How do you build a Japanese pitch accent dictionary from Kanjium for Yomitan?
YuzuLingo · Nov 1, 2026
You build it by converting Kanjium’s accents.txt into Yomitan term-meta JSON, then zipping those files at the archive root. The common open generator is the Node script that ships with the yomichan-pitch-accent-dictionary project (and forks such as Ajatt-Tools).
What Kanjium gives you
Kanjium publishes accents.txt under data/source_files/raw. Each line lists a headword, reading, and mora downstep positions for a large Japanese vocabulary set. That file is pitch data only. It is not a glossary and it is not the NHK Accent Dictionary.
Generate the Yomitan banks
Clone or download a pitch-accent generator that targets Yomichan/Yomitan format 3. Point the script at accents.txt and an empty output folder, for example: node main.js path/to/accents.txt ./output. The run writes index.json plus numbered term_meta_bank_*.json files that store pitch entries.
Zip the JSON at the archive root
Yomitan dictionaries are zip archives with the JSON files in the root, not inside a subfolder. Prefer a Deflate zip. A typical 7-Zip command is: 7z a -tzip -mx=9 -mm=Deflate -mtc=off -mcu=on kanjium_pitch_accents.zip ./output/*.json. Keep Zip64 and nested folders out of the package.
What the zip contains
index.json holds the dictionary title, revision, and format (3). Pitch lives in term_meta_bank files with mode pitch, not in term_bank glossary rows. A pitch zip can sit beside a separate glossary zip and a frequency zip. Tools that accept Yomitan format 3 load each kind from its own archive.
Import and license notes
Import the finished zip in any reader that supports Yomitan dictionaries. Rebuild when you refresh accents.txt so ranks and coverage stay current. Respect Kanjium’s license on redistribution, and do not ship the commercial NHK accent dictionary as if it were free open data.
Why people build this
A pitch zip lets a popup show a mora downstep graph next to a gloss. Learners who already use JMdict or Jitendex for meanings add Kanjium-derived pitch as a second dictionary so accent stays attached to the same headword lookup.