Skip to content

Autocorrect: learned words no longer hijack corrections; add סגטק→סגור — v2.5.7 - #71

Merged
KEZO555 merged 1 commit into
mainfrom
claude/light-keyboard-project-ZsCx2
Jul 28, 2026
Merged

Autocorrect: learned words no longer hijack corrections; add סגטק→סגור — v2.5.7#71
KEZO555 merged 1 commit into
mainfrom
claude/light-keyboard-project-ZsCx2

Conversation

@KEZO555

@KEZO555 KEZO555 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Why "Hebrew autocorrect feels off"

Two linked problems, both traced empirically:

1. Typos in "my words" were hijacking corrections (the big one)

A learned word is a correction target with weight count × 50,000. Many real Hebrew words are far less frequent than that (e.g. סגור ≈ 10,800), so a typo that slipped into "my words" could outrank real words and pull corrections toward itself. As "my words" fills with mistakes, this gets worse — exactly the "feels off" you described.

Fix: isDictWord (the "correct-to" gate) is now base-dictionary only. Corrections only ever land on a real listed word. Learned words are still left alone (never autocorrected away — isWord unchanged), they just can't be a target anymore. A typo in "my words" can no longer corrupt other words' corrections.

2. סגטק → סגור wasn't corrected

It's two adjacent-key slips (ט→ו, ק→ר) — edit distance 2, which the edit-1 corrector can't reach. I measured a blanket 2-edit corrector against the real dictionary: ~21% wrong (picks a different common word), too erratic to auto-apply. So this is a curated confusion entry, the safe fix — same as מאציו→מאמין.

What you should do on-device

Your "my words" has accumulated mistakes from older versions. Once on 2.5.7, open My words and use "Clear all" to wipe the pollution — going forward, learning stays conservative and the auto-prune keeps it clean. (After clearing, סגטק will correct to סגור, since it's no longer a learned word.)

Pinned cases still pass (מאציו, נרעה, צה→מה, אנט→אני, teh, wich), plus the new סגטק→סגור.

Version → 2.5.7. Holding merge until CI confirms the build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Unbc3zuLA7kfCnaBL4pCHF


Generated by Claude Code

…→סגור

Two fixes for "Hebrew autocorrect feels off" + typos piling up in "my words":

1. A learned word (weight = count × 50k) was a valid correction TARGET, so a typo
   that slipped into "my words" could outrank real words — many Hebrew words are
   far less frequent than 50k (e.g. סגור ≈ 10.8k) — and hijack corrections,
   pulling real words toward the typo. Now isDictWord is base-dictionary only:
   corrections only ever land on a real listed word. Learned words are still left
   alone (isWord unchanged), just never a target. This also stops a typo in
   "my words" from corrupting other words' corrections.

2. Add the curated override סגטק→סגור (ט→ו and ק→ר, both adjacent-key slips — two
   edits, which the edit-1 corrector can't reach; a blanket 2-edit corrector is
   ~21% wrong on the real dictionary, so a curated entry is the safe fix).

Existing pinned cases still pass; a learned typo can no longer win as a target.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Unbc3zuLA7kfCnaBL4pCHF
@KEZO555
KEZO555 merged commit 7e99260 into main Jul 28, 2026
1 check passed
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