fcd6b2bc97933cb686977e8b95e2bef2e99b5ea9,run_tgen.py,,eval_tokens,#Any#Any#,533
Before Change
def eval_tokens(eval_tokens, gen_tokens):
// TODO TODO TODO
raise NotImplementedError()
def rerank_cl_eval(args):
After Change
log_info("BLEU score: %.4f" % (evaluator.bleu() * 100))
evaluator = Evaluator()
for pred_sent, gold_sents in zip(gen_tokens, eval_tokens):
for gold_sent in gold_sents: // effectively an average over all gold paraphrases
evaluator.append(gold_sent, pred_sent)
log_info("TOKEN precision: %.4f, Recall: %.4f, F1: %.4f" % evaler.p_r_f1(EvalTypes.TOKEN))
log_info("Sentence length stats:\n * GOLD %s\n * PRED %s\n * DIFF %s" % evaler.size_stats())
log_info("Common subphrase stats:\n -- SIZE: %s\n -- ΔGLD: %s\n -- ΔPRD: %s" %
evaler.common_substruct_stats())
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: UFAL-DSG/tgen
Commit Name: fcd6b2bc97933cb686977e8b95e2bef2e99b5ea9
Time: 2016-04-21
Author: odusek@ufal.mff.cuni.cz
File Name: run_tgen.py
Class Name:
Method Name: eval_tokens
Project Name: stanfordnlp/stanza
Commit Name: 1f3006445eb4570231e1591c6021ea7091c9c8d7
Time: 2018-08-28
Author: qipeng@users.noreply.github.com
File Name: models/common/vocab.py
Class Name: CompositeVocab
Method Name: id2unit
Project Name: apache/incubator-mxnet
Commit Name: f70c7b7b1e246e32e322ba059f8bf0e5d01a22be
Time: 2020-02-29
Author: szhengac@users.noreply.github.com
File Name: python/mxnet/optimizer/optimizer.py
Class Name: Optimizer
Method Name: update
Project Name: mil-tokyo/webdnn
Commit Name: 7a0de7195392dd0cbd98535f281e13ff265da918
Time: 2017-08-01
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/frontend/chainer/functions/array.py
Class Name:
Method Name: _convert_split_axis