24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_phrases,#Any#,30
Before Change
break
data += packet
received = pickle.loads(data)
all_phrases.extend(received)
print("vocab len = " + str(len(all_phrases)))
// print("Received: {}".format(received))
finally:
After Change
def get_phrases(top_n=100000):
global all_phrases
received = send_request_to_server("get_vocab")
// 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: 4
Non-data size: 4
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: 60ac44f9e688577d47ae506be06058a8916af100
Time: 2018-05-08
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/image_window.py
Class Name: ImageWindow
Method Name: _update_placeholders_dict
Project Name: OpenNMT/OpenNMT-py
Commit Name: a850f4a77146f79da97a151281e474ee0cd70d1b
Time: 2019-02-01
Author: guillaumekln@users.noreply.github.com
File Name: onmt/utils/loss.py
Class Name:
Method Name: filter_shard_state
Project Name: NervanaSystems/coach
Commit Name: 85afb86893ad241660b3ff7dc23fe5eb581a83ce
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: architectures/tensorflow_components/general_network.py
Class Name: GeneralTensorFlowNetwork
Method Name: get_model