63871d5ab3301d015805abddd8f4259680d6a24a,translate.py,,main,#,68
Before Change
if opt.n_best > 1:
print("\nBEST HYP:")
for n in range(opt.n_best):
os.write(1, bytes("[%.4f] %s\n" % (pred_score[n],
" ".join(pred_sents[n])),
"UTF-8"))
report_score("PRED", pred_score_total, pred_words_total)
if opt.tgt:
report_score("GOLD", gold_score_total, gold_words_total)
After Change
for pred_sents, gold_sent, pred_score, gold_score, src_sent in z_batch:
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:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
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: idaholab/raven
Commit Name: 5fb490891cdd267b61c85f612e28583ac1580d62
Time: 2018-11-08
Author: joshua.cogliati@inl.gov
File Name: framework/CodeInterfaces/MooseBasedApp/MOOSEparser.py
Class Name: MOOSEparser
Method Name: printInput
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: theislab/scanpy
Commit Name: 0947ab294710b6eb8865534de15b0c67cc3f912b
Time: 2019-05-16
Author: flying-sheep@web.de
File Name: scanpy/readwrite.py
Class Name:
Method Name: write_params
Project Name: geekcomputers/Python
Commit Name: 3dfdfaa6db730f66bdff5155320d4c4ee5d5b29c
Time: 2020-09-20
Author: markhappy200@gmail.com
File Name: EncryptionTool.py
Class Name:
Method Name: