Commit 1aede1d1 by 曹润柘

合并分支 'caorunzhe' 到 'master'

Caorunzhe

查看合并请求 !294
parents 4b7103e7 798d00c4
......@@ -12,12 +12,12 @@
\begin{scope}
{
{\small
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:}};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:}};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} 现在};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {\textbf{4:} 物价};
\node [anchor=north west] (entry5) at ([yshift=0.1em]entry4.south west) {\textbf{5:} 确实};
\node [anchor=north west] (entry6) at ([yshift=0.1em]entry5.south west) {\textbf{6:} 实现};
\node [anchor=north west] (entry1) at (0,0) {{1:}};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {{2:}};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {{3:} 现在};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {{4:} 物价};
\node [anchor=north west] (entry5) at ([yshift=0.1em]entry4.south west) {{5:} 确实};
\node [anchor=north west] (entry6) at ([yshift=0.1em]entry5.south west) {{6:} 实现};
\node [anchor=south west] (dictionarylabel) at (entry1.north west) {{\color{ublue} 分词词典}};
}
}
......
......@@ -15,7 +15,7 @@
& \overset{r_2}{\Rightarrow} & \textrm{猫 喜欢 VP} \nonumber \\
& \overset{r_6}{\Rightarrow} & \textrm{猫 喜欢 VV NN} \nonumber \\
& \overset{r_3}{\Rightarrow} & \textrm{猫 喜欢 吃 NN} \nonumber \\
& \overset{r_4}{\Rightarrow} & \textrm{猫 喜欢 吃 鱼} \nonumber
& \overset{r_4}{\Rightarrow} & \textrm{猫 喜欢 吃 鱼} \nonumber
\end{eqnarray}
}
\end{minipage}
......@@ -36,119 +36,14 @@
\node [anchor=north west,inner sep=2pt] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=west,inner sep=2pt] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt] (r2) at ([xshift=3em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
\node [anchor=north west,inner sep=2pt] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};
\node [anchor=north west,inner sep=2pt] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
}
\end{scope}
\begin{scope}[xshift=4.5em,yshift=-5.5em,level distance=20pt,sibling distance=13pt]
\Tree[.IP \edge[white];
[.{\color{white} NP} \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
] \edge[white];
[.{\color{white} VP} \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw2){喜欢}; ] \edge[white];
[.{\color{white} VP} \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
[.VP \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw2){喜欢}; ] \edge[white];
[.{\color{white} VP} \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \edge[white]; \node[white](sw1){}; ]
]
[.VP \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw2){喜欢}; ] \edge[white];
[.{\color{white} VP} \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \node(sw1){}; ]
]
[.VP \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw2){喜欢}; ] \edge[white];
[.{\color{white} VP} \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \node(sw1){}; ]
]
[.VP
[.VV \edge[white]; \node[white](sw2){喜欢}; ]
[.VP \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \node(sw1){}; ]
]
[.VP
[.VV \node(sw2){喜欢}; ]
[.VP \edge[white];
[.{\color{white} VV} \edge[white]; \node[white](sw1){}; ] \edge[white];
[.{\color{white} NN} \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \node(sw1){}; ]
]
[.VP
[.VV \node(sw2){喜欢}; ]
[.VP
[.VV \edge[white]; \node[white](sw1){}; ]
[.NN \edge[white]; \node[white](sw1){}; ]
]
]
]
\Tree[.IP
[.NP
[.NN \node(sw1){}; ]
]
......
......@@ -38,8 +38,8 @@
\node[anchor=north,see] (one_s) at ([yshift=-1.4em]one_h.south){};
\node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_s.east){一个可见状态};
\draw[->,line width=1.4pt] ([xshift=8em]one_h.east) -- ([xshift=9em]one_h.east);
\node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.2em]one_h.east){从一个隐含状态到下一个隐含状态\\转换,该过程隐含着转移概率};
\node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.2em]one_h.east){从一个隐含状态到下一个隐含状态\\转换,该过程隐含着转移概率};
\draw[->,line width=1.4pt,blue!60] ([yshift=-2em,xshift=8.5em]one_h.east) --([yshift=-3em,xshift=8.5em]one_h.east) ;
\node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.2em]one_h.east){从一个隐含状态到可见状态的输出\\该过程隐含着发射概率};
\node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.2em]one_h.east){从一个隐含状态到可见状态的输出\\该过程隐含着发射概率};
\end{tikzpicture}
\ No newline at end of file
......@@ -12,12 +12,12 @@
\begin{scope}
{
{\small
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:}};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:}};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} 现在};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {\textbf{4:} 物价};
\node [anchor=north west] (entry5) at ([yshift=0.1em]entry4.south west) {\textbf{5:} 确实};
\node [anchor=north west] (entry6) at ([yshift=0.1em]entry5.south west) {\textbf{6:} 实现};
\node [anchor=north west] (entry1) at (0,0) {{1:}};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {{2:}};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {{3:} 现在};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {{4:} 物价};
\node [anchor=north west] (entry5) at ([yshift=0.1em]entry4.south west) {{5:} 确实};
\node [anchor=north west] (entry6) at ([yshift=0.1em]entry5.south west) {{6:} 实现};
\node [anchor=south west] (dictionarylabel) at (entry1.north west) {{\color{ublue} 分词词典}};
}
}
......
......@@ -8,9 +8,9 @@
\begin{tikzpicture}
{\scriptsize
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:} 这 / 是 / 数据};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:} 现在 / 已经 / 实现};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} 确实 / 有 / 很 / 多};
\node [anchor=north west] (entry1) at (0,0) {1: 这 / 是 / 数据};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {2: 现在 / 已经 / 实现};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {3: 确实 / 有 / 很 / 多};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {...};
\node [anchor=south west] (corpuslabel) at (entry1.north west) {{\color{ublue} \textbf{学习用数据}}};
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\definecolor{ugreen}{rgb}{0,0.5,0}
......@@ -9,57 +8,22 @@
\begin{tikzpicture}
\begin{scope}[sibling distance=7pt,level distance=22pt]
\Tree[.\node[inner sep=1pt](sn0){IP\scriptsize{:句子}};
[.\node[inner sep=1pt](sn1){NP\scriptsize{:名}};
[.\node[inner sep=1pt](sn2){NN\tiny{:名词}}; \node(sw1){}; ]
]
[.\node[inner sep=1pt](sn3){VP\scriptsize{:动}};
[.\node[inner sep=1pt](sn4){VV\tiny{:动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt](sn5){VP\scriptsize{:动}};
[.\node[inner sep=1pt](sn6){VV\tiny{:动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt](sn7){NN\tiny{:名词}}; \node(sw1){}; ]
]
]
]
\Tree[.\node[inner sep=1pt](sn0){IP\scriptsize{:句子}};
[.\node[inner sep=1pt](sn1){NP\scriptsize{:名}};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{:名词}}; \node(sw1){}; ]
]
[.\node[inner sep=1pt](sn3){VP\scriptsize{:动}};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{:动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt](sn5){VP\scriptsize{:动}};
[.\node[inner sep=1pt,fill=blue!20](sn6){VV\tiny{:动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=blue!20](sn7){NN\tiny{:名词}}; \node(sw1){}; ]
]
]
]
\Tree[.\node[inner sep=1pt,fill=red!20](sn0){IP\scriptsize{:句子}};
[.\node[inner sep=1pt,fill=red!20](sn1){NP\scriptsize{:}};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{:名词}}; \node(sw1){}; ]
\Tree[.\node[inner sep=1pt,fill=red!20](sn0){IP\scriptsize{ 句子}};
[.\node[inner sep=1pt,fill=red!20](sn1){NP\scriptsize{ }};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{ 名词}}; \node(sw1){}; ]
]
[.\node[inner sep=1pt,fill=red!20](sn3){VP\scriptsize{:}};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{:动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt](sn5){VP\scriptsize{:}};
[.\node[inner sep=1pt,fill=blue!20](sn6){VV\tiny{:动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=blue!20](sn7){NN\tiny{:名词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=red!20](sn3){VP\scriptsize{ }};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{ 动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt,fill=green!20](sn5){VP\scriptsize{ }};
[.\node[inner sep=1pt,fill=green!20](sn6){VV\tiny{ 动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=green!20](sn7){NN\tiny{ 名词}}; \node(sw1){}; ]
]
]
]
\Tree[.\node[inner sep=1pt,fill=red!20](sn0){IP\scriptsize{:句子}};
[.\node[inner sep=1pt,fill=red!20](sn1){NP\scriptsize{:名}};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{:名词}}; \node(sw1){}; ]
]
[.\node[inner sep=1pt,fill=red!20](sn3){VP\scriptsize{:动}};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{:动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt,fill=green!20](sn5){VP\scriptsize{:动}};
[.\node[inner sep=1pt,fill=green!20](sn6){VV\tiny{:动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=green!20](sn7){NN\tiny{:名词}}; \node(sw1){}; ]
]
]
]
\end{scope}
......@@ -79,4 +43,3 @@
\end{tikzpicture}
......@@ -2,13 +2,13 @@
\begin{scope}
\node[minimum width=3em,minimum height=1.5em] (o) at (0,0){};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\scriptsize\bfnew{硬币$\boldsymbol A$}};
\node[anchor=west,inner sep=0pt] (cb) at ([xshift=1.4em]ca.east){\scriptsize\bfnew{硬币$\boldsymbol B$}};
\node[anchor=west,inner sep=0pt] (cc) at ([xshift=1.4em]cb.east){\scriptsize\bfnew{硬币$\boldsymbol C$}};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\small\sffamily\bfseries{硬币$\boldsymbol A$}};
\node[anchor=west,inner sep=0pt] (cb) at ([xshift=1.4em]ca.east){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=west,inner sep=0pt] (cc) at ([xshift=1.4em]cb.east){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\scriptsize\bfnew{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.4em]ra.south){\scriptsize\bfnew{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.4em]rb.south){\scriptsize\bfnew{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\small\sffamily\bfseries{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.4em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.4em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-0.9em]ca.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1em]n11.south){\small{$\frac{1}{3}$}};
......@@ -35,12 +35,12 @@
\begin{scope}[xshift=8cm]
\node[minimum width=3em,minimum height=1.5em] (o) at (0,0){};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\scriptsize\bfnew{正面}};
\node[anchor=west,inner sep=0pt] (cb) at ([xshift=1.4em]ca.east){\scriptsize\bfnew{反面}};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\small\sffamily\bfseries{正面}};
\node[anchor=west,inner sep=0pt] (cb) at ([xshift=1.4em]ca.east){\small\sffamily\bfseries{反面}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\scriptsize\bfnew{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\scriptsize\bfnew{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.5em]rb.south){\scriptsize\bfnew{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\small\sffamily\bfseries{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.5em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1.2em]ca.south){\footnotesize{$0.3$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1.7em]n11.south){\footnotesize{$0.5$}};
......
......@@ -13,9 +13,9 @@
{\scriptsize
{
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:} 这 / 是 / 数据};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:} 现在 / 已经 / 实现};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} 确实 / 有 / 很 / 多};
\node [anchor=north west] (entry1) at (0,0) {1: 这 / 是 / 数据};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {2: 现在 / 已经 / 实现};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {3: 确实 / 有 / 很 / 多};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {...};
\node [anchor=south west] (corpuslabel) at (entry1.north west) {{\color{ublue} \textbf{学习用数据}}};
}
......
......@@ -33,7 +33,7 @@
% auto evaluation
\node [anchor=north west,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=red!20,drop shadow] (aebox) at ([xshift=8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!20,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式}\\\small\footnotesize{简单的建模}};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!20,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式}\\\small\footnotesize{简单的建模}};
\node [anchor=north,minimum width=10em] (aetitle) at ([yshift=-0.2em]aebox.north) {{\small\bfnew\large{有参考答案的评价}}};
\draw [-] ([yshift=-2em]aebox.north west) -- ([yshift=-2em]aebox.north east);
\node [anchor=north] (aemethod1) at ([yshift=-0.5em]aetitle.south) {BLEU、NIST、};
......@@ -53,14 +53,14 @@
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow1) at ([yshift=-2.4em]qebox.south) {};
% comparing different systems
\node [anchor=west,align=left] (com) at ([xshift=8em,yshift=0.6em]hebox.east) {\small\bfnew{用于对比}\\\small\bfnew{不同系统}\\\small\bfnew{的好坏}};
\node [anchor=west,align=left] (com) at ([xshift=8em,yshift=0.6em]hebox.east) {\small\bfnew{用于对比}\\\small\bfnew{不同系统}\\\small\bfnew{性能差异}};
\node [anchor=west,single arrow,minimum height=7.5em,fill=blue!30] (arrow2) at ([yshift=-1.4em,xshift=0.5em]hebox.north east) {};
\node [anchor=north,fill=white] (arrow2label) at ([xshift=-0.5em]arrow2.south) {\footnotesize{{\color{blue} 成本高但精度高}}};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow3) at ([yshift=-2.4em,xshift=2.2em]aebox.south) {};
\node [anchor=west,fill=white,font=\footnotesize,align=left,text=blue,inner sep=0pt] (arrow3label) at ([yshift=2.6em,xshift=0.6em]arrow3.east) {成本低\\无人工\\有偏差};
% system optimization
\node [anchor=west,align=left] (optimization) at ([xshift=2em]aebox.east) {\small\bfnew{用于}\\\small\bfnew{机器}\\\small\bfnew{翻译}\\\small\bfnew{系统}\\\small\bfnew{的调}\\\small\bfnew{}};
\node [anchor=west,align=left] (optimization) at ([xshift=2em]aebox.east) {\small\bfnew{用于机器}\\\small\bfnew{翻译系统}\\\small\bfnew{}};
\node [anchor=west,single arrow,minimum height=1.8em,fill=blue!30] (arrow4) at ([xshift=0.4em]aebox.east) {};
\begin{pgfonlayer}{background}
......
......@@ -50,7 +50,7 @@ IBM模型由Peter F. Brown等人于上世纪九十年代初提出\upcite{DBLP:jo
\end{figure}
%----------------------------------------------
\parinterval 上面的例子反映了人在做翻译时所使用的一些知识:首先,两种语言单词的顺序可能不一致,而且译文需要符合目标语的习惯,这也就是常说的翻译的{\small\sffamily\bfseries{流畅度}}\index{流畅度}问题(Fluency)\index{Fluency};其次,源语言单词需要准确地被翻译出来,也就是常说的翻译的{\small\sffamily\bfseries{准确性}}\index{准确性}(Accuracy)\index{Accuracy}问题和{\small\sffamily\bfseries{充分性}}\index{充分性}(Adequacy)\index{Adequacy}问题。为了达到以上目的,传统观点认为翻译过程需要包含三个步骤\upcite{parsing2009speech}
\parinterval 上面的例子反映了人在做翻译时所使用的一些知识:首先,两种语言单词的顺序可能不一致,而且译文需要符合目标语的习惯,这也就是常说的翻译的流畅度;其次,源语言单词需要准确地被翻译出来,也就是常说的翻译的准确性问题和充分性问题。为了达到以上目的,传统观点认为翻译过程需要包含三个步骤\upcite{parsing2009speech}
\begin{itemize}
\vspace{0.5em}
......@@ -154,7 +154,7 @@ IBM模型由Peter F. Brown等人于上世纪九十年代初提出\upcite{DBLP:jo
%----------------------------------------------------------------------------------------
\subsubsection{3. 人工翻译 vs. 机器翻译}
\parinterval 人在翻译时的决策是非常确定并且快速的,但计算机处理这个问题时却充满了概率化的思想。当然它们也有类似的地方。首先,计算机使用统计模型的目的是把翻译知识变得可计算,并把这些“知识”储存在模型参数中,这个模型和人类大脑的作用是类似的\footnote{这里并不是要把统计模型等同于生物学或者认知科学上的人脑,这里是指它们处理翻译问题时发挥的作用类似。};其次,计算机对统计模型进行训练相当于人类对知识的学习,二者都可以被看作是理解、加工知识的过程;再有,计算机使用学习到的模型对新句子进行翻译的过程相当于人运用知识的过程。在统计机器翻译中,模型学习的过程被称为{\small\sffamily\bfseries{训练}}\index{训练}(Training)\index{Training},目的是从双语平行数据中自动学习翻译“知识”;而使用模型处理新句子的过程是一个典型的预测过程,也被称为{\small\sffamily\bfseries{解码}}\index{解码}(Decoding)\index{Decoding}{\small\sffamily\bfseries{推断}}\index{推断}(Inference)\index{Inference}。图\ref{fig:5-4}的右侧标注在翻译过程中训练和解码的作用。最终,统计机器翻译的核心由三部分构成\ \dash \ 建模、训练和解码。本章后续内容会围绕这三个问题展开讨论。
\parinterval 人在翻译时的决策是非常确定并且快速的,但计算机处理这个问题时却充满了概率化的思想。当然它们也有类似的地方。首先,计算机使用统计模型的目的是把翻译知识变得可计算,并把这些“知识”储存在模型参数中,这个模型和人类大脑的作用是类似的\footnote{这里并不是要把统计模型等同于生物学或者认知科学上的人脑,这里是指它们处理翻译问题时发挥的作用类似。};其次,计算机对统计模型进行训练相当于人类对知识的学习,二者都可以被看作是理解、加工知识的过程;再有,计算机使用学习到的模型对新句子进行翻译的过程相当于人运用知识的过程。在统计机器翻译中,模型学习的过程被称为训练,目的是从双语平行数据中自动学习翻译“知识”;而使用模型处理新句子的过程是一个典型的预测过程,也被称为解码或推断。图\ref{fig:5-4}的右侧标注在翻译过程中训练和解码的作用。最终,统计机器翻译的核心由三部分构成\ \dash \ 建模、训练和解码。本章后续内容会围绕这三个问题展开讨论。
%----------------------------------------------------------------------------------------
% NEW SUB-SECTION
......@@ -428,7 +428,7 @@ g(\seq{s},\seq{t}) \equiv \prod_{j,i \in \widehat{A}}{\funp{P}(s_j,t_i)} \times
\subsection{解码}
\label{sec:simple-decoding}
\parinterval {\small\sffamily\bfseries{解码}}\index{解码}(Decoding)\index{Decoding}是指在得到翻译模型后,对于新输入的句子生成最佳译文的过程。具体来说,当给定任意的源语言句子$\seq{s}$,解码系统要找到翻译概率最大的目标语译文$\hat{\seq{t}}$。这个过程可以被形式化描述为:
\parinterval 解码是指在得到翻译模型后,对于新输入的句子生成最佳译文的过程。具体来说,当给定任意的源语言句子$\seq{s}$,解码系统要找到翻译概率最大的目标语译文$\hat{\seq{t}}$。这个过程可以被形式化描述为:
\begin{eqnarray}
\widehat{\seq{t}}=\argmax_{\seq{t}} \funp{P}(\seq{t}|\seq{s})
\label{eq:5-11}
......@@ -616,7 +616,7 @@ g(\seq{s},\seq{t}) \equiv \prod_{j,i \in \widehat{A}}{\funp{P}(s_j,t_i)} \times
\subsection{词对齐}
\parinterval IBM模型的一个基本的假设是词对齐假设。{\small\sffamily\bfseries{词对齐}}\index{词对齐}(Word Alignment)\index{Word Alignment}描述了源语言句子和目标语句子之间单词级别的对应。具体来说,给定源语句子$\seq{s}=s_1...s_m$和目标语译文$\seq{t}=t_1...t_l$,IBM模型假设词对齐具有如下两个性质。
\parinterval IBM模型的一个基本的假设是词对齐假设。词对齐描述了源语言句子和目标语句子之间单词级别的对应。具体来说,给定源语句子$\seq{s}=s_1...s_m$和目标语译文$\seq{t}=t_1...t_l$,IBM模型假设词对齐具有如下两个性质。
\begin{itemize}
\vspace{0.5em}
......
......@@ -189,7 +189,7 @@ p_4 &=& \text{问题}\nonumber
&&... \nonumber
\end{eqnarray}
\parinterval 接下来的问题是,如何使用双语短语描述双语句子的生成,即句子翻译的建模问题。在基于词的翻译模型里,可以用词对齐来描述双语句子的对应关系。类似的,也可以使用双语短语描述句子的翻译。这里,借用形式文法中{\small\bfnew{推导}}\index{推导}(Derivation)\index{Derivation}的概念。把生成双语句对的过程定义为一个基于短语的翻译推导:
\parinterval 接下来的问题是,如何使用双语短语描述双语句子的生成,即句子翻译的建模问题。在基于词的翻译模型里,可以用词对齐来描述双语句子的对应关系。类似的,也可以使用双语短语描述句子的翻译。这里,借用形式文法中推导的概念。把生成双语句对的过程定义为一个基于短语的翻译推导:
%-------------------------------------------
\vspace{0.5em}
......@@ -312,7 +312,7 @@ d = {(\bar{s}_{\bar{a}_1},\bar{t}_1)} \circ {(\bar{s}_{\bar{a}_2},\bar{t}_2)} \c
\subsection{对数线性模型}
\parinterval 对于如何定义$\funp{P}(d,\seq{t}|\seq{s})$有很多种思路,比如,可以把$d$拆解为若干步骤,然后对这些步骤分别建模,最后形成描述$d${\small\bfnew{生成式模型}}\index{生成式模型}(Generative Model)\index{Generative Model}。这种方法在{\chapterfive}{\chaptersix}的IBM模型中也大量使用。但是,生成式模型的每一步推导需要有严格的概率解释,这也限制了研究人员从更多的角度对$d$进行描述。这里,可以使用另外一种方法\ \dash \ {\small\bfnew{判别式模型}}\index{判别式模型}(Discriminative Model)\index{Discriminative Model}来对$\funp{P}(d,\seq{t}|\seq{s})$进行描述\upcite{DBLP:conf/acl/OchN02}。其模型形式如下:
\parinterval 对于如何定义$\funp{P}(d,\seq{t}|\seq{s})$有很多种思路,比如,可以把$d$拆解为若干步骤,然后对这些步骤分别建模,最后形成描述$d$生成式模型。这种方法在{\chapterfive}{\chaptersix}的IBM模型中也大量使用。但是,生成式模型的每一步推导需要有严格的概率解释,这也限制了研究人员从更多的角度对$d$进行描述。这里,可以使用另外一种方法\ \dash \ 判别式模型来对$\funp{P}(d,\seq{t}|\seq{s})$进行描述\upcite{DBLP:conf/acl/OchN02}。其模型形式如下:
\begin{eqnarray}
\funp{P}(d,\seq{t}|\seq{s}) &=& \frac{\textrm{exp}(\textrm{score}(d,\seq{t},\seq{s}))}{\sum_{d',\seq{t}'} \textrm{exp}(\textrm{score}(d',\seq{t}',\seq{s}))} \label{eqa4.10}
......@@ -787,7 +787,7 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
\subsection{翻译候选匹配}
\parinterval 在解码时,首先要知道每个源语言短语可能的译文都是什么。对于一个源语言短语,每个可能的译文也被称作{\small\bfnew{翻译候选}}\index{翻译候选}(Translation Candidate)\index{Translation Candidate}。实现翻译候选的匹配很简单。只需要遍历输入的源语言句子中所有可能的短语,之后在短语表中找到相应的翻译即可。比如,图\ref{fig:7-27}展示了句子“桌子/上/有/一个/苹果”的翻译候选匹配结果。可以看到,不同的短语会对应若干翻译候选。这些翻译候选会保存在所对应的范围(被称为跨度)中。这里,跨度$[a,b]$表示从第$a+1$个词开始到第$b$个词为止所表示的词串。比如,“upon the table” 是短语“桌子/上/有”的翻译候选,即对应源语言跨度[0,3]。
\parinterval 在解码时,首先要知道每个源语言短语可能的译文都是什么。对于一个源语言短语,每个可能的译文也被称作翻译候选。实现翻译候选的匹配很简单。只需要遍历输入的源语言句子中所有可能的短语,之后在短语表中找到相应的翻译即可。比如,图\ref{fig:7-27}展示了句子“桌子/上/有/一个/苹果”的翻译候选匹配结果。可以看到,不同的短语会对应若干翻译候选。这些翻译候选会保存在所对应的范围(被称为跨度)中。这里,跨度$[a,b]$表示从第$a+1$个词开始到第$b$个词为止所表示的词串。比如,“upon the table” 是短语“桌子/上/有”的翻译候选,即对应源语言跨度[0,3]。
%----------------------------------------------
\begin{figure}[htp]
......@@ -823,7 +823,7 @@ dr = {\rm{start}}_i-{\rm{end}}_{i-1}-1
\subsection{剪枝}
\parinterval 假设扩展建立了解码算法的基本框架。但是,当句子变长时,这种方法还是面临着搜索空间爆炸的问题。对于这个问题,常用的解决办法是{\small\bfnew{剪枝}}\index{剪枝}(Pruning)\index{Pruning},也就是在搜索图中排除掉一些节点。比如,可以使用{\small\bfnew{束剪枝}}\index{束剪枝}(Beam Pruning)\index{Beam Pruning},确保每次翻译扩展时,最多生成$k$个新的翻译假设。这里$k$可以被看做是束的宽度。通过控制$k$的大小,可以在解码精度和速度之间进行平衡。这种基于束宽度进行剪枝的方法也被称作{\small\bfnew{直方图剪枝}}\index{直方图剪枝}(Histogram Pruning)\index{Histogram Pruning}。另一种思路是,每次扩展时只保留与最优翻译假设得分相差在$\delta$之内的翻译假设。$\delta$可以被看作是一种与最优翻译假设之间距离的阈值,超过这个阈值就被剪枝。这种方法也被称作{\small\bfnew{阈值剪枝}}\index{阈值剪枝}(Threshold Pruning)\index{Threshold Pruning}
\parinterval 假设扩展建立了解码算法的基本框架。但是,当句子变长时,这种方法还是面临着搜索空间爆炸的问题。对于这个问题,常用的解决办法是剪枝,也就是在搜索图中排除掉一些节点。比如,可以使用束剪枝,确保每次翻译扩展时,最多生成$k$个新的翻译假设。这里$k$可以被看做是束的宽度。通过控制$k$的大小,可以在解码精度和速度之间进行平衡。这种基于束宽度进行剪枝的方法也被称作直方图剪枝。另一种思路是,每次扩展时只保留与最优翻译假设得分相差在$\delta$之内的翻译假设。$\delta$可以被看作是一种与最优翻译假设之间距离的阈值,超过这个阈值就被剪枝。这种方法也被称作{\small\bfnew{阈值剪枝}}\index{阈值剪枝}(Threshold Pruning)\index{Threshold Pruning}
\parinterval 不过,即使引入束剪枝,解码过程中仍然会有很多冗余的翻译假设。有两种方法可以进一步加速解码:
......
......@@ -264,7 +264,7 @@ r_4:\quad \funp{X}\ &\to\ &\langle \ \text{了},\quad \textrm{have}\ \rangle \no
& & \ \textrm{The imports}\ {\red{\textrm{have}}}\ \textrm{drastically}\ \textrm{fallen}\ \rangle \nonumber
\end{eqnarray}
\noindent 其中,每使用一次规则就会同步替换源语言和目标语言符号串中的一个非终结符,替换结果用红色表示。通常,可以把上面这个过程称作翻译{\small\bfnew{推导}}\index{推导}(Derivation)\index{Derivation},记为:
\noindent 其中,每使用一次规则就会同步替换源语言和目标语言符号串中的一个非终结符,替换结果用红色表示。通常,可以把上面这个过程称作翻译推导,记为:
\begin{eqnarray}
d = {r_1} \circ {r_2} \circ {r_3} \circ {r_4}
\label{eq:8-1}
......@@ -532,7 +532,7 @@ span\textrm{[0,4]}&=&\textrm{“猫} \quad \textrm{喜欢} \quad \textrm{吃} \q
\begin{itemize}
\vspace{0.5em}
\item 剪枝:在CKY中,每个跨度都可以生成非常多的推导(局部翻译假设)。理论上,这些推导的数量会和跨度大小成指数关系。显然不可能保存如此大量的翻译推导。对于这个问题,常用的办法是只保留top-$k$个推导。也就是每个局部结果只保留最好的$k$个,即{\small\bfnew{束剪枝}}\index{束剪枝}(Beam Pruning)\index{Beam Pruning}。在极端情况下,当$k$=1时,这个方法就变成了贪婪的方法;
\item 剪枝:在CKY中,每个跨度都可以生成非常多的推导(局部翻译假设)。理论上,这些推导的数量会和跨度大小成指数关系。显然不可能保存如此大量的翻译推导。对于这个问题,常用的办法是只保留top-$k$个推导。也就是每个局部结果只保留最好的$k$个,即束剪枝。在极端情况下,当$k$=1时,这个方法就变成了贪婪的方法;
\vspace{0.5em}
\item $n$-best结果的生成:$n$-best推导(译文)的生成是统计机器翻译必要的功能。比如,最小错误率训练中就需要最好的$n$个结果用于特征权重调优。在基于CKY的方法中,整个句子的翻译结果会被保存在最大跨度所对应的结构中。因此一种简单的$n$-best生成方法是从这个结构中取出排名最靠前的$n$个结果。另外,也可以考虑自上而下遍历CKY生成的推导空间,得到更好的$n$-best结果\upcite{huang2005better}
\end{itemize}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论