Modified n-gram precision
ID: modified-n-gram-precision
Modified n-gram precision measures reference-matched candidate n-grams while clipping repeated occurrences to the evidence available in the references. It is the precision component of BLEU. Merely asking whether a word appears anywhere in a reference would otherwise reward repeating that word indefinitely.[ref]
BLEU: a Method for Automatic Evaluation of Machine Translation by Kishore Papineni and others. §2.1 and footnote 2, clipped occurrence counts
For candidate sentence , let count n-gram , and let count it in reference . Its clipped match count isUse the maximum count in one reference for each n-gram, rather than adding counts across references. Corpus precision sums these clipped matches and divides by the total candidate n-gram count of that length, provided this denominator is nonzero. An implementation needs a stated convention when no candidate n-grams of that length exist.[ref]
For an own example, take reference
the cat the mat and candidate the the the cat. The candidate has three occurrences of the, but only two can match; cat contributes one more. Thus modified unigram precision is , whereas an unrestricted word-membership check would misleadingly credit all four words.The candidate's three bigram occurrences are
the the twice and the cat once. Only the last matches, giving modified bigram precision . Longer n-grams therefore test ordering distinctions that unigram counts cannot capture. New to topics? Read the docs here!