hex/ios/scripts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel 376da1c630 iOS: emoji index built from Unicode's emoji list and CLDR
What changed
- scripts/build-emoji-data.py builds HEXShared/FullKeyboard/Emoji/emoji-index-<lang>.txt
  for the four keyboard layouts (en, nb, es, de) from Unicode emoji-test.txt 18.0
  (pinned by SHA-256) and CLDR 49 annotations and annotationsDerived (release-49 tag),
  plus Hex's own chat words in scripts/emoji-aliases-en.txt ("congrats", "bday",
  "lol", "new year"; 336 words, written for Hex).
- Each file holds the catalog in panel order (8 categories, 1,923 emoji, 332 with five
  uniform skin tones), each emoji's English name, its folded search words, and the
  word and phrase postings already weighted (one-word name 1.0, name word 0.75,
  keyword 0.6, keyword-phrase word 0.3, chat word 1.2 down to 0.9, an IDF factor for
  words many emoji share), sorted by key so the keyboard can binary-search the file
  in place. Non-English layouts carry English's words at 0.85.
- LICENSE-Unicode.txt (Unicode License v3) ships beside the data, as the licence
  asks: both emoji-test.txt and CLDR's data are under it, which allows commercial
  use with the notice.

Why
- The emoji panel (next commits) suggests emoji for what you type and searches them
  on the iPhone. Precomputing the index keeps the keyboard extension's heap small:
  the first version built Swift dictionaries at runtime and held 5.7 MB, which
  malloc kept after release; the mapped file plus offsets measures 0.7 MB.

Verified
- The generator runs from a sources folder or downloads the pinned files; output is
  deterministic. Files: en 351 KB, nb 560 KB, es 549 KB, de 610 KB.
2026-11-20 10:49:41 -05:00
..
build-emoji-data.py iOS: emoji index built from Unicode's emoji list and CLDR 2026-11-20 10:49:41 -05:00
emoji-aliases-en.txt iOS: emoji index built from Unicode's emoji list and CLDR 2026-11-20 10:49:41 -05: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