OpenNMT Forum

Getting BLEU score

Hi there,

I am running the OpenNMT v1.0.0.rc1 image2text model using the 100K dataset provided with the source code. I want to see the BLEU score of them. I tried LUA to get them but I want to use OpenNMT for this.
I have provided the flags
translator = build_translator(opt, report_score=True, report_time=True, report_bleu=True, report_rouge=True) enable the condition @line 414 of onmt/translate/
as they were not provided in the original source code, but I am not able to see any BLEU scores. I tried printing BLEU scores under self.report_bleu condition @ line414 but it is not printing anything.

May I request you to please let me know how will I be able to print BLEU scores.
Thank you in advance!:blush:

I think these options were never working properly. The easiest is probably to write your results and use sacrebleu to compute BLEU between your hyp and ref files.