BLEU score calculator for evaluating the accuracy of machine translation of different languages.
- Implemented a BLEU score calculator for evaluating the accuracy of machine translation of different languages, as defined in the paper.
- Calculated BLEU score fully matches the true BLEU score.
Core Technology: Python.
Many reference translations can be found from EUROPARL corpus.
The candidate translations can be obtained by taking the corresponding English sentences from the reference translations and running them through Google Translate.
calculatebleu.py takes two paramaters:
-
path to the candidate translation (a single file).
-
path to the reference translations (either a single file, or a directory if there are multiple reference translations).
> python calculatebleu.py /path/to/candidate /path/to/reference
BLEU score of the candidate translation relative to the set of reference translations is written to an output file called bleu_out.txt.