Input

  • output (str): The generated text
  • expectedOutput (str): The reference text

Output

  • Result (float): A score between 0 and 1.

Interpretation

  • Higher scores (closer to 1): Better unigram overlap with the reference (more content coverage)
  • Lower scores (closer to 0): Poor unigram overlap

Formula

ROUGE-1=Count of overlapping unigramsTotal unigrams in reference\mathrm{ROUGE\text{-}1} = \frac{\text{Count of overlapping unigrams}}{\text{Total unigrams in reference}}
This is a Similarity Metric

Use Cases

  • Evaluating automatic text summarization
  • Assessing machine translation quality