So you want to know how yasbd stacks up against the competition? Fair enough.

EN Golden benchmark

Aggregate score across all 92 English edge cases in EN_GOLDEN_DATA.py via run_golden.py. Expanded from pysbd's original 48 to 92 cases: we removed biased/wrong expectations (like splitting mid-ellipsis or bad punctuation in dialog) and added cases for abbreviation chains, contiguous terminators, exclamation-safe words, academic citations, and more.

The Passed column is a strict sentence-string equality check. Alongside it, we report boundary-level Precision, Recall, and F1 computed by scorer.py.

Boundary metric methodology

evaluate_segmentation scores against the positions where sentences end, not the sentence strings themselves, so a boundary that is merely shifted (e.g. trailing whitespace) still counts toward accuracy. Implementation:

  1. Word-level binary arrays. Every sentence is split into words. The final word of each sentence is marked 1 (a sentence boundary); all other words are marked 0.
  2. Alignment. If the model dropped or added words, the two arrays differ in length. The shorter array is right-justified with 0 padding so both arrays share the final word's boundary marker.
  3. Confusion counts. Each aligned word position is a True Positive (1/1), False Positive (0/1), or False Negative (1/0).
  4. Averages. TP/FP/FN are summed across all 92 cases, then Precision = TP ÷ (TP+FP), Recall = TP ÷ (TP+FN), and F1 = the harmonic mean of the two.

All three are bounded [0, 1]; they fall back to 0.0 when no useful boundary signal exists (e.g. an empty gold).

LibraryPassedPrecisionRecallF1
yasbd91/92 (98.9%)100.0%99.3%99.7%
pysbd77/92 (83.7%)90.5%97.3%93.8%
sentencex77/92 (83.7%)89.7%94.6%92.1%
blingfire75/92 (81.5%)86.7%93.2%89.8%
sentsplit61/92 (66.3%)89.9%85.0%87.4%
sentence-splitter60/92 (65.2%)80.1%90.5%85.0%
nupunkt59/92 (64.1%)77.9%91.2%84.0%
spacy-sentencizer51/92 (55.4%)75.7%89.1%81.9%

yasbd achieves 91/92 (98.9%). The only failing case is the Ave. abbreviation followed by a capitalized new sentence — a known limitation of rule-based abbreviation suppression.

Book benchmarks

Real-world performance on full-length books via bench_books.py.

Alice in Wonderland (148,208 chars)

LibraryCold (ms)Warm (ms)Sentences
blingfire33.45.7676
nupunkt2583.624.91592
pysbd730.8740.73378
sentence-splitter221.3221.53960
sentencex5.32.12014
sentsplit1330.61034.54170
spacy-sentencizer460.7267.41622
yasbd262.4248.71620

Adventures of Sherlock Holmes (593,911 chars)

LibraryCold (ms)Warm (ms)Sentences
blingfire24.424.45185
nupunkt157.9124.55092
pysbd9148.29161.514501
sentence-splitter4186.94102.716269
sentencex10.37.77142
sentsplit6664.44687.115961
spacy-sentencizer1572.9863.46900
yasbd1071.31178.15962

Posted Aug 16, 2026, 10:49 PM UTC

10
Loading comments…