Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Update BLEU evaluation to suppress annoying warning. (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenroller committed Jul 11, 2018
1 parent 8b8d651 commit d97ff00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parlai/core/metrics.py
Expand Up @@ -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,
)


Expand Down

0 comments on commit d97ff00

Please sign in to comment.