Skip to content

Commit

Permalink
Fixes #2571 (#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
shvms committed Dec 23, 2020
1 parent c97bca7 commit e562f62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nltk/translate/bleu_score.py
Expand Up @@ -541,8 +541,9 @@ def method2(self, p_n, *args, **kwargs):
In COLING 2004.
"""
return [
Fraction(p_i.numerator + 1, p_i.denominator + 1, _normalize=False)
for p_i in p_n
Fraction(p_n[i].numerator + 1, p_n[i].denominator + 1, _normalize=False)
if i != 0 else p_n[0]
for i in range(len(p_n))
]

def method3(self, p_n, *args, **kwargs):
Expand Down

0 comments on commit e562f62

Please sign in to comment.