You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NLTK3.5 implements smoothing method 4 proposed in the paper [https://www.aclweb.org/anthology/W14-3346/ ].
However, we suspect that the implementation is incorrect. The code at
) # Note that this K is different from the K from NIST.
p_n[i] =incvnt/p_i.denominator
is problematic.
This leads to the p_n[i] greater than 100% in some case. When hyp_len < 4 in 4-gram, p_n[i] can be assigned with a percentage number that is much greater than 100% (or even > 500%).
In fact, the p_n[i] should not be greater than 100%.
The correct implementation is p_n[i] = (1 / incvnt) / p_i.denominator in line585.
The text was updated successfully, but these errors were encountered:
NLTK3.5 implements smoothing method 4 proposed in the paper [https://www.aclweb.org/anthology/W14-3346/ ].
However, we suspect that the implementation is incorrect. The code at
nltk/nltk/translate/bleu_score.py
Lines 582 to 585 in d0f54c2
This leads to the p_n[i] greater than 100% in some case. When hyp_len < 4 in 4-gram, p_n[i] can be assigned with a percentage number that is much greater than 100% (or even > 500%).
In fact, the p_n[i] should not be greater than 100%.
The correct implementation is p_n[i] = (1 / incvnt) / p_i.denominator in line585.
The text was updated successfully, but these errors were encountered: