Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix edge case error where there is no correct translation #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cedrou
Copy link

@cedrou cedrou commented Sep 11, 2018

When validating very early in the training, there is a good chance that the translation is completely wrong, that is with no correct translated words.
In this case, the script multi-bleu-detok.perl that computes the BLEU score displays the following messages:

Use of uninitialized value in division (/) at ../tools/moses-scripts/scripts/generic/multi-bleu-detok.perl line 148, <STDIN> line 1760.

The fix consists in initializing the arrays TOTAL and CORRECT to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant