Expand description
Kanji table — JP kanji with on/kun readings + relative frequency.
Generated by tools/nihongo/build_kanji_rs.py from
tools/scoring/data/supplemental/jp_kanji_v1.tsv. DO NOT edit by hand —
re-run the script. The source TSV was produced by an LLM batch call;
corrections go to the TSV first, then regenerate.
Schema: each kanji carries 1+ Hepburn romaji readings (on-yomi + kun-yomi
stems where the bare-kanji is the natural surface form) and a 0–100 freq
score. Composite-layer scoring uses freq to lift high-frequency JP
kanji above rare Chinese chars / 生僻词组 per the user’s design rule
(2026-05-23: ‘日语高频要高于中文难检字和生僻词组’).
Codepoint-identity-with-SC constraint REMOVED (was the v1.1 design). Shinjitai-only kanji (経/漢/楽/愛/東/見/書/…) are first-class entries now — Inputx’s JP plugin delivers professional-grade JP, not just the SC-overlap subset.
Structs§
Constants§
Functions§
- lookup_
by_ reading - Lookup: given a Hepburn romaji string, return all (kanji, freq) tuples whose readings include exactly that string. Linear scan over the table is fine for a few thousand entries — modern keystroke-rate cost is dominated by the FST traversal in the wubi/pinyin engines, not this.