Skip to content

rougers 0.2.1

Latest

Choose a tag to compare

@kholdrex kholdrex released this 11 Oct 04:21
· 2 commits to main since this release
8ddaec4

About 2.5 times faster on one core, with identical scores.

  • Tokens are written into one buffer per text and interned without a string per token;
    stemming works in place.
  • rouge1 counts in a dense array and rouge2 uses packed bigram keys; rougeL uses
    Hyyrö's bit-parallel LCS, with a linear-memory fallback for very large inputs.
  • The Python binding builds the result dicts in Rust.
  • Scorers pickled by 0.1.0 load correctly.

On CNN/DailyMail, XSum and PubMed samples (2,000 pairs each, M1 Pro) scoring is now 30–80× faster than rouge-score on one core and 80–350× with eight threads, and faster than rouge-rust on the ROUGE-1/2/L subset it supports. Details in BENCHMARKS.md.

pip install -U rouge-score-rs