Complete the code to import the BLEU score function from nltk.
from nltk.translate.bleu_score import [1]
The function sentence_bleu is used to calculate BLEU score for a single sentence.
Complete the code to define the reference translations list for BLEU score calculation.
references = [[[1]]]References must be a list of tokenized sentences, so a list of lists of words.
Fix the error in the candidate sentence tokenization for BLEU score calculation.
candidate = [1]The candidate sentence must be a list of tokens (words) for BLEU calculation.
Fill both blanks to calculate the BLEU score for the candidate against references.
score = sentence_bleu([1], [2])
The first argument is the list of reference sentences, the second is the candidate sentence.
Fill all three blanks to print the BLEU score rounded to 2 decimals with a message.
print(f"BLEU score: [1]([2], 2)[3]")
Use round(score, 2) to round the BLEU score, then concatenate with the message.