Repository navigation
Migrate scoring APIs to double precision for v6.0.0 - #32
Merged
Merged
Conversation
- add bulk character population and ASCII fast paths - lazily allocate non-ASCII storage - rename benchmark labels to Raffinert.FuzzySharp - update v6 migration documentation and PR summary
ancgate
pushed a commit
to ancgate/Fuzzion
that referenced
this pull request
Nov 4, 2026
…token sort order Plan items Raffinert#31 and Raffinert#32 (Phase 7). - StringPreprocessor.RemoveDiacritics (NFD, drop combining marks, NFC, plus ß/æ/œ/ø/ł/đ/þ spelled out) and StringPreprocessor.Compose. - StringPreprocessor.FullUnicode, matching RapidFuzz's default_process: Python's isalnum (keeps ², ½, Ⅻ), simple lowercase mapping (İ -> i, which .NET's invariant casing leaves unchanged), whole characters outside the BMP. Full is unchanged. - CodePoints.Compare(a, b, metric) / CodePoints.Scorer(scorer): compare by code point with any metric or scorer, by replacing each distinct character outside the BMP with an unused private-use character, in code point order. Chosen over a TextUnit enum overload, which would make Fuzz.Ratio(a, b, 0) ambiguous. Fix: token scorers sorted words with the current culture instead of ordinally (Python sorts by code point), so mixed-case or accented words scored differently from RapidFuzz and results could depend on the machine's culture. TokenSortRatio("Zoo apple", "apple zoo") was 88.9, now 55.6 as in RapidFuzz. Inherited from Raffinert.FuzzySharp; found because code-point token scores disagreed with the oracle. Oracle: new unicode-cases.json with 300 emoji/CJK Extension B/Deseret pairs (7 metrics via CodePoints), 300 default_process strings and 200 mixed-case sentence pairs for the token scorers. All match. The two token-sort tests fail when the old culture-sensitive sort is restored. All 5,628 tests pass on net8.0 and net10.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016t3BEHkMD2QGVHNJcT4FuL
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.
Closes #28
Summary
Fuzzmethods, extraction results, and extraction cutoffs frominttodoublescoreCutofffrom the Indel, Levenshtein, longest-common-subsequence, and partial-ratio APIs6.0.0.nupkgand.snupkgfiles as GitHub Actions artifacts onlyBreaking changes
doubleFuzzmethods now return fractionaldoublescores instead of rounded integersExtractedResult<T>.Score, scorer delegates, and extraction cutoff parameters now usedoublescoreCutoffparameters have been removed from the distance and partial-ratio APIsIRatioScorer,ICachedRatioScorer, and their generic variants must update theirScorereturn types todoubleValidation
netframework4.6.2,netframework4.7.2,net8.0, andnet10.0(20,504 total test executions)Raffinert.FuzzySharp.6.0.0.nupkgandRaffinert.FuzzySharp.6.0.0.snupkg