Mozc is a Japanese input method engine that converts romanized or kana keystrokes into Japanese kanji, kana, and mixed text with predictive conversion. It functions as a cross-platform input method framework, compiling the same engine into platform-specific binaries for Android, Linux, macOS, and Windows.
The engine combines a dictionary-based segmentation system with a hybrid of rule-based and statistical language models to determine word boundaries and predict character sequences. A prefix-tree structure enables real-time, context-aware conversion suggestions as the user types, while a key-event rewriting pipeline transforms raw keystrokes into composable text segments before passing them to the conversion engine.
Mozc manages input through a deterministic state machine that switches between hiragana, katakana, half-width, and direct ASCII modes during composition. The system separates the input method frontend from the conversion engine backend using inter-process communication, keeping the engine platform-independent while allowing platform-specific user interfaces.