rapidrouge
⚠️⚠️⚠️ This repository was build with AI ⚠️⚠️⚠️
A fast, pure-Python drop-in replacement for rouge-score.
uv add rapidrouge # pure-Python, ZERO runtime deps — installs anywhere
Optional extras: rapidrouge[stemmer] (nltk, for use_stemmer=True),
rapidrouge[aggregate] (numpy, for BootstrapAggregator), or rapidrouge[full].
Same import, same results as rouge_score 0.1.2 — ROUGE-L's
LCS length is computed with the Hyyrö bit-parallel algorithm, so it's far faster
on long documents:
from rapidrouge import rouge_scorer
scorer = rouge_scorer.RougeScorer(["rouge1", "rougeL"], use_stemmer=False)
scorer.score("the quick brown fox", "quick brown the fox")["rougeL"].fmeasure # 0.75
Benchmarks
ROUGE-L is where the bit-parallel kernel pays off, and the win grows with document length. From ~10× on a sentence to ~900× on a 35k-token document (115 ms vs ~104 s), with results identical to rouge_score:
It's a memory win too: the reference fills an O(n·m) DP table (~9.8 GB at 35k tokens), while rapidrouge's LCS is O(n). rouge1/
rouge2 (n-gram counting) and rougeLsum (still a DP table) match the reference in both correctness and speed (~1×), as expected — only ROUGE-L rides the Hyyrö kernel.
License
Apache-2.0. Portions derived from rouge_score (Apache-2.0); see NOTICE.
Metadata
Release files for rapidrouge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| rapidrouge-0.2.0.tar.gz | 14.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rapidrouge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.5 kB
Release files / rapidrouge-0.2.0.tar.gz
| Download URL | rapidrouge-0.2.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad429b0edfee200c8f186d2539a0edf6ac68931f12cc90359135be8b508a37a2
|
|
BLAKE2b-256 checksum How to use checksums |
d5da598bb5bc2bd77077c2983e07c4f7288670bde007d517f6322c61fa8af057
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logRelease files / rapidrouge-0.2.0-py3-none-any.whl
| Download URL | rapidrouge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a41860a482d6378a60de18567aa8da449beee26d260cdd5039afad2e745bf9fd
|
|
BLAKE2b-256 checksum How to use checksums |
79fc6ead02d72039cdeb398ef90a3b3181236876560d6e190bc550b708395055
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logSecurity for rapidrouge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for rapidrouge-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.