24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_phrases,#Any#,30
Before Change
sock.sendall(bytes("get_vocab" + "\n", "utf-8"))
// Receive data from the server and shut down
data = b""
while True:
packet = sock.recv(4096)
if not packet:
break
data += packet
received = pickle.loads(data)
all_phrases.extend(received)
print("vocab len = " + str(len(all_phrases)))
// print("Received: {}".format(received))
After Change
// all_phrases.extend(x for x in received if len(x) < max_phrase_length)
all_phrases=received
for p in all_phrases:
if len(p) < max_phrase_length:
all_phrases_dict[p] = p
all_cut_phrases_dict[p] = p
else:
all_phrases_dict[p] = p[:max_phrase_length] + "..."
all_cut_phrases_dict[p[:max_phrase_length] + "..."] = p
print("done. vocab count = " + str(len(all_phrases)))
// pp = pprint.PrettyPrinter()
// pp.pprint(all_phrases_dict)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_phrases
Project Name: NifTK/NiftyNet
Commit Name: bd333dd43d69b26015eb3f201afe1772ba701a41
Time: 2018-05-07
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/contrib/dataset_sampler/sampler_uniform_v2.py
Class Name: UniformSampler
Method Name: layer_op
Project Name: keras-team/autokeras
Commit Name: 4b83c1070cebd0d996ba2cc69779dcb66d5d0032
Time: 2018-05-29
Author: jhfjhfj1@gmail.com
File Name: autokeras/classifier.py
Class Name: ClassifierBase
Method Name: fit