A context-aware kanji/kana checker for Japanese official documents โ judging the notation that dictionaries and regular expressions cannot, and citing the normative clause as evidence.
Japan's official-writing guidelines ("Considerations for Creating Official Documents," Council for Cultural Affairs, 7 Jan 2022) require the same word to be written differently by its syntactic role: a formal noun ใใจ in kana, but the substantive ไบ ("the gravity of the matter") in kanji. Uniform dictionary replacement (textlint + prh) collapses each word to one spelling, so wherever both usages appear it is structurally forced to get half of them wrong. Scribe judges the context and attaches the clause it relied on.
Keeps ็ฉ / ๆ in kanji (substantive), fixes ไบโใใจ, ไธใใโใใ ใใ, ่กใชใโ่กใ, ๏ผโใ, ๏ผโ3.
โ Over-converts substantive nouns: ็ฉโใใฎ, ๆโใจใใ are wrong (should stay kanji).
| System | Overall | Hard | Precision | Recall | Over-flag |
|---|---|---|---|---|---|
| (A) prh uniform replacement | 0.56 | 0.51 | 0.56 | 0.56 | 0.43 |
| (B) Jลyล-kanji rule check | 0.50 | 0.50 | 0.00 | 0.00 | 0.00 |
| (D) Scribe (heuristic layer) | 0.94 | 0.94 | 0.94 | 0.94 | 0.06 |
Diagnostic on a synthetic seed corpus (CC0); demonstrates the structural claim, not absolute accuracy on natural text. The trained neural model reaches 0.82 span accuracy on a held-out (by-document) test set.
Hosted Gradio Spaces now require a PRO subscription, so this Space is a static showcase. The full interactive demo runs locally:
git clone https://github.com/NagaYu/scribe-koyobun cd scribe-koyobun pip install -e . && pip install gradio python app.py # or: scribe check doc.txt --profile jichitai
Apache-2.0 ยท Built with a rule layer + a 0.1โ0.2B token-classification model ยท Normative documents' rights belong to their issuers (clauses referenced, not reproduced).