Calculate the ROUGE score to evaluate text summarization quality against references.
ROUGE (Recall-Oriented Understudy for Gisting Evaluation) measures summarization quality by counting n-gram overlap between a generated summary and reference summaries. Unlike BLEU which emphasizes precision, ROUGE focuses on recall — what fraction of reference content appears in the candidate.
ROUGE-N
Recall = overlap_ngrams / reference_ngrams; F1 = 2*P*R/(P+R)
ROUGE-1 counts unigram overlap, ROUGE-2 counts bigram overlap (captures fluency), and ROUGE-L uses longest common subsequence (captures sentence structure) without requiring consecutive matches.
Use ROUGE for summarization tasks (where capturing reference content matters) and BLEU for translation tasks (where precision of generated text matters more).