Expand description
JP engine state machine — parallel in shape to inputx-wubi’s
WubiEngine and inputx-pinyin’s segmenter so the composite layer
can plug it in next to the existing engines without bespoke wiring.
State per session:
buffer: raw ASCII romaji as the user types (preedit source)candidates: rebuilt on every keystroke, ordered hiragana → katakana → kanji-matching-current-on-yomi
No auto-commit / freq-tuning / pin learning — those are wubi/pinyin concerns and would only add ambiguity to a passthrough-style JP engine at this MVP stage.
Structs§
- Candidate
- One JP candidate with its sub-source category, so the host UI can optionally render a hint (kana vs kanji) on top of the W/P/J source dot at the composite layer.
- Japanese
Engine - JP engine. One per session. Cheap to construct — all data is in
const tables in
crate::romajiandcrate::kanji.