Spaces:
Running
Running
File size: 1,636 Bytes
ba9518e 7280cef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ROUGE (rouge-score-rs)</title>
<style>
body { font-family: system-ui, -apple-system, sans-serif; max-width: 760px; margin: 40px auto; padding: 0 20px; line-height: 1.55; color: #1f2328; }
pre { background: #f6f8fa; padding: 14px 16px; border-radius: 6px; overflow-x: auto; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
a { color: #0969da; }
</style>
</head>
<body>
<h1>ROUGE (rouge-score-rs)</h1>
<p>An <a href="https://huggingface.co/docs/evaluate">Evaluate</a> metric with the same inputs, options and scores as
<a href="https://huggingface.co/spaces/evaluate-metric/rouge"><code>rouge</code></a>, computed with
<a href="https://pypi.org/project/rouge-score-rs/">rouge-score-rs</a>, a Rust implementation of Google's
<code>rouge-score</code>.</p>
<pre><code>pip install evaluate 'rouge-score-rs[aggregate]>=0.1.1'</code></pre>
<pre><code>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}</code></pre>
<p>Inputs, outputs, compatibility notes and examples are in the
<a href="https://huggingface.co/spaces/SyntaxSpirits/rouge/blob/main/README.md">metric card</a>.
Source code: <a href="https://github.com/SyntaxSpirits/rougers">SyntaxSpirits/rougers</a>.
Not affiliated with Google or Hugging Face.</p>
</body>
</html>
|