d3266d6e0ff7d771bd408631f7849e2e4500bebd,conceptnet5/vectors/transforms.py,,make_replacements_faster,#Any#Any#Any#Any#,114
Before Change
if verbose:
random.seed(20)
for replacement_pair in random.sample(replacements.items(), 50):
print(replacement_pair)
return replacements
def make_replacements(small_frame, big_frame):
After Change
for term in big_frame.index:
if term not in small_frame.index:
most_similar_index = index.get_nns_by_vector(big_frame.loc[term], 1)[0]
most_similar = index_map[most_similar_index]
replacements[term] = most_similar
if verbose and not (len(replacements) % 1001):
print("{} ==> {}".format(term, most_similar))
return replacements
def make_replacements(small_frame, big_frame):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: commonsense/conceptnet5
Commit Name: d3266d6e0ff7d771bd408631f7849e2e4500bebd
Time: 2017-06-16
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: make_replacements_faster
Project Name: estnltk/estnltk
Commit Name: 7dda2e7e471179d22e748f5054679af5c0214870
Time: 2015-07-01
Author: karl.valliste@gmail.com
File Name: estnltk/prettyprinter/prettyprinter.py
Class Name: PrettyPrinter
Method Name: __init__
Project Name: dmlc/dgl
Commit Name: ac932c665b0a06ea9e222136351f52b5d6772ed0
Time: 2018-12-02
Author: coin2028@hotmail.com
File Name: examples/pytorch/jtnn/vaetrain_dgl.py
Class Name:
Method Name: train