togatoga/karukan
Japanese Input Method System for Linux, macOS, Neural Kana-Kanji Conversion Engine
What it solves
Karukan is a Japanese Input Method Editor (IME) for Linux and macOS that replaces traditional rule-based conversion with a neural-network-based approach to improve the accuracy and naturalness of kana-to-kanji conversion.
How it works
It uses a core engine that combines traditional dictionary lookups with LLM-based inference. Specifically, it leverages llama.cpp to run GPT-2 or Qwen3-based models to predict the most appropriate kanji based on the surrounding text context. It also integrates SudachiDict for its system dictionary and includes a candidate rewriter (ported from Mozc) to handle variations in character width, case, and numeric notation.
Who it’s for
Users of Linux (via fcitx5) and macOS who want a more intelligent, context-aware Japanese input experience that learns from their selection habits.
Highlights
- Neural Conversion: Uses LLMs via llama.cpp for high-quality, context-sensitive Japanese text conversion.
- Live Conversion: Displays conversion results in real-time as the user types, without needing to press the Space key.
- Adaptive Learning: Remembers user selections to prioritize preferred candidates in future conversions and predictive text.
- Hybrid Dictionary: Combines a system dictionary built from SudachiDict with support for user dictionaries in Mozc/Google IME formats.
- Rich Candidate Generation: Automatically generates variations for half-width/full-width characters, symbols, and various numeric formats.
- Emoji Support: Supports both phonetic input (e.g., "pien" for 🥺) and Slack-style trigger queries (e.g., ":smile").
Related
- Project
- Project
- Project
- Dispatch
- Project