1b135442947aa5db8aff360b4eb035d78df16cb9,translate.py,,main,#,42
Before Change
best_pred = n_best_preds[0]
best_score = pred_score[0]
os.write(1, bytes("PRED %d: %s\n" %
(sent_number, best_pred), "UTF-8"))
print("PRED SCORE: %.4f" % best_score)
if opt.tgt:
After Change
best_score = pred_score[0]
output = "PRED {}: {}\n".format(sent_number, best_pred)
os.write(1, output.encode("utf-8"))
print("PRED SCORE: {:.4f}".format(best_score))
if opt.tgt:
tgt_sent = " ".join(gold_sent)
output = "GOLD {}: {}\n".format(sent_number, tgt_sent)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: OpenNMT/OpenNMT-py
Commit Name: 1b135442947aa5db8aff360b4eb035d78df16cb9
Time: 2017-12-14
Author: anton@addstructure.com
File Name: translate.py
Class Name:
Method Name: main
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_expand_results_callback
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