751ff35eb5faa6460038bb20a1ef6bfcf29f440a,jieba/analyse/__init__.py,,extract_tags,#Any#Any#Any#,62

Before Change


            continue
        freq[w] = freq.get(w, 0.0) + 1.0
    total = sum(freq.values())
    freq = [(k,v/total) for k,v in freq.iteritems()]

    tf_idf_list = [(v*idf_freq.get(k,median_idf), k) for k,v in freq]
    st_list = sorted(tf_idf_list, reverse=True)

    if withWeight:
        tags = st_list[:topK]
    else:
        top_tuples = st_list[:topK]
        tags = [a[1] for a in top_tuples]
    return tags

After Change


        freq[k] *= idf_freq.get(k, median_idf) / total

    if withWeight:
        tags = sorted(freq.items(), key=itemgetter(1), reverse=True)
    else:
        tags = sorted(freq, key=freq.__getitem__, reverse=True)
    if topK:
        return tags[:topK]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: fxsjy/jieba
Commit Name: 751ff35eb5faa6460038bb20a1ef6bfcf29f440a
Time: 2014-10-31
Author: abcdoyle888@gmail.com
File Name: jieba/analyse/__init__.py
Class Name:
Method Name: extract_tags


Project Name: sentinel-hub/eo-learn
Commit Name: 889cde4a62dbcedbb5856ed3b295b742031074ac
Time: 2019-10-11
Author: jovan.visnjic@sinergise.com
File Name: io/eolearn/io/processing_api.py
Class Name: Sentinelhub16bitInput
Method Name: execute


Project Name: OpenNMT/OpenNMT-py
Commit Name: 685126644ae540be72eb662527269a0395e2c9eb
Time: 2017-09-05
Author: bpeters@coli.uni-saarland.de
File Name: onmt/IO.py
Class Name:
Method Name: make_features


Project Name: explosion/prodigy-recipes
Commit Name: 06e5e82f9e649dae5207e6ff0e847134b3b2a836
Time: 2019-12-14
Author: ines@ines.io
File Name: ner/ner_silver_to_gold.py
Class Name:
Method Name: ner_silver_to_gold