hex/ios/HEXShared
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 499c14162f iOS: bilingual autocorrect keeps English as good as alone beside French or German
X (Philippe): "Would also be great if the keyboard supported typing multiple
languages without having to actively choose which one to use at a given
time, like Gboard."

What works today: bilingual autocorrect (#2097, #2143, #2164) already pairs
any two Latin-script languages with an iOS dictionary (English with Français,
Deutsch, Italiano, Português, Polski, Norsk, Română, Español), whatever their
order: the first other chosen Latin language is the partner, its dictionary
is checked per word and the strip shows both languages' fixes and completions.
So no new pairs were needed. But the held-out English benchmark (2,000
Tatoeba sentences, Spatial autocorrect on) got much worse with a partner on:
5.75% WER alone, 7.56% with Français, 7.53% with Deutsch (7.18% with the
German Spatial experiment). Causes, measured:
- iOS's French and German dictionaries take many English typos for words
  ("dont", "im", "ive", "dk", "dl", "ro", "tkm"), and a word either language
  knew was never changed, so "Im" and "dont" stayed (61 and 42 losses).
- They also take common English words ("the", "you", "your", "not",
  "please"), so the words-before lean almost never said English.
- The partner's spelling guesses changed names English kept ("Ziri" ->
  "Zuri").

Changes (AutocorrectEngine):
- languageLean: a word both dictionaries know counts, from three letters, for
  the language whose typing model has it among its commonest (-ln P <= 10).
- In a sentence that leans the keyboard's language, a word the partner knows
  still gets this language's sure fixes (unambiguousFixes, two-letter slips).
- Without a lean, Spatial autocorrect may still read the taps as another word,
  counting the partner's word as a valid one (changed only on its valid-word
  margin), except words with a sure fix, which the next word decides.
- bilingualRevision: at a sentence's start, "Im"/"Dont" become "I'm"/"Don't"
  at the next word's space when that word leans English (German "Im Haus"
  stays; the revision's undo is the existing one).
- A partner word without a vowel is no word (iOS abbreviations), and the
  partner's guess of a name is never a fix.
- Kept: #2143's guard (workingPartner ignores a dictionary that takes every
  word), #2164's layout rule (English and Spanish on the first one's keys;
  other languages keep their own layouts), dictation following the keyboard.

Removed: "a word either language knows as typed is never changed" without
exception; it now has the exceptions above.

Black box (iOS 27.2 simulator): Settings offers "Add to English (US)
Keyboard" for French (France, Canada, Switzerland) ("Type in English and
French on the same keyboard": one "English & French" keyboard on QWERTY, no
switching); Portuguese, Polish, Turkish offer "Add to Existing Keyboard".
It fixed "I dont know" and "Dont do it", kept "est" and "merci" after English
words; its French data is thin in the simulator ("je pense" -> "he pence"),
so its French weighting is unverified.

Verified (iPhone 17 simulator, iOS 27.2, Mac Studio, rebased on #2180):
- Benchmark (ZZDecoderBench, not committed): English alone 5.75% (unchanged
  by this change); with Français 7.56% -> 5.79% (correct words broken 125 ->
  99, 113 alone); with Deutsch 7.53% -> 5.79%; Deutsch with its Spatial
  model 7.18% -> 5.70%. Before rebasing (2a023f91): alone 5.24%, Français
  7.07% -> 5.24%, Deutsch 7.08% -> 5.27%.
- Code-switching probe (centre taps): after "we said that", 1 of 80 French
  words changes (dont -> don't) and 3 of 72 German (auch, ist, habe), none
  before; at a message's start and after French or German words, none; slips
  in French/German words at a message's start fixed as before (26/50, 18/40).
- Letter p95 with a partner 4.1-5.4 ms (3.9-5.1 ms before), 2.2 ms alone.
- xcodebuild test: 530 tests, 1 skipped, 0 failures, including new
  AutocorrectEngineTests.testBesideAnotherLanguageEnglishStillFixesItsOwnTypos
  and the existing bilingual tests (testABilingualKeyboardKeepsBothLanguagesWords,
  testTheFrenchKeyboardFixesEnglishTyposWithEnglishBesideIt,
  testAPartnerDictionaryThatTakesEveryWordIsIgnored).
2026-11-21 08:31:18 -05:00
..
FullKeyboard iOS: bilingual autocorrect keeps English as good as alone beside French or German 2026-11-21 08:31:18 -05:00
TypingLog iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
AppleIntelligenceCleanupSettings.swift ios: optional Apple Intelligence transcript cleanup (experiment) (#1538) 2026-11-08 08:07:11 -05:00
AppleSpeechModule.swift iOS: dictation follows the keyboard's language, English and Spanish share one layout, and Spanish never goes to Parakeet (#2164) 2026-11-21 08:46:10 +00:00
AudioSessionControlling.swift iOS: dictation picks the car's mic in CarPlay, and a warm session never holds call audio (#2179) 2026-11-21 07:21:46 -05:00
CleanupGuard.swift iOS: Clean up what I say keeps names, and is on by default (#2132) 2026-11-21 03:12:53 +00:00
CleanupReconstruction.swift iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
CleanupTagger.swift iOS: Clean up what I say keeps names, and is on by default (#2132) 2026-11-21 03:12:53 +00:00
CleanupTokenizer.swift iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
CustomVocabularySettings.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00
DictationCorrections.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationEditInference.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationEditTracker.swift ios: learn dictation and typing fixes from edits (Learn how I type) (#2022) 2026-11-20 01:04:58 +00:00
DictationLanguage.swift iOS: remove and add dictation languages from the keyboard, and a space-bar cursor on the Dictation bar (#2180) 2026-11-21 07:40:24 -05:00
DictationLanguageSwitch.swift iOS: remove and add dictation languages from the keyboard, and a space-bar cursor on the Dictation bar (#2180) 2026-11-21 07:40:24 -05:00
DictationPipeline.swift iOS: French dictation gets French spacing before ? ! ; : and inside « » 2026-11-21 08:31:18 -05:00
DictationTranslation.swift iOS: translation says when it pastes as spoken, retries, and never turns itself off (#2176) 2026-11-21 06:33:37 -05:00
DotScope.swift iOS: a tap after a swiped word starts the next word, and the Metal HUD stays off the home page (#2159) 2026-11-21 07:54:19 +00:00
DotScopeShader.metal fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
EmptyCapture.swift iOS: fix six TestFlight tester issues (audio error, leaked error text, Live Activity, haptics, capitals, push to talk) (#2035) 2026-11-20 13:21:16 +00:00
FrenchSpacing.swift iOS: French dictation gets French spacing before ? ! ; : and inside « » 2026-11-21 08:31:18 -05:00
HexTheme.swift fix(ios): eliminate handoff frame stalls and add overlapping ballistic swipe throw (t1153) (#757) 2026-10-31 22:14:22 -07:00
HinglishLexicon.swift iOS: Hinglish dictation, Hindi in Latin letters (Experiment, off by default) (#2119) 2026-11-21 00:29:24 +00:00
HinglishRomanizer.swift iOS: Hinglish dictation, Hindi in Latin letters (Experiment, off by default) (#2119) 2026-11-21 00:29:24 +00:00
HomeSwipeCue.swift iOS: a tap after a swiped word starts the next word, and the Metal HUD stays off the home page (#2159) 2026-11-21 07:54:19 +00:00
KeyboardBridge.swift iOS: dictation picks the car's mic in CarPlay, and a warm session never holds call audio (#2179) 2026-11-21 07:21:46 -05:00
KeyboardSurface.swift iOS: remove and add dictation languages from the keyboard, and a space-bar cursor on the Dictation bar (#2180) 2026-11-21 07:40:24 -05:00
MicrophoneChoice.swift iOS: dictation picks the car's mic in CarPlay, and a warm session never holds call audio (#2179) 2026-11-21 07:21:46 -05:00
SpeechModelInstall.swift iOS: model preparation loads once, keeps moving, and survives the background (#2171) 2026-11-21 10:39:38 +00:00
SpokenCleanupRules.swift iOS: dictation styles apply in the keyboard and read differently, plus Lowercase (#2103) 2026-11-20 21:47:04 +00:00
SpokenLists.swift iOS: format dictated lists, and write out gonna and wanna (#2131) 2026-11-21 03:01:16 +00:00
TranscriptFormatter.swift iOS: text replacements without autocorrect, End with a period, and emoji and symbols on the Dictation bar (#2147) 2026-11-21 06:24:16 +00:00
UserFacingError.swift iOS: fewer paste prompts, and a translate switch in the keyboard (#2134) 2026-11-21 03:24:58 +00:00
VocabularySpelling.swift ios: custom vocabulary experiment (#1547) 2026-11-08 12:15:00 -05:00