hex/ios/scripts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel dad51c2c32 iOS: the typing quality gate on the iOS engine (opt-in replay)
Add ios/scripts/typing-gate.py and the opt-in HEXMobileTests/TypingGateReplayTests.
The script reads the Android benchmark's held-out inputs (#2374:
android/benchmark/typing/held-out, accent-keys.json, critical-cases.json,
thresholds.json) without copying them, writes the inputs, runs the replay
once per language (one xcodebuild each), and scores the outputs exactly as
quality-gate.py does: the same alignment, the same three numbers (error
reduction against raw taps, correct words changed, unambiguous accents
restored by the model and .valid lists), the same thresholds and critical
cases.

The replay types each input through FullKeyboardEngine with the language's
bundled model and the simulator's spelling dictionary. Taps made on the
synthetic layout move onto Hex's key by key. A tap Hex's keys don't take as
a letter or space (outside them, or on 123, shift or delete, which Hex's
shorter rows let the synthetic typist hit) goes to the nearest letter or
space bar; the older out-of-tree replay dropped those, so the iOS numbers
quoted before this are 1-1.6 WER points high. Letters without a key are
picked from the long-press menu, apostrophes without a key come from the
123 page, and French's AZERTY apostrophe key (#2354) is tapped.

The test skips unless HEX_TYPING_GATE is set, so xcodebuild test is not
slower. README: a section beside the Android gate on how to run it and what
each number means.

Verified on the Studio (iPhone 17 simulator, iOS 27.2) at dev 1d9dd051:
all six languages replayed and scored (en, es pass; de, fr, it, nb fail as
listed in the README's run). code-shape.py: no hard problems.
2026-11-22 12:34:50 -05:00
..
build-emoji-data.py iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
build-german-capitals.py iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
build-typing-model.py iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes (#2059) 2026-11-20 16:18:07 +00:00
emoji-aliases-en.txt iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
fetch-cleanup-model.sh iOS: clean up what I say with an on-device tagger (experiment) (#2023) 2026-11-20 01:29:41 +00:00
marketing-release.sh iOS: TestFlight stays on 0.9.0, and App Store releases are tagged 1.0.x (#2194) 2026-11-21 09:11:30 -05:00
typing-gate.py iOS: the typing quality gate on the iOS engine (opt-in replay) 2026-11-22 12:34:50 -05:00