c580b3d82dbddb8de16c2ad52ab65c7bd132e9e5,synonyms/synonyms.py,,_nearby_levenshtein_distance,#Any#Any#,209

Before Change


    scores = []
    if len(ft) == 0: return 0.0 // invalid length for first string
    for x in second:
        scores.append(max([_levenshtein_distance(x, y) for y in ft]))
    s = np.sum(scores) / maxlen
    return s

After Change


        for o in n[:5]:
            ft_1.add(o)
            
    ft_2 = set() // all related words with second sentence
    for x in second:
        ft_2.add(x)
        n, _ = nearby(x)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: huyingxi/Synonyms
Commit Name: c580b3d82dbddb8de16c2ad52ab65c7bd132e9e5
Time: 2018-04-28
Author: 531196781@qq.com
File Name: synonyms/synonyms.py
Class Name:
Method Name: _nearby_levenshtein_distance


Project Name: stellargraph/stellargraph
Commit Name: 61815b4142f99111096c429ba35c83812dad4567
Time: 2020-04-20
Author: Huon.Wilson@data61.csiro.au
File Name: tests/datasets/test_datasets.py
Class Name:
Method Name: test_mutag_load


Project Name: sassoftware/python-dlpy
Commit Name: d0e35b89aefbf665b9aff2a1777c3873b2bb4669
Time: 2019-05-16
Author: Wenyu.Shi@sas.com
File Name: dlpy/layers.py
Class Name: Res
Method Name: output_size