diff options
author | Chris Dyer <redpony@gmail.com> | 2015-03-05 15:15:28 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2015-03-05 15:15:28 -0500 |
commit | 62b8b8e72c66da104e51d302ac41d1466b5d35ef (patch) | |
tree | cc343c34192ba455ccd0df842be25f343a508ce9 /training | |
parent | 3d2a60701f053fc35130711e88d9fcb29f29e274 (diff) |
fix extra logging
Diffstat (limited to 'training')
-rwxr-xr-x | training/mira/mira.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/training/mira/mira.py b/training/mira/mira.py index ccecb10e..32478c4f 100755 --- a/training/mira/mira.py +++ b/training/mira/mira.py @@ -22,23 +22,9 @@ dlog = None #scoring function using pycdec scoring def fast_score(hyps, refs, metric): - #scorer = cdec.score.Scorer(metric) - #logging.info('loaded {0} references for scoring with {1}'.format( - # len(refs), metric)) - #if metric=='BLEU': - # logging.warning('BLEU is ambiguous, assuming IBM_BLEU\n') - # metric = 'IBM_BLEU' - #elif metric=='COMBI': - # logging.warning('COMBI metric is no longer supported, switching to ' - # 'COMB:TER=-0.5;BLEU=0.5') - # metric = 'COMB:TER=-0.5;BLEU=0.5' - #stats = sum(scorer(r).evaluate(h) for h,r in itertools.izip(hyps,refs)) - #logging.info('Score={} ({})'.format(stats.score, stats.detail)) - #return stats.score cmd = ('{0} -r{1} -i {2} -m {3}').format(fast_score_binary, refs, hyps, metric) proc = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE) o = proc.stdout.readline().strip() - print 'res: ', o return float(o) #create new parallel input file in output directory in sgml format |