日本語版はこちら (README_jp.md) — this English README is the primary entry point to the repository; the Japanese version mirrors its structure.
This database is a full-text digitization of the Kanchi-in manuscript of the Ruiju Myōgishō (abbreviated as KRM), incorporating location information, textual collation, source studies, and more. It is one of the Hanzi dictionary databases comprising the Integrated Database of Hanzi Dictionaries in Early Japan (abbreviated as HDIC).
The Kanchi-in manuscript of the Ruiju Myōgishō is a Hanzi dictionary compiled in the twelfth century by a Shingon Buddhist monk. It has been regarded as an important resource for Japanese historical linguistics research due to its extensive collection of wakun indicating accent, detailed annotations on Hanzi pronunciations, and annotations on variant characters. Its Chinese annotations on fanqie, meanings, and glyph forms have also garnered attention as materials for Chinese linguistics.
KRM was first published in March 2022. In March 2025, a revised edition with a specification change (see Version History) and more detailed documentation was released.
Dictionaries of Chinese characters compiled in Japan during the Heian period are invaluable resources not only for Japanese linguistics but also for Chinese linguistics. To promote international accessibility, this project uses the term "Hanzi." Researchers specializing in Japanese studies may, without any issue, read this term as "Kanji." This is meant to respect the linguistic diversity and academic traditions of both fields while encouraging broader scholarly exchange.
| Latest archived release | v1.2.7 (2026-08-29) — DOI-assigned on Zenodo. Cite this version for academic work. |
| Current repository state (GitHub) | unreleased — this repository has received incremental corrections and additions since v1.2.7 (see Version History) that are not yet reflected in any archived Zenodo snapshot. |
If you use KRM for academic purposes, please cite the archived release (Chicago style):
Ikeda, Shōju. (2026). KRM: Database of the Kanchi-in Manuscript of the Ruiju Myōgishō. Version v1.2.7. Zenodo. https://doi.org/10.5281/zenodo.22164768
BibTeX
@misc{krm2026,
author = {Ikeda, Shōju},
title = {{KRM: Database of the Kanchi-in Manuscript of the Ruiju Myōgishō}},
year = 2026,
month = aug,
version = {v1.2.7},
publisher = {Zenodo},
doi = {10.5281/zenodo.22164768},
url = {https://doi.org/10.5281/zenodo.22164768}
}A machine-readable citation is also available in CITATION.cff.
krm/
├── krm_main.tsv / .json ← dataset files (repository root)
├── krm_notes.tsv / .json (see Dataset Files below)
├── krm_headword_chars.tsv / .json
├── krm_wakun.tsv / .json
├── krm_pronunciations.tsv / .json
├── krm_ndl.tsv
├── krm.db ← read-only SQLite build of the TSVs (do not edit)
├── docs/ ← detailed specifications and working notes
├── scripts/ ← data-pipeline maintenance tools (MIT License)
├── examples/ ← AI-assisted data analysis guide
├── webapp/ ← search web application (MIT License)
├── images/ ← ER diagrams
├── diff/ ← correction-workflow logs produced by scripts/
├── CITATION.cff, LICENSE, README.md, README_jp.md
└── AGENTS.md, CLAUDE.md ← guidance for AI coding assistants working in this repo
There is no separate dataset/ directory: the TSV/JSON data files live directly at the repository root. output/ and work/ are local, .gitignored working directories used by scripts/ and are not part of the distributed dataset.
| File | Description | Formats |
|---|---|---|
krm_main |
Core data: headwords, full definitions, volume/radical, and location IDs. | TSV, JSON |
krm_notes |
Annotation data: each entry's definition broken into typed elements (character-form notes, phonetic glosses, semantic glosses, wakun, other), with compiler's remarks. | TSV, JSON |
krm_headword_chars |
Per-character data for every constituent character of every headword, enabling single-character search. | TSV, JSON |
krm_wakun |
Japanese native readings (wakun), with variant forms and links to the JapanKnowledge edition of the Nihon Kokugo Daijiten. | TSV, JSON |
krm_pronunciations |
Phonetic gloss data aligned with the DHSJR column specification. | TSV, JSON |
krm_ndl |
Links to National Diet Library Digital Collections page images. | TSV only |
krm_notes.json is large (~45 MB) and is not tracked in this Git repository (see .gitignore); it ships with the archived Zenodo release, or can be regenerated locally with scripts/gen_notes_json.py (see Tools and Applications). All other files listed above are tracked in Git.
Full column-by-column specifications, old/new column-name mappings, and the ER diagrams live in docs/data_specification.md.
-
TSV files are the authoritative source for all data in this repository. They begin with
#-prefixed comment lines (containing the file's own version, dates, license, and column descriptions) before the header row — skip these when parsing. -
JSON files are generated from the TSV files (see
scripts/, e.g.tsv_to_json.py,gen_notes_json.py) and are not edited by hand. They mirror the TSV data field-for-field, exceptkrm_notes.json, which nests its records under eachkrm_mainentry's"definitions"key rather than being a flat table (see Data Model). -
krm.dbis also generated from the TSV files (not from the JSON) — a read-only SQLite build used bywebapp/. Do not edit it directly; it is a derivative, not source data. -
Special notation used across headword and definition fields (see docs/data_specification.md for the full specification):
Symbol Meaning _Kana wakun without tone marks VVoiced-sound tone mark ()(full-width)Presence of tone marks 〔〕(full-width)Correction proposal for a typo [](full-width)Missing characters /(full-width)Separator for multi-character headwords ■Unrepresentable or unreadable character 〇Used in original_entrywhen no original-form headword is neededHanzi outside Unicode are represented via IDS (Ideographic Description Sequence) or CHISE/GlyphWiki entity references (e.g.,
CDP-8C55,koseki-00001).
krm_main is the root table; its primary key is entry_id (e.g., F00001).
krm_noteslinks tokrm_mainviaentry_id; itsdefinition_seq_id(e.g.,F00001_01) extendsentry_idwith a suffix (_00= headword,_01,_02, ... = definition elements in order).krm_wakunandkrm_pronunciationslink tokrm_notesviadefinition_seq_id.krm_headword_charslinks tokrm_mainviaentry_idand useshanzi_id(e.g.,S00001) for individual character IDs.krm_ndlpredates this key scheme and is matched tokrm_mainby comparing page numbers (see docs/data_specification.md).
In the JSON distribution, krm_notes is nested inside each krm_main record under a "definitions" key rather than being a separate flat table:
See docs/data_specification.md for the full ER diagram walkthrough and a sample JSON record.
Detailed reference material lives in docs/:
- docs/data_specification.md — full column-level specification for every dataset file, old/new column-name mappings, and the citation-abbreviation list used in compiler's remarks. (Japanese version)
- docs/krm_scripts_usage.md — usage guide for the data-pipeline scripts in
scripts/(Japanese). - docs/remarks_pronunciation_summary.md — categorized summary of
remarks_pronunciationvalues inkrm_pronunciations(Japanese). - docs/manual_exclusion_list.md — log of manual corrections/exclusions for irregular tone-mark cases (Japanese).
Built on top of the core dataset. Utility Scripts are maintainer-facing (used to produce and correct the data itself); Web Application and Examples are consumer-facing (used to search or analyze the published data).
scripts/ contains the data-pipeline tools used to maintain krm_pronunciations, regenerate krm_notes.json (gen_notes_json.py), and convert any KRM TSV to JSON (tsv_to_json.py). Per CLAUDE.md, all changes to the dataset go through this pipeline rather than manual edits. Provided under the MIT License. See docs/krm_scripts_usage.md for full usage.
webapp/ is a Next.js + SQLite FTS5 search and browsing application for KRM (full-text search over headwords, definitions, and wakun, plus an approximate itaiji (variant-character) search). Provided under the MIT License; see webapp/README.md for setup and architecture.
External data: the webapp's itaiji fuzzy search optionally uses the NIHU (National Institutes for the Humanities) 異体漢字対応テーブル (Itaiji Correspondence Table), a third-party dataset under CC-BY 4.0. It is not part of the KRM dataset and is not bundled in this repository — download it separately from the NIHU research-data page and place it at the repository root as described in webapp/README.md. Without it, the webapp still works; itaiji search is simply disabled.
examples/README.md is a guide to analyzing KRM using Claude Code in natural language — no programming knowledge required. It walks through sample questions (data-integrity checks, per-volume/per-radical aggregation, cross-table lookups) and their expected output, and shows how to save a recurring analysis as a reusable script.
Each data file's exact version number, publication date, and last-modified date are recorded in that file's own #-prefixed comment header — treat those headers, not this README, as authoritative for current version state.
- March 2022: initial public release (
KRM.tsvand related files, v1.1.x). - March 2025: specification change to the current
krm_*file set (v1.2.x) — see below. - 2025-06-12:
v1.2.6archived on Zenodo. - 2026-08-29:
v1.2.7archived on Zenodo and assigned the current citable DOI (see Current Release and Citation). - Since then, the repository has continued with incremental corrections and additions (e.g.,
krm_headword_charsandkrm_pronunciationswere added after the initial v1.2 release); these are not individually re-archived on Zenodo.
Previously, published files were prefixed KRM; files following this change are prefixed krm. Key points:
- The at-mark
@, indicating kana wakun without tone marks, was changed to underscore_. - The double-quotation mark
", indicating a voiced-sound tone mark, was changed to the half-width letterV. - Half-width parentheses
(), indicating the presence of tone marks, were changed to full-width parentheses(). - Half-width parentheses
()indicating a correction proposal for a typo were changed to full-width brackets〔〕. - Half-width brackets
[], indicating missing characters, were changed to full-width brackets[]. KRM_definitions.tsvwas retired; its data and functionality were absorbed into the newkrm_notes(see docs/data_specification.md).
- Data and documentation (all files at the repository root, and
docs/): CC BY-SA 4.0. scripts/andwebapp/source code: MIT License (webapp/LICENSE).- External datasets (e.g., the NIHU itaiji table used by the webapp) retain their own license terms — see Tools and Applications.
This is open access data.
HDIC Project Representative: Shoju Ikeda (Professor Emeritus, Hokkaido University) Copyright (c) 2022-2026 HDIC project, IKEDA Shoju (Chair, Professor Emeritus, Hokkaido University)
Contact: ikeda.shoju@gmail.com, liyuansapporo@yahoo.co.jp, toyjack@gmail.com, kleinekuma@gmail.com
We would like to express our gratitude to Tenri Central Library and Yagi Bookstore for granting permission to publish the decipherment text of the Kanchi-in manuscript of the Ruiju Myōgishō.
This research is partly supported by JSPS KAKENHI Grant Numbers 16H03422, 19H00526, 23K17500, 25K00466, and 26K21717. We gratefully acknowledge this support.

