Skip to content

Hebrew: auto-prune lingering learned typos (אנט→אני) — v2.5.5 - #69

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

Hebrew: auto-prune lingering learned typos (אנט→אני) — v2.5.5#69
KEZO555 merged 1 commit into
mainfrom
claude/light-keyboard-project-ZsCx2

Conversation

@KEZO555

@KEZO555 KEZO555 commented Jul 21, 2026

Copy link
Copy Markdown
Owner

The bug

אנט doesn't autocorrect to אני. But the engine already handles itbestCorrection("אנט") returns אני at cost 1 (adjacent-key slip ט→י; אני is freq ~4.5M). The real cause: אנט is saved in "my words", so it counts as a known word and is never corrected — leftover pollution from the old over-eager learning (fixed in 2.3.5).

The 2.3.6 auto-prune only dropped learned words the dictionary already contains; a genuine non-word typo like אנט survived it.

The fix

Extend the load-time prune (Hebrew only) to also drop a learned, non-dictionary word that is one transposition/adjacent-key slip from a common dictionary word (freq ≥ 50k). So אנט self-heals on the next launch and autocorrects to אני again.

Conservative — validated against the real dictionary:

  • אנטpruned (→ אני, cost 1, freq 4.5M) ✓
  • מאציוkept (its only cheap neighbour is rare — left for the confusion map, not mis-pruned) ✓
  • real words (כלב) → kept

A word you truly want is re-learned by retyping it. English is unaffected (its far larger frequency counts would over-match) and stays covered by the interactive "replace + forget" bar chip from 2.3.6. Pinned in a corpus test.

Version → 2.5.5 (rebased onto current main; note main had advanced to 2.5.4 with your recent work).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Unbc3zuLA7kfCnaBL4pCHF


Generated by Claude Code

…(אנט→אני)

The engine already corrects אנט→אני (one adjacent-key slip, אני freq ~4.5M), but
if אנט was saved to "my words" by the old over-eager learning it counts as a
known word and is never corrected. The existing prune only dropped learned words
the dictionary already contains; a genuine non-word typo like אנט survived.

Extend the load-time prune (Hebrew only) to also drop a learned, non-dictionary
word that is one transposition/adjacent-key slip from a *common* dictionary word
(freq ≥ 50k). Conservative: a word with no cheap fix to a common word stays —
e.g. מאציו (its only cheap neighbour is rare) is left for the confusion map, and
real words are never touched. A word you truly want is re-learned by retyping it.
English is unaffected (its far larger counts would over-match); it stays covered
by the interactive "replace + forget" bar chip. Pinned in a corpus test.

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