Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mtbookv2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
NiuTrans
mtbookv2
Commits
1489baae
Commit
1489baae
authored
Dec 20, 2020
by
曹润柘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix 5-8
parent
7e02a60f
全部展开
显示空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
170 行增加
和
165 行删除
+170
-165
Chapter5/Figures/figure-different-translation-candidate-space.tex
+6
-6
Chapter5/Figures/figure-greedy-mt-decoding-process-1.tex
+2
-2
Chapter5/Figures/figure-greedy-mt-decoding-process-3.tex
+2
-2
Chapter5/Figures/figure-process-of-machine-translation.tex
+8
-8
Chapter5/Figures/figure-scores-of-different-translation_model&language_model.tex
+2
-2
Chapter5/Figures/figure-zh-en-translation-sentence-pairs&word-alignment-connection.tex
+2
-2
Chapter5/chapter5.tex
+1
-1
Chapter6/Figures/figure-alignment-matrix-for-zh-to-en-translation.tex
+3
-2
Chapter6/Figures/figure-examples-of-sequential-translation-and-reorder-translation.tex
+3
-2
Chapter6/chapter6.tex
+13
-13
Chapter7/Figures/figure-basic-process-of-translation.tex
+5
-4
Chapter7/Figures/figure-example-of-hypothesis-recombination.tex
+20
-20
Chapter7/Figures/figure-example-of-stack-decode.tex
+7
-7
Chapter7/Figures/figure-judge-type-of-reorder-method.tex
+2
-2
Chapter7/Figures/figure-search-space-representation-of-feature-weight.tex
+4
-3
Chapter7/Figures/figure-translation-hypothesis-extension.tex
+35
-35
Chapter7/Figures/figure-word-and-phrase-translation-regard-as-path.tex
+0
-0
Chapter7/Figures/figure-word-translation-regard-as-path.tex
+19
-19
Chapter7/chapter7.tex
+13
-13
Chapter8/Figures/figure-different-representations-of-syntax-tree.tex
+2
-1
Chapter8/Figures/figure-example-of-cky-algorithm-execution.tex
+4
-4
Chapter8/Figures/figure-execution-of-cube-pruning.tex
+4
-4
Chapter8/Figures/figure-structure-of-chart.tex
+2
-2
Chapter8/chapter8.tex
+11
-11
没有找到文件。
Chapter5/Figures/figure-different-translation-candidate-space.tex
查看文件 @
1489baae
...
@@ -23,13 +23,13 @@
...
@@ -23,13 +23,13 @@
\node
[draw,dashed,ublue,fill=blue!10,thick,anchor=center,circle,minimum size=18pt] (t6) at ([xshift=3em]t2.east)
{}
;
\node
[draw,dashed,ublue,fill=blue!10,thick,anchor=center,circle,minimum size=18pt] (t6) at ([xshift=3em]t2.east)
{}
;
\node
[draw,dashed,ublue,fill=blue!10,thick,anchor=center,circle,minimum size=18pt] (t7) at ([xshift=3em]t4.east)
{}
;
\node
[draw,dashed,ublue,fill=blue!10,thick,anchor=center,circle,minimum size=18pt] (t7) at ([xshift=3em]t4.east)
{}
;
\draw
[->,thick
,] (s.north east) .. controls +(north east:1em) and +(north west:1em).. (t1.north west) node[pos=0.5,below]
{
\tiny
{
P (
$
\seq
{
t
}_
1
|
\seq
{
s
}$
)=0.1
}}
;
\draw
[->,thick
] (s.north east) .. controls +(north east:1em) and +(north west:1em).. (t1.north west) node[pos=0.5,below]
{
\tiny
{$
\funp
{
P
}
(
\seq
{
t
}_
1
|
\seq
{
s
}
)=
0
.
1
$
}}
;
\draw
[->,thick
,] (s.60) .. controls +(50:4em) and +(west:1em).. (t2.west) node[pos=0.5,below]
{
\tiny
{
P(
$
\seq
{
t
}_
2
|
\seq
{
s
}$
)=0.2
}}
;
\draw
[->,thick
] (s.60) .. controls +(50:4em) and +(west:1em).. (t2.west) node[pos=0.5,below]
{
\tiny
{$
\funp
{
P
}
(
\seq
{
t
}_
2
|
\seq
{
s
}
)=
0
.
2
$
}}
;
\draw
[->,thick
,] (s.north) .. controls +(70:4em) and +(west:1em).. (t3.west) node[pos=0.5,above,xshift=-1em]
{
\tiny
{
P(
$
\seq
{
t
}_
3
|
\seq
{
s
}$
)=0.3
}}
;
\draw
[->,thick
] (s.north) .. controls +(70:4em) and +(west:1em).. (t3.west) node[pos=0.5,above,xshift=-1em]
{
\tiny
{$
\funp
{
P
}
(
\seq
{
t
}_
3
|
\seq
{
s
}
)=
0
.
3
$
}}
;
\draw
[->,thick
,] (s.south east) .. controls +(300:3em) and +(south west:1em).. (t4.south west) node[pos=0.5,below]
{
\tiny
{
P(
$
\seq
{
t
}_
4
|
\seq
{
s
}$
)=0.1
}}
;
\draw
[->,thick
] (s.south east) .. controls +(300:3em) and +(south west:1em).. (t4.south west) node[pos=0.5,below]
{
\tiny
{$
\funp
{
P
}
(
\seq
{
t
}_
4
|
\seq
{
s
}
)=
0
.
1
$
}}
;
\node
[anchor=center] (foot1) at ([xshift=3.8em,yshift=-3
em]s1.south)
{
\footnotesize
{
人的翻译候选空间
}}
;
\node
[anchor=center] (foot1) at ([xshift=3.8em,yshift=-3
.5em]s1.south)
{
\small
{
(a)
人的翻译候选空间
}}
;
\node
[anchor=center] (foot2) at ([xshift=7em,yshift=-3
em]s.south)
{
\footnotesize
{
机器的翻译候选空间
}}
;
\node
[anchor=center] (foot2) at ([xshift=7em,yshift=-3
.5em]s.south)
{
\small
{
(b)
机器的翻译候选空间
}}
;
\end{tikzpicture}
\end{tikzpicture}
...
...
Chapter5/Figures/figure-greedy-mt-decoding-process-1.tex
查看文件 @
1489baae
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-1.3em,yshift=-8.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-1.3em,yshift=-8.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=north west] (foot1) at ([xshift=
0.0em,yshift=-18.0em]translabel.south west)
{
\scriptsize
{
(a)
\;
4:
$
h
=
\phi
$}}
;
\node
[anchor=north west] (foot1) at ([xshift=
4.0em,yshift=-18.0em]translabel.south west)
{
\small
{
(a)
\;
4:
$
h
=
\phi
$}}
;
}
}
\end{scope}
\end{scope}
...
@@ -233,7 +233,7 @@
...
@@ -233,7 +233,7 @@
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-1.3em,yshift=-8.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-1.3em,yshift=-8.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=north west] (foot2) at ([xshift=
0.0em,yshift=-18.0em]translabel.south west)
{
\scriptsize
{
(b)
\;
6:
\textbf
{
if
}
$
used
[
j
]=
$
\textbf
{
false
}
\textbf
{
then
}}}
;
\node
[anchor=north west] (foot2) at ([xshift=
-4.0em,yshift=-18.0em]translabel.south west)
{
\small
{
(b)
\;
6:
\textbf
{
if
}
$
used
[
j
]=
$
\textbf
{
false
}
\textbf
{
then
}}}
;
}
}
{
%大大的join
{
%大大的join
\node
[anchor=center,draw=ublue,circle,thick,fill=white,inner sep=2.5pt,circular drop shadow=
{
shadow xshift=0.1em,shadow yshift=-0.1em
}
] (join) at ([xshift=4em,yshift=-1em]hlabel.north east)
{
\tiny
{
\textsc
{
Join
}}}
;
\node
[anchor=center,draw=ublue,circle,thick,fill=white,inner sep=2.5pt,circular drop shadow=
{
shadow xshift=0.1em,shadow yshift=-0.1em
}
] (join) at ([xshift=4em,yshift=-1em]hlabel.north east)
{
\tiny
{
\textsc
{
Join
}}}
;
...
...
Chapter5/Figures/figure-greedy-mt-decoding-process-3.tex
查看文件 @
1489baae
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-0.7em,yshift=-7.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-0.7em,yshift=-7.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
}
}
\node
[anchor=north west] (foot1) at ([xshift=
0.0em,yshift=-12.3em]translabel.south west)
{
\scriptsize
{
(c)
\;
7:
$
h
=
h
\cup
\textrm
{
\textsc
{
Join
}}
(
best,
\pi
[
j
])
$}}
;
\node
[anchor=north west] (foot1) at ([xshift=
-2.0em,yshift=-12.3em]translabel.south west)
{
\small
{
(c)
\;
7:
$
h
=
h
\cup
\textrm
{
\textsc
{
Join
}}
(
best,
\pi
[
j
])
$}}
;
{
%大大的join
{
%大大的join
\node
[anchor=center,draw=ublue,circle,thick,fill=white,inner sep=2.5pt,circular drop shadow=
{
shadow xshift=0.1em,shadow yshift=-0.1em
}
] (join) at ([xshift=4em,yshift=-1em]hlabel.north east)
{
\tiny
{
\textsc
{
Join
}}}
;
\node
[anchor=center,draw=ublue,circle,thick,fill=white,inner sep=2.5pt,circular drop shadow=
{
shadow xshift=0.1em,shadow yshift=-0.1em
}
] (join) at ([xshift=4em,yshift=-1em]hlabel.north east)
{
\tiny
{
\textsc
{
Join
}}}
;
}
}
...
@@ -283,7 +283,7 @@
...
@@ -283,7 +283,7 @@
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\draw
[-] (glabel.south west) -- ([xshift=3.5in]glabel.south west);
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-0.7em,yshift=-7.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=center,rotate=90] (hlabel2) at ([xshift=-0.7em,yshift=-7.5em]glabel.west)
{
\tiny
{$
h
$
存放临时翻译结果
}}
;
\node
[anchor=north west] (foot2) at ([xshift=
0.0em,yshift=-23.0em]translabel.south west)
{
\scriptsize
{
(d)
\;
8:
$
best
=
\textrm
{
\textsc
{
PruneForTop
1
}}
(
h
)
$}}
;
\node
[anchor=north west] (foot2) at ([xshift=
-5.0em,yshift=-23.0em]translabel.south west)
{
\small
{
(d)
\;
8:
$
best
=
\textrm
{
\textsc
{
PruneForTop
1
}}
(
h
)
$}}
;
}
}
...
...
Chapter5/Figures/figure-process-of-machine-translation.tex
查看文件 @
1489baae
...
@@ -76,16 +76,16 @@
...
@@ -76,16 +76,16 @@
\begin{scope}
\begin{scope}
{
\small
{
\small
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.
6
em,minimum width=2.5em] (ft11) at ([yshift=-1.5in]t11.west)
{
I'm
}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.
5
em,minimum width=2.5em] (ft11) at ([yshift=-1.5in]t11.west)
{
I'm
}
;
\node
[anchor=center,inner sep=2pt,fill=purple!20,minimum height=1.
6
em,minimum width=4.5em] (ft12) at ([xshift=5.0em]ft11.center)
{
satisfied
}
;
\node
[anchor=center,inner sep=2pt,fill=purple!20,minimum height=1.
5
em,minimum width=4.5em] (ft12) at ([xshift=5.0em]ft11.center)
{
satisfied
}
;
\node
[anchor=center,inner sep=2pt,fill=green!20,minimum height=1.
6
em,minimum width=2.5em] (ft13) at ([xshift=5.0em]ft12.center)
{
with
}
;
\node
[anchor=center,inner sep=2pt,fill=green!20,minimum height=1.
5
em,minimum width=2.5em] (ft13) at ([xshift=5.0em]ft12.center)
{
with
}
;
\node
[anchor=center,inner sep=2pt,fill=blue!20,minimum height=1.
6
em,minimum width=2.5em] (ft14) at ([xshift=4.0em]ft13.center)
{
you
}
;
\node
[anchor=center,inner sep=2pt,fill=blue!20,minimum height=1.
5
em,minimum width=2.5em] (ft14) at ([xshift=4.0em]ft13.center)
{
you
}
;
{
{
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.
6
em,minimum width=2.5em] (ft21) at ([yshift=-3em]ft11.west)
{
I'm
}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.
5
em,minimum width=2.5em] (ft21) at ([yshift=-3em]ft11.west)
{
I'm
}
;
\node
[anchor=center,inner sep=2pt,fill=purple!20,minimum height=1.
6
em,minimum width=4.5em] (ft22) at ([xshift=5.0em]ft21.center)
{
satisfy
}
;
\node
[anchor=center,inner sep=2pt,fill=purple!20,minimum height=1.
5
em,minimum width=4.5em] (ft22) at ([xshift=5.0em]ft21.center)
{
satisfy
}
;
\node
[anchor=center,inner sep=2pt,fill=green!20,minimum height=1.
6
em,minimum width=2.5em] (ft23) at ([xshift=5.0em]ft22.center)
{
to
}
;
\node
[anchor=center,inner sep=2pt,fill=green!20,minimum height=1.
5
em,minimum width=2.5em] (ft23) at ([xshift=5.0em]ft22.center)
{
to
}
;
\node
[anchor=center,inner sep=2pt,fill=blue!20,minimum height=1.
6
em,minimum width=2.5em] (ft24) at ([xshift=4.0em]ft23.center)
{
you
}
;
\node
[anchor=center,inner sep=2pt,fill=blue!20,minimum height=1.
5
em,minimum width=2.5em] (ft24) at ([xshift=4.0em]ft23.center)
{
you
}
;
}
}
{
{
...
...
Chapter5/Figures/figure-scores-of-different-translation_model&language_model.tex
查看文件 @
1489baae
%%% outline
%%% outline
%-------------------------------------------------------------------------
%-------------------------------------------------------------------------
\begin{tabular}
{
|
l
| l |
}
\begin{tabular}
{
|
c
| l |
}
\hline
\hline
&
{
\footnotesize
{$
\prod\limits
_{
(
j,i
)
\in
\hat
{
A
}}
\funp
{
P
}
(
s
_
j,t
_
i
)
$}
\color
{
red
}{{
\footnotesize
{$
\times\funp
{
P
}_{
\textrm
{
lm
}}
(
\mathbf
{
t
}
)
$}}}}
\\
\hline
\rule
{
0pt
}{
15pt
}
源语言句子“我对你感到满意”的不同翻译结果
&
{
\footnotesize
{$
\prod\limits
_{
(
j,i
)
\in
\hat
{
A
}}
\funp
{
P
}
(
s
_
j,t
_
i
)
$}
\color
{
red
}{{
\footnotesize
{$
\times\funp
{
P
}_{
\textrm
{
lm
}}
(
\mathbf
{
t
}
)
$}}}}
\\
\hline
\begin{tikzpicture}
\begin{tikzpicture}
...
...
Chapter5/Figures/figure-zh-en-translation-sentence-pairs&word-alignment-connection.tex
查看文件 @
1489baae
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
\node
[anchor=west] (s3) at ([xshift=0.5em]s2.east)
{
你
\footnotesize
{$_
3
$}}
;
\node
[anchor=west] (s3) at ([xshift=0.5em]s2.east)
{
你
\footnotesize
{$_
3
$}}
;
\node
[anchor=west] (s4) at ([xshift=0.5em]s3.east)
{
感到
\footnotesize
{$_
4
$}}
;
\node
[anchor=west] (s4) at ([xshift=0.5em]s3.east)
{
感到
\footnotesize
{$_
4
$}}
;
\node
[anchor=west] (s5) at ([xshift=0.5em]s4.east)
{
满意
\footnotesize
{$_
5
$}}
;
\node
[anchor=west] (s5) at ([xshift=0.5em]s4.east)
{
满意
\footnotesize
{$_
5
$}}
;
\node
[anchor=east] (s) at (s1.west)
{$
\
mathbf
{
s
}
=
$}
;
\node
[anchor=east] (s) at (s1.west)
{$
\
seq
{
s
}
=
$}
;
\end{scope}
\end{scope}
\begin{scope}
[yshift=-3.0em]
\begin{scope}
[yshift=-3.0em]
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
\node
[anchor=west] (t3) at ([xshift=0.3em,yshift=0.1em]t2.east)
{
satisfied
\footnotesize
{$_
3
$}}
;
\node
[anchor=west] (t3) at ([xshift=0.3em,yshift=0.1em]t2.east)
{
satisfied
\footnotesize
{$_
3
$}}
;
\node
[anchor=west] (t4) at ([xshift=0.3em]t3.east)
{
with
\footnotesize
{$_
4
$}}
;
\node
[anchor=west] (t4) at ([xshift=0.3em]t3.east)
{
with
\footnotesize
{$_
4
$}}
;
\node
[anchor=west] (t5) at ([xshift=0.3em,yshift=-0.2em]t4.east)
{
you
\footnotesize
{$_
5
$}}
;
\node
[anchor=west] (t5) at ([xshift=0.3em,yshift=-0.2em]t4.east)
{
you
\footnotesize
{$_
5
$}}
;
\node
[anchor=east] (t) at ([xshift=-0.3em]t1.west)
{$
\
mathbf
{
t
}
=
$}
;
\node
[anchor=east] (t) at ([xshift=-0.3em]t1.west)
{$
\
seq
{
t
}
=
$}
;
\end{scope}
\end{scope}
...
...
Chapter5/chapter5.tex
查看文件 @
1489baae
...
@@ -874,7 +874,7 @@ g(\seq{s},\seq{t}) & \equiv & \prod_{j,i \in \widehat{A}}{\funp{P}(s_j,t_i)} \ti
...
@@ -874,7 +874,7 @@ g(\seq{s},\seq{t}) & \equiv & \prod_{j,i \in \widehat{A}}{\funp{P}(s_j,t_i)} \ti
\parinterval
回到IBM模型的优化问题上。以IBM模型1为例,优化的目标是最大化翻译概率
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
。使用公式
\eqref
{
eq:5-28
}
,可以把这个目标表述为:
\parinterval
回到IBM模型的优化问题上。以IBM模型1为例,优化的目标是最大化翻译概率
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
。使用公式
\eqref
{
eq:5-28
}
,可以把这个目标表述为:
\begin{eqnarray}
\begin{eqnarray}
&
&
\textrm
{
max
}
\Big
(
\frac
{
\varepsilon
}{
(l+1)
^
m
}
\prod
_{
j=1
}^{
m
}
\sum
_{
i=0
}^{
l
}{
f(
{
s
_
j|t
_
i
}
)
}
\Big
)
\nonumber
\\
&
&
\textrm
{
max
}
\Big
(
\frac
{
\varepsilon
}{
(l+1)
^
m
}
\prod
_{
j=1
}^{
m
}
\sum
_{
i=0
}^{
l
}{
f(
{
s
_
j|t
_
i
}
)
}
\Big
)
\nonumber
\\
&
\textrm
{
s.t.
}
&
\textrm
{
任意单词
}
t
_{
y
}
:
\;\sum
_{
s
_
x
}{
f(s
_
x|t
_
y)
}
=
1
\nonumber
&
\textrm
{
s.t.
}
&
\textrm
{
任意单词
}
t
_{
y
}
:
\;\sum
_{
s
_
x
}{
f(s
_
x|t
_
y)
}
=
1
\nonumber
\label
{
eq:5-31
}
\label
{
eq:5-31
}
\end{eqnarray}
\end{eqnarray}
\noindent
其中,
$
\textrm
{
max
}
(
\cdot
)
$
表示最大化,
$
\frac
{
\varepsilon
}{
(
l
+
1
)
^
m
}
\prod
_{
j
=
1
}^{
m
}
\sum
_{
i
=
0
}^{
l
}{
f
(
{
s
_
j|t
_
i
}
)
}$
是目标函数,
$
f
(
{
s
_
j|t
_
i
}
)
$
是模型的参数,
$
\sum
_{
s
_
x
}{
f
(
s
_
x|t
_
y
)
}
=
1
$
是优化的约束条件,以保证翻译概率满足归一化的要求。需要注意的是
$
\{
f
(
s
_
x |t
_
y
)
\}
$
对应了很多参数,每个源语言单词和每个目标语单词的组合都对应一个参数
$
f
(
s
_
x |t
_
y
)
$
。
\noindent
其中,
$
\textrm
{
max
}
(
\cdot
)
$
表示最大化,
$
\frac
{
\varepsilon
}{
(
l
+
1
)
^
m
}
\prod
_{
j
=
1
}^{
m
}
\sum
_{
i
=
0
}^{
l
}{
f
(
{
s
_
j|t
_
i
}
)
}$
是目标函数,
$
f
(
{
s
_
j|t
_
i
}
)
$
是模型的参数,
$
\sum
_{
s
_
x
}{
f
(
s
_
x|t
_
y
)
}
=
1
$
是优化的约束条件,以保证翻译概率满足归一化的要求。需要注意的是
$
\{
f
(
s
_
x |t
_
y
)
\}
$
对应了很多参数,每个源语言单词和每个目标语单词的组合都对应一个参数
$
f
(
s
_
x |t
_
y
)
$
。
...
...
Chapter6/Figures/figure-alignment-matrix-for-zh-to-en-translation.tex
查看文件 @
1489baae
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
2,yshift=0.4em]o.east)
{
satisfied
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
2,yshift=0.4em]o.east)
{
satisfied
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
3,yshift=0.4em]o.east)
{
with
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
3,yshift=0.4em]o.east)
{
with
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
4,yshift=0.4em]o.east)
{
you
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
4,yshift=0.4em]o.east)
{
you
}
;
\node
[anchor=east,inner sep=0pt,font=\
footnotesize
]
at([xshift=
\bc*
4.5,yshift=-1.0cm-
\bc*
4]o.west)
{
(a)对齐实例1
}
;
\node
[anchor=east,inner sep=0pt,font=\
small
]
at([xshift=
\bc*
4.5,yshift=-1.0cm-
\bc*
4]o.west)
{
(a)对齐实例1
}
;
\end{scope}
\end{scope}
\begin{scope}
[xshift=15.0em]
\begin{scope}
[xshift=15.0em]
\filldraw
[fill=white,drop shadow] (0,0) rectangle (
\bc*
8,
\bc*
6);
\filldraw
[fill=white,drop shadow] (0,0) rectangle (
\bc*
8,
\bc*
6);
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
5,yshift=0.4em]o.east)
{
work
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
5,yshift=0.4em]o.east)
{
work
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
6,yshift=0.4em]o.east)
{
every
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
6,yshift=0.4em]o.east)
{
every
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
7,yshift=0.4em]o.east)
{
day
}
;
\node
[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45]
at([xshift=0.1cm+
\bc*
7,yshift=0.4em]o.east)
{
day
}
;
\node
[anchor=east,inner sep=0pt,font=\
footnotesize
]
at([xshift=
\bc*
6.0,yshift=-1.0cm-
\bc*
5]o.west)
{
(b)对齐实例2
}
;
\node
[anchor=east,inner sep=0pt,font=\
small
]
at([xshift=
\bc*
6.0,yshift=-1.0cm-
\bc*
5]o.west)
{
(b)对齐实例2
}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\ No newline at end of file
Chapter6/Figures/figure-examples-of-sequential-translation-and-reorder-translation.tex
查看文件 @
1489baae
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n14.south) -- ([yshift=0.2em]n24.north);
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n14.south) -- ([yshift=0.2em]n24.north);
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n15.south) -- ([yshift=0.2em]n25.north);
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n15.south) -- ([yshift=0.2em]n25.north);
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n16.south) -- ([yshift=0.2em]n26.north);
\draw
[line width=1.2pt,dashed]
([yshift=-0.3em]n16.south) -- ([yshift=0.2em]n26.north);
\node
[anchor=west]
at([xshift=5.5em,yshift=-3em]n21.east)
{
(a)顺序翻译对齐结果
}
;
\node
[anchor=west]
at([xshift=5.5em,yshift=-3em]n21.east)
{
\small
{
(a)顺序翻译对齐结果
}
}
;
\end{scope}
\end{scope}
\begin{scope}
[yshift=-11.5em]
\begin{scope}
[yshift=-11.5em]
\tikzstyle
{
cand
}
= [draw,inner sep=4pt,line width=1pt,align=center,drop shadow,minimum height =1.6em,minimum width=4.2em,fill=green!30]
\tikzstyle
{
cand
}
= [draw,inner sep=4pt,line width=1pt,align=center,drop shadow,minimum height =1.6em,minimum width=4.2em,fill=green!30]
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
\draw
[line width=1.2pt,dashed,out=-40,in=140]
([yshift=-0.3em]n14.south) to ([yshift=0.2em]n26.north);
\draw
[line width=1.2pt,dashed,out=-40,in=140]
([yshift=-0.3em]n14.south) to ([yshift=0.2em]n26.north);
\draw
[line width=1.2pt,dashed,out=-140,in=40]
([yshift=-0.3em]n15.south) to ([yshift=0.2em]n23.north);
\draw
[line width=1.2pt,dashed,out=-140,in=40]
([yshift=-0.3em]n15.south) to ([yshift=0.2em]n23.north);
\draw
[line width=1.2pt,dashed,out=-140,in=40]
([yshift=-0.3em]n16.south) to ([yshift=0.2em]n24.north);
\draw
[line width=1.2pt,dashed,out=-140,in=40]
([yshift=-0.3em]n16.south) to ([yshift=0.2em]n24.north);
\node
[anchor=west]
at([xshift=5.5em,yshift=-3em]n21.east)
{
(b)调序翻译对齐结果
}
;
\node
[anchor=west]
at([xshift=5.5em,yshift=-3em]n21.east)
{
\small
{
(b)调序翻译对齐结果
}
}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
\ No newline at end of file
Chapter6/chapter6.tex
查看文件 @
1489baae
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
\parinterval
对于建模来说,IBM模型1很好地化简了翻译问题,但是由于使用了很强的假设,导致模型和实际情况有较大差异。其中一个比较严重的问题是假设词对齐的生成概率服从均匀分布。IBM模型2抛弃了这个假设
\upcite
{
DBLP:journals/coling/BrownPPM94
}
。它认为词对齐是有倾向性的,它与源语言单词的位置和目标语言单词的位置有关。具体来说,对齐位置
$
a
_
j
$
的生成概率与位置
$
j
$
、源语言句子长度
$
m
$
和目标语言句子长度
$
l
$
有关,形式化表述为:
\parinterval
对于建模来说,IBM模型1很好地化简了翻译问题,但是由于使用了很强的假设,导致模型和实际情况有较大差异。其中一个比较严重的问题是假设词对齐的生成概率服从均匀分布。IBM模型2抛弃了这个假设
\upcite
{
DBLP:journals/coling/BrownPPM94
}
。它认为词对齐是有倾向性的,它与源语言单词的位置和目标语言单词的位置有关。具体来说,对齐位置
$
a
_
j
$
的生成概率与位置
$
j
$
、源语言句子长度
$
m
$
和目标语言句子长度
$
l
$
有关,形式化表述为:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(a
_
j|a
_
1
^{
j-1
}
,s
_
1
^{
j-1
}
,m,
\seq
{
t
}
)
\equiv
a(a
_
j|j,m,l)
\funp
{
P
}
(a
_
j|a
_
1
^{
j-1
}
,s
_
1
^{
j-1
}
,m,
\seq
{
t
}
)
&
\equiv
&
a(a
_
j|j,m,l)
\label
{
eq:6-1
}
\label
{
eq:6-1
}
\end{eqnarray}
\end{eqnarray}
...
@@ -132,7 +132,7 @@
...
@@ -132,7 +132,7 @@
\parinterval
针对此问题,基于HMM的词对齐模型抛弃了IBM模型1-2的绝对位置假设,将一阶隐马尔可夫模型用于词对齐问题
\upcite
{
vogel1996hmm
}
。HMM词对齐模型认为,单词与单词之间并不是毫无联系的,对齐概率应该取决于对齐位置的差异而不是本身单词所在的位置。具体来说,位置
$
j
$
的对齐概率
$
a
_
j
$
与前一个位置
$
j
-
1
$
的对齐位置
$
a
_{
j
-
1
}$
和译文长度
$
l
$
有关,形式化的表述为:
\parinterval
针对此问题,基于HMM的词对齐模型抛弃了IBM模型1-2的绝对位置假设,将一阶隐马尔可夫模型用于词对齐问题
\upcite
{
vogel1996hmm
}
。HMM词对齐模型认为,单词与单词之间并不是毫无联系的,对齐概率应该取决于对齐位置的差异而不是本身单词所在的位置。具体来说,位置
$
j
$
的对齐概率
$
a
_
j
$
与前一个位置
$
j
-
1
$
的对齐位置
$
a
_{
j
-
1
}$
和译文长度
$
l
$
有关,形式化的表述为:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(a
_{
j
}
|a
_{
1
}^{
j-1
}
,s
_{
1
}^{
j-1
}
,m,
\seq
{
t
}
)
\equiv
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)
\funp
{
P
}
(a
_{
j
}
|a
_{
1
}^{
j-1
}
,s
_{
1
}^{
j-1
}
,m,
\seq
{
t
}
)
&
\equiv
&
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)
\label
{
eq:6-6
}
\label
{
eq:6-6
}
\end{eqnarray}
\end{eqnarray}
...
@@ -140,13 +140,13 @@
...
@@ -140,13 +140,13 @@
\parinterval
把公式
$
\funp
{
P
}
(
s
_
j|a
_
1
^{
j
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
\equiv
f
(
s
_
j|t
_{
a
_
j
}
)
$
和
\eqref
{
eq:6-6
}
重新带入公式
$
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)=
\funp
{
P
}
(
m|
\seq
{
t
}
)
$
\\
$
\prod
_{
j
=
1
}^{
m
}{
\funp
{
P
}
(
a
_
j|a
_
1
^{
j
-
1
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
\funp
{
P
}
(
s
_
j|a
_
1
^{
j
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
}$
和
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)=
\sum
_{
\seq
{
a
}}
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
$
,可得HMM词对齐模型的数学描述:
\parinterval
把公式
$
\funp
{
P
}
(
s
_
j|a
_
1
^{
j
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
\equiv
f
(
s
_
j|t
_{
a
_
j
}
)
$
和
\eqref
{
eq:6-6
}
重新带入公式
$
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)=
\funp
{
P
}
(
m|
\seq
{
t
}
)
$
\\
$
\prod
_{
j
=
1
}^{
m
}{
\funp
{
P
}
(
a
_
j|a
_
1
^{
j
-
1
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
\funp
{
P
}
(
s
_
j|a
_
1
^{
j
}
,s
_
1
^{
j
-
1
}
,m,
\seq
{
t
}
)
}$
和
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)=
\sum
_{
\seq
{
a
}}
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
$
,可得HMM词对齐模型的数学描述:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
=
\sum
_{
\seq
{
a
}}{
\funp
{
P
}
(m|
\seq
{
t
}
)
}
\prod
_{
j=1
}^{
m
}{
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)f(s
_{
j
}
|t
_{
a
_
j
}
)
}
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
&
=
&
\sum
_{
\seq
{
a
}}{
\funp
{
P
}
(m|
\seq
{
t
}
)
}
\prod
_{
j=1
}^{
m
}{
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)f(s
_{
j
}
|t
_{
a
_
j
}
)
}
\label
{
eq:6-7
}
\label
{
eq:6-7
}
\end{eqnarray}
\end{eqnarray}
\parinterval
此外,为了使得HMM的对齐概率
$
\funp
{
P
}
(
a
_{
j
}
|a
_{
j
-
1
}
,l
)
$
满足归一化的条件,这里还假设其对齐概率只取决于
$
a
_{
j
}
-
a
_{
j
-
1
}$
,即:
\parinterval
此外,为了使得HMM的对齐概率
$
\funp
{
P
}
(
a
_{
j
}
|a
_{
j
-
1
}
,l
)
$
满足归一化的条件,这里还假设其对齐概率只取决于
$
a
_{
j
}
-
a
_{
j
-
1
}$
,即:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)
=
\frac
{
\mu
(a
_{
j
}
-a
_{
j-1
}
)
}{
\sum
_{
i=1
}^{
l
}{
\mu
(i-a
_{
j-1
}
)
}}
\funp
{
P
}
(a
_{
j
}
|a
_{
j-1
}
,l)
&
=
&
\frac
{
\mu
(a
_{
j
}
-a
_{
j-1
}
)
}{
\sum
_{
i=1
}^{
l
}{
\mu
(i-a
_{
j-1
}
)
}}
\label
{
eq:6-8
}
\label
{
eq:6-8
}
\end{eqnarray}
\end{eqnarray}
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
\noindent
相反的,一个对齐
$
\seq
{
a
}$
和一个源语句子
$
\seq
{
s
}$
可以对应多组
$
<
\tau
,
\pi
>
$
。如图
\ref
{
fig:6-6
}
所示,不同的
$
<
\tau
,
\pi
>
$
对应同一个源语言句子和词对齐。它们的区别在于目标语单词“Scientists”生成的源语言单词“科学家”和“ 们”的顺序不同。这里把不同的
$
<
\tau
,
\pi
>
$
对应到的相同的源语句子
$
\seq
{
s
}$
和对齐
$
\seq
{
a
}$
记为
$
<
\seq
{
s
}
,
\seq
{
a
}
>
$
。因此计算
$
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
$
时需要把每个可能结果的概率加起来,如下:
\noindent
相反的,一个对齐
$
\seq
{
a
}$
和一个源语句子
$
\seq
{
s
}$
可以对应多组
$
<
\tau
,
\pi
>
$
。如图
\ref
{
fig:6-6
}
所示,不同的
$
<
\tau
,
\pi
>
$
对应同一个源语言句子和词对齐。它们的区别在于目标语单词“Scientists”生成的源语言单词“科学家”和“ 们”的顺序不同。这里把不同的
$
<
\tau
,
\pi
>
$
对应到的相同的源语句子
$
\seq
{
s
}$
和对齐
$
\seq
{
a
}$
记为
$
<
\seq
{
s
}
,
\seq
{
a
}
>
$
。因此计算
$
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
$
时需要把每个可能结果的概率加起来,如下:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
=
\sum
_{{
<
\tau
,
\pi
>
}
\in
{
<
\seq
{
s
}
,
\seq
{
a
}
>
}}{
\funp
{
P
}
(
\tau
,
\pi
|
\seq
{
t
}
)
}
\funp
{
P
}
(
\seq
{
s
}
,
\seq
{
a
}
|
\seq
{
t
}
)
&
=
&
\sum
_{{
<
\tau
,
\pi
>
}
\in
{
<
\seq
{
s
}
,
\seq
{
a
}
>
}}{
\funp
{
P
}
(
\tau
,
\pi
|
\seq
{
t
}
)
}
\label
{
eq:6-9
}
\label
{
eq:6-9
}
\end{eqnarray}
\end{eqnarray}
...
@@ -263,28 +263,28 @@
...
@@ -263,28 +263,28 @@
\parinterval
对于
$
i
=
0
$
的情况需要单独进行考虑。实际上,
$
t
_
0
$
只是一个虚拟的单词。它要对应
$
\seq
{
s
}$
中原本为空对齐的单词。这里假设:要等其他非空对应单词都被生成(放置)后,才考虑这些空对齐单词的生成(放置)。即非空对单词都被生成后,在那些还有空的位置上放置这些空对的源语言单词。此外,在任何的空位置上放置空对的源语言单词都是等概率的,即放置空对齐源语言单词服从均匀分布。这样在已经放置了
$
k
$
个空对齐源语言单词的时候,应该还有
$
\varphi
_
0
-
k
$
个空位置。如果第
$
j
$
个源语言位置为空,那么
\parinterval
对于
$
i
=
0
$
的情况需要单独进行考虑。实际上,
$
t
_
0
$
只是一个虚拟的单词。它要对应
$
\seq
{
s
}$
中原本为空对齐的单词。这里假设:要等其他非空对应单词都被生成(放置)后,才考虑这些空对齐单词的生成(放置)。即非空对单词都被生成后,在那些还有空的位置上放置这些空对的源语言单词。此外,在任何的空位置上放置空对的源语言单词都是等概率的,即放置空对齐源语言单词服从均匀分布。这样在已经放置了
$
k
$
个空对齐源语言单词的时候,应该还有
$
\varphi
_
0
-
k
$
个空位置。如果第
$
j
$
个源语言位置为空,那么
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\pi
_{
0k
}
=j|
\pi
_{
01
}^{
k-1
}
,
\pi
_
1
^
l,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
=
\frac
{
1
}{
\varphi
_
0-k
}
\funp
{
P
}
(
\pi
_{
0k
}
=j|
\pi
_{
01
}^{
k-1
}
,
\pi
_
1
^
l,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
&
=
&
\frac
{
1
}{
\varphi
_
0-k
}
\label
{
eq:6-13
}
\label
{
eq:6-13
}
\end{eqnarray}
\end{eqnarray}
否则
否则
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\pi
_{
0k
}
=j|
\pi
_{
01
}^{
k-1
}
,
\pi
_
1
^
l,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
=
0
\funp
{
P
}
(
\pi
_{
0k
}
=j|
\pi
_{
01
}^{
k-1
}
,
\pi
_
1
^
l,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
&
=
&
0
\label
{
eq:6-14
}
\label
{
eq:6-14
}
\end{eqnarray}
\end{eqnarray}
这样对于
$
t
_
0
$
所对应的
$
\tau
_
0
$
,就有
这样对于
$
t
_
0
$
所对应的
$
\tau
_
0
$
,就有
{
{
\begin{eqnarray}
\begin{eqnarray}
\prod
_{
k=1
}^{
\varphi
_
0
}{
\funp
{
P
}
(
\pi
_{
0k
}
|
\pi
_{
01
}^{
k-1
}
,
\pi
_{
1
}^{
l
}
,
\tau
_{
0
}^{
l
}
,
\varphi
_{
0
}^{
l
}
,
\seq
{
t
}
)
}
=
\frac
{
1
}{
\varphi
_{
0
}
!
}
\prod
_{
k=1
}^{
\varphi
_
0
}{
\funp
{
P
}
(
\pi
_{
0k
}
|
\pi
_{
01
}^{
k-1
}
,
\pi
_{
1
}^{
l
}
,
\tau
_{
0
}^{
l
}
,
\varphi
_{
0
}^{
l
}
,
\seq
{
t
}
)
}
&
=
&
\frac
{
1
}{
\varphi
_{
0
}
!
}
\label
{
eq:6-15
}
\label
{
eq:6-15
}
\end{eqnarray}
\end{eqnarray}
}
}
\parinterval
而上面提到的
$
t
_
0
$
所对应的这些空位置是如何生成的呢?即如何确定哪些位置是要放置空对齐的源语言单词。在IBM模型3中,假设在所有的非空对齐源语言单词都被生成出来后(共
$
\varphi
_
1
+
\varphi
_
2
+
\cdots
{
\varphi
}_
l
$
个非空对源语单词),这些单词后面都以
$
p
_
1
$
概率随机地产生一个“槽”用来放置空对齐单词。这样,
${
\varphi
}_
0
$
就服从了一个二项分布。于是得到
\parinterval
而上面提到的
$
t
_
0
$
所对应的这些空位置是如何生成的呢?即如何确定哪些位置是要放置空对齐的源语言单词。在IBM模型3中,假设在所有的非空对齐源语言单词都被生成出来后(共
$
\varphi
_
1
+
\varphi
_
2
+
\cdots
{
\varphi
}_
l
$
个非空对源语单词),这些单词后面都以
$
p
_
1
$
概率随机地产生一个“槽”用来放置空对齐单词。这样,
${
\varphi
}_
0
$
就服从了一个二项分布。于是得到
{
{
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\varphi
_
0|
\seq
{
t
}
)
=
\big
(
\begin{array}
{
c
}
\funp
{
P
}
(
\varphi
_
0|
\seq
{
t
}
)
&
=
&
\big
(
\begin{array}
{
c
}
\varphi
_
1+
\varphi
_
2+
\cdots
\varphi
_
l
\\
\varphi
_
1+
\varphi
_
2+
\cdots
\varphi
_
l
\\
\varphi
_
0
\\
\varphi
_
0
\\
\end{array}
\big
)p
_
0
^{
\varphi
_
1+
\varphi
_
2+
\cdots
\varphi
_
l-
\varphi
_
0
}
p
_
1
^{
\varphi
_
0
}
\end{array}
\big
)p
_
0
^{
\varphi
_
1+
\varphi
_
2+
\cdots
\varphi
_
l-
\varphi
_
0
}
p
_
1
^{
\varphi
_
0
}
...
@@ -337,14 +337,14 @@ p_0+p_1 & = & 1 \label{eq:6-21}
...
@@ -337,14 +337,14 @@ p_0+p_1 & = & 1 \label{eq:6-21}
\parinterval
利用这些新引进的概念,模型4对模型3的扭曲度进行了修改。主要是把扭曲度分解为两类参数。对于
$
[
i
]
$
对应的源语言单词列表(
$
\tau
_{
[
i
]
}$
)中的第一个单词(
$
\tau
_{
[
i
]
1
}$
),它的扭曲度用如下公式计算:
\parinterval
利用这些新引进的概念,模型4对模型3的扭曲度进行了修改。主要是把扭曲度分解为两类参数。对于
$
[
i
]
$
对应的源语言单词列表(
$
\tau
_{
[
i
]
}$
)中的第一个单词(
$
\tau
_{
[
i
]
1
}$
),它的扭曲度用如下公式计算:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\pi
_{
[i]1
}
=j|
{
\pi
}_
1
^{
[i]-1
}
,
{
\tau
}_
0
^
l,
{
\varphi
}_
0
^
l,
\seq
{
t
}
)
=
d
_{
1
}
(j-
{
\odot
}_{
i-1
}
|A(t
_{
[i-1]
}
),B(s
_
j))
\funp
{
P
}
(
\pi
_{
[i]1
}
=j|
{
\pi
}_
1
^{
[i]-1
}
,
{
\tau
}_
0
^
l,
{
\varphi
}_
0
^
l,
\seq
{
t
}
)
&
=
&
d
_{
1
}
(j-
{
\odot
}_{
i-1
}
|A(t
_{
[i-1]
}
),B(s
_
j))
\label
{
eq:6-22
}
\label
{
eq:6-22
}
\end{eqnarray}
\end{eqnarray}
\noindent
其中,第
$
i
$
个目标语言单词生成的第
$
k
$
个源语言单词的位置用变量
$
\pi
_{
ik
}$
表示。而对于列表(
$
\tau
_{
[
i
]
}$
)中的其他的单词(
$
\tau
_{
[
i
]
k
}
,
1
< k
\le
\varphi
_{
[
i
]
}$
)的扭曲度,用如下公式计算:
\noindent
其中,第
$
i
$
个目标语言单词生成的第
$
k
$
个源语言单词的位置用变量
$
\pi
_{
ik
}$
表示。而对于列表(
$
\tau
_{
[
i
]
}$
)中的其他的单词(
$
\tau
_{
[
i
]
k
}
,
1
< k
\le
\varphi
_{
[
i
]
}$
)的扭曲度,用如下公式计算:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\pi
_{
[i]k
}
=j|
{
\pi
}_{
[i]1
}^{
k-1
}
,
\pi
_
1
^{
[i]-1
}
,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
=
d
_{
>1
}
(j-
\pi
_{
[i]k-1
}
|B(s
_
j))
\funp
{
P
}
(
\pi
_{
[i]k
}
=j|
{
\pi
}_{
[i]1
}^{
k-1
}
,
\pi
_
1
^{
[i]-1
}
,
\tau
_
0
^
l,
\varphi
_
0
^
l,
\seq
{
t
}
)
&
=
&
d
_{
>1
}
(j-
\pi
_{
[i]k-1
}
|B(s
_
j))
\label
{
eq:6-23
}
\label
{
eq:6-23
}
\end{eqnarray}
\end{eqnarray}
...
@@ -428,13 +428,13 @@ p_0+p_1 & = & 1 \label{eq:6-21}
...
@@ -428,13 +428,13 @@ p_0+p_1 & = & 1 \label{eq:6-21}
\parinterval
IBM模型的缺陷是指翻译模型会把一部分概率分配给一些根本不存在的源语言字符串。如果用
$
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)
$
表示
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
在所有的正确的(可以理解为语法上正确的)
$
\seq
{
s
}$
上的和,即
\parinterval
IBM模型的缺陷是指翻译模型会把一部分概率分配给一些根本不存在的源语言字符串。如果用
$
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)
$
表示
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
在所有的正确的(可以理解为语法上正确的)
$
\seq
{
s
}$
上的和,即
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)
=
\sum
_{
\seq
{
s
}
\textrm
{
\;
is
\;
well
\;
formed
}}{
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
}
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)
&
=
&
\sum
_{
\seq
{
s
}
\textrm
{
\;
is
\;
well
\;
formed
}}{
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
}
\label
{
eq:6-26
}
\label
{
eq:6-26
}
\end{eqnarray}
\end{eqnarray}
\parinterval
类似地,用
$
\funp
{
P
}
(
\textrm
{
ill
}
|
\seq
{
t
}
)
$
表示
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
在所有的错误的(可以理解为语法上错误的)
$
\seq
{
s
}$
上的和。如果
$
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)+
\funp
{
P
}
(
\textrm
{
ill
}
|
\seq
{
t
}
)
<
1
$
,就把剩余的部分定义为
$
\funp
{
P
}
(
\textrm
{
failure
}
|
\seq
{
t
}
)
$
。它的形式化定义为,
\parinterval
类似地,用
$
\funp
{
P
}
(
\textrm
{
ill
}
|
\seq
{
t
}
)
$
表示
$
\funp
{
P
}
(
\seq
{
s
}
|
\seq
{
t
}
)
$
在所有的错误的(可以理解为语法上错误的)
$
\seq
{
s
}$
上的和。如果
$
\funp
{
P
}
(
\textrm
{
well
}
|
\seq
{
t
}
)+
\funp
{
P
}
(
\textrm
{
ill
}
|
\seq
{
t
}
)
<
1
$
,就把剩余的部分定义为
$
\funp
{
P
}
(
\textrm
{
failure
}
|
\seq
{
t
}
)
$
。它的形式化定义为,
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
{
\textrm
{
failure
}
|
\seq
{
t
}}
)
=
1 -
\funp
{
P
}
(
{
\textrm
{
well
}
|
\seq
{
t
}}
) -
\funp
{
P
}
(
{
\textrm
{
ill
}
|
\seq
{
t
}}
)
\funp
{
P
}
(
{
\textrm
{
failure
}
|
\seq
{
t
}}
)
&
=
&
1 -
\funp
{
P
}
(
{
\textrm
{
well
}
|
\seq
{
t
}}
) -
\funp
{
P
}
(
{
\textrm
{
ill
}
|
\seq
{
t
}}
)
\label
{
eq:6-27
}
\label
{
eq:6-27
}
\end{eqnarray}
\end{eqnarray}
...
...
Chapter7/Figures/figure-basic-process-of-translation.tex
查看文件 @
1489baae
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
\node
[anchor=east]
(t0) at (-0.5em, -1.5)
{$
\seq
{
t
}$
:
}
;
\node
[anchor=east]
(t0) at (-0.5em, -1.5)
{$
\seq
{
t
}$
:
}
;
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
footnotesize
{
(a)
\
}}
;
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
small
{
(a)
\
}}
;
\end{scope}
\end{scope}
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
\path
[<->, thick]
(s2.south) edge (t1.north);
\path
[<->, thick]
(s2.south) edge (t1.north);
}
}
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
footnotesize
{
(b)
\
}}
;
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
small
{
(b)
\
}}
;
\end{scope}
\end{scope}
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
\node
[anchor=west,fill=red!20]
(t2) at ([xshift=1em]t1.east)
{
\footnotesize
{
an apple
}}
;
\node
[anchor=west,fill=red!20]
(t2) at ([xshift=1em]t1.east)
{
\footnotesize
{
an apple
}}
;
\path
[<->, thick]
(s3.south) edge (t2.north);
\path
[<->, thick]
(s3.south) edge (t2.north);
}
}
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
footnotesize
{
(c)
\
}}
;
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
small
{
(c)
\
}}
;
\end{scope}
\end{scope}
...
@@ -76,6 +76,6 @@
...
@@ -76,6 +76,6 @@
\node
[anchor=west,fill=red!20]
(t3) at ([xshift=1em]t2.east)
{
\footnotesize
{
on the table
}}
;
\node
[anchor=west,fill=red!20]
(t3) at ([xshift=1em]t2.east)
{
\footnotesize
{
on the table
}}
;
\path
[<->, thick]
(s1.south) edge (t3.north);
\path
[<->, thick]
(s1.south) edge (t3.north);
}
}
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
footnotesize
{
(d)
\
}}
;
\node
[anchor=north]
(l) at ([xshift=7em,yshift=-0.5em]t0.south)
{
\
small
{
(d)
\
}}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
\ No newline at end of file
Chapter7/Figures/figure-example-of-hypothesis-recombination.tex
查看文件 @
1489baae
差异被折叠。
点击展开。
Chapter7/Figures/figure-example-of-stack-decode.tex
查看文件 @
1489baae
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
{
{
\node
[anchor=north,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h0) at (0,0)
{
\scriptsize
{
null
}}
;
\node
[anchor=north,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h0) at (0,0)
{
\scriptsize
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt0) at (h0.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt0) at (h0.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}}
;
}
}
{
{
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h13) at ([xshift=2.1em,yshift=6em]h0.east)
{
\scriptsize
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h13) at ([xshift=2.1em,yshift=6em]h0.east)
{
\scriptsize
{
there is
}}
;
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt1) at (h1.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt1) at (h1.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h13.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h13.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h2) at ([xshift=2.1em]h1.east)
{
\scriptsize
{
have
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3em] (h2) at ([xshift=2.1em]h1.east)
{
\scriptsize
{
have
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=2em,minimum width=3em] (h22) at ([xshift=2.1em]h12.east)
{
\small
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,minimum height=2em,minimum width=3em] (h22) at ([xshift=2.1em]h12.east)
{
\small
{
\textbf
{
...
}}}
;
...
@@ -32,10 +32,10 @@
...
@@ -32,10 +32,10 @@
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt2) at (h2.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt2) at (h2.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (h23.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (h23.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h3.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h3.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt33) at (h33.east)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt33) at (h33.east)
{
\
tiny
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}}
;
}
}
\node
[anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south)
{
\small
{
\textbf
{
未译词
}}}
;
\node
[anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south)
{
\small
{
\textbf
{
未译词
}}}
;
\node
[anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south)
{
\small
{
\textbf
{
已译
}
1
\textbf
{
词
}}}
;
\node
[anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south)
{
\small
{
\textbf
{
已译
}
1
\textbf
{
词
}}}
;
...
...
Chapter7/Figures/figure-judge-type-of-reorder-method.tex
查看文件 @
1489baae
...
@@ -105,8 +105,8 @@
...
@@ -105,8 +105,8 @@
\node
[anchor=north]
(m1) at ([xshift=0.6em,yshift=0.1em]b05.east)
{
M
}
;
\node
[anchor=north]
(m1) at ([xshift=0.6em,yshift=0.1em]b05.east)
{
M
}
;
}
}
\node
[anchor=north]
(l1) at ([xshift=1.8em,yshift=-0.5em]a10.south)
{
\s
criptsize
{
基于词
}}
;
\node
[anchor=north]
(l1) at ([xshift=1.8em,yshift=-0.5em]a10.south)
{
\s
mall
{
基于词
}}
;
\node
[anchor=north]
(l2) at ([xshift=2.2em,yshift=-0.5em]b10.south)
{
\s
criptsize
{
基于短语
}}
;
\node
[anchor=north]
(l2) at ([xshift=2.2em,yshift=-0.5em]b10.south)
{
\s
mall
{
基于短语
}}
;
\end{scope}
\end{scope}
...
...
Chapter7/Figures/figure-search-space-representation-of-feature-weight.tex
查看文件 @
1489baae
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
\node
[anchor=north]
(label3) at ([xshift=0em,yshift=-2.5em]label2.north)
{
取值
}
;
\node
[anchor=north]
(label3) at ([xshift=0em,yshift=-2.5em]label2.north)
{
取值
}
;
}
}
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
footnotesize
{
(a)搜索空间
}}
;
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
small
{
(a)搜索空间
}}
;
\end{scope}
\end{scope}
\begin{scope}
[scale=0.55,xshift=3.2in]
\begin{scope}
[scale=0.55,xshift=3.2in]
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
\node
[anchor=north]
(e4) at ([xshift=0,yshift=-0.2em]e3.south)
{$
w
_
M
=
1
.
00
$}
;
\node
[anchor=north]
(e4) at ([xshift=0,yshift=-0.2em]e3.south)
{$
w
_
M
=
1
.
00
$}
;
}
}
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
footnotesize
{
(b)一条搜索路径
}}
;
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
small
{
(b)一条搜索路径
}}
;
\end{scope}
\end{scope}
\begin{scope}
[scale=0.55,xshift=6.8in]
\begin{scope}
[scale=0.55,xshift=6.8in]
...
@@ -119,6 +119,6 @@
...
@@ -119,6 +119,6 @@
\node
[anchor=north]
(label2) at ([xshift=0em,yshift=-2.5em]label1.north)
{
种组合
}
;
\node
[anchor=north]
(label2) at ([xshift=0em,yshift=-2.5em]label1.north)
{
种组合
}
;
}
}
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
footnotesize
{
(c)多条搜索路径
}}
;
\node
[anchor=north]
(l1) at ([xshift=0em,yshift=-2.5em]x3.south)
{
\
small
{
(c)多条搜索路径
}}
;
\end{scope}
\end{scope}
\end{tikzpicture}
\end{tikzpicture}
\ No newline at end of file
Chapter7/Figures/figure-translation-hypothesis-extension.tex
查看文件 @
1489baae
...
@@ -5,24 +5,24 @@
...
@@ -5,24 +5,24 @@
\begin{scope}
\begin{scope}
{
{
\node
[anchor=north,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h0) at (0,0)
{
\small
{
null
}}
;
\node
[anchor=north,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h0) at (0,0)
{
\small
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt0) at (h0.east
)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt0) at (h0.south
)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}}
;
}
}
{
{
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h1) at ([xshift=3em]h0.east)
{
\small
{
on
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h1) at ([xshift=3em]h0.east)
{
\small
{
on
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h2) at ([xshift=3em,yshift=3em]h0.east)
{
\small
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h2) at ([xshift=3em,yshift=3em]h0.east)
{
\small
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h3) at ([xshift=3em,yshift=-3em]h0.east)
{
\small
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h3) at ([xshift=3em,yshift=-3em]h0.east)
{
\small
{
there is
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl1) at (h1.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl1) at (h1.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl2) at (h2.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl2) at (h2.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl3) at (h3.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl3) at (h3.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt1) at (h1.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.2
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt1) at (h1.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.2
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt2) at (h2.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.3
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt2) at (h2.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.3
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h3.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=
.5
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt3) at (h3.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=0
.5
}}}}
;
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt0.south
) -- ([xshift=-0.1em]h1.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h0.east
) -- ([xshift=-0.1em]h1.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt0.south
) -- ([xshift=-0.1em]h2.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h0.east
) -- ([xshift=-0.1em]h2.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt0.south
) -- ([xshift=-0.1em]h3.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h0.east
) -- ([xshift=-0.1em]h3.west);
}
}
{
{
...
@@ -32,40 +32,40 @@
...
@@ -32,40 +32,40 @@
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4em] (h7) at ([xshift=3em,yshift=1.2em]h5.east)
{
\small
{
on the table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4em] (h7) at ([xshift=3em,yshift=1.2em]h5.east)
{
\small
{
on the table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4.6em] (h8) at ([xshift=3em,yshift=-2em]h5.east)
{
\small
{
\ \;
apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4.6em] (h8) at ([xshift=3em,yshift=-2em]h5.east)
{
\small
{
\ \;
apple
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl4) at (h4.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl4) at (h4.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl5) at (h5.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl5) at (h5.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl6) at (h6.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl6) at (h6.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl7) at (h7.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1-2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl7) at (h7.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1-2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl8) at (h8.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl8) at (h8.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt4) at (h4.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.1
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt4) at (h4.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.1
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt5) at (h5.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt5) at (h5.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt6) at (h6.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.3
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=3.5em,fill=black] (pt6) at (h6.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.3
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt7) at (h7.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.6em,fill=black] (pt7) at (h7.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt8) at (h8.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.2
}}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.6em,fill=black] (pt8) at (h8.south)
{
\footnotesize
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.2
}}}}
;
\draw
[->,very thick,ublue] ([xshift=0.1em]pt1.south) -- ([xshift=1em,yshift=0.7em]pt1.south);
\draw
[->,very thick,ublue] ([xshift=0.1em]h6.east) -- ([xshift=1em,yshift=0.7em]h6.east);
\draw
[->,very thick,ublue] ([xshift=0.1em]h6.east) -- ([xshift=1em,yshift=-0.7em]h6.east);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt2.south) -- ([xshift=1em,yshift=-0.7em]pt2.south
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h2.east) -- ([xshift=1em,yshift=0.7em]h2.east
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt2.south) -- ([xshift=1em,yshift=0.7em]pt2.south
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h2.east) -- ([xshift=1em,yshift=-0.7em]h2.east
);
\draw
[->,very thick,ublue] ([xshift=0.1em]pt6.south) -- ([xshift=1em,yshift=-0.7em]pt6.south);
\draw
[->,very thick,ublue] ([xshift=0.1em]h1.east) -- ([xshift=1em,yshift=0.7em]h1.east);
\draw
[->,very thick,ublue] ([xshift=0.1em]pt6.south) -- ([xshift=1em,yshift=0.7em]pt6.south);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt3.south
) -- ([xshift=-0.1em]h4.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h3.east
) -- ([xshift=-0.1em]h4.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt3.south
) -- ([xshift=-0.1em]h5.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h3.east
) -- ([xshift=-0.1em]h5.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt3.south
) -- ([xshift=-0.1em]h6.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h3.east
) -- ([xshift=-0.1em]h6.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt5.south
) -- ([xshift=-0.1em]h7.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h5.east
) -- ([xshift=-0.1em]h7.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt5.south) -- ([xshift=1em,yshift=-0.7em]pt5.south
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h5.east) -- ([xshift=1em,yshift=-0.7em]h5.east
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt4.south
) -- ([xshift=-0.1em]h8.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h4.east
) -- ([xshift=-0.1em]h8.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]
pt4.south) -- ([xshift=1em,yshift=-0.7em]pt4.south
);
\draw
[->,very thick,ublue] ([xshift=0.1em]
h4.east) -- ([xshift=1em,yshift=-0.7em]h4.east
);
}
}
{
{
\draw
[->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.
5em]h0.west) -- ([xshift=0.7em,yshift=-0.5em]h0.east) -- ([xshift=-0.2em,yshift=-0.5em]h3.west) -- ([xshift=0.8em,yshift=-0.5em]h3.east) -- ([xshift=-0.2em,yshift=-0.5em]h5.west) -- ([xshift=0.8em,yshift=-0.5em]h5.east) -- ([xshift=-0.2em,yshift=-0.5em]h7.west) -- ([xshift=1.5em,yshift=-0.5
em]h7.east);
\draw
[->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.
6em]h0.west) -- ([xshift=0.0em,yshift=-0.6em]h0.east) -- ([xshift=-0.2em,yshift=-0.6em]h3.west) -- ([xshift=0.0em,yshift=-0.6em]h3.east) -- ([xshift=-0.2em,yshift=-0.6em]h5.west) -- ([xshift=0.0em,yshift=-0.6em]h5.east) -- ([xshift=-0.2em,yshift=-0.6em]h7.west) -- ([xshift=1.5em,yshift=-0.6
em]h7.east);
\node
[anchor=north west] (wtranslabel) at ([yshift=-3em]h0.south west)
{
\small
{
翻译路径:
}}
;
\node
[anchor=north west] (wtranslabel) at ([yshift=-
4.
3em]h0.south west)
{
\small
{
翻译路径:
}}
;
\draw
[->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
\draw
[->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
}
}
\end{scope}
\end{scope}
...
...
Chapter7/Figures/figure-word-and-phrase-translation-regard-as-path.tex
查看文件 @
1489baae
差异被折叠。
点击展开。
Chapter7/Figures/figure-word-translation-regard-as-path.tex
查看文件 @
1489baae
...
@@ -20,15 +20,15 @@
...
@@ -20,15 +20,15 @@
{
\small
{
\small
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south)
{
I
}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south)
{
I
}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.
2
em]t11.south)
{
me
}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.
8
em]t11.south)
{
me
}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.
2
em]t12.south)
{
I'm
}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.
8
em]t12.south)
{
I'm
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south)
{
to
}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south)
{
to
}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.
2
em]t21.south)
{
with
}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.
8
em]t21.south)
{
with
}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.
2
em]t22.south)
{
for
}
;
\node
[anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.
8
em]t22.south)
{
for
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
...
@@ -37,13 +37,13 @@
...
@@ -37,13 +37,13 @@
\node
[anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south)
{$
\phi
$}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.
2
em]t41.south)
{
show
}
;
\node
[anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.
8
em]t41.south)
{
show
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south)
{
satisfy
}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south)
{
satisfy
}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.
2
em]t51.south)
{
satisfied
}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.
8
em]t51.south)
{
satisfied
}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.
2
em]t52.south)
{
satisfies
}
;
\node
[anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.
8
em]t52.south)
{
satisfies
}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
...
@@ -52,22 +52,22 @@
...
@@ -52,22 +52,22 @@
{
\tiny
{
\tiny
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt11) at (t11.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt11) at (t11.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt12) at (t12.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.2
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt12) at (t12.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.2
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt13) at (t13.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt13) at (t13.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt21) at (t21.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt21) at (t21.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt22) at (t22.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.3
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt22) at (t22.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.3
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt23) at (t23.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.3
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt23) at (t23.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.3
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt31) at (t31.east
)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=4.2em,fill=black] (pt31) at (t31.south
)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=1
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt41) at (t41.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=5em,fill=black] (pt41) at (t41.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt42) at (t42.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=5em,fill=black] (pt42) at (t42.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt51) at (t51.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.5
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=7.5em,fill=black] (pt51) at (t51.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.5
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt52) at (t52.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.4
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=7.5em,fill=black] (pt52) at (t52.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.4
}}}
;
\node
[anchor=north,
rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt53) at (t53.east)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=
.1
}}}
;
\node
[anchor=north,
inner sep=1pt,minimum width=7.5em,fill=black] (pt53) at (t53.south)
{{
\color
{
white
}
\textbf
{$
\funp
{
P
}$
=0
.1
}}}
;
}
}
...
...
Chapter7/chapter7.tex
查看文件 @
1489baae
...
@@ -206,7 +206,7 @@ p_4 &=& \text{问题}\nonumber
...
@@ -206,7 +206,7 @@ p_4 &=& \text{问题}\nonumber
\parinterval
图
\ref
{
fig:7-10
}
给出了一个由三个双语短语
$
\{
(
\bar
{
s
}_{
\bar
{
a
}_
1
}
,
\bar
{
t
}_
1
)
,
(
\bar
{
s
}_{
\bar
{
a
}_
2
}
,
\bar
{
t
}_
2
)
,
(
\bar
{
s
}_{
\bar
{
a
}_
3
}
,
\bar
{
t
}_
3
)
\}
$
构成的汉英互译句对,其中短语对齐信息为
$
\bar
{
a
}_
1
=
1
$
,
$
\bar
{
a
}_
2
=
2
$
,
$
\bar
{
a
}_
3
=
3
$
。这里,可以把这三个短语对的组合看作是翻译推导,形式化表示为如下公式:
\parinterval
图
\ref
{
fig:7-10
}
给出了一个由三个双语短语
$
\{
(
\bar
{
s
}_{
\bar
{
a
}_
1
}
,
\bar
{
t
}_
1
)
,
(
\bar
{
s
}_{
\bar
{
a
}_
2
}
,
\bar
{
t
}_
2
)
,
(
\bar
{
s
}_{
\bar
{
a
}_
3
}
,
\bar
{
t
}_
3
)
\}
$
构成的汉英互译句对,其中短语对齐信息为
$
\bar
{
a
}_
1
=
1
$
,
$
\bar
{
a
}_
2
=
2
$
,
$
\bar
{
a
}_
3
=
3
$
。这里,可以把这三个短语对的组合看作是翻译推导,形式化表示为如下公式:
\begin{eqnarray}
\begin{eqnarray}
d
=
{
(
\bar
{
s
}_{
\bar
{
a
}_
1
}
,
\bar
{
t
}_
1)
}
\circ
{
(
\bar
{
s
}_{
\bar
{
a
}_
2
}
,
\bar
{
t
}_
2)
}
\circ
{
(
\bar
{
s
}_{
\bar
{
a
}_
3
}
,
\bar
{
t
}_
3)
}
d
&
=
&
{
(
\bar
{
s
}_{
\bar
{
a
}_
1
}
,
\bar
{
t
}_
1)
}
\circ
{
(
\bar
{
s
}_{
\bar
{
a
}_
2
}
,
\bar
{
t
}_
2)
}
\circ
{
(
\bar
{
s
}_{
\bar
{
a
}_
3
}
,
\bar
{
t
}_
3)
}
\label
{
eq:7-1
}
\label
{
eq:7-1
}
\end{eqnarray}
\end{eqnarray}
...
@@ -245,7 +245,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -245,7 +245,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
对于统计机器翻译,其目的是找到输入句子的可能性最大的译文:
\parinterval
对于统计机器翻译,其目的是找到输入句子的可能性最大的译文:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
\seq
{
t
}}
=
\argmax
_{
\seq
{
t
}}
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
\hat
{
\seq
{
t
}}
&
=
&
\argmax
_{
\seq
{
t
}}
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
\label
{
eq:7-2
}
\label
{
eq:7-2
}
\end{eqnarray}
\end{eqnarray}
...
@@ -261,7 +261,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -261,7 +261,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
基于短语的翻译模型假设
$
\seq
{
s
}$
到
$
\seq
{
t
}$
的翻译可以用翻译推导进行描述,这些翻译推导都是由双语短语组成。于是,两个句子之间的映射就可以被看作是一个个短语的映射。显然短语翻译的建模要比整个句子翻译的建模简单得多。从模型上看,可以把翻译推导
$
d
$
当作是从
$
\seq
{
s
}$
到
$
\seq
{
t
}$
翻译的一种隐含结构。这种结构定义了对问题的一种描述,即翻译由一系列短语组成。根据这个假设,可以把句子的翻译概率定义为:
\parinterval
基于短语的翻译模型假设
$
\seq
{
s
}$
到
$
\seq
{
t
}$
的翻译可以用翻译推导进行描述,这些翻译推导都是由双语短语组成。于是,两个句子之间的映射就可以被看作是一个个短语的映射。显然短语翻译的建模要比整个句子翻译的建模简单得多。从模型上看,可以把翻译推导
$
d
$
当作是从
$
\seq
{
s
}$
到
$
\seq
{
t
}$
翻译的一种隐含结构。这种结构定义了对问题的一种描述,即翻译由一系列短语组成。根据这个假设,可以把句子的翻译概率定义为:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
=
\sum
_{
d
}
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
&
=
&
\sum
_{
d
}
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\label
{
eq:7-3
}
\label
{
eq:7-3
}
\end{eqnarray}
\end{eqnarray}
...
@@ -282,25 +282,25 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -282,25 +282,25 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
另一种常用的方法是直接用
$
\funp
{
P
}
(
d,
\seq
{
t
}
|
\seq
{
s
}
)
$
的最大值代表整个翻译推导的概率和。这种方法假设翻译概率是非常尖锐的,“最好”的推导会占有概率的主要部分。它被形式化为:
\parinterval
另一种常用的方法是直接用
$
\funp
{
P
}
(
d,
\seq
{
t
}
|
\seq
{
s
}
)
$
的最大值代表整个翻译推导的概率和。这种方法假设翻译概率是非常尖锐的,“最好”的推导会占有概率的主要部分。它被形式化为:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
\approx
\max
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\funp
{
P
}
(
\seq
{
t
}
|
\seq
{
s
}
)
&
\approx
&
\max
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\label
{
eq:7-6
}
\label
{
eq:7-6
}
\end{eqnarray}
\end{eqnarray}
\parinterval
于是,翻译的目标可以被重新定义:
\parinterval
于是,翻译的目标可以被重新定义:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
\seq
{
t
}}
=
\arg\max
_{
\seq
{
t
}}
(
\max
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
))
\hat
{
\seq
{
t
}}
&
=
&
\arg\max
_{
\seq
{
t
}}
(
\max
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
))
\label
{
eq:7-7
}
\label
{
eq:7-7
}
\end{eqnarray}
\end{eqnarray}
\parinterval
值得注意的是,翻译推导中蕴含着译文的信息,因此每个翻译推导都与一个译文对应。因此可以把公式
\eqref
{
eq:7-7
}
所描述的问题重新定义为:
\parinterval
值得注意的是,翻译推导中蕴含着译文的信息,因此每个翻译推导都与一个译文对应。因此可以把公式
\eqref
{
eq:7-7
}
所描述的问题重新定义为:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
d
}
=
\arg\max
_{
d
}
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\hat
{
d
}
&
=
&
\arg\max
_{
d
}
\funp
{
P
}
(d,
\seq
{
t
}
|
\seq
{
s
}
)
\label
{
eq:7-8
}
\label
{
eq:7-8
}
\end{eqnarray}
\end{eqnarray}
\parinterval
也就是,给定一个输入句子
$
\seq
{
s
}$
,找到从它出发的最优翻译推导
$
\hat
{
d
}$
,把这个翻译推导所对应的目标语词串看作最优的译文。假设函数
$
t
(
\cdot
)
$
可以返回一个推导的目标语词串,则最优译文也可以被看作是:
\parinterval
也就是,给定一个输入句子
$
\seq
{
s
}$
,找到从它出发的最优翻译推导
$
\hat
{
d
}$
,把这个翻译推导所对应的目标语词串看作最优的译文。假设函数
$
t
(
\cdot
)
$
可以返回一个推导的目标语词串,则最优译文也可以被看作是:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
\seq
{
t
}}
=
t(
\hat
{
d
}
)
\hat
{
\seq
{
t
}}
&
=
&
t(
\hat
{
d
}
)
\label
{
eq:7-9
}
\label
{
eq:7-9
}
\end{eqnarray}
\end{eqnarray}
...
@@ -474,7 +474,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -474,7 +474,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
抽取双语短语之后,需要对每个双语短语的质量进行评价。这样,在使用这些双语短语时,可以更有效地估计整个句子翻译的好坏。在统计机器翻译中,一般用双语短语出现的可能性大小来度量双语短语的好坏。这里,使用相对频次估计对短语的翻译条件概率进行计算,公式如下:
\parinterval
抽取双语短语之后,需要对每个双语短语的质量进行评价。这样,在使用这些双语短语时,可以更有效地估计整个句子翻译的好坏。在统计机器翻译中,一般用双语短语出现的可能性大小来度量双语短语的好坏。这里,使用相对频次估计对短语的翻译条件概率进行计算,公式如下:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\bar
{
t
}
|
\bar
{
s
}
)
=
\frac
{
c(
\bar
{
s
}
,
\bar
{
t
}
)
}{
c(
\bar
{
s
}
)
}
\funp
{
P
}
(
\bar
{
t
}
|
\bar
{
s
}
)
&
=
&
\frac
{
c(
\bar
{
s
}
,
\bar
{
t
}
)
}{
c(
\bar
{
s
}
)
}
\label
{
eq:7-13
}
\label
{
eq:7-13
}
\end{eqnarray}
\end{eqnarray}
...
@@ -482,7 +482,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -482,7 +482,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
当遇到低频短语时,短语翻译概率的估计可能会不准确。例如,短语
$
\bar
{
s
}$
和
$
\bar
{
t
}$
在语料中只出现了一次,且在一个句子中共现,那么
$
\bar
{
s
}$
到
$
\bar
{
t
}$
的翻译概率为
$
\funp
{
P
}
(
\bar
{
t
}
|
\bar
{
s
}
)=
1
$
,这显然是不合理的,因为
$
\bar
{
s
}$
和
$
\bar
{
t
}$
的出现完全可能是偶然事件。既然直接度量双语短语的好坏会面临数据稀疏问题,一个自然的想法就是把短语拆解成单词,利用双语短语中单词翻译的好坏间接度量双语短语的好坏。为了达到这个目的,可以使用
{
\small\bfnew
{
词汇化翻译概率
}}
\index
{
词汇化翻译概率
}
(Lexical Translation Probability)
\index
{
Lexical Translation Probability
}
。前面借助词对齐信息完成了双语短语的抽取,因此,词对齐信息本身就包含了短语内部单词之间的对应关系。因此同样可以借助词对齐来计算词汇翻译概率,公式如下:
\parinterval
当遇到低频短语时,短语翻译概率的估计可能会不准确。例如,短语
$
\bar
{
s
}$
和
$
\bar
{
t
}$
在语料中只出现了一次,且在一个句子中共现,那么
$
\bar
{
s
}$
到
$
\bar
{
t
}$
的翻译概率为
$
\funp
{
P
}
(
\bar
{
t
}
|
\bar
{
s
}
)=
1
$
,这显然是不合理的,因为
$
\bar
{
s
}$
和
$
\bar
{
t
}$
的出现完全可能是偶然事件。既然直接度量双语短语的好坏会面临数据稀疏问题,一个自然的想法就是把短语拆解成单词,利用双语短语中单词翻译的好坏间接度量双语短语的好坏。为了达到这个目的,可以使用
{
\small\bfnew
{
词汇化翻译概率
}}
\index
{
词汇化翻译概率
}
(Lexical Translation Probability)
\index
{
Lexical Translation Probability
}
。前面借助词对齐信息完成了双语短语的抽取,因此,词对齐信息本身就包含了短语内部单词之间的对应关系。因此同样可以借助词对齐来计算词汇翻译概率,公式如下:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}_{
\textrm
{
lex
}}
(
\bar
{
t
}
|
\bar
{
s
}
)
=
\prod
_{
j=1
}^{
|
\bar
{
s
}
|
}
\frac
{
1
}{
|
\{
j|a(j,i) = 1
\}
|
}
\sum
_{
\forall
(j,i):a(j,i) = 1
}
\sigma
(t
_
i|s
_
j)
\funp
{
P
}_{
\textrm
{
lex
}}
(
\bar
{
t
}
|
\bar
{
s
}
)
&
=
&
\prod
_{
j=1
}^{
|
\bar
{
s
}
|
}
\frac
{
1
}{
|
\{
j|a(j,i) = 1
\}
|
}
\sum
_{
\forall
(j,i):a(j,i) = 1
}
\sigma
(t
_
i|s
_
j)
\label
{
eq:7-14
}
\label
{
eq:7-14
}
\end{eqnarray}
\end{eqnarray}
...
@@ -541,7 +541,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
...
@@ -541,7 +541,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\parinterval
基于距离的调序方法的核心思想就是度量当前翻译结果与顺序翻译之间的差距。对于译文中的第
$
i
$
个短语,令
$
\rm
{
start
}_
i
$
表示它所对应的源语言短语中第一个词所在的位置,
$
\rm
{
end
}_
i
$
表示它所对应的源语言短语中最后一个词所在的位置。于是,这个短语(相对于前一个短语)的调序距离为:
\parinterval
基于距离的调序方法的核心思想就是度量当前翻译结果与顺序翻译之间的差距。对于译文中的第
$
i
$
个短语,令
$
\rm
{
start
}_
i
$
表示它所对应的源语言短语中第一个词所在的位置,
$
\rm
{
end
}_
i
$
表示它所对应的源语言短语中最后一个词所在的位置。于是,这个短语(相对于前一个短语)的调序距离为:
\begin{eqnarray}
\begin{eqnarray}
dr
=
{
\rm
{
start
}}_
i-
{
\rm
{
end
}}_{
i-1
}
-1
dr
&
=
&
{
\rm
{
start
}}_
i-
{
\rm
{
end
}}_{
i-1
}
-1
\label
{
eq:7-15
}
\label
{
eq:7-15
}
\end{eqnarray}
\end{eqnarray}
...
@@ -579,7 +579,7 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
...
@@ -579,7 +579,7 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
\parinterval
对于每种调序类型,都可以定义一个调序概率,如下:
\parinterval
对于每种调序类型,都可以定义一个调序概率,如下:
\begin{eqnarray}
\begin{eqnarray}
\funp
{
P
}
(
\seq
{
o
}
|
\seq
{
s
}
,
\seq
{
t
}
,
\seq
{
a
}
)
=
\prod
_{
i=1
}^{
K
}
\funp
{
P
}
(o
_
i|
\bar
{
s
}_{
a
_
i
}
,
\bar
{
t
}_
i, a
_{
i-1
}
, a
_
i)
\funp
{
P
}
(
\seq
{
o
}
|
\seq
{
s
}
,
\seq
{
t
}
,
\seq
{
a
}
)
&
=
&
\prod
_{
i=1
}^{
K
}
\funp
{
P
}
(o
_
i|
\bar
{
s
}_{
a
_
i
}
,
\bar
{
t
}_
i, a
_{
i-1
}
, a
_
i)
\label
{
eq:7-16
}
\label
{
eq:7-16
}
\end{eqnarray}
\end{eqnarray}
...
@@ -654,13 +654,13 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
...
@@ -654,13 +654,13 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
\parinterval
这里介绍一种更加高效的特征权重调优方法
$
\ \dash
\
${
\small\bfnew
{
最小错误率训练
}}
\index
{
最小错误率训练
}
(Minimum Error Rate Training
\index
{
Minimum Error Rate Training
}
,MERT)。最小错误率训练是统计机器翻译发展中代表性工作,也是机器翻译领域原创的重要技术方法之一
\upcite
{
DBLP:conf/acl/Och03
}
。最小错误率训练假设:翻译结果相对于标准答案的错误是可度量的,进而可以通过降低错误数量的方式来找到最优的特征权重。假设有样本集合
$
S
=
\{
(
s
_
1
,
\seq
{
r
}_
1
)
,...,
(
s
_
N,
\seq
{
r
}_
N
)
\}
$
,
$
s
_
i
$
为样本中第
$
i
$
个源语言句子,
$
\seq
{
r
}_
i
$
为相应的参考译文。注意,
$
\seq
{
r
}_
i
$
可以包含多个参考译文。
$
S
$
通常被称为
{
\small\bfnew
{
调优集合
}}
\index
{
调优集合
}
(Tuning Set)
\index
{
Tuning Set
}
。对于
$
S
$
中的每个源语句子
$
s
_
i
$
,机器翻译模型会解码出
$
n
$
-best推导
$
\hat
{
\seq
{
d
}}_{
i
}
=
\{\hat
{
d
}_{
ij
}
\}
$
,其中
$
\hat
{
d
}_{
ij
}$
表示对于源语言句子
$
s
_
i
$
得到的第
$
j
$
个最好的推导。
$
\{\hat
{
d
}_{
ij
}
\}
$
可以被定义如下:
\parinterval
这里介绍一种更加高效的特征权重调优方法
$
\ \dash
\
${
\small\bfnew
{
最小错误率训练
}}
\index
{
最小错误率训练
}
(Minimum Error Rate Training
\index
{
Minimum Error Rate Training
}
,MERT)。最小错误率训练是统计机器翻译发展中代表性工作,也是机器翻译领域原创的重要技术方法之一
\upcite
{
DBLP:conf/acl/Och03
}
。最小错误率训练假设:翻译结果相对于标准答案的错误是可度量的,进而可以通过降低错误数量的方式来找到最优的特征权重。假设有样本集合
$
S
=
\{
(
s
_
1
,
\seq
{
r
}_
1
)
,...,
(
s
_
N,
\seq
{
r
}_
N
)
\}
$
,
$
s
_
i
$
为样本中第
$
i
$
个源语言句子,
$
\seq
{
r
}_
i
$
为相应的参考译文。注意,
$
\seq
{
r
}_
i
$
可以包含多个参考译文。
$
S
$
通常被称为
{
\small\bfnew
{
调优集合
}}
\index
{
调优集合
}
(Tuning Set)
\index
{
Tuning Set
}
。对于
$
S
$
中的每个源语句子
$
s
_
i
$
,机器翻译模型会解码出
$
n
$
-best推导
$
\hat
{
\seq
{
d
}}_{
i
}
=
\{\hat
{
d
}_{
ij
}
\}
$
,其中
$
\hat
{
d
}_{
ij
}$
表示对于源语言句子
$
s
_
i
$
得到的第
$
j
$
个最好的推导。
$
\{\hat
{
d
}_{
ij
}
\}
$
可以被定义如下:
\begin{eqnarray}
\begin{eqnarray}
\{\hat
{
d
}_{
ij
}
\}
=
\arg\max
_{
\{
d
_{
ij
}
\}
}
\sum
_{
i=1
}^{
M
}
\lambda
_
i
\cdot
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
\{\hat
{
d
}_{
ij
}
\}
&
=
&
\arg\max
_{
\{
d
_{
ij
}
\}
}
\sum
_{
i=1
}^{
M
}
\lambda
_
i
\cdot
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
\label
{
eq:7-17
}
\label
{
eq:7-17
}
\end{eqnarray}
\end{eqnarray}
\parinterval
对于每个样本都可以得到
$
n
$
-best推导集合,整个数据集上的推导集合被记为
$
\hat
{
\seq
{
D
}}
=
\{\hat
{
\seq
{
d
}}_{
1
}
,...,
\hat
{
\seq
{
d
}}_{
s
}
\}
$
。进一步,令所有样本的参考译文集合为
$
\seq
{
R
}
=
\{\seq
{
r
}_
1
,...,
\seq
{
r
}_
N
\}
$
。最小错误率训练的目标就是降低
$
\hat
{
\seq
{
D
}}$
相对于
$
\seq
{
R
}$
的错误。也就是,通过调整不同特征的权重
$
\lambda
=
\{
\lambda
_
i
\}
$
,让错误率最小,形式化描述为:
\parinterval
对于每个样本都可以得到
$
n
$
-best推导集合,整个数据集上的推导集合被记为
$
\hat
{
\seq
{
D
}}
=
\{\hat
{
\seq
{
d
}}_{
1
}
,...,
\hat
{
\seq
{
d
}}_{
s
}
\}
$
。进一步,令所有样本的参考译文集合为
$
\seq
{
R
}
=
\{\seq
{
r
}_
1
,...,
\seq
{
r
}_
N
\}
$
。最小错误率训练的目标就是降低
$
\hat
{
\seq
{
D
}}$
相对于
$
\seq
{
R
}$
的错误。也就是,通过调整不同特征的权重
$
\lambda
=
\{
\lambda
_
i
\}
$
,让错误率最小,形式化描述为:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
\lambda
}
=
\arg\min
_{
\lambda
}
\textrm
{
Error
}
(
\hat
{
\seq
{
D
}}
,
\seq
{
R
}
)
\hat
{
\lambda
}
&
=
&
\arg\min
_{
\lambda
}
\textrm
{
Error
}
(
\hat
{
\seq
{
D
}}
,
\seq
{
R
}
)
\label
{
eq:7-18
}
\label
{
eq:7-18
}
\end{eqnarray}
\end{eqnarray}
%公式--------------------------------------------------------------------
%公式--------------------------------------------------------------------
...
...
Chapter8/Figures/figure-different-representations-of-syntax-tree.tex
查看文件 @
1489baae
...
@@ -16,6 +16,6 @@
...
@@ -16,6 +16,6 @@
\node
[anchor=north west] (cap1) at (-1.5em,-1in)
{{
(a) 树状表示
}}
;
\node
[anchor=north west] (cap1) at (-1.5em,-1in)
{{
(a) 树状表示
}}
;
\node
[anchor=west] (cap2) at ([xshift=0.5in]cap1.east)
{{
(b) 序列表示(缩进)
}}
;
\node
[anchor=west] (cap2) at ([xshift=0.5in]cap1.east)
{{
(b) 序列表示(缩进)
}}
;
\node
[anchor=west] (cap3) at ([xshift=0.
5
in]cap2.east)
{{
(c) 序列表示
}}
;
\node
[anchor=west] (cap3) at ([xshift=0.
3
in]cap2.east)
{{
(c) 序列表示
}}
;
}
}
\end{tikzpicture}
\end{tikzpicture}
\ No newline at end of file
Chapter8/Figures/figure-example-of-cky-algorithm-execution.tex
查看文件 @
1489baae
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (caption1) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
(a)
}
;
\node
[anchor=north] (caption1) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
\small
{
(a)
}
}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (caption2) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
(b)
}
;
\node
[anchor=north] (caption2) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
\small
{
(b)
}
}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (caption3) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
(c)
}
;
\node
[anchor=north] (caption3) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
\small
{
(c)
}
}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l3) at ([yshift=-1em]cell53.south)
{
\tiny
{$
l
$
=3
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l4) at ([yshift=-1em]cell54.south)
{
\tiny
{$
l
$
=4
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (l5) at ([yshift=-1em]cell55.south)
{
\tiny
{$
l
$
=5
}}
;
\node
[anchor=north] (caption4) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
(d)
}
;
\node
[anchor=north] (caption4) at ([xshift=0.0em,yshift=0.0em]l5.south)
{
\small
{
(d)
}
}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y1) at ([xshift=-2.1em,yshift=2em]cell11.center)
{
\tiny
{
\blue
0
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
\node
[anchor=center] (y2) at ([xshift=-2.1em,yshift=2em]cell21.center)
{
\tiny
{
\blue
1
}}
;
...
...
Chapter8/Figures/figure-execution-of-cube-pruning.tex
查看文件 @
1489baae
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
criptsize
{
(a)
}}
;
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
mall
{
(a)
}}
;
\end{scope}
\end{scope}
%图2
%图2
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
criptsize
{
(b)
}}
;
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
mall
{
(b)
}}
;
\end{scope}
\end{scope}
%图3
%图3
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
criptsize
{
(c)
}}
;
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
mall
{
(c)
}}
;
\end{scope}
\end{scope}
...
@@ -194,7 +194,7 @@
...
@@ -194,7 +194,7 @@
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=-1.0em,yshift=-0.7em]alig4.south west);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\draw
[->,thick] ([xshift=-1.0em,yshift=1.0em]alig1.north west)--([xshift=0.8em,yshift=1.0em]alig13.north east);
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
criptsize
{
(d)
}}
;
\node
[anchor=north]
(l) at ([xshift=0em,yshift=-1.5em]alig4.south)
{
\s
mall
{
(d)
}}
;
\end{scope}
\end{scope}
...
...
Chapter8/Figures/figure-structure-of-chart.tex
查看文件 @
1489baae
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
\begin{tikzpicture}
\begin{tikzpicture}
\begin{scope}
\begin{scope}
\node
[anchor=south west,draw,fill=
u
green!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell11) at (0,0)
{
\scriptsize
{
cell[1,2]
}}
;
\node
[anchor=south west,draw,fill=green!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell11) at (0,0)
{
\scriptsize
{
cell[1,2]
}}
;
\node
[anchor=south west,draw,fill=red!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell12) at (cell11.south east)
{
\scriptsize
{
cell[0,2]
}}
;
\node
[anchor=south west,draw,fill=red!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell12) at (cell11.south east)
{
\scriptsize
{
cell[0,2]
}}
;
\node
[anchor=south west,draw,fill=orange!30,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell21) at (cell11.north west)
{
\scriptsize
{
cell[0,1]
}}
;
\node
[anchor=south west,draw,fill=orange!30,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell21) at (cell11.north west)
{
\scriptsize
{
cell[0,1]
}}
;
\node
[anchor=south west,draw,fill=gray!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell22) at (cell21.south east)
{
\scriptsize
{
N/A
}}
;
\node
[anchor=south west,draw,fill=gray!20,minimum width=2.8em,minimum height=2.8em,inner sep=1pt] (cell22) at (cell21.south east)
{
\scriptsize
{
N/A
}}
;
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
\draw
[->,thick] ([xshift=-1em,yshift=1em]cell21.north west)--([xshift=1em,yshift=1em]cell22.north east);
\draw
[->,thick] ([xshift=-1em,yshift=1em]cell21.north west)--([xshift=1em,yshift=1em]cell22.north east);
\node
[anchor=north west,fill=orange!30,draw,drop shadow,align=left,minimum width=4em] (cell11label) at ([xshift=4em,yshift=1em]cell22.north east)
{
\footnotesize
{
VV[0,1]
}}
;
\node
[anchor=north west,fill=orange!30,draw,drop shadow,align=left,minimum width=4em] (cell11label) at ([xshift=4em,yshift=1em]cell22.north east)
{
\footnotesize
{
VV[0,1]
}}
;
\node
[anchor=north west,fill=
u
green!20,draw,drop shadow,align=left,minimum width=4em] (cell12label) at ([yshift=-1em]cell11label.south west)
{
\footnotesize
{
NN[1,2]
}
\\\footnotesize
{
NP[1,2]
}}
;
\node
[anchor=north west,fill=green!20,draw,drop shadow,align=left,minimum width=4em] (cell12label) at ([yshift=-1em]cell11label.south west)
{
\footnotesize
{
NN[1,2]
}
\\\footnotesize
{
NP[1,2]
}}
;
\node
[anchor=north west,fill=red!20,draw,drop shadow,align=left,minimum width=4em] (cell21label) at ([yshift=-1em]cell12label.south west)
{
\footnotesize
{
VP[0,2]
}
\\\footnotesize
{
NP[0,2]
}}
;
\node
[anchor=north west,fill=red!20,draw,drop shadow,align=left,minimum width=4em] (cell21label) at ([yshift=-1em]cell12label.south west)
{
\footnotesize
{
VP[0,2]
}
\\\footnotesize
{
NP[0,2]
}}
;
\draw
[->,very thick,dotted] ([yshift=0.3em]cell11label.west) .. controls +(west:2em) and +(north:1.5em) .. ([xshift=1em,yshift=-0.5em]cell21.north);
\draw
[->,very thick,dotted] ([yshift=0.3em]cell11label.west) .. controls +(west:2em) and +(north:1.5em) .. ([xshift=1em,yshift=-0.5em]cell21.north);
...
...
Chapter8/chapter8.tex
查看文件 @
1489baae
...
@@ -266,7 +266,7 @@ r_4:\quad \funp{X}\ &\to\ &\langle \ \text{了},\quad \textrm{have}\ \rangle \no
...
@@ -266,7 +266,7 @@ r_4:\quad \funp{X}\ &\to\ &\langle \ \text{了},\quad \textrm{have}\ \rangle \no
\noindent
其中,每使用一次规则就会同步替换源语言和目标语言符号串中的一个非终结符,替换结果用红色表示。通常,可以把上面这个过程称作翻译推导,记为:
\noindent
其中,每使用一次规则就会同步替换源语言和目标语言符号串中的一个非终结符,替换结果用红色表示。通常,可以把上面这个过程称作翻译推导,记为:
\begin{eqnarray}
\begin{eqnarray}
d
=
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
4
}
d
&
=
&
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
4
}
\label
{
eq:8-1
}
\label
{
eq:8-1
}
\end{eqnarray}
\end{eqnarray}
...
@@ -402,19 +402,19 @@ y&=&\beta_0 y_{\pi_1} \beta_1 y_{\pi_2} ... \beta_{m-1} y_{\pi_m} \beta_m
...
@@ -402,19 +402,19 @@ y&=&\beta_0 y_{\pi_1} \beta_1 y_{\pi_2} ... \beta_{m-1} y_{\pi_m} \beta_m
\parinterval
这些特征可以被具体描述为:
\parinterval
这些特征可以被具体描述为:
\begin{eqnarray}
\begin{eqnarray}
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
=
\sum
_{
r
\in
d
}
h
_
i (r)
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
&
=
&
\sum
_{
r
\in
d
}
h
_
i (r)
\label
{
eq:8-4
}
\label
{
eq:8-4
}
\end{eqnarray}
\end{eqnarray}
\parinterval
公式
\eqref
{
eq:8-4
}
中,
$
r
$
表示推导
$
d
$
中的一条规则,
$
h
_
i
(
r
)
$
表示规则
$
r
$
上的第
$
i
$
个特征。可以看出,推导
$
d
$
的特征值就是所有包含在
$
d
$
中规则的特征值的和。进一步,可以定义
\parinterval
公式
\eqref
{
eq:8-4
}
中,
$
r
$
表示推导
$
d
$
中的一条规则,
$
h
_
i
(
r
)
$
表示规则
$
r
$
上的第
$
i
$
个特征。可以看出,推导
$
d
$
的特征值就是所有包含在
$
d
$
中规则的特征值的和。进一步,可以定义
\begin{eqnarray}
\begin{eqnarray}
\textrm
{
rscore
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
=
\sum
_{
i=1
}^
7
\lambda
_
i
\cdot
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
\textrm
{
rscore
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
&
=
&
\sum
_{
i=1
}^
7
\lambda
_
i
\cdot
h
_
i (d,
\seq
{
t
}
,
\seq
{
s
}
)
\label
{
eq:8-5
}
\label
{
eq:8-5
}
\end{eqnarray}
\end{eqnarray}
\parinterval
最终,模型得分被定义为:
\parinterval
最终,模型得分被定义为:
\begin{eqnarray}
\begin{eqnarray}
\textrm
{
score
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
=
\textrm
{
rscore
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)+
\lambda
_
8
\textrm
{
log
}
(
\funp
{
P
}_{
\textrm
{
lm
}}
(
\seq
{
t
}
))+
\lambda
_
9
\mid
\seq
{
t
}
\mid
\textrm
{
score
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
&
=
&
\textrm
{
rscore
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)+
\lambda
_
8
\textrm
{
log
}
(
\funp
{
P
}_{
\textrm
{
lm
}}
(
\seq
{
t
}
))+
\lambda
_
9
\mid
\seq
{
t
}
\mid
\label
{
eq:8-6
}
\label
{
eq:8-6
}
\end{eqnarray}
\end{eqnarray}
...
@@ -438,14 +438,14 @@ h_i (d,\seq{t},\seq{s})=\sum_{r \in d}h_i (r)
...
@@ -438,14 +438,14 @@ h_i (d,\seq{t},\seq{s})=\sum_{r \in d}h_i (r)
\parinterval
层次短语模型解码的目标是找到模型得分最高的推导,即:
\parinterval
层次短语模型解码的目标是找到模型得分最高的推导,即:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
d
}
=
\argmax
_{
d
}
\ \textrm
{
score
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
\hat
{
d
}
&
=
&
\argmax
_{
d
}
\ \textrm
{
score
}
(d,
\seq
{
t
}
,
\seq
{
s
}
)
\label
{
eq:8-7
}
\label
{
eq:8-7
}
\end{eqnarray}
\end{eqnarray}
\noindent
这里,
$
\hat
{
d
}$
的目标语部分即最佳译文
$
\hat
{
\seq
{
t
}}$
。令函数
$
t
(
\cdot
)
$
返回翻译推导的目标语词串,于是有:
\noindent
这里,
$
\hat
{
d
}$
的目标语部分即最佳译文
$
\hat
{
\seq
{
t
}}$
。令函数
$
t
(
\cdot
)
$
返回翻译推导的目标语词串,于是有:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
\seq
{
t
}}
=
t(
\hat
{
d
}
)
\hat
{
\seq
{
t
}}
&
=
&
t(
\hat
{
d
}
)
\label
{
eq:8-8
}
\label
{
eq:8-8
}
\end{eqnarray}
\end{eqnarray}
...
@@ -1408,15 +1408,15 @@ r_9: \quad \textrm{IP(}\textrm{NN}_1\ \textrm{VP}_2) \rightarrow \textrm{S(}\tex
...
@@ -1408,15 +1408,15 @@ r_9: \quad \textrm{IP(}\textrm{NN}_1\ \textrm{VP}_2) \rightarrow \textrm{S(}\tex
\parinterval
从句法分析的角度看,超图最大程度地复用了局部的分析结果,使得分析可以“结构化”。比如,有两个推导:
\parinterval
从句法分析的角度看,超图最大程度地复用了局部的分析结果,使得分析可以“结构化”。比如,有两个推导:
\begin{eqnarray}
\begin{eqnarray}
d
_
1
=
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
4
}
\label
{
eqa4.30
}
\\
d
_
1
&
=
&
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
4
}
\label
{
eqa4.30
}
\\
d
_
2
=
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
5
}
d
_
2
&
=
&
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}
\circ
{
r
_
5
}
\label
{
eq:8-10
}
\label
{
eq:8-10
}
\end{eqnarray}
\end{eqnarray}
\noindent
其中,
$
r
_
1
-
r
_
5
$
分别表示不同的规则。
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
是两个推导的公共部分。在超图表示中,
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
可以对应一个子图,显然这个子图也是一个推导,记为
${
d'
}
=
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
。这样,
$
d
_
1
$
和
$
d
_
2
$
不需要重复记录
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
,重新写作:
\noindent
其中,
$
r
_
1
-
r
_
5
$
分别表示不同的规则。
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
是两个推导的公共部分。在超图表示中,
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
可以对应一个子图,显然这个子图也是一个推导,记为
${
d'
}
=
{
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
。这样,
$
d
_
1
$
和
$
d
_
2
$
不需要重复记录
${
r
_
1
}
\circ
{
r
_
2
}
\circ
{
r
_
3
}$
,重新写作:
\begin{eqnarray}
\begin{eqnarray}
d
_
1
=
{
d'
}
\circ
{
r
_
4
}
\label
{
eqa4.32
}
\\
d
_
1
&
=
&
{
d'
}
\circ
{
r
_
4
}
\label
{
eqa4.32
}
\\
d
_
1
=
{
d'
}
\circ
{
r
_
5
}
d
_
1
&
=
&
{
d'
}
\circ
{
r
_
5
}
\label
{
eq:8-12
}
\label
{
eq:8-12
}
\end{eqnarray}
\end{eqnarray}
...
@@ -1458,7 +1458,7 @@ d_1 = {d'} \circ {r_5}
...
@@ -1458,7 +1458,7 @@ d_1 = {d'} \circ {r_5}
\parinterval
解码的目标是找到得分score(
$
d
$
)最高的推导
$
d
$
。这个过程通常被描述为:
\parinterval
解码的目标是找到得分score(
$
d
$
)最高的推导
$
d
$
。这个过程通常被描述为:
\begin{eqnarray}
\begin{eqnarray}
\hat
{
d
}
=
\argmax
_
d
\ \textrm
{
score
}
(d,
\seq
{
s
}
,
\seq
{
t
}
)
\hat
{
d
}
&
=
&
\argmax
_
d
\ \textrm
{
score
}
(d,
\seq
{
s
}
,
\seq
{
t
}
)
\label
{
eq:8-13
}
\label
{
eq:8-13
}
\end{eqnarray}
\end{eqnarray}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论