Loading...
Calculate the ROUGE-1 F1 score between a generated summary and a reference summary.
ROUGE-1 measures unigram overlap:
All comparisons are case-insensitive. Round the F1 score to 4 decimal places.
Input format:
the cat sat on the mat the cat is on the mat
0.8333
Step 1: Extract unigrams Generated: {the:2, cat:1, sat:1, on:1, mat:1} → 6 words Reference: {the:2, cat:1, is:1, on:1, mat:1} → 6 words
Step 2: Count matches (min count per word) the: min(2,2)=2, cat: min(1,1)=1, on: min(1,1)=1, mat: min(1,1)=1 Total matches: 5
Step 3: Compute scores Precision = 5/6, Recall = 5/6 F1 = 2 * (5/6) * (5/6) / (5/6 + 5/6) = 5/6 ≈ 0.8333