63871d5ab3301d015805abddd8f4259680d6a24a,translate.py,,main,#,68
Before Change
for pred_sents, gold_sent, pred_score, gold_score, src_sent in z_batch:
count += 1
for n in range(opt.n_best):
out_file.write(" ".join(pred_sents[n]) + "\n")
out_file.flush()
if opt.verbose:
words = []
After Change
n_best_preds = [" ".join(pred) for pred in pred_sents[:opt.n_best]]
count += 1
out_file.write("\n".join(n_best_preds))
out_file.write("\n")
out_file.flush()
if opt.verbose:
words = get_src_words(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: OpenNMT/OpenNMT-py
Commit Name: 63871d5ab3301d015805abddd8f4259680d6a24a
Time: 2017-09-21
Author: bpeters@coli.uni-saarland.de
File Name: translate.py
Class Name:
Method Name: main
Project Name: streamlit/streamlit
Commit Name: b52d4c522b1d669783b6250c47a189c293ced625
Time: 2018-06-18
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/reference.py
Class Name:
Method Name: display_reference
Project Name: hanxiao/bert-as-service
Commit Name: 0a6b1bd320c996a9fca13a2e3b6611aa8cde7506
Time: 2019-01-21
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name: