feat(keyboard): add English QuickType bar and system lexicon

Show verbatim/correction/completion slots, mmap a 40k-word list, and
use UITextChecker plus supplementary lexicon for conservative autocorrect.
This commit is contained in:
Rocky
2026-08-14 21:49:22 +08:00
parent 2c3a3f80f3
commit 4749a9cbf2
34 changed files with 45539 additions and 3395 deletions
+10 -5
View File
@@ -30,11 +30,16 @@ commit, SHA-256 and output SHA-256.
- Eight opt-in fuzzy-pinyin rule groups.
- Offline English typing data under
`OSGKeyboardShared/Resources/Typing/English/`:
- `english_lexicon.tsv`curated word list with synthetic relative
frequency ranks for autocomplete / autocorrect
- `english_bigrams.tsv` — light next-word candidates
- Not derived from GPL/LGPL dictionaries; ranks are ordering weights,
not a single third-party corpus dump
- `english_lexicon.bin`mmap-friendly binary of the top 40k alphabetic
unigrams (log-scaled ranks) plus truncated bigrams; this is what the
keyboard extension loads
- `english_lexicon.tsv` / `english_bigrams.tsv` — build inputs derived from
Peter Norvigs public-domain `count_1w.txt` / `count_2w.txt`
(https://norvig.com/ngrams/; not GPL/LGPL dictionaries). Not copied into
the app bundle.
- Rebuild with `python3 Scripts/typing/build_english_lexicon.py`
(add `--from-tsv` to compile the binary from existing TSV without network)
## Reference only