Repository navigation
Add Small Seal Script dictionaries and configs for the Unicode 18.0 Seal block - #1494
Merged
frankslin merged 1 commit intoSep 20, 2026
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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-preferlines promote the candidate attested in more source editions. U+3D06D (說文 玉) maps to 玉 instead of the kSEAL_MCJK value 王, which collides with U+3D068 (說文 王).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-preferkeep transcriptions that are themselves standard characters (裏, 爲) unchanged in seal2t.SealCharactersRevandSealVariantsRevare produced at build time withreverse.py, likeTWVariantsRev.t2seal= SealVariants -> SealCharactersRev;seal2t= SealCharacters -> SealVariantsRev;s2seal= the s2t chain followed by the t2seal stages. Small Seal to Simplified needs aseal2t | t2spipeline because segmentation only runs on the input.TEXT_DICTS, reverse genrule, non-BMP audit exclusion) and CMake (DICTS_RAW,DICTS_GENERATED,CONFIG_FILES).t2seal/seal2t/s2sealcases totestcases.json; document the configs in README, node READMEs, CONTRIBUTING, AGENTS and NEWS.