next up previous contents
Next: デコーダ Up: 句に基づく統計翻訳 Previous: フレーズテーブル作成法   目次

言語モデル

言語モデルとは, 人間が用いる言葉の自然な並びを確率としてモデル化したもの であり, 膨大な量の単言語データを用いて単語の列や文字の列が起こる 遷移確率を付与したものである.言語モデルには以下のようなものがある.

$ N$ -gram(2.23)

統計翻訳では主に$ N$ -gramを用いる. tri-gramの式を式2.23に示す.

\begin{gather*}\begin{gathered}\sum_{i=0}^{N-1} \log_2 {\frac{count(E_{i-2},E_{i-1},E_{i})}{count(E_{i-2},E_{i-1})}}\hspace{10mm}\end{gather*} (2.23)
$\displaystyle %左にずらすためのスペース
\end{gathered}$ (2.24)




$ E_{i}$ : 英語単語 $ N$ : 英文の単語数
$ C$ : 対訳学習文の頻度  

実際の計算例を(2.24)に示す.

\begin{gather*}\begin{gathered}\log_2P(I~have~a~dog.)\hspace{10mm}\end{gather*} (2.25)
$\displaystyle = \log_2 {\frac{count(I~have~a)}{count(I~have)}}\hspace{10mm}$ (2.26)
$\displaystyle + \log_2 {\frac{count(have~a~dog)}{count(have~a)}}\hspace{10mm}$ (2.27)
$\displaystyle + \log_2 {\frac{count(a~dog.)}{count(a~dog)}}\hspace{10mm}$ (2.28)
$\displaystyle = \log_2 {\frac{140}{1,007}} + \log_2 {\frac{2}{465}} + \log_2 {\frac{14}{31}}\hspace{10mm}$ (2.29)
$\displaystyle = -11.8545 \end{gathered}$ (2.30)

High order Joint Probability(2.25)

本研究では, 言語モデルにTri-gramの代わりに High order Joint Probabilityを使用する. High order Joint Probabilityを式2.25に示す.

\begin{gather*}\begin{gathered}\sum_{j=0}^{M-1}\sum_{i=0}^{N-1} count(J_{j-2},J_{j-1},J_{j},E_{i-2},E_{i-1},E_{i}) \hspace{10mm}\end{gather*} (2.31)
$\displaystyle %左にずらすためのスペース
\hspace{5mm} \times \ \log_2 \frac{cou...
..._{i})}{count(J_{j-2},J_{j-1},J_{j})count(E_{i-2},E_{i-1},E_{i})} \end{gathered}$ (2.32)


$ J_{j}$ : 日本語単語 $ M$ : 日本語文の単語数
$ E_{i}$ : 英語単語 $ N$ : 英文の単語数
$ P$ : 出現確率  

実際の計算例を(2.26)に示す.また, 計算式が長くに及ぶため, 第1項のみ計算例を示す.

\begin{gather*}\begin{gathered}P(ぶらんこが揺れている。~~~~The~swing~is~swinging.)\hspace{10mm}\end{gather*} (2.33)
$\displaystyle = count(ぶらんこ~が~~~~The~swing) log_2 {\frac{count(ぶらんこ~が~~~~The~swing)}{count(ぶらんこ~が)P(The~swing)}} + ...\hspace{10mm}$ (2.34)
$\displaystyle = \frac{1}{100,000} log_2 {\frac {\frac{1}{100,000}} {\frac{2}{100,000} \frac{1}{100,000}}} + ...\hspace{10mm}$ (2.35)
$\displaystyle \end{gathered}$ (2.36)

High order Dice(2.27)

$\displaystyle \sum_{j=0}^{M-1}\sum_{i=0}^{N-1} \log_2 \frac{2 \cdot count(J_{j-...
...-2},E_{i-1},E_{i})} {count(J_{j-2},J_{j-1},J_{j})+count(E_{i-2},E_{i-1},E_{i})}$ (2.37)

実際の計算例を(2.28)に示す.また, 計算式が長くに及ぶため, 第1項のみ計算例を示す.

\begin{displaymath}\begin{split}P(ぶらんこが揺れている。~~~~The~swing~is~swingin...
...0,000}} {\frac{2}{100,000}+\frac{1}{100,000}} + ... \end{split}\end{displaymath} (2.38)

High order Log Linear(2.29)

\begin{gather*}\begin{gathered}\sum_{j=0}^{M-1}\sum_{i=0}^{N-1} \log_2 \left\{ \...
...{j-1},J_{j})}{count(E_{i-2},E_{i-1},E_{i})} \right\} \end{gathered}\end{gather*} (2.39)

実際の計算例を(2.30)に示す.また, 計算式が長くに及ぶため, 第1項のみ計算例を示す.

\begin{gather*}\begin{gathered}P(ぶらんこが揺れている。~~~~The~swing~is~swinging.)\hspace{10mm}\end{gather*} (2.40)
$\displaystyle = \log_2 \left\{ \frac{count(ぶらんこ~が~~~~The~swing)}{count(ぶ�...
... \frac{count(The~swing~~~~ぶらんこ~が)}{count(The~swing)} \right\}\hspace{10mm}$ (2.41)
$\displaystyle = \log_2 \left\{ \frac{\frac{1}{100,000}}{\frac{2}{100,000}} \rig...
...imes \left. \frac{\frac{1}{100,000}}{\frac{1}{100,000}} \right\} \end{gathered}$ (2.42)


next up previous contents
Next: デコーダ Up: 句に基づく統計翻訳 Previous: フレーズテーブル作成法   目次
2020-03-11