diff --git a/parlai/core/metrics.py b/parlai/core/metrics.py index ae4fab29dea..7c0bd50cab4 100644 --- a/parlai/core/metrics.py +++ b/parlai/core/metrics.py @@ -85,7 +85,8 @@ def _bleu(guess, answers): # works with strings, which is better suited for this module. return nltkbleu.sentence_bleu( [normalize_answer(a).split(" ") for a in answers], - normalize_answer(guess).split(" ") + normalize_answer(guess).split(" "), + smoothing_function=nltkbleu.SmoothingFunction(epsilon=1e-12).method1, )