SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Neural Network Language Model
for Chinese Pinyin Input Method Engine
長岡技術科学大学 自然言語処理研究室
修士1年 西山 浩気
Shien-Yuan Chen, Rui Wang, Hai Zhao, 29th Pacific Asia Conference on Language,
Information and Computation pages 455 – 461, Shanghai, China, 10.30-11.1, 2015
1. 概要
2
 NNLMを用いた IMEの構築
back-off n-gram言語モデルに変換する
ことで高性能なIMEを構築
従来のn-gramを用いた手法に比べ、
高い予測性能を獲得
 IME (Input Method Editor)
 キーボード入力を出力したい言語に変換
 多くの中国語のIMEが Pinyin(中国語の発音表現)を採用
 500種類のPinyinから約6,000種類の中国語に
変換する必要がある
2. はじめに
3
IME
 Pinyinから中国語に変換する際に曖昧性
 先行研究 (IME)
 Back-off N-gram language model (BNLMs)
[Chen and Goodman, 1996; 1999; Stolcke, 2002a]
✓ Pinyin IME で広く利用
 Neural Network Language model (NNLMs)
[Bengio et al., 2003; Schwenk, 2007; Le at al.,2010]
✓ IMEとして利用するには 出力に時間がかかりすぎる
2. はじめに
4
 先行研究 (NNLMs 高速化)
 [Arisoy et al., 2014][Vaswani et al.,2013]
[Devlin et al., 2014]
 音声認識, 機械翻訳 タスク
2. はじめに
5
 BNLMs と NNLMs を組み合わせる
 N-gramの確率をNNLMsで再計算
 再計算された確率を使って、
n-gramモデルでIMEを構築する
 モデルの計算過程
1. Pinyin分割
 ルールベースのPinyin分割[Goh et al., 2005]
2. 候補となる単語を取得
 Pinyinの音節に対応する単語を辞書から取得
3. 候補文の生成
2.1 Pinyin IME モデル
6
 モデルの計算過程
3. 候補文の生成
 言語モデル[Chen and Lee, 2000; Zhao et al., 2013]
を用いて、確率が最大となる文を生成
 Vitabiアルゴリズムで最も尤もらしい経路を選択
2.1 Pinyin IME モデル
7
 モデルの計算過程
3. 候補文の生成
 言語モデル[Chen and Lee, 2000; Zhao et al., 2013]
を用いて、確率が最大となる文を生成
2.1 Pinyin IME モデル
8
2.1 Pinyin IME モデル
9
2.2 Back-off n-gram 言語モデル
10
2.3 NNLM-enhanced BNLM 提案手法
13
 NNLMの欠点
 言語モデルの計算コストが大きい
 NNLMの出力 (再計算された確率) で,
BNLMの確率を上書きする
確率の計算を事前にNNLMで行う
実装はBNLMなので高速
3.1 実験設定 実験
14
 中国語コーパス[Yang et al., 2012]
 人民日報から抽出
 単語ごとにpinyinが付与, 単語分割済み
 中国語-pinyin 辞書[Wang et al., 2013a; Wang et al,. 2014]
 914,728語
3.2 実行時間の比較 実験
15
 実行時間を各モデル3回ずつ計測
✓ NNLMがBNLMに比べ100倍近く遅い
✓ 提案手法ではBNLMと同程度の実行速度
3.3 Perplexityの比較 実験
16
 モデルの複雑さを提案手法とBaselineで比較
 Baseline : Trigram言語モデル (Kneser-Ney smoothing)
 提案手法の方がPerplexityは低い
3.4 Pinyin IMEにおいてのパフォーマンス 実験
17
 IMEとして利用する際の正解率を評価
✓ 第一候補文の正解率 (HRF)
✓ 上位10候補文での正解率 (HRF10)
✓ 第一候補文に含まれる単語の正解率(CA)
提案手法により IMEとしての性能が向上
3.4 Pinyin IMEにおいてのパフォーマンス 実験
18
 テストセット
 Pinyinが10~30文字の割合が高い
 提案手法では10文字以上のPinyinに対し、
従来手法に比べて精度が高い
テストセット中のPinyin文字数の分布
4. まとめ
19
 Pinyin IMEの性能向上に向けた取り組み
 従来は Ngram言語モデル
 NNLMを用いた性能向上
 NNLMは出力に時間がかかりIMEに向かない
 Ngramの確率をNNLMで学習させる
✓ 実行時間は従来と同程度
✓ IMEとしての性能が向上

Weitere ähnliche Inhalte

Mehr von 浩気 西山

Semi supervised sequence tagging with bidirectional language models
Semi supervised sequence tagging with bidirectional language modelsSemi supervised sequence tagging with bidirectional language models
Semi supervised sequence tagging with bidirectional language models浩気 西山
 
Classifying Temporal Relations by Bidirectional LSTM over Dependency Paths
Classifying Temporal Relations by Bidirectional LSTM over Dependency PathsClassifying Temporal Relations by Bidirectional LSTM over Dependency Paths
Classifying Temporal Relations by Bidirectional LSTM over Dependency Paths浩気 西山
 
Are emojis predictable
Are emojis predictableAre emojis predictable
Are emojis predictable浩気 西山
 
Semantic analysis and helpfulness prediction of text for online product reviews
Semantic analysis and helpfulness prediction of text  for online product reviewsSemantic analysis and helpfulness prediction of text  for online product reviews
Semantic analysis and helpfulness prediction of text for online product reviews浩気 西山
 
Effective search space reduction for spell correction using character neural ...
Effective search space reduction for spell correction using character neural ...Effective search space reduction for spell correction using character neural ...
Effective search space reduction for spell correction using character neural ...浩気 西山
 
1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム浩気 西山
 
1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム浩気 西山
 

Mehr von 浩気 西山 (7)

Semi supervised sequence tagging with bidirectional language models
Semi supervised sequence tagging with bidirectional language modelsSemi supervised sequence tagging with bidirectional language models
Semi supervised sequence tagging with bidirectional language models
 
Classifying Temporal Relations by Bidirectional LSTM over Dependency Paths
Classifying Temporal Relations by Bidirectional LSTM over Dependency PathsClassifying Temporal Relations by Bidirectional LSTM over Dependency Paths
Classifying Temporal Relations by Bidirectional LSTM over Dependency Paths
 
Are emojis predictable
Are emojis predictableAre emojis predictable
Are emojis predictable
 
Semantic analysis and helpfulness prediction of text for online product reviews
Semantic analysis and helpfulness prediction of text  for online product reviewsSemantic analysis and helpfulness prediction of text  for online product reviews
Semantic analysis and helpfulness prediction of text for online product reviews
 
Effective search space reduction for spell correction using character neural ...
Effective search space reduction for spell correction using character neural ...Effective search space reduction for spell correction using character neural ...
Effective search space reduction for spell correction using character neural ...
 
1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム
 
1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム1.単純パーセプトロンと学習アルゴリズム
1.単純パーセプトロンと学習アルゴリズム
 

Neural Network Language Model For Chinese Pinyin Input Method Engine

  • 1. Neural Network Language Model for Chinese Pinyin Input Method Engine 長岡技術科学大学 自然言語処理研究室 修士1年 西山 浩気 Shien-Yuan Chen, Rui Wang, Hai Zhao, 29th Pacific Asia Conference on Language, Information and Computation pages 455 – 461, Shanghai, China, 10.30-11.1, 2015
  • 2. 1. 概要 2  NNLMを用いた IMEの構築 back-off n-gram言語モデルに変換する ことで高性能なIMEを構築 従来のn-gramを用いた手法に比べ、 高い予測性能を獲得
  • 3.  IME (Input Method Editor)  キーボード入力を出力したい言語に変換  多くの中国語のIMEが Pinyin(中国語の発音表現)を採用  500種類のPinyinから約6,000種類の中国語に 変換する必要がある 2. はじめに 3 IME
  • 4.  Pinyinから中国語に変換する際に曖昧性  先行研究 (IME)  Back-off N-gram language model (BNLMs) [Chen and Goodman, 1996; 1999; Stolcke, 2002a] ✓ Pinyin IME で広く利用  Neural Network Language model (NNLMs) [Bengio et al., 2003; Schwenk, 2007; Le at al.,2010] ✓ IMEとして利用するには 出力に時間がかかりすぎる 2. はじめに 4
  • 5.  先行研究 (NNLMs 高速化)  [Arisoy et al., 2014][Vaswani et al.,2013] [Devlin et al., 2014]  音声認識, 機械翻訳 タスク 2. はじめに 5  BNLMs と NNLMs を組み合わせる  N-gramの確率をNNLMsで再計算  再計算された確率を使って、 n-gramモデルでIMEを構築する
  • 6.  モデルの計算過程 1. Pinyin分割  ルールベースのPinyin分割[Goh et al., 2005] 2. 候補となる単語を取得  Pinyinの音節に対応する単語を辞書から取得 3. 候補文の生成 2.1 Pinyin IME モデル 6
  • 7.  モデルの計算過程 3. 候補文の生成  言語モデル[Chen and Lee, 2000; Zhao et al., 2013] を用いて、確率が最大となる文を生成  Vitabiアルゴリズムで最も尤もらしい経路を選択 2.1 Pinyin IME モデル 7
  • 8.  モデルの計算過程 3. 候補文の生成  言語モデル[Chen and Lee, 2000; Zhao et al., 2013] を用いて、確率が最大となる文を生成 2.1 Pinyin IME モデル 8
  • 9. 2.1 Pinyin IME モデル 9
  • 10. 2.2 Back-off n-gram 言語モデル 10
  • 11. 2.3 NNLM-enhanced BNLM 提案手法 13  NNLMの欠点  言語モデルの計算コストが大きい  NNLMの出力 (再計算された確率) で, BNLMの確率を上書きする 確率の計算を事前にNNLMで行う 実装はBNLMなので高速
  • 12. 3.1 実験設定 実験 14  中国語コーパス[Yang et al., 2012]  人民日報から抽出  単語ごとにpinyinが付与, 単語分割済み  中国語-pinyin 辞書[Wang et al., 2013a; Wang et al,. 2014]  914,728語
  • 13. 3.2 実行時間の比較 実験 15  実行時間を各モデル3回ずつ計測 ✓ NNLMがBNLMに比べ100倍近く遅い ✓ 提案手法ではBNLMと同程度の実行速度
  • 14. 3.3 Perplexityの比較 実験 16  モデルの複雑さを提案手法とBaselineで比較  Baseline : Trigram言語モデル (Kneser-Ney smoothing)  提案手法の方がPerplexityは低い
  • 15. 3.4 Pinyin IMEにおいてのパフォーマンス 実験 17  IMEとして利用する際の正解率を評価 ✓ 第一候補文の正解率 (HRF) ✓ 上位10候補文での正解率 (HRF10) ✓ 第一候補文に含まれる単語の正解率(CA) 提案手法により IMEとしての性能が向上
  • 16. 3.4 Pinyin IMEにおいてのパフォーマンス 実験 18  テストセット  Pinyinが10~30文字の割合が高い  提案手法では10文字以上のPinyinに対し、 従来手法に比べて精度が高い テストセット中のPinyin文字数の分布
  • 17. 4. まとめ 19  Pinyin IMEの性能向上に向けた取り組み  従来は Ngram言語モデル  NNLMを用いた性能向上  NNLMは出力に時間がかかりIMEに向かない  Ngramの確率をNNLMで学習させる ✓ 実行時間は従来と同程度 ✓ IMEとしての性能が向上