BLEU
BLEU copied to clipboard
Calculate the Evaluation of Machine Translate--BLEU,the language includes Chinese and English
BLEU
Calculate the Evaluation of Machine Translate--BLEU,the language includes Chinese and English
BLEU -- BiLingual Evaluation Understudy, is a method to evaluate result of Machine Translate.
Calculate
- calculate the count_clip(n-gram)
Where count(n-gram) is the number of occurrences of an n-gram in the candidate translation, and MaxRefCount(n-gram) is the maximum number of occurrences of the n-gram in the reference translation. The final statistical result count_clip(n-gram) is the smaller of the two. - calculate the pn
- calculate the bp
- calculate BLEU
Usage
calculate English BLEU:
python bleu.py data/candidate_en.txt data/reference_en en
calculate Chinese BLEU:
python bleu.py data/candidate_ch.txt data/reference_ch ch
Reference
BLEU: a Method for Automatic Evaluation of Machine Translation