'a dog, it is'.split()]candidate='it is dog'.split()print('BLEU score -> {}'.format(sentence_bleu(reference,candidate)))candidate='it is a dog'.split()print('BLEU score -> {}'.format(sentence_bleu(reference,candidate)))
How to Calculate the BLEU Score in Python Word Error Rate in Python Check the complete code here.Happy learning ♥Just finished the article? Why not take your Python skills a notch higher with our Python Code Assistant? Check it out!
Automatic BLEU and COMET estimation of translation quality If you want to test different plugins translation quality on your pair of languages - you can do it! (Supported over 100 languages from FLORES dataset) If you have your own plugin - you can compare it with others!