[AI] Normalize validator input before scoring#34
Merged
Conversation
Contributor
Points performanceResultsPointsPerformance comparison
Language.points(for:) TimeMedian ns/word, lower is better.
|
Owner
Author
|
PointsPerformance comparison
Language.points(for:) TimeMedian ns/word, lower is better.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 93.70% 93.77% +0.06%
==========================================
Files 35 35
Lines 1875 1862 -13
==========================================
- Hits 1757 1746 -11
+ Misses 118 116 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Summary
Normalize validator input before DAWG lookup and scoring, including canonical precomposition, lowercasing, and deterministic French diacritic folding with
fr_FR.Move decomposed Unicode handling out of
Language.points(for:), keeping scoring optimized for normalized inputs and DAWG-produced words.Update
Scripts/points-performanceand docs so the scoring benchmark measures normalized scoring inputs instead of raw decomposed input.Why
Raw decomposed Unicode should be handled at user-input boundaries, not inside the scoring hot path that runs across search results.
Impact
Validator.check,words(from:), andregex(phrase:)now share the same normalization path before dictionary lookup.Language.points(for:)is simpler and avoids precomposition fallback work. The points benchmark now reports realistic scoring workloads and checksum status.