mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* iOS keyboard: never autocorrect into a hyphen; split a missed space into two words
What: AutocorrectEngine now passes every UITextChecker guess through
usableGuess before autocorrect or the strip uses it. A guess may add no
character you didn't type except letters and a contraction's apostrophe,
so "t.b." for "tb" or "x-y" for "xy" is never applied or shown. A guess
that splits the word in two ("up-to" or "up to" for "upto") is used only
as two words with a space, and only when its letters are exactly the
typed ones (a missed space), both halves are dictionary words (two or
more letters, or English "a"/"I", since UITextChecker accepts every
single letter), and the checker offers the spaced form itself.
Why: Record typing logs showed a missed space corrected into a
hyphenated compound. The old loop skipped spaced guesses but let the
hyphenated one through as a cheap one-character insertion. Removed: that
hyphen path; replaced by the spaced form under the rules above.
Verified: xcodebuild test on the iPhone 18 Pro simulator (iOS 27.2) for
AutocorrectEngineTests (4 new tests: missed space, the split rules,
punctuation, and the system dictionary's "nevermind" -> "never mind"),
FullKeyboardEngineTests, TypingLogTests, DictationLearningTests: 40
tests, 0 failures.
* iOS keyboard: rank completions by frequency, names last, no repeated literal
What: the suggestion strip's completions now keep UITextChecker's own
order, which is most probable first (Apple's documented order; on iOS 27
"b" lists but, be, because and "th" lists the, they, that's), instead of
re-sorting it by length and then alphabetically. UILexicon terms
(Contacts names and text replacements) now rank after the dictionary's
completions instead of ahead of everything, and a capitalised name ranks
after every other completion unless the typed word starts with a
capital. A completion equal to what was typed is dropped, one-letter
words get completions too, and when nothing is left the strip shows only
the typed word on the left instead of repeating it in the centre.
Why: Record typing logs showed contact names and job titles from the
lexicon taking the centre slot for common prefixes (a surname over "the"
for "th"), and one-letter words repeating the literal as the primary.
Removed: the lexicon-first pass (up to three terms before any spelling
guess) and the length/alphabetical sort. The frequency source is the
existing UITextChecker; no word list was added.
Verified: xcodebuild test on the iPhone 18 Pro simulator (iOS 27.2),
AutocorrectEngineTests: 16 tests, 0 failures (4 new: frequency order
ahead of contacts, names demoted unless capitalised, no repeated
literal, and the system dictionary's order for "b" and "th").
|
||
| .. | ||
| AccentPicker.swift | ||
| AutocorrectEngine.swift | ||
| FullKeyboardEngine.swift | ||
| FullKeyboardPalette.swift | ||
| FullKeyboardSettings.swift | ||
| FullKeyboardView.swift | ||
| HexKeyGesture.swift | ||
| HexKeyViews.swift | ||
| KeyboardClipboard.swift | ||
| KeyboardKeyPlaneView.swift | ||
| KeyboardLanguage.swift | ||
| KeyboardLayout.swift | ||
| KeyboardStripView.swift | ||
| ShiftStateMachine.swift | ||
| TypingJournal.swift | ||
| TypingJournalLearning.swift | ||