目次
背景
- Hu, Zhan, Lin (2026) “Dictionary-Constrained Grapheme-to-Phoneme for Unsegmented Languages from LLM-Annotated Data”(arXiv:2609.19805)を、辞書構築とデータ作成の部分に絞って詳しく整理する
- UniDicの仕組み・mpalignerの仕組みで扱った内容が、この論文の辞書構築の中で実際にどう使われているかが分かる
概要
- 日本語のような分かち書きされない言語では、G2Pは単語分割と多音字判定を同時に解く必要があり、精度の高い学習データの不足がボトルネックになっている
- この論文では、辞書から作った単語ラティス上でCRF(Conditional Random Field)によるスコアリングを行う、分割に依存しないG2Pフレームワークを提案している
- データ不足に対処するため、LLMを使って200万文を超える学習データを生成している
- Joyo-Kanji-Yomiベンチマークで、対象語の読み精度99.62%、対象語の音素誤り率(PER)0.32%、文単位PER 0.14%を達成している
引用
3.1. Dictionary Preparation
Two dictionaries are required for lattice construction and LLM annotation, respectively. Both dictionaries are constructed from the widely used UniDic [13], which comprises approximately 870k entries, encompassing common words, proper nouns, and symbols.
For lattice construction, the dictionary should provide the broadest possible coverage, even though there could be a few noisy entries. Therefore, we retain all entries in UniDic. However, we find that many Kanji characters have standalone readings that are not explicitly listed as independent entries in UniDic, but only occur within compound words. For example, the character 及 has no standalone entry for kyuu, despite this reading occurring frequently in compounds such as 普及 (fukyuu) and 言及 (genkyuu). To remedy this, we employ mpaligner [25] to mine all UniDic entries, yielding approximately 16.6k additional single-character entries.
Conversely, for LLM annotation, the dictionary must be accurate, compact and information-dense. Since UniDic targets fine-grained morphological analysis, words derived from the same base form are fragmented across entries due to conjugation or phonological variations. To streamline this, we group entries by their base form while retaining their POS tags and conjugation attributes. Furthermore, as the primary objective of Japanese G2P is to accurately disambiguate Kanji readings, we filter out entries whose surface forms contain no Kanji characters. Proper nouns are also excluded, as many are context-independent and a single surface form often exhibits multiple equally valid readings. This refinement yields a consolidated dictionary of approximately 151k lexical entries. To improve annotation quality, we partition these into 145k monophonic entries and 6k polyphonic entries.
3.2. LLM Annotation
We subsequently leverage Gemini 3.1 Pro, with thinking level set to high, for downstream data annotation tasks. For each monophonic entry, we prompt the LLM to generate 15 sentences accompanied by their readings, providing the surface form, reading form, POS tags, and conjugation attributes as context. During annotation, the LLM is instructed to first evaluate the validity of the entry and generate instances solely for valid ones, yielding approximately 2.05M sentences.
Since polyphone annotation quality dictates the upper bound of disambiguation performance, we annotate polyphonic entries via a two-stage pipeline: verification and generation. In the verification stage, the LLM assesses the validity of each candidate reading, clusters valid readings that share nearly identical semantics, provides a concise gloss per cluster, and designates a dominant reading for each, resulting in approximately 10.2k groups. In the generation stage, sentences are synthesized per group by prompting the LLM to construct contexts strictly matching the dominant reading. Besides POS tags and conjugation details, we inject the verification glosses and the competing readings of the same surface form, instructing the LLM to build contexts informative enough for a native speaker to uniquely infer the target reading. We generate 30 sentences per group, producing approximately 306k sentences.
Finally, we apply data filtering for the generated data. First, for each generated sentence and its corresponding reading, we construct a word lattice to verify whether the target reading is reachable. This lattice coverage check filters out roughly 0.76% of monophonic data and 0.88% of polyphonic data. Next, in the remaining sentences, we detect any non-dominant or invalid readings identified during polyphone verification: non-dominant readings are mapped to their dominant counterparts, and sentences with invalid readings are discarded. Only 0.06% of sentences need replacement, and no sentence contains invalid readings, which is reasonable as LLMs rarely generate such readings.
As a result, we obtain a final dataset of approximately 2.04M and 303k sentences from monophonic and polyphonic entries, respectively.
辞書構築
- 論文では、ラティス構築用とLLMアノテーション用という、2つの辞書が必要だとしている。どちらもUniDic(約87万エントリ)から作られるが、方針が異なる
| |
ベースとなる辞書: UniDic
- UniDicの仕組みで扱った、約87万エントリを持つUniDicを辞書のベースとして使っている
- エントリには、単語・遷移コスト、書字形・発音形、品詞タグ、活用属性といった情報が含まれる
ラティス構築用の辞書: mpalignerによる単漢字エントリの補完
- ラティス構築用には、UniDicの全エントリを保持した上で、さらにカバレッジを広げている
- 論文では、具体的な理由を次のように説明している
the character 及 has no standalone entry for kyuu, despite this reading occurring frequently in compounds such as 普及(fukyuu) and 言及(genkyuu)
- 実際に確認したが、たしかに、普及の及は及びしか意味が登録されていなかった
- mpalignerの仕組みで扱ったmpalignerを使って、UniDicの全エントリをマイニングし、このような単独では辞書に明示的に登録されていない漢字の読みを、約1.66万件の単漢字エントリとして追加している
- これはまさに、mpaligner記事で扱った「複合語の表記・読みペアをアライメントして、単漢字の読みを補完する」という応用そのものにあたる
LLMアノテーション用の辞書: 15.1万エントリへの整理
- LLMにデータ生成を指示するためには、別の整理された辞書を使っている
- 論文では、辞書の方針を次のように述べている
the dictionary must be accurate, compact and information-dense
- この方針に従い、UniDicのエントリを基本形でグルーピングしつつ、品詞タグ・活用属性は保持し、漢字を含まないエントリや固有名詞を除外することで、約15.1万エントリに整理している
- このうち、14.5万エントリが単一の読みしか持たないモノフォニックエントリ、6千エントリが複数の読みを持つポリフォニックエントリ
ラティスの構造
- ラティスは、ノードが単語分割の候補位置、エッジが辞書エントリを表す有向非巡回グラフ(DAG)として構築される
- MeCabの仕組みで扱ったラティスと同じ構造だが、形態素解析として妥当な分割パスだけでなく、G2Pとして妥当なパスも許容する
- これによって、単語分割の誤りが後段の読み推定に伝播してしまう問題を避けるため、潜在的な単語分割そのものを周辺化(marginalize out)して扱う
データ作成: LLMによるアノテーション
- LLMアノテーションとは、一言でいえば「UniDicの辞書情報だけでは足りない、実際の学習文をLLMに作らせる処理」。全体のフローは以下の通り
| |
- Polyでは読み分けのアノテーション品質がdisambiguation性能の上限を決めるため、論文ではverification→generationの二段階パイプラインを採用している。Verificationでは候補読みの妥当性を確認し、意味がほぼ同じ読みをまとめた上で、各groupを単位として生成を行う
使用したLLM
- Gemini 3.1 Proを、thinking levelをhighに設定して、データアノテーションに使用している
モノフォニックエントリ: 1エントリあたり15文
- モノフォニック(単一の読みしか持たない)エントリそれぞれに対して、書字形・発音形・品詞タグ・活用属性を文脈として与え、15文とその読みを生成するようLLMに指示している
- この結果、約205万文が生成されている
ポリフォニックエントリ: 検証→生成の2段階パイプライン
- ポリフォニック(複数の読みを持つ)エントリは、2段階のパイプラインで処理される。論文では、この部分の重要性を次のように述べている
Since polyphone annotation quality dictates the upper bound of disambiguation performance, we annotate polyphonic entries via a two-stage pipeline: verification and generation.
Verification(検証): 候補読みの整理
- 論文では、検証段階を次のように説明している
the LLM assesses the validity of each candidate reading, clusters valid readings that share nearly identical semantics, provides a concise gloss per cluster, and designates a dominant reading for each
- 誤解しやすい点として、「約6千のポリフォニックエントリ同士を1つのクラスタリング処理にかけて、約1.02万グループにまとめた」わけではない。論文の記述からは、各ポリフォニックエントリが持つ候補読みをそのエントリ内でクラスタリングし、その結果として全体で約1.02万グループになると解釈できる
| |
- このクラスタリングは、約6千のポリフォニックエントリ同士をクラスタリングする処理ではなく、各ポリフォニックエントリが持つ候補読みを、そのエントリの内部で整理する処理である
Generation(生成): クラスタ単位での文章生成
- 生成段階では、Verificationで作成した意味クラスタを単位として、文章を生成する
- dominant reading(代表として指定された読み)に厳密に一致する文脈を構築する。この際、検証段階で得た語義と、同じ表記を持つ競合する読みの情報も与えることで、母語話者がその文脈だけで対象の読みを一意に推定できるような、十分に情報量のある文脈を作るようLLMに指示する
- 1グループあたり30文、合計約30.6万文が生成されている
品質フィルタリング
- 生成されたデータには、2段階の品質検証が行われている
- ラティスのカバレッジ確認: 生成された文とその読みについて単語ラティスを構築し、対象の読みがラティス上で到達可能かを検証する。この検証で、モノフォニックデータの約0.76%、ポリフォニックデータの約0.88%が除外される
- 読みの妥当性確認: ポリフォニック検証の際に無効と判定された読みが含まれていないかを確認する。支配的でない読みは支配的な読みに変換し、無効な読みを含む文は破棄する。置き換えが必要だったのは全体の0.06%のみ
最終的なデータセット構成
- 最終的な学習データは、モノフォニックエントリ由来が約204万文、ポリフォニックエントリ由来が約30.3万文、合計で約234万文になる
自分の再現実装による確認結果
- ここまでは論文自体の記述。以下は、論文の手順を自分で再現実装してみた際の確認結果であり、論文そのものの数値ではない
LLMアノテーション用辞書の再現
- LLMアノテーション用辞書を再現するため、UniDicのエントリを論文の条件に従って基本形単位に整理・統合する必要がある。ただし、論文のいう"base form"がUniDicのどのフィールドに対応するかは明記されていない
| 手順 | 実施した処理 | 結果 |
|---|---|---|
| 1 | UniDic-CWJ 3.1.0を入力に使用 | 元データ約87.9万行 |
| 2 | 漢字を含む語を対象にする | 漢字なしを除外 |
| 3 | pos2 == “固有名詞” を除外 | 固有名詞を除外 |
| 4 | orthBaseが同じエントリをグループ化 | 151,234グループ |
| 5 | グループ内の異なるpronBaseの数を数える | Mono/Polyを分類 |
| 6 | pronBaseが1種類ならMono、2種類以上ならPoly | Mono 143,905、Poly 7,329 |
- Mono/Polyの分類は、同じorthBase(基本形表記)に対して、異なるpronBase(読み)が何種類あるかで判定する
- Poly候補(複数読み): orthBase=人気 → pronBase=ニンキ、ヒトケ(2種類)
- Mono候補(単一読み): orthBase=書く → pronBase=カク(1種類)
- 論文の数値(151k、145k、6k)とは近いが完全には一致しない
- 注意点として、orthBaseは「送り仮名まで含めた見出し語全体(活用の基本形)」単位でグループ化されるため、同じ漢字「生」を含む「生まれる(ウマレル)」「生える(ハエル)」「生む(ウム)」はそれぞれ独立したMonoグループとして扱われ、「生」という字自体の多読み性を横断的にまとめる仕組みにはなっていない。これが論文の言う"base form"と完全に同じ定義であるかは確認できていない
ラティス用辞書(mpaligner補完)の再現
- ラティス構築用には、UniDicの全エントリ(約87.9万行)を保持しつつ、熟語内にしか登場しない漢字の単独読み(「及」の例など)を補完する
| 手順 | 実施した処理 | 結果 |
|---|---|---|
| 1 | UniDicの全エントリを保持 | 元データ約87.9万行 |
| 2 | mpalignerの既存アライメント結果から、漢字1文字と読みの対応を抽出 | 13,090ペア |
| 3 | 抽出条件を拡張し、文字数と読み単位数が等しい複数字ブロックも位置対応で分割 | 16,799ペア |
| 4 | 旧方式との差集合を算出 | 3,709ペア増加 |
| 5 | 現行推論辞書のsurface→pron∪kanaと照合 | 11,949ペアが新規候補 |
- 新方式の分割例: 旧方式では抽出されなかった複数字ブロックに対し、文字数と読み単位数が等しい場合、位置対応で分割して抽出する。例えば「蕎:麦→ソ:バ」という抽出結果は、「蕎→ソ」「麦→バ」に分割される
- この分割が常に正しい保証はない
- 注意: 16,799という値は、論文の「約16.6k」を再現できたと確認された値ではない。論文側の正確な抽出条件・重複除去・正規化の詳細は不明であり、現時点ではこの数値を論文の結果と対応づけず、独立した実験結果として扱っている
ここまでの辞書構築の結論
| 辞書 | 採用・検証した方法 | 得られた結果 |
|---|---|---|
| LLM用辞書 | orthBaseでグループ化、固有名詞・漢字なしを除外、異なるpronBase数で分類 | 151,234件(Mono 143,905/Poly 7,329) |
| ラティス用辞書 | UniDicの全件を保持し、mpalignerの単漢字対応を追加 | 旧方式で13,090ペア抽出 |
| ラティス補完の別研究 | mpalignerの等長複数字ブロックも分割 | 16,799候補、現行辞書にない新規候補11,949件 |
MonoとPolyの生成戦略の比較
- 構築した辞書を用い、MonoとPolyで異なる単位・戦略で文章を生成する。最大の違いは、Monoは辞書エントリがそのまま生成単位になるのに対し、Polyはさらに意味・用法でクラスタリングしてから生成する点
| 項目 | Mono | Poly |
|---|---|---|
| 何か | 読みが1種類のentry | 複数読みを持つentry |
| 論文の辞書での数 | 約145k entries | 約6k entries |
| 辞書作成後 | 基本的にそのまま生成対象にする | さらに意味でクラスタリングする |
| クラスタリング | なし | あり |
| 生成するときの単位 | 1 entry | 1 semantic group |
| 1単位あたり生成数 | 15文 | 30文 |
| 今の再現実装での数 | 143,905 | 7,329 |
| 現在の課題 | orthBaseが論文のbase form相当か確認 | 同じ確認+その後のsemantic clustering |
ポリフォニックエントリのクラスタリングの再現例
- 自分の再現実装でクラスタリングを試したところ、以下のような結果が得られた
- 「端」: 7クラスタ(タン・ツマ・ハ・ハシ・ハシタ・ハタ・ハナ)→ 7ユニット×30文=210文
- 「上る」: 2クラスタ(ノボル・アガル)→ 2ユニット×30文=60文
- 「幼い」: 候補読みは2つ(イトケナイ・オサナイ)あるが、意味的に同じとみなされ1クラスタに統合→1ユニット×30文=30文
- 「上手」: 3クラスタ(ジョウズ系・ウワテ系・カミテ系)
- これらは自分の再現パイロット実装による結果であり、論文自体がこれらの具体例を挙げているわけではない
留意事項
- 本記事でダブルクオート・引用ブロックで示した部分は、論文の記述に直接基づく
- 一方、Verificationの実際のプロンプトの内容や、妥当性・クラスタリングの細かい判定基準、LLMへの正確な入力形式などは、論文の記述からは確定できない
- そのため、これらの処理を実際に再現実装する場合は、論文の記述に基づく推測を含んだ再現アプローチになる
再現上まだ分かっていないこと
- 論文の言う"base form"が、UniDicの具体的にどのフィールド(orthBase、lemmaなど)に対応するか
- Verificationで実際に使われたプロンプトの詳細
- 候補読み(candidate reading)の厳密な作り方
- 1つの候補読みが複数の意味クラスタに属することを許容するかどうか
- mpalignerで約16.6k件を得るための、正確な抽出・重複除去・正規化の条件
まとめ
- Dictionary-Constrained G2Pの辞書構築は、UniDic(約87万エントリ)をベースに、mpalignerで単漢字エントリを約1.66万件補完したラティス用辞書と、15.1万エントリに整理したLLMアノテーション用辞書という、2種類の辞書を使い分けている
- LLMアノテーション用辞書は、14.5万のモノフォニックエントリと6千のポリフォニックエントリに分かれ、前者は1エントリ15文、後者は検証→生成の2段階パイプラインで1グループ30文を生成している
- 生成データは、ラティスのカバレッジ確認と読みの妥当性確認という2段階の品質フィルタリングを経て、最終的に約234万文の学習データになる
- UniDic・mpalignerという既存のツールを、辞書構築の土台として組み合わせている点が特徴的
参考文献
- Hu, R., Zhan, Z., & Lin, X. (2026). “Dictionary-Constrained Grapheme-to-Phoneme for Unsegmented Languages from LLM-Annotated Data” (arXiv:2609.19805)
- UniDicの仕組み
- mpalignerの仕組み
- MeCabの仕組み
- G2Pライブラリを作る時に調査した先行文献などのメモ
