Measures translation quality by comparing the n-gram precision of a candidate text to reference translations, penalizing overly short outputs.
output
(str): The generated text to be evaluated.expectedOutput
(str): The reference or ground truth text.Result
(float): A score between 0 and 1.