24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_phrases,#Any#,30
Before Change
def get_phrases(top_n=100000):
global all_phrases
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
// Connect to server and send data
sock.connect(("localhost", 1111))
print("sending a get_vocab request")
sock.sendall(bytes("get_vocab" + "\n", "utf-8"))
// Receive data from the server and shut down
data = b""
After Change
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: 7
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: hanxiao/bert-as-service
Commit Name: dd3c13d51975d7ca569681dd19639473d19e8e85
Time: 2018-12-14
Author: hanhxiao@tencent.com
File Name: server/bert_serving/server/__init__.py
Class Name: BertWorker
Method Name: run1
Project Name: hanxiao/bert-as-service
Commit Name: 367ee86aeea0dc510f01ce0ef58dc551d1d4d86b
Time: 2018-11-21
Author: hanhxiao@tencent.com
File Name: service/server.py
Class Name: BertServer
Method Name: run