Commit 2e3e4d78 by 姜雨帆

Update phrase smt

parent 6743b5dc
......@@ -1287,16 +1287,406 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 与词对齐的兼容性
%%------------------------------------------------------------------------------------------------------------
%% 与词对齐的兼容性
\begin{frame}{与词对齐的兼容性}
% 与词对齐相兼容的短语
\begin{itemize}
\item 基于短语的翻译系统性能很大程度取决于短语表的好坏
\begin{itemize}
\item 在前面一章,我们提到过\alert{词对齐}的概念,在源语和目标语之间存在着单词级别的对应关系
\item 借助词对齐信息可以提高抽取双语短语的效率和质量
\end{itemize}
\end{itemize}
\vspace{-0.2em}
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [rotate=45,font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
alignment matrix
\begin{scope}[scale=0.85,yshift=0.12in]
\foreach \i / \j / \c in
{0/5/0.15, 1/5/0.15, 2/5/0.15, 3/5/0.15, 4/5/0.15, 5/5/0.15, 6/5/0.15, 7/5/0.15,
0/4/0.15, 1/4/0.15, 2/4/0.15, 3/4/0.15, 4/4/0.15, 5/4/0.15, 6/4/0.15, 7/4/0.15,
0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15, 5/3/0.15, 6/3/0.15, 7/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15, 5/2/0.15, 6/2/0.15, 7/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15, 5/1/0.15, 6/1/0.15, 7/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15, 5/0/0.15, 6/0/0.15, 7/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-0.05*\hnode) {};
source
\node[srcnode] (src1) at (-5.4*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{The}};
\node[srcnode] (src2) at ([xshift=0.5\hnode]src1.south west) {\scriptsize{weather}};
\node[srcnode] (src3) at ([xshift=0.5\hnode]src2.south west) {\scriptsize{is}};
\node[srcnode] (src4) at ([xshift=0.5\hnode]src3.south west) {\scriptsize{very}};
\node[srcnode] (src5) at ([xshift=0.5\hnode]src4.south west) {\scriptsize{good}};
\node[srcnode] (src6) at ([xshift=0.5\hnode]src5.south west) {\scriptsize{today}};
\node[srcnode] (src7) at ([xshift=0.5\hnode]src6.south west) {\scriptsize{.}};
\node[srcnode] (src8) at ([xshift=0.5\hnode]src7.south west) {\scriptsize{EOS}};
target
\node[tgtnode] (tgt1) at (-6.0*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{今天}};
\node[tgtnode] (tgt2) at ([yshift=-0.5\hnode]tgt1.north east) {\scriptsize{天气}};
\node[tgtnode] (tgt3) at ([yshift=-0.5\hnode]tgt2.north east) {\scriptsize{}};
\node[tgtnode] (tgt4) at ([yshift=-0.5\hnode]tgt3.north east) {\scriptsize{}};
\node[tgtnode] (tgt5) at ([yshift=-0.5\hnode]tgt4.north east) {\scriptsize{}};
\node[tgtnode] (tgt6) at ([yshift=-0.5\hnode]tgt5.north east) {\scriptsize{EOS}};
word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l04) at (a04) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l14) at (a14) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l55) at (a55) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l33) at (a33) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l42) at (a42) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l61) at (a61) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l70) at (a70) {};
\visible<2->{
\node [anchor=west] (p1line1) at ([xshift=4em,yshift=1em]a75.east) {\footnotesize{$\bar{s}_i$: 天气\ \ \ \ \ \ }};
\node [anchor=north west] (p1line2) at ([xshift=0]p1line1.south west) {\footnotesize{$\bar{t}_i$: The\ \ \ weather\ \ \ \ \ }};
\node [anchor=west] (p2line1) at ([xshift=4em]a72.east) {\footnotesize{$\bar{s}_j$: 真\ \ \ \ \ }};
\node [anchor=north west] (p2line2) at ([xshift=0]p2line1.south west) {\footnotesize{$\bar{t}_j$: very\ \ \ good\ \ \ \ \ \ \ \ }};
\begin{pgfonlayer}{background}
\visible<2->{
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a04) (a14)] (phrase1) {};
\node [rectangle,draw=ugreen,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a33) (a42)] (phrase2) {};
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (p1line1) (p1line2)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=green!10] [fit = (p2line1) (p2line2)] (box2) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([yshift=0.3em]phrase1.east) .. controls +(east:3.5) and +(west:1) .. (box1.west);
\draw [->,thick,dotted] ([yshift=-0.0em]phrase2.east) .. controls +(east:2.0) and +(west:1) .. ([yshift=1em]box2.west);
}
\end{scope}
\end{tikzpicture}
\end{center}
\begin{itemize}
\item<2-> \textbf{如何}使用词对齐信息来抽取短语对?
\end{itemize}
\end{frame}
%%------------------------------------------------------------------------------------------------------------
%% 短语抽取方法
\begin{frame}{基于词对齐的短语抽取}
%描述算法,给出词对齐及短语抽取结果
\begin{itemize}
\item 抽取短语要与词对齐保持一致
\begin{itemize}
\item 如果短语$\bar{s}$中所有词$s_1,\cdots,s_n$在词对齐$A$中与短语$\bar{t}$中的词$t_1,\cdots,t_n$都有对齐的点,反之亦然,那么称短语对$(\bar{t},\bar{s})$与词对齐$A$一致。即
\end{itemize}
\end{itemize}
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
alignment matrix1
\begin{scope}[scale=1,yshift=0.12in]
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
source
\node[srcnode] (src01) at (-5.9*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src02) at ([xshift=0.5\hnode]src01.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src03) at ([xshift=0.5\hnode]src02.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src04) at ([xshift=0.5\hnode]src03.south west) {\scriptsize{$t_4$}};
target
\node[tgtnode] (tgt01) at (-6.0*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt02) at ([yshift=-0.5\hnode]tgt01.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt03) at ([yshift=-0.5\hnode]tgt02.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt04) at ([yshift=-0.5\hnode]tgt03.north east) {\scriptsize{$s_4$}};
alignment matrix2
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (b\i\j) at (0.5*\hnode*\i+0.6*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
source
\node[srcnode] (src11) at (0.1*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src12) at ([xshift=0.5\hnode]src11.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src13) at ([xshift=0.5\hnode]src12.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src14) at ([xshift=0.5\hnode]src13.south west) {\scriptsize{$t_4$}};
target
\node[tgtnode] (tgt11) at (0.2*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt12) at ([yshift=-0.5\hnode]tgt11.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt13) at ([yshift=-0.5\hnode]tgt12.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt14) at ([yshift=-0.5\hnode]tgt13.north east) {\scriptsize{$s_4$}};
alignment matrix3
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (c\i\j) at (0.5*\hnode*\i+6.6*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
source
\node[srcnode] (src21) at (6.1*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src22) at ([xshift=0.5\hnode]src21.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src23) at ([xshift=0.5\hnode]src22.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src24) at ([xshift=0.5\hnode]src23.south west) {\scriptsize{$t_4$}};
target
\node[tgtnode] (tgt21) at (6.2*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt22) at ([yshift=-0.5\hnode]tgt21.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt23) at ([yshift=-0.5\hnode]tgt22.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt24) at ([yshift=-0.5\hnode]tgt23.north east) {\scriptsize{$s_4$}};
word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la1) at (a03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la2) at (a12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la3) at (a11) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb1) at (b03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb2) at (b12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50] (lb3) at (b11) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc1) at (c03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc2) at (c12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc3) at (c11) {};
\begin{pgfonlayer}{background}
\node [rectangle,draw=ugreen,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a03) (a11)] (phrase1) {};
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (b03) (b12)] (phrase2) {};
\node [rectangle,draw=ugreen,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (c03) (c21)] (phrase3) {};
\end{pgfonlayer}
\node[anchor=north] (l1) at ([xshift=0.5em,yshift=-0.5em]a10.south) {一致};
\node[anchor=north] (l2) at ([xshift=0.5em,yshift=-0.5em]b10.south) {不一致};
\node[anchor=north] (l3) at ([xshift=0.5em,yshift=-0.5em]c10.south) {一致};
\node[anchor=north] (formula1) at ([xshift=-0.5em,yshift=8.0em]a33.north) {$(\bar{t},\bar{s})$$A$一致$\Leftrightarrow$};
\node[anchor=west] (formula2) at ([xshift=0.3em,yshift=-1.5em]formula1.east) {$\forall t_i \in \bar{t}:(\bar{t},\bar{s}) \in A \Rightarrow s_i \in \bar{s}$};
\node[anchor=west] (formula3) at ([xshift=-2.4em,yshift=-1.5em]formula2.west) {AND $\forall s_i \in \bar{s}:(\bar{t},\bar{s}) \in A \Rightarrow t_i \in \bar{t}$};
\node[anchor=west] (formula4) at ([yshift=-1.5em]formula3.west) {AND $\exists t_i \in \bar{t},\exists s_i \in \bar{s}:(\bar{t},\bar{s}) \in A $};
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 短语抽取方法
\begin{frame}{基于词对齐的短语抽取}
\begin{frame}{基于词对齐的短语抽取(续)}
% 描述算法,给出词对齐及短语抽取结果
\begin{itemize}
\item 短语抽取算法
\begin{itemize}
\item 遍历所有可能的目标语短语,搜索与它们中每一个相匹配的(最小)源语短语
\item<6-> 需要对抽取短语的长度进行限制,否则抽取出来的短语对数量十分庞大,导致短语表质量下降
\end{itemize}
\end{itemize}
\vspace{-2.0em}
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [rotate=45,font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
% alignment matrix
\begin{scope}[scale=0.85,yshift=0.12in]
\foreach \i / \j / \c in
{0/5/0.15, 1/5/0.15, 2/5/0.15, 3/5/0.15, 4/5/0.15, 5/5/0.15, 6/5/0.15, 7/5/0.15,
0/4/0.15, 1/4/0.15, 2/4/0.15, 3/4/0.15, 4/4/0.15, 5/4/0.15, 6/4/0.15, 7/4/0.15,
0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15, 5/3/0.15, 6/3/0.15, 7/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15, 5/2/0.15, 6/2/0.15, 7/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15, 5/1/0.15, 6/1/0.15, 7/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15, 5/0/0.15, 6/0/0.15, 7/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-0.05*\hnode) {};
% source
\node[srcnode] (src1) at (-5.4*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{The}};
\node[srcnode] (src2) at ([xshift=0.5\hnode]src1.south west) {\scriptsize{weather}};
\node[srcnode] (src3) at ([xshift=0.5\hnode]src2.south west) {\scriptsize{is}};
\node[srcnode] (src4) at ([xshift=0.5\hnode]src3.south west) {\scriptsize{very}};
\node[srcnode] (src5) at ([xshift=0.5\hnode]src4.south west) {\scriptsize{good}};
\node[srcnode] (src6) at ([xshift=0.5\hnode]src5.south west) {\scriptsize{today}};
\node[srcnode] (src7) at ([xshift=0.5\hnode]src6.south west) {\scriptsize{.}};
\node[srcnode] (src8) at ([xshift=0.5\hnode]src7.south west) {\scriptsize{EOS}};
% target
\node[tgtnode] (tgt1) at (-6.0*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{今天}};
\node[tgtnode] (tgt2) at ([yshift=-0.5\hnode]tgt1.north east) {\scriptsize{天气}};
\node[tgtnode] (tgt3) at ([yshift=-0.5\hnode]tgt2.north east) {\scriptsize{}};
\node[tgtnode] (tgt4) at ([yshift=-0.5\hnode]tgt3.north east) {\scriptsize{}};
\node[tgtnode] (tgt5) at ([yshift=-0.5\hnode]tgt4.north east) {\scriptsize{}};
\node[tgtnode] (tgt6) at ([yshift=-0.5\hnode]tgt5.north east) {\scriptsize{EOS}};
% word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l14) at (a14) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l55) at (a55) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l33) at (a33) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l42) at (a42) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l61) at (a61) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l70) at (a70) {};
\node [anchor=north west,fill=blue!30,minimum width=1.3in,minimum height=1.5em] (alig) at ([xshift=3em,yshift=-1.5em]tgt6.south west) {\footnotesize{与词对齐保持一致?}};
\visible<2>{
\begin{pgfonlayer}{background}
\visible<2>{
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a04) (a14)] (phrase1) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([yshift=-0.1em]phrase1.south) .. controls +(south:3.5) and +(north:1.5) .. ([yshift=0.1em]alig.north);
}
\visible<3>{
\begin{pgfonlayer}{background}
\visible<3>{
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a04) (a14) (a24)] (phrase2) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.5em,yshift=-0.1em]phrase2.south) .. controls +(south:3.5) and +(north:1.5) .. ([yshift=0.1em]alig.north);
}
\visible<4>{
\begin{pgfonlayer}{background}
\visible<4>{
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a04) (a14) (a24) (a33)] (phrase3) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([yshift=-0.1em]phrase3.south) .. controls +(south:2.8) and +(north:1.4) .. ([yshift=0.1em]alig.north);
}
\visible<5>{
\begin{pgfonlayer}{background}
\visible<5>{
\node [rectangle,draw=red,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a04) (a14) (a24) (a33) (a42)] (phrase4) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.5em,yshift=-0.1em]phrase4.south) .. controls +(south:2.0) and +(north:1.2) .. ([yshift=0.1em]alig.north);
}
\end{scope}
\begin{scope}[xshift = 1.5in, yshift = 1.3in]
{\scriptsize
\node (rules) {\textbf{抽取得到的短语:}};
\draw[-] (rules.south west)--([xshift=2.0in]rules.south west);
\visible<2->{
\node[anchor=north west] (r1) at ([yshift=-0.3em]rules.south west) {天气 -- The weather};
}
\visible<3->{
\node[anchor=north west] (r2) at ([yshift=-0.4em]r1.south west) {天气 -- The weather is};
}
\visible<4->{
\node[anchor=north west] (r3) at ([yshift=-0.4em]r2.south west) {天气真 -- The weather is very};
}
\visible<5->{
\node[anchor=north west] (r4) at ([yshift=-0.4em]r3.south west) {天气真好 -- The weather is very good};
}
\visible<6->{
\node[anchor=north west] (r5) at ([yshift=-0.4em]r4.south west) {今天天气真好 -- The weather is very};
\node[anchor=north west] (r51) at ([xshift=7em,yshift=-0.4em]r5.south west) {good today};
\node[anchor=north west] (r6) at ([xshift=-7em,yshift=-0.8em]r51.south west) {今天 -- The today/真好 -- very good......};
}
\visible<2>{
\begin{pgfonlayer}{background}
\visible<2>{
\node [rectangle,thick,inner sep=0.1em,fill=ugreen!20] [fit = (r1)] (p1) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.1em]alig.east) .. controls +(east:2) and +(west:1.5) .. ([xshift=-0.1em]p1.west);
}
\visible<3>{
\begin{pgfonlayer}{background}
\visible<3>{
\node [rectangle,thick,inner sep=0.1em,fill=ugreen!20] [fit = (r2)] (p2) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.1em]alig.east) .. controls +(east:2) and +(west:1.5) .. ([xshift=-0.1em]p2.west);
}
\visible<4>{
\begin{pgfonlayer}{background}
\visible<4>{
\node [rectangle,thick,inner sep=0.1em,fill=ugreen!20] [fit = (r3)] (p3) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.1em]alig.east) .. controls +(east:2) and +(west:1.5) .. ([xshift=-0.1em]p3.west);
}
\visible<5>{
\begin{pgfonlayer}{background}
\visible<5>{
\node [rectangle,thick,inner sep=0.1em,fill=ugreen!20] [fit = (r4)] (p4) {};
}
\end{pgfonlayer}
\draw [->,thick,dotted] ([xshift=0.1em]alig.east) .. controls +(east:2) and +(west:1.5) .. ([xshift=-0.1em]p4.west);
}
\begin{pgfonlayer}{background}
\visible<6>{
\node [rectangle,draw=ugreen,thick,inner sep=0.1em,fill=white,drop shadow] [fit = (r1) (r6)] (p5) {};
}
\end{pgfonlayer}
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
......@@ -1305,27 +1695,280 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
% GIZA++ + 对称化
% FastAlign
% ...
\begin{itemize}
\item 基于词的翻译模型(IBM模型)为每个句对建立了词对齐关系,但是IBM模型有一个根本问题,每个目标语单词只对齐到一个源语词(GIZA++??)
\begin{itemize}
\item 词对齐对称化:从两个方向运行IBM模型,合并词对齐结果(交集包含相对可靠的对齐点,并集包含大多数对齐点)
\end{itemize}
\end{itemize}
\vspace{-0.3em}
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
% alignment matrix1
\begin{scope}[scale=0.9,yshift=0.12in]
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (src01) at (-5.9*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src02) at ([xshift=0.5\hnode]src01.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src03) at ([xshift=0.5\hnode]src02.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src04) at ([xshift=0.5\hnode]src03.south west) {\scriptsize{$t_4$}};
% target
\node[tgtnode] (tgt01) at (-6.0*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt02) at ([yshift=-0.5\hnode]tgt01.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt03) at ([yshift=-0.5\hnode]tgt02.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt04) at ([yshift=-0.5\hnode]tgt03.north east) {\scriptsize{$s_4$}};
% alignment matrix2
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (b\i\j) at (0.5*\hnode*\i+0.6*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (src11) at (0.1*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src12) at ([xshift=0.5\hnode]src11.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src13) at ([xshift=0.5\hnode]src12.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src14) at ([xshift=0.5\hnode]src13.south west) {\scriptsize{$t_4$}};
% target
\node[tgtnode] (tgt11) at (0.2*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt12) at ([yshift=-0.5\hnode]tgt11.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt13) at ([yshift=-0.5\hnode]tgt12.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt14) at ([yshift=-0.5\hnode]tgt13.north east) {\scriptsize{$s_4$}};
% alignment matrix3
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (c\i\j) at (0.5*\hnode*\i+6.6*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (src21) at (6.1*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src22) at ([xshift=0.5\hnode]src21.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src23) at ([xshift=0.5\hnode]src22.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src24) at ([xshift=0.5\hnode]src23.south west) {\scriptsize{$t_4$}};
% target
\node[tgtnode] (tgt21) at (6.2*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt22) at ([yshift=-0.5\hnode]tgt21.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt23) at ([yshift=-0.5\hnode]tgt22.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt24) at ([yshift=-0.5\hnode]tgt23.north east) {\scriptsize{$s_4$}};
% word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la1) at (a03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la2) at (a12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la3) at (a22) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la4) at (a30) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb1) at (b03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb2) at (b12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb3) at (b11) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb4) at (b30) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc1) at (c03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc2) at (c12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50] (lc3) at (c11) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50] (lc4) at (c22) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lc5) at (c30) {};
\node[anchor=north] (l1) at ([xshift=0.5em,yshift=-0.5em]a10.south) {\scriptsize{S - T}};
\node[anchor=north] (l2) at ([xshift=0.5em,yshift=-0.5em]b10.south) {\scriptsize{T - S}};
\node[anchor=north] (l3) at ([xshift=0.5em,yshift=-0.5em]c10.south) {\scriptsize{交集/并集}};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-1.2em}
\begin{itemize}
\item<2-> 其他词对齐方法:FastAlign、Berkeley Word Aligner
\item<3-> 如何评价词对齐?
\begin{enumerate}
\item<3-> 自动指标:词对齐错误率(AER)
\item<3-> 下游系统:短语抽取、机器翻译...
\end{enumerate}
\end{itemize}
% 如何评价词对齐 - 1) 自动指标 2) 下游系统(短语抽取、机器翻译)
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 改进方法
%%------------------------------------------------------------------------------------------------------------
%% 改进方法
\begin{frame}{更好更多的短语}
% 提高词对齐性能 -> 增加短语质量? -> 提高翻译质量?
% 提高Recall,对于不同任务,词对齐的密度更重要?
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 如何度量短语的好坏
\begin{frame}{短语打分 - 翻译概率}
% 正向、反向翻译概率
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 如何度量短语的好坏
\begin{frame}{短语打分 - 翻译概率}
% 正向、反向翻译概率
\begin{itemize}
\item 抽取到短语之后,如何将这些短语对转化成概率化的短语表?这里使用极大似然估计的方法(MLE)对翻译概率进行估计:
\vspace{-0.5em}
\begin{displaymath}
\textrm{Pr}(\bar{t}|\bar{s}) = \frac{count(\bar{s},\bar{t})}{count(\bar{s})}
\end{displaymath}
\vspace{-1.0em}
\begin{itemize}
\item count($\bar{s},\bar{t}$)表示短语对($\bar{s},\bar{t}$)出现的次数
\item count($\bar{s}$)表示短语$\bar{s}$出现的次数
\end{itemize}
\vspace{0.8em}
\begin{tikzpicture}
{\scriptsize
\node [anchor=north west,inner sep=1pt] (entry1) at (0,0) {\tiny{\textbf{1:} 这 是 数据 $\leftrightarrow$ This is data}};
\node [anchor=north west,inner sep=1pt] (entry2) at ([yshift=-0.1em]entry1.south west) {\tiny{\textbf{2:} 小心 !$\leftrightarrow$ Look out !}};
\node [anchor=north west,inner sep=1pt] (entry3) at ([yshift=-0.1em]entry2.south west) {\tiny{\textbf{3:} 你 是 谁 $\leftrightarrow$ Who are you}};
\node [anchor=north west,inner sep=2pt] (entry4) at ([yshift=-0.1em]entry3.south west) {...};
\node [anchor=south west] (corpuslabel) at (entry1.north west) {{\color{ublue} \textbf{双语平行数据}}};
\begin{pgfonlayer}{background}
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow,minimum height=1.6cm] [fit = (entry1) (entry2) (entry3) (entry4) (corpuslabel)] (corpus) {};
\end{pgfonlayer}
}
\visible<2->{
{\scriptsize
\node [anchor=west] (P1) at ([xshift=15em]entry1.west){\tiny{\textbf{1:} 数据 -- data}};
\node [anchor=west] (P2) at ([xshift=15em]entry2.west){\tiny{\textbf{2:} 小心 -- Look out}};
\node [anchor=west] (P3) at ([xshift=15em]entry3.west){\tiny{\textbf{3:} 谁 -- you}};
\node [anchor=west] (P4) at ([xshift=15em]entry4.west){...};
\node [anchor=west] (plabel) at ([xshift=15em]corpuslabel.west) {{\color{ublue} \textbf{短语对}}};
}
\begin{pgfonlayer}{background}
\visible<2->{
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow,minimum height=1.6cm] [fit = (P1) (P4) (P2) (P3) (plabel)] (model) {};
}
\end{pgfonlayer}
\draw [->,very thick,ublue] ([xshift=0.2em]corpus.east) -- ([xshift=3.2em]corpus.east) node [pos=0.5, above] {\alert{\scriptsize{短语抽取}}};
}
\visible<3->{
\draw [->,very thick,ublue] ([xshift=0.4em]model.east) -- ([xshift=3.4em]model.east) node [inner sep=0pt,pos=0.5, above,yshift=0.3em] (decodingarrow) {\alert{\scriptsize{统计}}};
{\scriptsize
\node [anchor=north west,inner sep=2pt] (sentlabel) at ([xshift=5.5em,yshift=-0.3em]model.north east) {{\color{ublue} \textbf{统计出现次数}}};
\node [anchor=north west] (sent) at ([yshift=-0.5em]sentlabel.south west) {\textbf{count($\bar{s},\bar{t}$)}};
\node [anchor=north west] (sentpart2) at ([yshift=-0.1em]sent.south west) {\textbf{count($\bar{s}$)}};
}
}
\begin{pgfonlayer}{background}
\visible<3->{
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow,minimum height=1.6cm] [fit = (sentlabel) (sent) (sentpart2)] (segsystem) {};
}
\end{pgfonlayer}
\end{tikzpicture}
\vspace{-0.2em}
\item<4-> 在实际使用中,还可以加入反向翻译概率即$\textrm{Pr}(\bar{s}|\bar{t})$来提升机器翻译模型性能
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 如何度量短语的好坏
\begin{frame}{短语打分 - 词汇翻译概率}
% 正向、反向翻译概率
\begin{itemize}
\item 对于不常出现的短语可能会产生一些问题,可以将短语分解成词,计算他们的匹配程度。计算公式如下:
\vspace{-0.5em}
\begin{displaymath}
\textrm{$\textrm{Pr}_{lex}$}(\bar{t}|\bar{s}) = \prod_{j=1}^{J} \frac{1}{|\{j|a(j,i) = 1\}|} \sum_{\forall(j,i):a(j,i) = 1} w(t_i|s_j)
\end{displaymath}
\vspace{-1em}
\begin{itemize}
\item 源语短语$\bar{s}=s_1...s_J$, 目标语短语$\bar{t}=t_1...t_I$,词对齐矩阵 $\mathbf{a}$
\end{itemize}
\visible<2->{
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
% alignment matrix1
\begin{scope}[scale=0.9,yshift=0.12in]
\foreach \i / \j / \c in
{0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (tgt01) at (-5.9*0.5*\hnode,-1.05*\hnode+3.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (tgt02) at ([xshift=0.5\hnode]tgt01.south west) {\scriptsize{$t_2$}};
\node[srcnode] (tgt03) at ([xshift=0.5\hnode]tgt02.south west) {\scriptsize{$t_3$}};
\node[srcnode] (tgt04) at ([xshift=0.5\hnode]tgt03.south west) {\scriptsize{$t_4$}};
\node[srcnode] (tgt05) at ([xshift=0.5\hnode]tgt04.south west) {\scriptsize{$N$}};
% target
\node[tgtnode] (src01) at (-6.0*0.5*\hnode,-1.05*\hnode+3.3*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (src02) at ([yshift=-0.5\hnode]src01.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (src03) at ([yshift=-0.5\hnode]src02.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (src04) at ([yshift=-0.5\hnode]src03.north east) {\scriptsize{$s_4$}};
% word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la1) at (a03) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la2) at (a12) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la3) at (a22) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la4) at (a41) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la5) at (a30) {};
\node[anchor=west] (f1) at ([xshift=3em,yshift=0.8em]a43.east) {\scriptsize{$\textrm{Pr}_{lex}(\bar{t}|\bar{s})=w(t_1|s_1)\times$}};
\node[anchor=north] (f2) at ([xshift=6em]f1.south) {\scriptsize{$\frac{1}{2}(w(t_2|s_2)+(t_3|s_2)+(t_4|s_2))\times$}};
\node[anchor=north west] (f3) at (f2.south west) {\scriptsize{$w(N|s_3)\times$}};
\node[anchor=north west] (f4) at (f3.south west) {\scriptsize{$w(t_4|s_4)\times$}};
%%%------------------------------------------------------------------------------------------------------------
%%% 如何度量短语的好坏
\begin{frame}{短语打分 - 词汇翻译概率}
% 正向、反向翻译概率
\end{scope}
\end{tikzpicture}
\end{center}
\begin{itemize}
\item 词对齐概率$w(t_i|s_i)$可以从平行语料中获取
\item 如果对空则使用概率$w(t_i|N)$
\end{itemize}
}
\item<3-> 同翻译概率一样,在模型中可以使用双向词汇翻译概率
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
......@@ -1333,6 +1976,7 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\begin{frame}{短语表实例}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\subsection{调序}
......@@ -1342,24 +1986,476 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
% 用一个调序比较多的实例说明调序是翻译中的普遍现象
% 需要设计调序特征来对问题进行建模
% 参考NiuTrans Manual
\begin{itemize}
\item 通过短语表可以找到每个短语正确的翻译结果,我们仍需要对这些短语进行调序来获取流利的翻译结果
\vspace{0.3em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 18pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\textbf{s}$:};
\node[anchor=west,fill=ugreen!50] (s1) at (0, 0) {};
\node[anchor=west,fill=red!50] (s2) at ([xshift=1em]s1.east) {桌子 上 的};
\node[anchor=west,fill=blue!50] (s3) at ([xshift=1em]s2.east) {苹果};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\textbf{t}$:};
\node[anchor=west,fill=blue!50] (t1) at (0, -1.5) {the apple};
\node[anchor=west,fill=ugreen!50] (t2) at ([xshift=1em]t1.east) {on};
\node[anchor=west,fill=red!50] (t3) at ([xshift=1em]t2.east) {the table};
\path[<->, thick] (s1.south) edge (t3.north);
\path[<->, thick] (s2.south) edge (t2.north);
\path[<->, thick] (s3.south) edge (t1.north);
\end{scope}
\end{tikzpicture}
\end{center}
\begin{itemize}
\item 将调序的程度作为特征加入判别式模型
\item<2-> 使用BTG来表示所有的调序可能性??
\end{itemize}
\vspace{0.5em}
\visible<2->{
\begin{flushright}
\begin{tabular}{l l l l r}
$X$ & $\to$ & $X_1$ $X_2,$ & $X_1$ $X_2$ & \hspace{4em} (R1)\\
$X$ & $\to$ & $X_1$ $X_2,$ & $X_2$ $X_1$ & (R2)\\
$X$ & $\to$ & $\bar{s},$ & $\bar{t}$ & (R3)\\
\end{tabular}
\end{flushright}
}
\item<3-> 常见的调序模型有基于距离的调序模型、词汇化调序模型(MSD)、最大熵调序模型(ME)
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型1:基于距离的调序
\begin{frame}{调序模型1:基于距离的调序}
% 参考Moses
\begin{itemize}
\item 参考前一个短语,来判断当前短语是否需要进行,调序距离设为$\textrm{start}_i-\textrm{end}_{i-1}-1$
\begin{itemize}
\item $\textrm{start}_i$是指翻译成第$i$个目标语短语的源语短语中的第一个词,而$\textrm{end}_i$为源于短语最后一个词
\end{itemize}
\vspace{0.0em}
\visible<2->{
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 20pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\textbf{s}$:};
\node[anchor=west,fill=ugreen!50] (s1) at (0, 0) {在 桌子 上 的};
\node[anchor=south] (n1) at ([xshift=-2.5em,yshift=-0.5em]s1.north) {\scriptsize{1}};
\node[anchor=south] (n2) at ([xshift=-0.8em,yshift=-0.5em]s1.north) {\scriptsize{2}};
\node[anchor=south] (n3) at ([xshift=1.1em,yshift=-0.5em]s1.north) {\scriptsize{3}};
\node[anchor=south] (n4) at ([xshift=2.5em,yshift=-0.5em]s1.north) {\scriptsize{4}};
\node[anchor=west,fill=blue!50] (s2) at ([xshift=1em]s1.east) {苹果};
\node[anchor=south] (n5) at ([yshift=-0.5em]s2.north) {\scriptsize{5}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\textbf{t}$:};
\node[anchor=west,fill=blue!50] (t1) at (0, -1.5) {the apple};
\node[anchor=west,fill=ugreen!50] (t2) at ([xshift=1em]t1.east) {on the table};
\path[<->, thick] (s1.south) edge (t2.north);
\path[<->, thick] (s2.south) edge (t1.north);
\node[anchor=west] (target) at ([xshift=3em,yshift=-1em]n5.east) {\scriptsize{目标短语}};
\node[anchor=west] (source) at ([xshift=0.7em]target.east) {\scriptsize{源短语}};
\node[anchor=west] (distance) at ([xshift=0.7em]source.east) {\scriptsize{距离}};
\node[anchor=north] (t1) at ([yshift=-0.1em]target.south) {1};
\node[anchor=north] (t2) at ([yshift=0.1em]t1.south) {2};
\node[anchor=north] (so1) at ([yshift=-0.1em]source.south) {5};
\node[anchor=north] (so2) at ([yshift=0.1em]so1.south) {1-4};
\node[anchor=north] (d1) at ([yshift=-0.1em]distance.south) {+4};
\node[anchor=north] (d2) at ([yshift=0.1em]d1.south) {-5};
\draw[-] (target.south west)--([xshift=1.6in]target.south west);
\draw[-,thick] (s1.north west)--([yshift=0.3in]s1.north west);
\draw[->,densely dotted,thick] ([yshift=0.3in]s1.north west)--([xshift=0.3in,yshift=0.3in]s1.north west);
\draw[-,thick] (s2.north west)--([yshift=0.3in]s2.north west);
\draw[->,densely dotted,thick] ([yshift=0.3in]s2.north west)--([xshift=-0.3in,yshift=0.3in]s2.north west);
\node[anchor=south] (ld1) at ([xshift=-0.1em,yshift=0.4em]n1.north) {\scriptsize{d=-5}};
\node[anchor=south] (ld2) at ([xshift=6em,yshift=0.4em]n1.north) {\scriptsize{d=+4}};
\end{scope}
\end{tikzpicture}
\end{center}
}
\vspace{0.3em}
\item<3-> 代价函数选择指数衰减函数$d(x)=\alpha^{|x|}$,其中$\alpha$通过近似估计得到,$\alpha \in$[0,1]
\begin{itemize}
\item<3-> 调序距离越大,调序代价越大
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型2:MSD模型
\begin{frame}{调序模型2:MSD模型}
% 参考NiuTrans Manual
\begin{itemize}
\item 基于距离的调序模型仅仅以词语移动的距离为条件,词汇化调序模型以实际短语为条件
\begin{itemize}
\item 在词汇化调序模型中仅考虑三种调序类型:M、S、D
\item 三种调序类型仅针对每个短语的前面一个短语
\end{itemize}
\end{itemize}
\vspace{-0.2em}
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,text=white,anchor=center]
\tikzstyle{srcnode} = [left,font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
alignment matrix
\begin{scope}[scale=0.92,yshift=0.12in]
\foreach \i / \j / \c in
{0/5/0.15, 1/5/0.15, 2/5/0.15, 3/5/0.15, 4/5/0.15, 5/5/0.15, 6/5/0.15, 7/5/0.15,
0/4/0.15, 1/4/0.15, 2/4/0.15, 3/4/0.15, 4/4/0.15, 5/4/0.15, 6/4/0.15, 7/4/0.15,
0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15, 5/3/0.15, 6/3/0.15, 7/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15, 5/2/0.15, 6/2/0.15, 7/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15, 5/1/0.15, 6/1/0.15, 7/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15, 5/0/0.15, 6/0/0.15, 7/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-0.05*\hnode) {};
source
\node[srcnode] (src1) at (-5.9*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src2) at ([xshift=0.5\hnode]src1.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src3) at ([xshift=0.5\hnode]src2.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src4) at ([xshift=0.5\hnode]src3.south west) {\scriptsize{$t_4$}};
\node[srcnode] (src5) at ([xshift=0.5\hnode]src4.south west) {\scriptsize{$t_5$}};
\node[srcnode] (src6) at ([xshift=0.5\hnode]src5.south west) {\scriptsize{$t_6$}};
\node[srcnode] (src7) at ([xshift=0.5\hnode]src6.south west) {\scriptsize{$t_7$}};
\node[srcnode] (src8) at ([xshift=0.5\hnode]src7.south west) {\scriptsize{$t_8$}};
target
\node[tgtnode] (tgt1) at (-6.0*0.5*\hnode,-1.05*\hnode+7.5*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt2) at ([yshift=-0.5\hnode]tgt1.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt3) at ([yshift=-0.5\hnode]tgt2.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt4) at ([yshift=-0.5\hnode]tgt3.north east) {\scriptsize{$s_4$}};
\node[tgtnode] (tgt5) at ([yshift=-0.5\hnode]tgt4.north east) {\scriptsize{$s_5$}};
\node[tgtnode] (tgt6) at ([yshift=-0.5\hnode]tgt5.north east) {\scriptsize{$s_6$}};
word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l05) at (a05) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l14) at (a14) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l24) at (a24) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l31) at (a31) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l32) at (a32) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l43) at (a43) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l53) at (a53) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l63) at (a63) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (l70) at (a70) {};
\visible<2->{
\node [anchor=west] (p1line1) at ([xshift=3.5em,yshift=0.5em]a75.east) {\footnotesize{M(monotone):单调调序}};
\node [anchor=north west] (p1line2) at ([xshift=0,yshift=-1em]p1line1.south west) {\footnotesize{S(swap): 与前面一个短语}};
\node [anchor=north west] (p1line3) at ([xshift=3.8em]p1line2.south west) {\footnotesize{位置进行交换}};
\node [anchor=north west] (p1line4) at ([xshift=-3.8em,yshift=-1em]p1line3.south west) {\footnotesize{D(discontinuous):非连续调序}};
%\node [anchor=west] (p2line1) at ([xshift=4em]a73.east) {\footnotesize{$\bar{s}_j$: 真\ \ \ 好 \ \ }};
%\node [anchor=north west] (p2line2) at ([xshift=0]p2line1.south west) {\footnotesize{$\bar{t}_j$: very\ \ \ good\ \ \ \ \ \ \ \ }};
\begin{pgfonlayer}{background}
\visible<2->{
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a05)] (phrase1) {};
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a14) (a24)] (phrase2) {};
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a31) (a32)] (phrase3) {};
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a43) (a63)] (phrase4) {};
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a70)] (phrase5) {};
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (p1line1)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=ugreen!10] [fit = (p1line2) (p1line3)] (box2) {};
\node [rectangle,inner sep=0.2em,fill=orange!10] [fit = (p1line4)] (box3) {};
}
\end{pgfonlayer}
\node [circle,draw,anchor=south,inner sep=1pt,fill=red!20] (c1) at ([xshift=-0.5em]a05.north) {\scriptsize{m}};
\node [circle,draw,anchor=south,inner sep=1pt,fill=red!20] (c2) at ([xshift=-0.5em]a14.north) {\scriptsize{m}};
\node [circle,draw,anchor=north,inner sep=1pt,fill=orange!20] (c3) at ([xshift=0.1em]a24.south) {\scriptsize{d}};
\node [circle,draw,anchor=south,inner sep=2pt,fill=ugreen!20] (c4) at ([xshift=0.5em]a32.north) {\scriptsize{s}};
\node [circle,draw,anchor=north,inner sep=1pt,fill=orange!20] (c5) at ([xshift=0.5em]a63.south) {\scriptsize{d}};
\draw [->,thick] (a05.south east) -- (c1.315);
\draw [->,thick] ([xshift=-0.5em]a24.west) -- (c2.315);
\draw [->,thick] ([yshift=-0.7em]a32.south) .. controls +(west:1.3) and +(east:1.3) .. (c3.340);
\draw [->,thick] (a53.center) -- (c4.15);
\draw [->,thick] (a70.center) .. controls +(west:1.3) and +(east:1.3) .. (c5.340);
}
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.6em}
\begin{itemize}
\item<3-> 引入调序模型来预测调序的方向类型,计算公式如下
\end{itemize}
\visible<3->{
\begin{displaymath}
\Pr(\textbf{o}|\textbf{s},\textbf{t},\textbf{a}) = \prod_{i=1}^{K} \Pr(o_i| \bar{s}_{a_i}, \bar{t}_i, a_{i-1}, a_i)
\end{displaymath}
}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型2:MSD模型
\begin{frame}{调序模型2:MSD模型(续)}
% 参考NiuTrans Manual
\begin{itemize}
\item 来详细的分析一下
\vspace{-1em}
\begin{displaymath}
\Pr(\textbf{o}|\textbf{s},\textbf{t},\textbf{a}) = \prod_{i=1}^{K} \Pr(o_i| \bar{s}_{a_i}, \bar{t}_i, a_{i-1}, a_i)
\end{displaymath}
\vspace{-1em}
\begin{itemize}
\item 其中$a_i$$\bar{t}_i$$\bar{s}_{a_i}$的词对齐,$\bar{t}_1...\bar{t}_K$为目标语短语序列
\item $o_i$为相应的调序类型,$O=\{M,S,D\}$,与$a_i$$a_{i-1}$有关
\end{itemize}
\vspace{-0.5em}
\begin{displaymath}
o_i = \left\{ \begin{array}{ll}
M & \textrm{if $a_i - a_{i-1} = 1$}\\
S & \textrm{if $a_i - a_{i-1} = -1$}\\
D & \textrm{otherwise}\\
\end{array} \right. \nonumber
\end{displaymath}
\vspace{-0.5em}
\begin{itemize}
\item 针对不同的调序类型,调序模型如下
\end{itemize}
\vspace{0.1em}
\begin{displaymath}
f_{M-pre}(d) = \prod_{i=1}^{K} \Pr(o_i = M| \bar{s}_{a_i}, \bar{t}_i, a_{i-1}, a_i)
\end{displaymath}
\vspace{-0.8em}
\begin{itemize}
\item 我们还可以得到$f_{S-pre}(d)$$f_{D-pre}(d)$,此外将$a_{i-1}$换成$a_{i+1}$,还可以得到每个短语与后面短语的调序类型
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型2:MSD模型
\begin{frame}{调序模型2:MSD模型(续)}
% 参考NiuTrans Manual
\begin{itemize}
\item 统计每种调序方向中每个抽取短语对的频率,使用极大似然估计对其概率分布进行估计
\begin{itemize}
\item 基于词的调序模型和基于短语的调序模型
\item<2-> 假设$\bar{t}_i$$(t_u,...,t_v)$组成,$\bar{s}_{a_i}$$(s_x,...,s_y)$组成
\end{itemize}
\end{itemize}
\vspace{-0.2em}
\visible<2->{
\begin{center}
\begin{tikzpicture}
\setlength{\wseg}{1.5cm}
\setlength{\hseg}{1.0cm}
\setlength{\wnode}{3.75cm}
\setlength{\hnode}{1.1cm}
\tikzstyle{elementnode} = [rectangle,anchor=center]
\tikzstyle{srcnode} = [font=\small,anchor=south west]
\tikzstyle{tgtnode} = [left,font=\small,anchor=north east]
\tikzstyle{alignmentnode} = [rectangle,draw,minimum height=3.6\hnode,minimum width=0.36\hnode]
\tikzstyle{probnode} = [fill=blue!30,minimum width=0.4\hnode]
\tikzstyle{labelnode} = [above]
% alignment matrix1
\begin{scope}[scale=0.9,yshift=0.12in]
\foreach \i / \j / \c in
{0/5/0.15, 1/5/0.15, 2/5/0.15, 3/5/0.15, 4/5/0.15, 5/5/0.15,
0/4/0.15, 1/4/0.15, 2/4/0.15, 3/4/0.15, 4/4/0.15, 5/4/0.15,
0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15, 5/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15, 5/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15, 5/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15, 5/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (a\i\j) at (0.5*\hnode*\i-5.4*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (src01) at (-5.9*0.5*\hnode,-1.05*\hnode+5.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src02) at ([xshift=0.5\hnode]src01.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src03) at ([xshift=0.5\hnode]src02.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src04) at ([xshift=0.5\hnode]src03.south west) {\scriptsize{$t_4$}};
\node[srcnode] (src05) at ([xshift=0.5\hnode]src04.south west) {\scriptsize{$t_5$}};
\node[srcnode] (src06) at ([xshift=0.5\hnode]src05.south west) {\scriptsize{$t_6$}};
% target
\node[tgtnode] (tgt01) at (-6.0*0.5*\hnode,-1.05*\hnode+5.4*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt02) at ([yshift=-0.5\hnode]tgt01.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt03) at ([yshift=-0.5\hnode]tgt02.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt04) at ([yshift=-0.5\hnode]tgt03.north east) {\scriptsize{$s_4$}};
\node[tgtnode] (tgt05) at ([yshift=-0.5\hnode]tgt04.north east) {\scriptsize{$s_5$}};
\node[tgtnode] (tgt06) at ([yshift=-0.5\hnode]tgt05.north east) {\scriptsize{$s_6$}};
%% alignment matrix2
\foreach \i / \j / \c in
{0/5/0.15, 1/5/0.15, 2/5/0.15, 3/5/0.15, 4/5/0.15, 5/5/0.15,
0/4/0.15, 1/4/0.15, 2/4/0.15, 3/4/0.15, 4/4/0.15, 5/4/0.15,
0/3/0.15, 1/3/0.15, 2/3/0.15, 3/3/0.15, 4/3/0.15, 5/3/0.15,
0/2/0.15, 1/2/0.15, 2/2/0.15, 3/2/0.15, 4/2/0.15, 5/2/0.15,
0/1/0.15, 1/1/0.15, 2/1/0.15, 3/1/0.15, 4/1/0.15, 5/1/0.15,
0/0/0.15, 1/0/0.15, 2/0/0.15, 3/0/0.15, 4/0/0.15, 5/0/0.15}
\node[elementnode,minimum size=0.6*\hnode*\c,inner sep=0.1pt,fill=blue] (b\i\j) at (0.5*\hnode*\i+4*0.5*\hnode,0.5*\hnode*\j-1.05*\hnode) {};
% source
\node[srcnode] (src11) at (3.5*0.5*\hnode,-1.05*\hnode+5.4*0.5*\hnode) {\scriptsize{$t_1$}};
\node[srcnode] (src12) at ([xshift=0.5\hnode]src11.south west) {\scriptsize{$t_2$}};
\node[srcnode] (src13) at ([xshift=0.5\hnode]src12.south west) {\scriptsize{$t_3$}};
\node[srcnode] (src14) at ([xshift=0.5\hnode]src13.south west) {\scriptsize{$t_4$}};
\node[srcnode] (src15) at ([xshift=0.5\hnode]src14.south west) {\scriptsize{$t_5$}};
\node[srcnode] (src16) at ([xshift=0.5\hnode]src15.south west) {\scriptsize{$t_6$}};
% target
\node[tgtnode] (tgt11) at (3.4*0.5*\hnode,-1.05*\hnode+5.4*0.5*\hnode) {\scriptsize{$s_1$}};
\node[tgtnode] (tgt12) at ([yshift=-0.5\hnode]tgt11.north east) {\scriptsize{$s_2$}};
\node[tgtnode] (tgt13) at ([yshift=-0.5\hnode]tgt12.north east) {\scriptsize{$s_3$}};
\node[tgtnode] (tgt14) at ([yshift=-0.5\hnode]tgt13.north east) {\scriptsize{$s_4$}};
\node[tgtnode] (tgt15) at ([yshift=-0.5\hnode]tgt14.north east) {\scriptsize{$s_5$}};
\node[tgtnode] (tgt16) at ([yshift=-0.5\hnode]tgt15.north east) {\scriptsize{$s_6$}};
% word alignment
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la1) at (a23) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la2) at (a22) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la3) at (a31) {};
\visible<3->{
\node[align=center,elementnode,minimum size=0.5cm,inner sep=0.1pt,fill=red!50] (la4) at (a14) {M};
}
\visible<4->{
\node[align=center,elementnode,minimum size=0.5cm,inner sep=0.1pt,fill=ugreen!50] (la5) at (a44) {S};
}
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb1) at (b23) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb2) at (b22) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (lb3) at (b31) {};
\visible<3->{
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50] (lb4) at (b05) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50] (lb5) at (b14) {};
}
\visible<4->{
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=ugreen!50] (lb6) at (b45) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=ugreen!50] (lb7) at (b54) {};
}
\begin{pgfonlayer}{background}
\node [rectangle,thick,inner sep=0.4em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a23) (a31)] (phrase1) {};
\node [rectangle,thick,inner sep=0.4em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (b23) (b31)] (phrase2) {};
\visible<3->{
\node [rectangle,thick,inner sep=0.4em,fill=red!40,drop shadow,fill opacity=0.85] [fit = (b05) (b14)] (phrase3) {};
}
\visible<4->{
\node [rectangle,thick,inner sep=0.4em,fill=ugreen!40,drop shadow,fill opacity=0.85] [fit = (b45) (b54)] (phrase4) {};
}
\end{pgfonlayer}
\visible<4->{
\node[anchor=north] (s1) at ([xshift=0.6em,yshift=0.1em]b45.east) {S};
}
\visible<3->{
\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) {\scriptsize{基于词}};
\node[anchor=north] (l2) at ([xshift=2.2em,yshift=-0.5em]b10.south) {\scriptsize{基于短语}};
\visible<3->{
\node [anchor=south west] (p1line1) at ([xshift=-4em,yshift=2em]a05.north west) {\footnotesize{如果在(x-1,u-1)存在对齐点,或者存在可抽取的短语,则$o_i$=M}};
}
\visible<4->{
\node [anchor=north west] (p1line2) at ([yshift=-11.2em]p1line1.south west) {\footnotesize{如果在(x-1,v+1)存在对齐点,或者存在可抽取的短语,则$o_i$=S}};
}
\begin{pgfonlayer}{background}
\visible<3->{
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (p1line1)] (box1) {};
}
\visible<4->{
\node [rectangle,inner sep=0.2em,fill=ugreen!10] [fit = (p1line2)] (box2) {};
}
\end{pgfonlayer}
%\draw [->,dotted,very thick,red] ([yshift=0.1em]la4.north) .. controls +(north:1) and +(south:1) .. ([xshift=3em,yshift=-0.1em]box1.south west) ;
\end{scope}
\end{tikzpicture}
\end{center}
}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 调序模型3:分类模型
\begin{frame}{调序模型3:分类模型}
% 参考NiuTrans Manual 的最大熵分类
\begin{itemize}
\item 还有一种基于最大熵的调序模型,将调序问题看成是一个二分类问题
\begin{itemize}
\item 对于相邻的两个短语块,将其合成一个大的更大的块
\item 根据合成后的顺序$o$,可以分为正序和反序,因此可以看作是一个二分类问题
\end{itemize}
\vspace{0.1em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 15pt]
\node[anchor=west,fill=ugreen!50,minimum width=3em] (x1) at (0, 0) {\footnotesize{$X_1$}};
\node[anchor=west,fill=blue!50] (x2) at ([xshift=1em]x1.east) {\footnotesize{$X_2$}};
\node[anchor=west,fill=ugreen!50,minimum width=3em] (x3) at ([xshift=3em,yshift=1.2em]x2.east) {\footnotesize{$X_1$}};
\node[anchor=west,fill=blue!50] (x4) at ([xshift=1em]x3.east) {\footnotesize{$X_2$}};
\node[anchor=west,fill=blue!50] (x5) at ([xshift=3em,yshift=-1.2em]x2.east) {\footnotesize{$X_2$}};
\node[anchor=west,fill=ugreen!50,minimum width=3em] (x6) at ([xshift=1em]x5.east) {\footnotesize{$X_1$}};
\draw [->,thick] ([xshift=0.1em]x2.east) -- ([xshift=-0.1em]x3.west);
\draw [->,thick] ([xshift=0.1em]x2.east) -- ([xshift=-0.1em]x5.west);
\node[anchor=west] (l1) at ([xshift=1em]x4.east) {正序};
\node[anchor=west] (l2) at ([xshift=1em]x6.east) {反序};
\end{scope}
\end{tikzpicture}
\end{center}
\begin{itemize}
\item 使用多组特征??来预测合成之后的顺序,使用对数线性模型对特征进行建模
\end{itemize}
% \begin{itemize}
% \item 我们还可以得到$f_{S-pre}(d)$和$f_{D-pre}(d)$,此外将$a_{i-1}$换成$a_{i+1}$,还可以得到每个短语与后面短语的调序类型
% \end{itemize}
\item 对于每一种翻译推导$d$,基于最大熵的调序模型的得分计算公式如下
\begin{displaymath}
f_{ME}(d) = \prod_{<o,X_1,X_2> \in d} \Pr(o|X_1, X_2)
\end{displaymath}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
......@@ -1370,18 +2466,179 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\begin{frame}{模型得分}
% 定义模型得分 - 不需要算归一化的分母
% 判别式模型使用了三类特征:1)翻译模型特征;2)调序模型特征;3)语言模型
\begin{itemize}
\item 基于短语的统计机器翻译模型包括三个子模型
\begin{enumerate}
\item 短语表:短语翻译及每个短语对应的特征值
\item 调序模型:短语调序的模型
\item 语言模型:评价译文流畅度的$n$-gram语言模型
\end{enumerate}
\item 把每个子模型当作一个特征,为每个模型添加一个权重,然后使用对数线性模型对这些子模型进行建模,对数线性模型的形式如下:
\vspace{-0.8em}
\begin{displaymath}
\textrm{P}(d,\textbf{t}|\textbf{s}) = \exp(\sum_{i=1}^{M} \lambda_i \cdot h_i(d,\textbf{s},\textbf{t}))
\end{displaymath}
\vspace{-1.2em}
\begin{itemize}
\item 将三个子模型作为具体的特征代入有
\end{itemize}
\vspace{0.8em}
\begin{displaymath}
\textrm{P}(d,\textbf{t}|\textbf{s}) = \prod_{(\bar{s},\bar{t}) \in d} \Pr(\bar{t}|\bar{s})^{\lambda_{1}} \times f(d)^{\lambda_{2}} \times \Pr\nolimits_{lm}(\mathbf{t})^{\lambda_{lm}}
\end{displaymath}
\item 可以引入更多的特征来提高翻译质量(下面介绍)
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 特征的具体形式
\begin{frame}{特征}
% 给出特征列表
\begin{itemize}
\item \textbf{特征1-2: 短语翻译概率},即正向翻译概率$\Pr(\bar{s}|\bar{t})$和反向翻译概率$\Pr(\bar{t}|\bar{s})$。是基于短语的统计机器翻译模型中最主要的特征。
\item \textbf{特征3-4: 词汇翻译概率},即正向词汇翻译概率$\Pr_{lex}(\bar{t}|\bar{s})$和反向词汇翻译概率$\Pr_{lex}(\bar{s}|\bar{t})$。用来描述短语对中源语端单词和目标语端单词的对应关系
\item<2-> \textbf{特征5: $n$-gram语言模型},即$\textrm{P}_{\textrm{lm}}(\textbf{t})$。度量译文的流畅度,可以使用大规模目标语单语数据得到。
\item<2-> \textbf{特征6:译文长度},即$|\textbf{t}|$。避免模型倾向于短译文,同时让系统自动学习对译文长度的偏好。
\item<2-> \textbf{特征7:翻译规则数量}。这个特征是为了避免模型仅仅使用少量特征构成翻译推导(因为翻译概率相乘,因子少结果一般会大一些),同时让系统自动学习对使用规则数量的偏好。
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 特征的具体形式
\begin{frame}{特征(续)}
% 给出特征列表
\begin{itemize}
\item \textbf{特征8:源语言被翻译为空的单词数量}。注意,空翻译规则(或特征)有时也被称作evil feature,这类特征在一些数据集上对BLEU有很好的提升作用,但是会造成人工评价的下降,因此需要谨慎使用。
\item \textbf{特征9:基于最大熵的调序模型}$f_{ME}(d)$
\item \textbf{特征10:基于MSD的调序模型},包括与前一个短语的调序$f_{M-pre}(d)$$f_{S-pre}(d)$$f_{D-pre}(d)$, 和后一个短语的调序$f_{M-fol}(d)$$f_{S-fol}(d)$$f_{D-fol}(d)$
\item \textbf{最终模型得分}
\vspace{0.3em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 15pt]
\node[anchor=west,minimum width=3em] (x1) at (0, 0) {\footnotesize{$\textrm{P}(d,\textbf{t}|\textbf{s}) = \prod_{(\bar{s},\bar{t}) \in d} score(\bar{s},\bar{t}) \times f_{ME}(d)^{\lambda_{ME}} \times f_{MSD}(d)^{\lambda_{MSD}} \times$}};
\node[anchor=north west] (x2) at ([xshift=4em,yshift=0.1em]x1.south west) {\footnotesize{$\Pr\nolimits_{lm}(\mathbf{t})^{\lambda_{lm}} \times \exp(\lambda_{TWB} \cdot length(\mathbf{t})) / Z(\mathbf{s})$}};
\node[anchor=north west] (x3) at ([yshift=-1.8em]x1.south west) {\footnotesize{$score(\bar{s},\bar{t}) = \Pr(\bar{t}|\bar{s})^{\lambda_{1}} \times \Pr(\bar{s}|\bar{t})^{\lambda_{2}} \times \Pr\nolimits_{lex}(\bar{t}|\bar{s})^{\lambda_{3}} \times \Pr\nolimits_{lex}(\bar{s}|\bar{t})^{\lambda_{4}} \times$}};
\node[anchor=north west] (x4) at ([xshift=5em,yshift=0.1em]x3.south west) {\footnotesize{$\exp(\lambda_{PB}) \times \exp(\lambda_{WDB} \cdot \delta(\bar{s} \to null))$}};
\end{scope}
\end{tikzpicture}
\end{center}
%\begin{displaymath}
%\textrm{P}(d,\textbf{t}|\textbf{s}) = \prod_{(\bar{s},\bar{t}) \in d} score(\bar{s},\bar{t}) \times f_{ME}(d)^{\lambda_{ME}} \times f_{MSD}(d)^{\lambda_{MSD}} \times \nonumber \\
%%\Pr\nolimits_{lm}(\mathbf{t})^{\lambda_{lm}} \times \exp(\lambda_{TWB} \cdot length(\mathbf{t})) / Z(\mathbf{s})
%\end{displaymath}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 特征权重调优
\begin{frame}{特征权重调优}
% 看我MERT的slides
\begin{itemize}
\item 对于训练样本$S=\{(f_1,r_1),...,(f_s,r_s)\}$,有
\begin{itemize}
\item $f_s$为样本中的第$s$个源语句子,$r_s$为相应的译文,通常使用$R=\{r_1,...r_s\}$来表示训练样本的参考译文
\item 针对每个源语句子,解码器可以生成一个n-best结果$\{t_{ij}\}$
\end{itemize}
\item 对于模型参数$\lambda$,最佳的翻译结果为$T^*=\{t_{1}^{*},..,t_{i}^{*}\}$
\vspace{-0.5em}
\begin{displaymath}
t_{i}^{*} = \argmin_{t_{ij}} \sum_{k=1}^{M} \lambda_k \cdot h_k(t_{ij})
\end{displaymath}
\vspace{-0.9em}
\item<2-> 最小错误率训练(MERT)
\vspace{0.1em}
\begin{itemize}
\item<2-> 定义一个错误函数Err$(T^*, R)$来衡量译文$T^*$与参考答案$R$之间的差距,通过调整权重$\lambda$来最小化错误率
\item<2-> 常见的错误函数有词错误率(WER)、位置错误率(PER)、BLEU值以及NIST值
\end{itemize}
\vspace{0.3em}
\visible<2->{
\begin{displaymath}
\mathbf{\lambda}^* = \argmin_{\mathbf{\lambda}} \mathbf{Err}(T^*, R)
\end{displaymath}
}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 特征权重调优
\begin{frame}{特征权重调优(续)}
% 看我MERT的slides
\begin{itemize}
\item 如何得到最优的$\lambda^*$
\begin{itemize}
\item 最简单的方法是枚举所有可能的$\lambda$值,但是这样做效率很低。可以只考虑最优译文发生变化的点:)
\item 对于每个训练样本,假设有2-best个译文$\mathbf{t}=\{t_1,t_2\}$,每个译文$t$的得分modelscore($t$)可以表示成关于权重$\lambda_i$的函数
\end{itemize}
\vspace{0.2em}
\begin{displaymath}
\textrm{modelscore}(t) = \lambda_i \cdot h_i(t) + \sum_{k{\ne}i}^{M} \lambda_k \cdot h_k(t) = a \cdot \lambda_i + b
\end{displaymath}
\vspace{-0.7em}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\node[anchor=west] (x0) at (0, 0) {};
\draw[->,thick] (x0.center) -- ([xshift=8.2em]x0.east);
\draw[->,thick] (x0.center) -- ([yshift=5.6em]x0.center);
\visible<1-2>{
\draw[thick] ([yshift=1em]x0.center) -- ([xshift=8em,yshift=5em]x0.center);
\draw[thick] ([yshift=2em]x0.center) -- ([xshift=8em,yshift=4em]x0.center);
\node[anchor=north] (e1) at ([xshift=6em,yshift=6em]x0.south) {\footnotesize{$t_1$}};
\node[anchor=north] (e2) at ([xshift=7em,yshift=4em]x0.south) {\footnotesize{$t_2$}};
\node[anchor=north,rotate=90] (e2) at ([xshift=-1.3em,yshift=3.6em]x0.south) {\footnotesize{model score}};
}
\visible<2>{
\node [anchor=center,draw=red,circle,inner sep=2pt,thick] (x1) at ([xshift=4em,yshift=3em]x0.center) {};
\draw[thick,dotted] ([xshift=4em]x0.center) -- ([xshift=4em,yshift=3em]x0.center);
}
\node[anchor=north] (zero) at ([yshift=0.1em]x0.south) {\footnotesize{0}};
\node[anchor=north] (wx) at ([xshift=4em,yshift=0.1em]x0.south) {\footnotesize{$w_x$}};
\node[anchor=north] (wi) at ([xshift=8em,yshift=0.1em]x0.south) {\footnotesize{$w_i$}};
\visible<3->{
\draw[thick] ([yshift=2em]x0.center) -- ([xshift=4em,yshift=2em]x0.center);
\draw[thick] ([xshift=4em,yshift=4em]x0.center) -- ([xshift=8em,yshift=4em]x0.center);
\draw[thick,dotted] ([xshift=4em]x0.center) -- ([xshift=4em,yshift=5.5em]x0.center);
\node[anchor=north] (e1) at ([xshift=2em,yshift=3em]x0.north) {\footnotesize{$t^*=t_1$}};
\node[anchor=north] (e2) at ([xshift=6.2em,yshift=5em]x0.north) {\footnotesize{$t^*=t_2$}};
\node[anchor=north,rotate=90] (e2) at ([xshift=-1.3em,yshift=3.6em]x0.south) {\footnotesize{BLEU}};
\draw[decorate,decoration={brace,amplitude=0.4em},red,thick] ([xshift=3.8em,yshift=0.5em]x0.south) -- ([xshift=8.2em,yshift=0.5em]x0.south);
\node[anchor=north] (wi) at ([xshift=6.1em,yshift=2em]x0.south) {\tiny{\alert{挑选$w_i$}}};
}
\visible<2->{
\node [anchor=east] (line1) at ([xshift=-2.2em,yshift=4.5em]x0.west) {\footnotesize{1.找到最优译文$E^*$发生变化的位置}};
}
\visible<3->{
\node [anchor=north west] (line2) at ([yshift=-0.8em]line1.south west) {\footnotesize{2.对译文按照BLEU值进行排序,\ \ \ }};
\node [anchor=north west] (line3) at ([xshift=0.6em,yshift=-0.1em]line2.south west) {\footnotesize{在分数高的范围中挑选新的$\lambda_i$}};
}
\begin{pgfonlayer}{background}
\visible<2->{
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (line1)] (box1) {};
}
\visible<3->{
\node [rectangle,inner sep=0.2em,fill=green!10] [fit = (line2) (line3)] (box2) {};
}
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{-0.3em}
\begin{itemize}
\item<4-> 还有一些技巧可以防止训练出现过拟合和陷入局部最优
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
......@@ -1391,12 +2648,374 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
%%% 什么是解码
\begin{frame}{解码问题}
% 定义解码是啥
\begin{itemize}
\item 解码是根据模型以及输入原文,找到得分最高的译文 ${d}^*$
\begin{displaymath}
\mathbf{d}^* = \argmax_{\mathbf{t}} \sum_{d \in D(\mathbf{s}, \mathbf{t})} \Pr(\mathbf{t}, d|\mathbf{s})
\end{displaymath}
\vspace{-0.8em}
\begin{itemize}
\item 其中 $D$表示所有可能的推导构成的搜索空间。
\item $\Pr(\mathbf{t}, d|\mathbf{s})$表示前面提到的所有特征的得分
\end{itemize}
\item 实际解码过程中,通常按从左到右的顺序生成译文,递增的计算翻译概率,同时对已翻译的原文进行标记
\vspace{1em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 18pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\textbf{s}$:};
\node[anchor=west,fill=ugreen!50] (s1) at (0, 0) {桌子 上};
\node[anchor=west,fill=red!50] (s2) at ([xshift=1em]s1.east) {};
\node[anchor=west,fill=blue!50] (s3) at ([xshift=1em]s2.east) {一个 苹果};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\textbf{t}$:};
\visible<2->{
\node[anchor=west,fill=red!50] (t1) at (0, -1.5) {There is};
\path[<->, thick] (s2.south) edge (t1.north);
}
\visible<3->{
\node[anchor=west,fill=blue!50] (t2) at ([xshift=1em]t1.east) {an apple};
\path[<->, thick] (s3.south) edge (t2.north);
}
\visible<4->{
\node[anchor=west,fill=ugreen!50] (t3) at ([xshift=1em]t2.east) {on the table};
\path[<->, thick] (s1.south) edge (t3.north);
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 什么是解码
\begin{frame}{解码问题-翻译选项}
% 定义解码是啥
\begin{itemize}
\item 对于每个输入的源语句子$\textbf{s}$,可以从短语表中查询到所有可能的翻译选项,用来翻译
\vspace{0.1em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[minimum height = 16pt]
\node[anchor=east] (s0) at (-0.8em, 0) {$\textbf{s}$:};
\node[anchor=west] (s1) at (0, 0) {桌子};
\node[anchor=west] (s2) at ([xshift=2em]s1.east) {};
\node[anchor=west] (s3) at ([xshift=2.3em]s2.east) {};
\node[anchor=west] (s4) at ([xshift=2em]s3.east) {一个};
\node[anchor=west] (s5) at ([xshift=1.6em]s4.east) {苹果};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=3em] (t11) at ([yshift=-0.5em]s1.south) {table};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=3em] (t12) at ([yshift=-0.2em]t11.south) {desk};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=3em] (t21) at ([yshift=-0.5em]s2.south) {on};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=3em] (t22) at ([yshift=-0.2em]t21.south) {up};
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=3.4em] (t31) at ([yshift=-0.5em]s3.south) {have};
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=3.4em] (t32) at ([yshift=-0.2em]t31.south) {there is};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-0.5em]s4.south) {one};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south) {an};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=3em] (t51) at ([yshift=-0.5em]s5.south) {apple};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=3em] (t52) at ([yshift=-0.2em]t51.south) {apples};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=7.2em] (t13) at ([yshift=-3.7em]t12.south west) {on tabel};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=7.2em] (t14) at ([yshift=-0.2em]t13.south west) {on the tabel};
\node [anchor=north west,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=7.35em] (t43) at ([yshift=-0.2em]t42.south west) {one apple};
\node [anchor=north west,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=7.35em] (t44) at ([yshift=-0.2em]t43.south west) {an apple};
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=7.25em] (t23) at ([yshift=-0.2em]t22.south west) {upon there};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=11.5em] (t15) at ([yshift=-1.95em]t12.south west) {upon the tabel};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=11.8em] (t33) at ([yshift=-3.7em]t32.south west) {there is an apple};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=11.8em] (t34) at ([yshift=-0.2em]t33.south west) {have an apple...};
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{0.3em}
\item 正确的翻译都在翻译选项中,但是里面也包含了很多其他翻译选项,接下来介绍如何找到最优的译文?
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 什么是解码
\begin{frame}{解码问题-假设扩展}
% 定义解码是啥
\begin{itemize}
\item 从翻译选项中挑选合适的选项,顺序地构建输出,构建的局部翻译称为翻译假设
\begin{enumerate}
\item<1-> 翻译的起点是空假设,局部概率得分是1
\item<2-> 挑选一个翻译选项扩展为新的翻译假设,同时记录已翻译的原文并计算翻译代价(可以同时生成多种翻译假设)
\item<3-> 对未覆盖的源语应用上述方法
\item<4-> 当翻译假设覆盖了所有的原文时,就得到了一个完整的翻译假设,从所有的翻译假设中找到一个概率最高的翻译
\end{enumerate}
\vspace{0.5em}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\visible<1->{
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h0) at (0,0) {\scriptsize{null}};
\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=1.7em,fill=black] (pt0) at (h0.east) {\tiny{{\color{white} \textbf{P=1}}}};
}
\visible<2->{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h1) at ([xshift=2.5em]h0.east) {\scriptsize{on}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h2) at ([xshift=2.5em,yshift=2.5em]h0.east) {\scriptsize{tabel}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h3) at ([xshift=2.5em,yshift=-2.5em]h0.east) {\scriptsize{there is}};
\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) {\tiny{{\color{white} \textbf{1}}}};
\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=1.7em,fill=black] (pt1) at (h1.east) {\tiny{{\color{white} \textbf{P=.2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt2) at (h2.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt3) at (h3.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt0.south) -- ([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]pt0.south) -- ([xshift=-0.1em]h3.west);
}
\visible<3->{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h4) at ([xshift=2.5em,yshift=-1.8em]h3.east) {\scriptsize{one}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h5) at ([xshift=2.5em,yshift=0.7em]h3.east) {\scriptsize{an apple}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h6) at ([xshift=2.5em,yshift=0.7em]h1.east) {\scriptsize{tabel}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.5em] (h7) at ([xshift=2.5em,yshift=0.7em]h5.east) {\scriptsize{on the tabel}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.7em,minimum width=3.2em] (h8) at ([xshift=2.5em,yshift=-2em]h5.east) {\scriptsize{apple}};
\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) {\tiny{{\color{white} \textbf{4-5}}}};
\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) {\tiny{{\color{white} \textbf{1-2}}}};
\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=1.7em,fill=black] (pt4) at (h4.east) {\tiny{{\color{white} \textbf{P=.1}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt5) at (h5.east) {\tiny{{\color{white} \textbf{P=.4}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt6) at (h6.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt7) at (h7.east) {\tiny{{\color{white} \textbf{P=.4}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.7em,fill=black] (pt8) at (h8.east) {\tiny{{\color{white} \textbf{P=.2}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt1.south) -- ([xshift=1em,yshift=0.7em]pt1.south);
\draw [->,very thick,ublue] ([xshift=0.1em]pt2.south) -- ([xshift=1em,yshift=-0.7em]pt2.south);
\draw [->,very thick,ublue] ([xshift=0.1em]pt2.south) -- ([xshift=1em,yshift=0.7em]pt2.south);
\draw [->,very thick,ublue] ([xshift=0.1em]pt6.south) -- ([xshift=1em,yshift=-0.7em]pt6.south);
\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]pt3.south) -- ([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]pt5.south) -- ([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]pt4.south) -- ([xshift=-0.1em]h8.west);
\draw [->,very thick,ublue] ([xshift=0.1em]pt4.south) -- ([xshift=1em,yshift=-0.7em]pt4.south);
}
\visible<4->{
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.2em]h0.west) -- ([xshift=0.7em]h0.east) -- ([xshift=-0.2em]h3.west) -- ([xshift=0.8em]h3.east) -- ([xshift=-0.2em]h5.west) -- ([xshift=0.8em]h5.east) -- ([xshift=-0.2em]h7.west) -- ([xshift=0.8em]h7.east);
\node [anchor=north west] (wtranslabel) at ([yshift=-3em]h0.south west) {\scriptsize{翻译路径:}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 假设重组
\begin{frame}{假设重组}
% 描述过程,可能需要几页,注意提到coverage,beam search,hypothesis recombination
\begin{itemize}
\item 随着源语长度的增加,搜索空间将变得十分巨大,其中相同的翻译假设可以通过不同的搜索路径得到
\begin{itemize}
\item 可以通过\alert{假设重组},来减少翻译假设的数量
\end{itemize}
\vspace{0.8em}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\visible<2->{
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h0) at (0,0) {\tiny{null}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl0) at (h0.north west) {\tiny{{\color{white} \textbf{0}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt0) at (h0.east) {\tiny{{\color{white} \textbf{P=1}}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h2) at ([xshift=1.8em,yshift=2.5em]h0.east) {\tiny{an}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h3) at ([xshift=1.8em]h2.east) {\tiny{apple}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h2.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h2.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h3.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt0.south) -- ([xshift=-0.1em]h2.west);
\draw [->,very thick,ublue] ([xshift=0.1em]pt2.south) -- ([xshift=-0.1em]h3.west);
\visible<2>{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h1) at ([xshift=5.3em]h0.east) {\tiny{an apple}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt1) at (h1.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt0.south) -- ([xshift=-0.1em]h1.west);
}
\visible<3->{
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=0.1em]pt0.south) -- ([xshift=5em]pt0.south) -- ([yshift=-0.1em]h3.south);
}
}
\visible<4->{
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h4) at ([yshift=-4em]h0.south west) {\tiny{null}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h5) at ([xshift=1.8em]h4.east) {\tiny{he}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h6) at ([xshift=1.8em,yshift=2.5em]h4.east) {\tiny{it}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h8) at ([xshift=1.8em]h6.east) {\tiny{is not}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl4) at (h4.north west) {\tiny{{\color{white} \textbf{0}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h5.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h6.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h8.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt4) at (h4.east) {\tiny{{\color{white} \textbf{P=1}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt5) at (h5.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt6) at (h6.east) {\tiny{{\color{white} \textbf{P=.4}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt8) at (h8.east) {\tiny{{\color{white} \textbf{P=.2}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt4.south) -- ([xshift=-0.1em]h5.west);
\draw [->,very thick,ublue] ([xshift=0.1em]pt4.south) -- ([xshift=-0.1em]h6.west);
\draw [->,very thick,ublue] ([xshift=0.1em]pt6.south) -- ([xshift=-0.1em]h8.west);
\visible<4>{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.0em] (h7) at ([xshift=1.8em]h5.east) {\tiny{is not}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt7) at (h7.east) {\tiny{{\color{white} \textbf{P=.2}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h7.north west) {\tiny{{\color{white} \textbf{2}}}};
\draw [->,very thick,ublue] ([xshift=0.1em]pt5.south) -- ([xshift=-0.1em]h7.west);
}
\visible<5->{
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=0.1em]pt5.south) -- ([xshift=1.5em]pt5.south) -- ([yshift=-0.1em]h8.south);
}
}
\visible<2->{
\node [anchor=west] (line1) at ([xshift=2em,yshift=-0.5em]h3.east) {\footnotesize{1.翻译过相同数量的源语,输出}};
\node [anchor=north west] (line2) at ([xshift=0.6em,yshift=-0.1em]line1.south west) {\footnotesize{相同的翻译。舍弃概率低的假设}};
}
\visible<4->{
\node [anchor=west] (line3) at ([xshift=2em,yshift=-0.5em]h8.east) {\footnotesize{2.输出结果略有不同也可以重新}};
\node [anchor=north west] (line4) at ([xshift=0.6em,yshift=-0.1em]line3.south west) {\footnotesize{组合,只要有相同后续代价即可}};
}
\begin{pgfonlayer}{background}
\visible<2->{
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (line1) (line2)] (box1) {};
}
\visible<4->{
\node [rectangle,inner sep=0.2em,fill=green!10] [fit = (line3) (line4)] (box2) {};
}
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\vspace{0.3em}
\item<5-> 重组假设可以减少内部表示不同,如不同短语切分的情况,能够更严格和高效地搜索
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 栈解码
\begin{frame}{栈解码}
% 描述过程,可能需要几页,注意提到coverage,beam search,hypothesis recombination
\begin{itemize}
\item 还有一种减小搜索空间的方法,如果早期发现较差的翻译假设,则将它舍弃,并忽略由它扩展出来的翻译假设
\begin{itemize}
\item 整理翻译假设,放进\alert{假设堆栈}
\item 堆栈按照已翻译的词数进行分类
\item 如果栈过大,则删掉栈里面最差的那些假设
\end{itemize}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h0) at (0,0) {\tiny{null}};
\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=1.5em,fill=black] (pt0) at (h0.east) {\tiny{{\color{white} \textbf{P=1}}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h13) at ([xshift=2.3em,yshift=5em]h0.east) {\tiny{on}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.3em,yshift=2.5em]h0.east) {\tiny{tabel}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h1) at ([xshift=2.3em]h0.east) {\tiny{there is}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west) {\tiny{{\color{white} \textbf{3}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h12.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt1) at (h1.east) {\tiny{{\color{white} \textbf{P=.2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h12.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h13.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h2) at ([xshift=2.3em]h1.east) {\tiny{have}};
\node [anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h22) at ([xshift=2.3em]h12.east) {\footnotesize{\textbf{...}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h23) at ([xshift=2.3em]h13.east) {\tiny{an}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h3) at ([xshift=2.3em]h2.east) {\tiny{there is}};
\node [anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h32) at ([xshift=2.3em]h22.east) {\footnotesize{\textbf{...}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h33) at ([xshift=2.3em]h23.east) {\tiny{apple}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h4) at ([xshift=2.3em]h3.east) {\tiny{one}};
\node [anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h42) at ([xshift=2.3em]h32.east) {\footnotesize{\textbf{...}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h43) at ([xshift=2.3em]h33.east) {\tiny{apple}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h5) at ([xshift=2.3em]h4.east) {\tiny{apples}};
\node [anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h52) at ([xshift=2.3em]h42.east) {\footnotesize{\textbf{...}}};
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h53) at ([xshift=2.3em]h43.east) {\tiny{on tabel}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h2.north west) {\tiny{{\color{white} \textbf{3}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl23) at (h23.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl4) at (h4.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl43) at (h43.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h5.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1.0pt,fill=black] (hl53) at (h53.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h2.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt23) at (h23.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h3.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt33) at (h33.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt4) at (h4.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt43) at (h43.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt5) at (h5.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt53) at (h53.east) {\tiny{{\color{white} \textbf{P=.5}}}};
\node [anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south) {\scriptsize{\textbf{未译词}}};
\node [anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south) {\scriptsize{\textbf{已译1词}}};
\node [anchor=north] (l2) at ([xshift=0.3em,yshift=-0.7em]h2.south) {\scriptsize{\textbf{已译2词}}};
\node [anchor=north] (l3) at ([xshift=0.3em,yshift=-0.7em]h3.south) {\scriptsize{\textbf{已译3词}}};
\node [anchor=north] (l4) at ([xshift=0.3em,yshift=-0.7em]h4.south) {\scriptsize{\textbf{已译4词}}};
\node [anchor=north] (l5) at ([xshift=0.3em,yshift=-0.7em]h5.south) {\scriptsize{\textbf{已译5词}}};
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h0) (pt0)] (box0) {};
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h1) (pt1) (h13)] (box1) {};
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h2) (pt2) (h23)] (box2) {};
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h3) (pt3) (h33)] (box3) {};
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h4) (pt4) (h43)] (box4) {};
\node [rectangle,inner sep=0.3em,fill=blue!10] [fit = (h5) (pt5) (h53)] (box5) {};
\end{pgfonlayer}
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=0.2em,yshift=-0.5em]h0.west) -- ([xshift=1em,yshift=-0.5em]h1.east) -- ([xshift=-0.2em,yshift=-0.5em]h23.west) -- ([xshift=1em,yshift=-0.5em]h33.east) -- ([xshift=2.5em,yshift=1.5em]h33.east) -- ([xshift=4.8em,yshift=1.5em]h33.east) -- ([xshift=-0.2em,yshift=-0.5em]h53.west) -- ([xshift=0.1em,yshift=-0.5em]h53.east);
\end{scope}
\end{tikzpicture}
\end{center}
\item 使用栈解码可以很大程度上提高解码效率
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论