Repository navigation
perf(coreference): avoid rebuilding growing regex alternations - #92
Open
mazzasaverio wants to merge 4 commits into
Open
mazzasaverio wants to merge 4 commits into
mazzasaverio wants to merge 4 commits into
Conversation
mazzasaverio
marked this pull request as ready for review
October 2, 2026 06:18
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Coreference detection rebuilt a regex alternation containing every learned token for every block. Replace that with a Unicode word scan and exact dictionary lookup, preserving offsets, case, confidence and boundaries. Add generated equivalence tests and a comparative benchmark at 100, 1,000 and 10,000 tokens. Large scopes improve locally; small scopes can be slightly slower.
Validation: 6 focused tests and 6 benchmark cases passed. Full CI passed 527 tests per matrix job with 95.00% to 95.07% coverage, plus quality, docs, performance, property, packaging and installed-wheel checks: https://github.com/ma2za/pseudonymize/actions/runs/36972557134 . No detection-quality improvement is claimed.
Current review status
Review priority: 6 of 9; PR #100 is the packaging prerequisite. Updated against main
17e8fccwhile preserving development version 1.37.0 and the hosted-service changes. Includes the shared service-extra audit correction from #100. No PR has been merged.Current branch validation: 17 focused tests passed; Ruff formatting/lint, mypy, wheel/sdist builds and release verification passed. All six comparative coreference benchmark cases passed; these measure lookup cost and do not establish a detection-quality improvement. Fresh CI on the current head completed with 18 successful checks, one skipped check, and no failures.