ROUGE (rouge-score-rs)

An Evaluate metric with the same inputs, options and scores as rouge, computed with rouge-score-rs, a Rust implementation of Google's rouge-score.

pip install evaluate 'rouge-score-rs[aggregate]>=0.1.1'
import evaluate

rouge = evaluate.load("SyntaxSpirits/rouge")
results = rouge.compute(
    predictions=["hello there", "general kenobi"],
    references=["hello there", "general kenobi"],
)
print(results)  # {'rouge1': 1.0, 'rouge2': 1.0, 'rougeL': 1.0, 'rougeLsum': 1.0}

Inputs, outputs, compatibility notes and examples are in the metric card. Source code: SyntaxSpirits/rougers. Not affiliated with Google or Hugging Face.