Skip to content

docs: plan regional forms — one kanji across Japan, China, Hong Kong and Taiwan (spec 22) - #46

Merged
Saeris merged 4 commits into
mainfrom
docs/regional-forms-plan
Nov 19, 2026
Merged

Saeris merged 4 commits into
mainfrom
docs/regional-forms-plan

Conversation

@Saeris

@Saeris Saeris commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

A plan for regional forms. The decisions were made, and phase 0 (spikes) done, on 2026-11-10. Nothing is built yet.

Read: docs/specs/22-regional-forms.md. Backlog #56 points at it.

Decisions:

  • Port and adapt hanji's method, with its code as a reference.
  • Taiwan's list status from Taiwan's own sources.
  • Korea out for now.
  • Fonts bundled.
  • Lookup from a form seen in the wild comes later.
  • Readings and per-region frequency in scope.
  • Wiktionary added as a source.

Phase 0 findings:

  • Glyph comparison: our port reproduces hanji's results for all 8,449 groups. Without Korea, 8 groups change, each one where Korea had been the only link.
  • Taiwan's list: comes from Taiwan's national character database (CNS 11643), under Taiwan's open data licence. Its common list has exactly the official 4,808 characters.
  • Taiwan's stroke counts: the official counts differ from hanji's for 15% of Taiwan forms. These are regional conventions; 返, for example, is 8 strokes in Taiwan and 7 in China and Japan. So Taiwan's counts come from that database first.
  • Fonts: 4.4 MB for our scope.
  • Stroke drawings: 5,508 to add at most, already in our player's SVG format.
  • Wiktionary: one 141-second pass gives 18.8 MB of English shape notes, meanings, labelled variant forms and readings.

Phases:

  1. Data (schema 8).
  2. Region fonts.
  3. The Regional forms view.
  4. Stroke order by region.
  5. Readings and frequency.
  6. Wiktionary notes.
  7. Browse and filters.

Later: lookup from any regional form, and Korea.

No code or data changes.

…g Kong, Taiwan and Korea (spec 22)

A study of hanji (code MIT, data CC BY 4.0), its live site and its source, and a phased plan for folding most of it into the kanji pages: a stacked comparison of each region's form, a chart of code points, stroke counts and list status adapted to the sidebar's width, stroke order by region, lookup from any regional form, and a browse with hanji's filters.

The plan records what was measured (5.37 MB of region sans fonts; AnimCJK covering 8,014 characters for Simplified Chinese but 1,013 for Traditional and 535 for Korean), which Unihan fields can replace the unlicensed list transcription hanji uses (four of five lists), what the licence excludes (the name and logo), and the decisions needed from the user before phase 1. Backlog #56.
@github-actions

Copy link
Copy Markdown

bumpy-frog

This PR includes an empty bump file — no version bump is needed. ✅


This comment is maintained by bumpy.

…ktionary (spec 22)

The user's answers on 2026-11-10: port and adapt hanji's method with its code as a reference; take Taiwan's list status from Taiwan's own sources; leave Korea out for now; bundle the fonts; leave lookup from a regional form until later; and include readings in other languages and per-region frequency.

Wiktionary is added as a source on the user's suggestion: its character pages label each variant form and note where a shape came from, in English and under CC BY-SA 4.0, like our JMdict data. kaikki.org's per-language extracts are being removed, so an on-demand job extracts the character entries from the full dump into a pinned release asset.

For Taiwan, the Ministry of Education's 4,808-character list is published with "All Rights Reserved" and no open licence, while CNS 11643 is open data (OGDL 1.0) but may not flag the list. Phase 0 inspects it and brings the options back to the user.
@Saeris Saeris changed the title docs: plan regional forms — one kanji across Japan, China, Hong Kong, Taiwan and Korea (spec 22) docs: plan regional forms — one kanji across Japan, China, Hong Kong and Taiwan (spec 22) Nov 10, 2026
Six spikes, run against hanji's published data and the sources pinned at its commits:

- The ported CMap reading reproduces hanji's glyph signatures for all 8,449 groups; without Korea, 8 groups differ, each one Korea had linked.
- Taiwan's list comes from CNS 11643 open data (OGDL 1.0): its source table tags the Ministry of Education's common list with exactly 4,808 characters.
- Taiwan's official stroke counts differ from hanji's for 1,263 of 8,446 Taiwan forms, by regional convention (the grass, altar and movement radicals), so Taiwan's counts come from CNS 11643 first.
- Region fonts for our scope: 4.40 MB, under target.
- China's and Taiwan's stroke drawings: 5,508 at most, 15.5 MB raw, available as SVGs in our player's format.
- Wiktionary: one pass of the full dump takes 141 seconds and yields 18.8 MB of English notes, meanings, labelled variants and readings; a first quick filter lost entries to nested keys, which the plan now warns about.
Taiwan's less-common list was short by about 580 characters: CNS 11643 credits each character to the first document that attests it, so those are credited to the textbook list. The list is now the less-common source plus the textbook source, 6,355 against the official 6,341.

CNS 11643 rebuilds its archives in place, without always changing their version, so the build takes the latest, records its date, and fails if the common list is not 4,808. A checksum pin would have failed every few weeks.

The schema section shows what was built: only the columns phase 1 fills. Later phases add theirs.

Phase 1's results: five rules hanji does not need (Hong Kong's index as the entry; dropping a group no list names that repeats another; joining two orthodox forms only when two tables agree; Japan's old form from Japan's own pair; the 4,808 check), the comparison with hanji with a reason for each class of difference, and the known limits.
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