What changed: TypingLearning.isSlip(typed:final:language:) decides whether a word you erased was
plausibly a slip of the word you typed in its place: the same word with other capitals or an
apostrophe ("Im" -> "I'm"), or, both two letters or more, starting alike (the same letter, a
neighbouring key on the language's layout, or the first letter missed or one typed before it) and
at most one slip for every four letters of the new word (at least one), where a neighbouring key,
a missing accent, two swapped letters and a doubled letter count half. TypingJournal.didFinish
records a retyped pair only then (it replaces "edit distance <= max(2, half the word)", which
let "Sunda" -> "Saturday" through at 4 of 8). TypingJournalCorrection.teaches applies the same
check when a journal is read, so pairs already recorded that fail it are not counted (Typing
insights' summary), not listed (Words you fix most) and never learned (TypingLearning.derive);
no migration. Picks, autocorrections, undos and kept words are unchanged. README follows, and
says the switch per fix in Typing insights is the dictation fixes'.
Why: TestFlight build 142: Words you fix most listed "Sunda -> Saturday 1x" beside real fixes; a
change of mind was recorded as a fix, and a second one would have turned "Sunda" into
"Saturday" on space.
Verified:
- TypingJournalLearningTests.testAWordErasedForAnotherWordTeachesNothing: keeps "Ciry" ->
"City", "Diaxuss" -> "Discuss", "Im" -> "I'm", "i" -> "I" and other slips; drops "Sunda" ->
"Saturday", "is" -> "this", "reqe" -> "request" and other changes; German's own keys; the
journal records only the slip; an older journal's change of mind isn't learned or counted.
- A tester's typing logs, the journal's pairs emulated: of 26 retyped pairs the old check
recorded, it keeps 12 (all 9 slips of the final word) and drops 14 (8 of 10 different words,
4 unfinished words finished).
- The held-out gate's typo pairs (en/es/de, 11,716 of 2+ letters the old check kept): 99.42%
kept (en 99.8%, es 99.1%, de 99.5%), through the Swift function.
- xcodebuild test on the Studio (own simulator): 931 tests, 0 failures, 4 opt-in skips.
code-shape.py: no hard problems.