Skip to content

rougers 0.1.0

Choose a tag to compare

@kholdrex kholdrex released this 11 Oct 00:41
· 8 commits to main since this release
544a397

First release.

rougers is a Rust implementation of ROUGE whose scores are bit-for-bit identical to Google's rouge-score, including its tokenizer, NLTK's Porter stemmer and the summary-level rougeLsum.

Install

pip install rouge-score-rs
from rouge_score_rs import rouge_scorer  # was: from rouge_score import rouge_scorer

Rust: rougers = "0.1" (crates.io).

Highlights

  • rouge1–rouge9, rougeL and rougeLsum, with the same rouge_scorer, scoring, tokenize and tokenizers modules as rouge-score.
  • score_batch scores many pairs on all CPU cores without holding the GIL.
  • No required Python dependencies; NumPy and NLTK are optional extras for bootstrap aggregation and split_summaries.
  • Wheels for Linux (x86_64, aarch64, glibc and musl), macOS (Intel and Apple Silicon) and Windows, for Python 3.9 and newer.

Performance

10,000 English text pairs, about 60 words each, rouge1, rouge2, rougeL, rougeLsum with stemming, Apple M1 Pro:

pairs per second speedup
rouge-score 0.1.2 590 1×
score() 17,078 29×
score_batch(), 8 threads 83,957 142×

See the README for how compatibility is tested and the few known differences.