Skip to content

Add Small Seal Script dictionaries and configs for the Unicode 18.0 Seal block - #1494

Merged
frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:unicode-18-seal-script-mapping
Sep 20, 2026
Merged

frankslin merged 1 commit into
BYVoid:masterfrom
frankslin:unicode-18-seal-script-mapping

Conversation

@frankslin

@frankslin frankslin commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

Unicode 18.0 encodes 11,328 Small Seal characters at U+3D000..U+3FC3F and publishes their modern CJK equivalents as the kSEAL_MCJK property of SealSources.txt (UAX #60). This change turns that data into a bidirectional OpenCC mapping between Small Seal characters and Han characters, bridges modern standard characters to the 說文 transcriptions used by kSEAL_MCJK, and adds three experimental configs: t2seal.json, seal2t.json and s2seal.json.

Detailed Changes:

  • Dictionaries:
    • Add SealCharacters.txt (Small Seal -> modern CJK equivalent, 11,328 keys) derived from kSEAL_MCJK. When several Small Seal characters share one Han form, the reverse keeps code point order so the 說文解字 headword precedes its 重文; four @reverse-prefer lines promote the candidate attested in more source editions. U+3D06D (說文 玉) maps to 玉 instead of the kSEAL_MCJK value 王, which collides with U+3D068 (說文 王).
    • Add SealVariants.txt (modern standard character -> 說文 transcription, e.g. 年 -> 秊, 前 -> 歬, 小 -> 𡭔), compiled by aligning the headword sequence of the shuowen.org open data (Apache-2.0) with kSEAL_MCJK and supplemented by reviewed Unihan variant pairs and regional variants. Self-mappings with @reverse-prefer keep transcriptions that are themselves standard characters (裏, 爲) unchanged in seal2t.
    • SealCharactersRev and SealVariantsRev are produced at build time with reverse.py, like TWVariantsRev.
  • Configs: t2seal = SealVariants -> SealCharactersRev; seal2t = SealCharacters -> SealVariantsRev; s2seal = the s2t chain followed by the t2seal stages. Small Seal to Simplified needs a seal2t | t2s pipeline because segmentation only runs on the input.
  • Build: wire the new dictionaries into Bazel (TEXT_DICTS, reverse genrule, non-BMP audit exclusion) and CMake (DICTS_RAW, DICTS_GENERATED, CONFIG_FILES).
  • CLI: list the configs in the native CLI help and the npm CLI built-in config table.
  • Tests / docs: add t2seal / seal2t / s2seal cases to testcases.json; document the configs in README, node READMEs, CONTRIBUTING, AGENTS and NEWS.

…eal block

Unicode 18.0 encodes 11,328 Small Seal characters at U+3D000..U+3FC3F and
publishes their modern CJK equivalents as the kSEAL_MCJK property of
SealSources.txt (UAX BYVoid#60). This change turns that data into a bidirectional
OpenCC mapping between Small Seal characters and Han characters, bridges
modern standard characters to the 說文 transcriptions used by kSEAL_MCJK, and
adds three experimental configs: t2seal.json, seal2t.json and s2seal.json.

Detailed Changes:
- **Dictionaries**:
  - Add `SealCharacters.txt` (Small Seal -> modern CJK equivalent, 11,328
    keys) derived from kSEAL_MCJK. When several Small Seal characters share
    one Han form, the reverse keeps code point order so the 說文解字 headword
    precedes its 重文; four `@reverse-prefer` lines promote the candidate
    attested in more source editions. U+3D06D (說文 玉) maps to 玉 instead of
    the kSEAL_MCJK value 王, which collides with U+3D068 (說文 王).
  - Add `SealVariants.txt` (modern standard character -> 說文 transcription,
    e.g. 年 -> 秊, 前 -> 歬, 小 -> 𡭔), compiled by aligning the headword
    sequence of the shuowen.org open data (Apache-2.0) with kSEAL_MCJK and
    supplemented by reviewed Unihan variant pairs and regional variants.
    Self-mappings with `@reverse-prefer` keep transcriptions that are
    themselves standard characters (裏, 爲) unchanged in seal2t.
  - `SealCharactersRev` and `SealVariantsRev` are produced at build time with
    `reverse.py`, like `TWVariantsRev`.
- **Configs**: `t2seal` = SealVariants -> SealCharactersRev; `seal2t` =
  SealCharacters -> SealVariantsRev; `s2seal` = the s2t chain followed by the
  t2seal stages. Small Seal to Simplified needs a `seal2t | t2s` pipeline
  because segmentation only runs on the input.
- **Build**: wire the new dictionaries into Bazel (`TEXT_DICTS`, reverse
  genrule, non-BMP audit exclusion) and CMake (`DICTS_RAW`,
  `DICTS_GENERATED`, `CONFIG_FILES`).
- **CLI**: list the configs in the native CLI help and the npm CLI built-in
  config table.
- **Tests / docs**: add `t2seal` / `seal2t` / `s2seal` cases to
  `testcases.json`; document the configs in README, node READMEs,
  CONTRIBUTING, AGENTS and NEWS.
@frankslin
frankslin merged commit ef9748b into BYVoid:master Sep 20, 2026
41 checks passed
@frankslin
frankslin deleted the unicode-18-seal-script-mapping branch September 20, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant