Skip to content

Improve auto-correction (swapped/doubled letters, multilingual) and add a benchmark - #1022

Closed
LeanBitLab wants to merge 5 commits into
mainfrom
feat/autocorrect-bench
Closed

LeanBitLab wants to merge 5 commits into
mainfrom
feat/autocorrect-bench

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Auto-correction fixes

  • Unknown words of 4+ letters: a candidate that only needs two letters swapped (novles -> novels) or a doubled letter removed (bandd -> band) wins if the decoder rates it nearly as high. The user's own words, shortcuts, dictionary replacements and contractions stay first.
  • Multilingual, tie: both languages were weighted below 0.99, where the native decoder corrects no missing space and searches less. The leading (first when tied) language now keeps full weight. The others are weighted as before.
  • Multilingual: no auto-correction into three or more words (it stays available as suggestion).

Benchmark

tools/autocorrect_bench replays seeded typos through the real keyboard, native decoder and Suggest (debug-only receiver). See its README.

Measured on Waydroid, on seeds not used for tuning

  • English only: 89.3% -> 91.1% and 91.4% -> 92.2% of typos corrected (15 better / 2 worse, 7 / 1).
  • English + Slovak, fresh start: 64.2% -> 77.1% (94 better / 3 worse). No Slovak case got worse.

Checks

SuggestTest, InputLogicTest, DictionaryGroupTest, LikelySlipTest, ShortWordGuardTest pass; offline flavor compiles. Not tested: swipe typing (the tie weight applies to it too) and a physical phone.

@LeanBitLab

Copy link
Copy Markdown
Owner Author

Replaced by #1023, which has only the fixes.

@LeanBitLab LeanBitLab closed this Nov 30, 2026
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.

1 participant