Share
Embed
Yuino: OSS kana-kanji conversion system that combines LLM and a dictionary-based approach
COSCUP2026で発表したスライドです。
LLMでも辞書を使って変換したい!という想いを込めてYuinoというかな漢字変換を実装中です。
Masahiko Hashimoto
November 20, 2026
Transcript
24 slides
-
2026 Japan Track Yuino: OSS kana-kanji conversion system that combines
LLM and a dictionary-based approach Masahiko Hashimoto 2026 Japan Track -
who am I. Name: Masahiko Hashimoto Belong to: – Japan
openSUSE User group – Tokaido Linux User Group – Open Source Conference Nagoya Staff Tastes: Writing a novel Works: Building an AI in a research lab (Federated Learning) 2026 Japan Track -
table of contents : 1. What’s Kana-Kanji conversion? 2. Approach
to Kana-to-Kanji Conversion Using LLMs 3. Yuino's Approach ~Why is a dictionary necessary?~ 4. Modification of an original LLM model 5. Future Challenges 2026 Japan Track -
What’s Kana-Kanji conversion? Japanese language has Hiragana and kanji, and
both Hiragana and Kanji are used when writing example) My name is Masahiko Hashimoto Hiragana : わたしのなまえははしもとまさひこです ← Keyboard input Kanji & Hiragana: 私の名前は橋本雅彦です Input from the keyboard is done in hiragana, which is then converted to Hiragana and Kanji Both look like conversion errors... ※Example of using Mozc 2026 Japan Track -
OSS Kana-Kanji conversion • • Anthy – Such as Fedora,
It is used as the standard for Red Hat-based Linux distributions. – Development began at Kyoto University in 2000, and maintenance is currently continued primarily by Red Hat inc. Mozc – It is standard Japanese input method across a wide range of Linux distributions, such as Ubuntu, Debian, and openSUSE. – It has been under continuous development by Google since 2009 as the open-source version of Google Japanese Input. 2026 Japan Track -
OSS Kana-Kanji conversion *Issue • • Anthy – Such as
Fedora, It is used as the standard for Red Hat-based Linux distributions. – Development began at Kyoto University in 2000, and maintenance is currently continued primarily by Red Hat inc. Mozc – It is standard Japanese input method across a wide range of Linux distributions, such as Ubuntu, Debian, and openSUSE. – It has been under continuous development by Google since 2009 as the open-source version of Google Japanese Input. Can this truly be called "modern"? 2026 Japan Track -
The era of generative AI has arrived Development of Kana-Kanji
conversion using LLM has begun in OSS space as well. (Although it cannot yet be said to be widely adopted…) • azooKey https://github.com/azooKey/azooKey • karukan https://github.com/togatoga/karukan • mozKey https://github.com/koyasi777/mozkey 2026 Japan Track -
azooKey azooKey is a pioneering and the most widely used
OSS kana-tokanji conversion using LLM. Speculative decoding is used, in which queries regarding conversion candidates are sent to an LLM. 2026 Japan Track Draft candidates (not generated by LLM) https://zenn.dev/azookey/articles/ea15bacf81521e LLM Tasks: Check whether the Japanese is correct Repeatedly submit queries to select the best conversion candidate. -
Issues of Kana-Kanji Conversion Using Generative AI It is difficult
to perform Kana-Kanji conversion using only an LLM. Many approaches involve a model that acts as a companion to the LLM. Conversion Other Model (not LLM) LLM Guide runners 2026 Japan Track -
Going back to 2019... An incident occurred within the Japanese
Linux distribution developer community. We can't convert "Reiwa"! Reiwa ( 令和 ) is the new Japanese era name that began in 2019. Even if we try to convert “Reiwa” on Linux… 1. "Reiwa" is missing from the conversion dictionary. 2. Even if we wanted to create a model, there are no datasets that include the “Reiwa” era. 2026 Japan Track -
Return to the topic of generative AI Creating LLMs and
other machine learning models requires massive datasets. However, whenever a new era name is introduced, it becomes necessary to rebuild the model using data that does not yet exist. It's an impossible game! Conversion 令和 令和 令和 There is no data to train with. 2026 Japan Track Other Model (not LLM) LLM Guide runners -
Going back to 2019 once more Mozc, as used at
the time (or even now), performs dictionary-based conversion. Therefore, by copying and pasting the parameters listed in the dictionary, we can reuse them for other words. In other words, we can enable the conversion by copying the parameters for the previous era "Heisei," and adding the parameters for "Reiwa" to the dictionary. 平成 (Heisei) xxxxx yyyyy zzzzz 2026 Japan Track 令和 (Reiwa) Copy the parameters as-is and add them to the dictionary xxxxx yyyyy zzzzz -
Yuino's Approach ~Why is a dictionary necessary?~ The "Yuino" system
I propose is a conversion algorithm that predicts the next word using an LLM, while still building upon conventional dictionary-based methods. Since each word in the dictionary can be converted into text, we can add new words simply by copying and pasting. Previous words 私 令和 平成 わたし れいわ へいせい xxxx yyyy zzzz Yuino LLM (Transformer model) Dictionary (text-based) 2026 Japan Track Next word (candidate) -
Why is it difficult to perform Kana-Kanji conversion using an
LLM alone? The fundamental processing of an LLM is a problem of selecting the next token. The tokens used in LLMs do not necessarily correspond exactly to word-level divisions. Tokens split by the tokenizer Vocab-size: 30,000 ~ 200,000 insufficient for Kana-Kanji conversion Since the vocabulary size of an LLM tokenizer is limited, the size of the dictionary used for KanaKanji conversion cannot be adopted as-is. LLM (transformer model) Therefore, it is impossible to perform kana-kanji conversion directly using an LLM unless the LLM's input and output themselves are modified. lm_head A layer that treats the LLM's output as a next-token selection problem 2026 Japan Track Next token -
Yuino's Approach ~the world of zeros and ones~ Yuino does
not use any standard tokenizers at all. Each word is represented as a sequence of 64 zeros and ones, converted into a single `uint64` value, and stored in the dictionary as a parameter. The part of speech, which indicates the grammatical nature of each word, is also represented by a sequence of 64 zeros and ones. A total of 128 zeros and ones are used as input to the model for each word. A layer that compresses LLM output into 128 zeros and ones 2026 Japan Track Previous words A sequence of words represented by 128 zeros and ones Yuino LLM (transformer model) lm_head Next word -
Yuino’s convert and dictionary Yuino performs kana-kanji conversion using a
sequence of 128 zeros and ones. Ex: 私のなまえはなかのです Generate Fixed words (LLM Input) (LLM Output) Dictionary なまえ , 名前 , 11287, なまえ , 生絵 , 2343201, なまえ , 艶絵 , 11140832, なまえ , 菜真恵 ,2344215, 64bit DEX (UINT64) word embedding Word embedding Candidates: 名前 生絵 艶絵 菜真恵 Select the one with the closest vector shape 2026 Japan Track Decimal to binary conversion 11287 (DEX) ↓ 101100000110111 (BIN) ↓ [0,0...,0,0,0,0,0,0,1,1,0,1,1,1] (Tensor of size 64) noun noun noun person’s name Part of speech Pert of speech noun ↓ (Convert to a tensor in the same way) ↓ [1,1..,0,0,1,1,0,1,0,1,0,1,0,0] (Tensor of size 64) [0,0,0,0,0,0,0,0,...,0,0,1,1,0,1,0,1,0,1,0,0] (Tensor of size 128) concat -
How much have you finished? Yuino is currently under active
development (it is not yet complete). $ pyuino-toybox --Yuino TOY-BOX-かな > はこねおんせんへようこそ 0.5473639369010925 ['[CLS]', ' 羽 '] 0.5501382946968079 ['[CLS]', ' 筐 '] There is still a bit too much noise. 0.6909381747245789 ['[CLS]', ' はこね '] 1.3568682670593262 ['[CLS]', ' はこね ', ' お '] 1.3223243355751038 ['[CLS]', ' 筐 ', ' ネオン '] 1.4771115183830261 ['[CLS]', ' はこね ', ' オンセ '] 0.6929624676704407 ['[CLS]', ' 箱根温泉 '] It looks like the part-of-speech 1.1179965436458588 ['[CLS]', ' 箱根温泉 ', ' へ '] tagging was done correctly. 1.5004573464393616 ['[CLS]', ' 箱根温泉 ', ' へよ '] 1.525723159313202 ['[CLS]', ' 箱根温泉 ', ' へよう '] 1.8744302093982697 ['[CLS]', ' 箱根温泉 ', ' へ ', ' 楊子 '] 1.8722382485866547 ['[CLS]', ' 箱根温泉 ', ' へ ', ' ようこそ '] 箱根温泉へようこそ : 0.990405 sec 漢字 : 箱根温泉へようこそ The conversion speed is also 2026 Japan Track within an acceptable range. -
Future Challenges Training a completely original LLM from scratch entails
relatively high training costs. →We might need to build a system that allows for the continuous learning of new words. (It appears that the infrastructure for continuously training LLMs on edge PCs is not yet in place.) GitHub URL: https://github.com/yuino-im/pyuino 2026 Japan Track