Skip to content

Benchmarking against nlp_uk - #5

Closed
proger wants to merge 1 commit into
lang-uk:mainfrom
proger:main-args
Closed

proger wants to merge 1 commit into
lang-uk:mainfrom
proger:main-args

Conversation

@proger

@proger proger commented Oct 15, 2022 •

Copy link
Copy Markdown
Contributor

I benchmarked three branches (main, experiments and #4) with this patch on a file with 100k lines.

I got the best results with code from #4 using AccurateSrxTextIterator clocked at 141.82s. tokenize_text from nlp_uk clocks at 54.58s. If I disable word segmentation (remove -u -w) nlp_uk clocks at 35.324s.

This code generates a bit less sentences on that dataset: 84452 from nlp_uk vs 84018 in choppa. See sentence-wise diff.

Here's the full log: https://gist.github.com/proger/2fa3ead52dc78b7d582cd356d9f423e9

- --line-by-line is now opt-in
- options to choose iterators and their hyperparams for benchmarking
@proger proger changed the title Benchmarking with more command line arguments Benchmarking vs nlp_uk Oct 15, 2022
@proger proger changed the title Benchmarking vs nlp_uk Benchmarking against nlp_uk Oct 15, 2022
dchaplinsky added a commit that referenced this pull request Jul 4, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dchaplinsky

Copy link
Copy Markdown
Contributor

Superseded by scripts/benchmark.py on main (which also byte-diffs against the Java segment output), and the CLI improvements from this PR (line-by-line mode, iterator selection) landed as part of the choppa console script in #6 — thank you!

Fresh numbers on 100k lines / 11 MB: 4.7s for SrxTextIterator (vs 141.8s for the best 2022 configuration and ~55s for nlp_uk), output byte-identical to Java. The sentence-count gap this benchmark exposed (84,018 vs 84,452) was the thread that led to the 100-char window bug — this PR earned its keep.

@dchaplinsky dchaplinsky closed this Jul 5, 2026
dchaplinsky added a commit that referenced this pull request Jul 5, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants