Commit c0fe49af by 曹润柘

update chapter3

parent ed599510
......@@ -65,7 +65,6 @@
\parinterval 剩下的问题是如何进行句子的切分和结构的分析。思路有很多,一种常用的方法是对问题进行概率化,用统计模型来描述问题并求解。比如,一个句子切分的好坏,并不是非零即一的判断,而是要估计出这种切分的可能性大小,最终选择可能性最大的结果进行输出。这也是一种典型的用统计建模的方式来描述自然语言处理问题。
\parinterval 本章将会对上述问题及方法进行介绍。首先,会用一个例子给出统计建模的基本思路,之后会应用这种方法进行中文分词、语言建模和句法分析。
%--概率论基础-----------------------------------------
\section{概率论基础}\index{Chapter2.2}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -22,7 +22,8 @@
\begin{pgfonlayer}{background}
{
\node[rectangle,draw=ublue, inner sep=0mm] [fit =(line1)(line2)(line3)(line4)(line5)(line6)(line7)(line11)(line8)(line9)(line13)] {};
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow] [fit =(line1)(line2)(line3)(line4)(line5)(line6)(line7)(line11)(line8)(line9)(line13)] (remark1label) {};
}
\end{pgfonlayer}
......@@ -30,3 +31,34 @@
......@@ -9,12 +9,12 @@
\node [anchor=west,inner sep=2pt,fill=red!20] (e3) at (e2.east) {$\prod\nolimits_{(j,i) \in \hat{A}} \textrm{P}(s_j,t_i)$};
\node [anchor=west,inner sep=1pt] (e4) at (e3.east) {$\times$};
\node [anchor=west,inner sep=3pt,fill=blue!20] (e5) at (e4.east) {$\textrm{P}_{lm}(t)$};
\node [anchor=north west,inner sep=1pt] (n1) at ([xshift=2.5em,yshift=-1em]e1.south west) {$\textrm{P}(s|t)$};
\node [anchor=north west,inner sep=1pt] (n1) at ([xshift=7.0em,yshift=-0.5em]e1.south west) {$\textrm{P}(s|t)$};
\node [anchor=north] (n1part2) at ([yshift=0.3em]n1.south) {\scriptsize{\textbf{翻译模型}}};
\node [anchor=west,inner sep=1pt] (n2) at ([xshift=2em]n1.east) {$\textrm{P}(t)$};
\node [anchor=west,inner sep=1pt] (n2) at ([xshift=4.0em]n1.east) {$\textrm{P}(t)$};
\node [anchor=north] (n2part2) at ([yshift=0.3em]n2.south) {\scriptsize{\textbf{语言模型}}};
\draw [->,thick] (e3.south) .. controls +(south:1em) and +(north:1em) .. (n1.north);
\draw [->,thick] (e5.south) .. controls +(south:1em) and +(70:1em) .. (n2.north);
%\draw [->,thick] (e3.south) .. controls +(south:1em) and +(north:1em) .. (n1.north);
%\draw [->,thick] (e5.south) .. controls +(south:1em) and +(70:1em) .. (n2.north);
\end{tikzpicture}
......
......@@ -7,7 +7,7 @@
{\small
\node [anchor=west,inner sep=2pt] (s1) at (0,0) {谢谢};
\node [anchor=west,inner sep=2pt] (s2) at ([xshift=2em]s1.east) {};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thank};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thanks};
\node [anchor=north,inner sep=2pt] (t2) at ([yshift=-2.45em]s2.center) {you};
\draw [-] (s1.south) -- ([yshift=-0.2em]t1.north);
\draw [-] (s2.south) -- (t2.north);
......@@ -18,7 +18,7 @@
{\small
\node [anchor=west,inner sep=2pt] (s1) at (0,0) {谢谢};
\node [anchor=west,inner sep=2pt] (s2) at ([xshift=2em]s1.east) {};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thank};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thanks};
\node [anchor=north,inner sep=2pt] (t2) at ([yshift=-2.45em]s2.center) {you};
\draw [-] (s1.south) -- ([yshift=-0.2em]t1.north);
\draw [-] (s1.south) -- (t2.north);
......@@ -29,7 +29,7 @@
{\small
\node [anchor=west,inner sep=2pt] (s1) at (0,0) {谢谢};
\node [anchor=west,inner sep=2pt] (s2) at ([xshift=2em]s1.east) {};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thank};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.2em]s1.center) {thanks};
\node [anchor=north,inner sep=2pt] (t2) at ([yshift=-2.45em]s2.center) {you};
\draw [-] (s1.south) -- ([yshift=-0.2em]t1.north);
\draw [-] (s2.south) -- ([yshift=-0.2em]t1.north);
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\definecolor{ugreen}{rgb}{0,0.5,0}
%%% outline
%-------------------------------------------------------------------------
%%% 简易机器翻译系统 - step 3 decoding - example
\begin{tikzpicture}
\begin{scope}[scale=0.4]
{\footnotesize
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num1) at (0,0) {C};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num1-1) at ([yshift=-5.0em]num1.south) {};
\draw [->,very thick,ublue]([yshift=-0.2em]num1.south) -- ([yshift=0.2em]num1-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num2) at ([xshift=5.2em]num1.east) {B};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num2-1) at ([yshift=-5.0em]num2.south) {};
\draw [->,very thick]([xshift=0.2em]num1.east) -- ([xshift=-0.2em]num2.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num2.south) -- ([yshift=0.2em]num2-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num3) at ([xshift=5.2em]num2.east) {A};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num3-1) at ([yshift=-5.0em]num3.south) {};
\draw [->,very thick]([xshift=0.2em]num2.east) -- ([xshift=-0.2em]num3.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num3.south) -- ([yshift=0.2em]num3-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num4) at ([xshift=5.2em]num3.east) {B};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num4-1) at ([yshift=-5.0em]num4.south) {};
\draw [->,very thick]([xshift=0.2em]num3.east) -- ([xshift=-0.2em]num4.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num4.south) -- ([yshift=0.2em]num4-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num5) at ([xshift=5.2em]num4.east) {C};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num5-1) at ([yshift=-5.0em]num5.south) {};
\draw [->,very thick]([xshift=0.2em]num4.east) -- ([xshift=-0.2em]num5.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num5.south) -- ([yshift=0.2em]num5-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](num6) at ([xshift=5.2em]num5.east) {A};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](num6-1) at ([yshift=-5.0em]num6.south) {};
\draw [->,very thick]([xshift=0.2em]num5.east) -- ([xshift=-0.2em]num6.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num6.south) -- ([yshift=0.2em]num6-1.north);
\node [anchor=north](word1) at ([xshift=2.5em,yshift=-3.0em]num1-1.south) {图示说明:};
\node [anchor=north,draw,thick,minimum width=2.8em, minimum height=2.0em,fill=green!30,drop shadow](word2) at ([xshift=-2.5em,yshift=-3.0em]word1.south) {C};
\node [anchor=west](word2-2) at ([xshift=1.5em]word2.east) {一个隐含状态};
\node [anchor=north,circle,draw,thick,minimum width=2.0em,fill=red!30,drop shadow](word3) at ([xshift=-2.5em,yshift=-12.2em]word1.south) {};
\node [anchor=west](word3-2) at ([xshift=2.1em]word3.east) {一个可见状态};
\draw [->,very thick]([xshift=6.4em]word2-2.east) -- ([xshift=11.6em]word2-2.east);
\node [anchor=west](word4) at ([xshift=13.1em]word2-2.east) {从一个隐含状态到下一个};
\node [anchor=west](word4-1) at ([xshift=13.1em,yshift=-4.0em]word2-2.east) {隐含状态的转换};
\draw [->,very thick,ublue]([xshift=30.7em,yshift=-0.2em]word3.north) -- ([xshift=30.7em,yshift=0.2em]word3.south);
\node [anchor=west](word5) at ([xshift=13.1em,yshift=-9.5em]word2-2.east) {从一个隐含状态到可见状};
\node [anchor=west](word5-1) at ([xshift=13.1em,yshift=-13.5em]word2-2.east) {态的输出};
}
\end{scope}
\end{tikzpicture}
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
{
{\scriptsize
\node [anchor=west,minimum height=2.5em,minimum width=5.5em] (sf1) at (2.3em,0) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s1) at ([xshift=2.3em]sf1.east) {科学家};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s2) at ([xshift=2.3em]s1.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s3) at ([xshift=2.3em]s2.east) {并不};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s4) at ([xshift=2.3em]s3.east) {知道};
}
{
{\scriptsize
\node [anchor=west] (tau11) at ([xshift=1.5em]taut.east) {$\tau_0$};
\node [anchor=west] (tau12) at ([xshift=-0.5em]tau11.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau1) [fit = (tau11) (tau12)] {};
\node [anchor=west] (tau21) at ([xshift=1.9em]tau1.east) {$\tau_1$};
\node [anchor=west] (tau22) at ([xshift=-0.5em]tau21.north east) {\tiny{1.科学家}};
\node [anchor=west] (tau23) at ([xshift=-0.5em]tau21.south east) {\tiny{2.们}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau2)[fit = (tau21) (tau22) (tau23)] {};
\node [anchor=west] (tau31) at ([xshift=2.1em]tau2.east) {$\tau_2$};
\node [anchor=west] (tau32) at ([xshift=-0.5em]tau31.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau3) [fit = (tau31) (tau32)] {};
\node [anchor=west] (tau41) at ([xshift=2.3em]tau3.east) {$\tau_3$};
\node [anchor=west] (tau42) at ([xshift=-0.5em]tau41.east) {\tiny{1.并不}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau4) [fit = (tau41) (tau42)] {};
\node [anchor=west] (tau51) at ([xshift=2.3em]tau4.east) {$\tau_4$};
\node [anchor=west] (tau52) at ([xshift=-0.5em]tau51.east) {\tiny{1.知道}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau5) [fit = (tau51) (tau52)] {};
}
\draw [->,thick] ([xshift=-0.68em,yshift=-0.2em]tau22.north) -- (s1.south);
\draw [->,thick] (tau23.east) -- (s2.south);
\draw [->,thick] ([xshift=-0.22em]tau4.north) -- (s3.south);
\draw [->,thick] ([xshift=-0.23em]tau5.north) -- (s4.south);
}
\draw [->,thick,dashed] ([yshift=1em]tau1.north west) -- ([yshift=1em]tau5.north east);
\draw [->,thick,dashed] ([yshift=-1em]tau1.south west) -- ([yshift=-1em]tau5.south east);
{
{
\node [anchor=north] (d1) at ([yshift=-2em]tau1.south) {$...$};
\node [anchor=west] (d2) at ([xshift=4.23em]d1.east) {$...$};
\node [anchor=west] (d31) at ([xshift=4.3em]d2.east) {$...$};
\node [anchor=north] (d32) at ([xshift=0.2em]d31.south) {\footnotesize{${<{\tau,\pi}>}_1$}};
\node [anchor=west] (d4) at ([xshift=4.27em]d31.east) {$...$};
\node [anchor=west] (d5) at ([xshift=4.25em]d4.east) {$...$};
}
\draw [->,thick] (d1.north) -- (tau1.south);
\draw [->,thick] (d2.north) -- (tau2.south);
\draw [->,thick] (d31.north) -- (tau3.south);
\draw [->,thick] (d4.north) -- (tau4.south);
\draw [->,thick] (d5.north) -- (tau5.south);
}
{\scriptsize
\node [rectangle,draw,anchor=north,line width=1pt,minimum height=2.5em,minimum width=5.5em] (ns1) at ([yshift=-13em]s1.south) {科学家};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (ns2) at ([xshift=2.3em]ns1.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (ns3) at ([xshift=2.3em]ns2.east) {并不};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (ns4) at ([xshift=2.3em]ns3.east) {知道};
}
{
{\scriptsize
\node [anchor=north] (ntau11) at ([yshift=-15em]tau11.south) {$\tau_0$};
\node [anchor=west] (ntau12) at ([xshift=-0.5em]ntau11.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (ntau1) [fit = (ntau11) (ntau12)] {};
\node [anchor=west] (ntau21) at ([xshift=1.9em]ntau1.east) {$\tau_1$};
\node [anchor=west] (ntau22) at ([xshift=-0.5em]ntau21.north east) {\tiny{1.们}};
\node [anchor=west] (ntau23) at ([xshift=-0.5em]ntau21.south east) {\tiny{2.科学家}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (ntau2)[fit = (ntau21) (ntau22) (ntau23)] {};
\node [anchor=west] (ntau31) at ([xshift=2.1em]ntau2.east) {$\tau_2$};
\node [anchor=west] (ntau32) at ([xshift=-0.5em]ntau31.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (ntau3) [fit = (ntau31) (ntau32)] {};
\node [anchor=west] (ntau41) at ([xshift=2.3em]ntau3.east) {$\tau_3$};
\node [anchor=west] (ntau42) at ([xshift=-0.5em]ntau41.east) {\tiny{1.并不}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (ntau4) [fit = (ntau41) (ntau42)] {};
\node [anchor=west] (ntau51) at ([xshift=2.3em]ntau4.east) {$\tau_4$};
\node [anchor=west] (ntau52) at ([xshift=-0.5em]ntau51.east) {\tiny{1.知道}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (ntau5) [fit = (ntau51) (ntau52)] {};
}
\draw [->,thick] ([xshift=-0.05em,yshift=-0.2em]ntau22.north) -- (ns1.south);
\draw [->,thick] (ntau23.east) -- (ns2.south);
\draw [->,thick] ([xshift=-0.22em]ntau4.north) -- (ns3.south);
\draw [->,thick] ([xshift=-0.23em]ntau5.north) -- (ns4.south);
}
\draw [->,thick,dashed] ([yshift=1em]ntau1.north west) -- ([yshift=1em]ntau5.north east);
\draw [->,thick,dashed] ([yshift=-1em]ntau1.south west) -- ([yshift=-1em]ntau5.south east);
{
{
\node [anchor=north] (nd1) at ([yshift=-2em]ntau1.south) {$...$};
\node [anchor=west] (nd2) at ([xshift=4.23em]nd1.east) {$...$};
\node [anchor=west] (nd31) at ([xshift=4.3em]nd2.east) {$...$};
\node [anchor=north] (nd32) at ([xshift=0.2em]nd31.south) {\footnotesize{${<{\tau,\pi}>}_2$}};
\node [anchor=west] (nd4) at ([xshift=4.27em]nd31.east) {$...$};
\node [anchor=west] (nd5) at ([xshift=4.25em]nd4.east) {$...$};
}
\draw [->,thick] (nd1.north) -- (ntau1.south);
\draw [->,thick] (nd2.north) -- (ntau2.south);
\draw [->,thick] (nd31.north) -- (ntau3.south);
\draw [->,thick] (nd4.north) -- (ntau4.south);
\draw [->,thick] (nd5.north) -- (ntau5.south);
}
}
\end{tikzpicture}
%---------------------------------------------------------------------
\ No newline at end of file
%%% outline
%-------------------------------------------------------------------------
%%% 简易机器翻译系统 - step 3 decoding - example
\begin{tikzpicture}
\node [anchor=west,inner sep=2pt,minimum height=2.5em] (eq1) at (0,0) {${\textrm{P}(\tau,\pi|t) = \prod_{j=0}^{l}{\textrm{P}(\varphi_j|\varphi_{1}^{j-1},t)} \times {\textrm{P}(\varphi_0|\varphi_{1}^{l},t)} \times}$};
\node [anchor=north west,inner sep=2pt,minimum height=2.5em] (eq2) at ([xshift=-15.06em,yshift=0.0em]eq1.south east) {${\prod_{j=0}^l{\prod_{k=1}^{\varphi_j}{\textrm{P}(\tau_{jk}|\tau_{j1}^{k-1},\tau_{1}^{j-1},\varphi_{0}^{l},t )}} \times}$};
\node [anchor=north west,inner sep=2pt,minimum height=2.5em] (eq3) at ([xshift=-15.56em,yshift=0.0em]eq2.south east) {${\prod_{j=1}^l{\prod_{k=1}^{\varphi_j}{\textrm{P}(\pi_{jk}|\pi_{j1}^{k-1},\pi_{1}^{j-1},\tau_{0}^{l},\varphi_{0}^{l},t )}} \times}$};
\node [anchor=north west,inner sep=2pt,minimum height=2.5em] (eq4) at ([xshift=-17.10em,yshift=0.0em]eq3.south east) {{${\prod_{k=1}^{\varphi_0}{\textrm{P}(\pi_{0k}|\pi_{01}^{k-1},\pi_{1}^{l},\tau_{0}^{l},\varphi_{0}^{l},t )}}$}};
\node [anchor=west,inner sep=2pt,minimum height=2.0em,fill=red!15] (part1) at ([xshift=-12.5em,yshift=0.0em]eq1.east) {{${\textrm{P}(\varphi_j|\varphi_{1}^{j-1},t)}$}};
\node [anchor=west,inner sep=2pt,minimum height=2.0em,fill=blue!15] (part2) at ([xshift=-5.9em,yshift=0.0em]eq1.east) {{${\textrm{P}(\varphi_0|\varphi_{1}^{l},t)}$}};
\node [anchor=west,inner sep=2pt,minimum height=2.0em,fill=green!15] (part3) at ([xshift=-10.7em,yshift=0.0em]eq2.east) {{${\textrm{P}(\tau_{jk}|\tau_{j1}^{k-1},\tau_{1}^{j-1},\varphi_{0}^{l},t )}$}};
\node [anchor=west,inner sep=2pt,minimum height=2.0em,fill=yellow!15] (part4) at ([xshift=-12.23em,yshift=0.0em]eq3.east) {{${\textrm{P}(\pi_{jk}|\pi_{j1}^{k-1},\pi_{1}^{j-1},\tau_{0}^{l},\varphi_{0}^{l},t )}$}};
\node [anchor=west,inner sep=2pt,minimum height=2.0em,fill=gray!15] (part5) at ([xshift=-10.4em,yshift=0.0em]eq4.east) {{${\textrm{P}(\pi_{0k}|\pi_{01}^{k-1},\pi_{1}^{l},\tau_{0}^{l},\varphi_{0}^{l},t )}$}};
\end{tikzpicture}
\begin{tikzpicture}
{\footnotesize
{\scriptsize
\node [anchor=north west,inner sep=2pt,align=left] (line1) at (0,0) {\textrm{\textbf{Function} \textsc{WordDecoding}($s$)}};
\node [anchor=north west,inner sep=2pt,align=left] (line2) at ([yshift=-1pt]line1.south west) {\textrm{1: $\pi = $\textsc{GetTransOptions}($s$)}};
......@@ -27,33 +26,43 @@
%% highlights
%\begin{pgfonlayer}{background}
{
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.85in] (line2highlight) at (line2.west) {};
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.85in] (line3highlight) at (line3.west) {};
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.85in] (line5highlight) at (line5.west) {};
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line2highlight) at (line2.west) {};
}
{
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line3highlight) at (line3.west) {};
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line5highlight) at (line5.west) {};
}
{
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line8highlight) at (line8.west) {};
}
{
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line9highlight) at (line9.west) {};
}
{
\node[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=1.71in] (line10highlight) at (line10.west) {};
}
%\end{pgfonlayer}
\end{pgfonlayer}
{
{\footnotesize
%% remark 1
\begin{scope}
{\footnotesize
\node [anchor=north west,align=left] (remark1) at ([xshift=0.6in,yshift=-1em]algorithm.north east) {获取每个单词\\的翻译候选};
{
\node [anchor=north west,align=left] (remark1) at ([xshift=0.4in]algorithm.north east) {获取每个单词\\的翻译候选};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,red] (s1) at ([yshift=-0.3em,xshift=0.5em]remark1.north east){1};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,ugreen] (s2) at ([xshift=0.4em]s1.east) {2};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,orange] (s3) at ([xshift=0.4em]s2.east) {3};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=3.0pt,ublue] (s4) at ([xshift=0.4em]s3.east) {...};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=1.5pt,purple] (s5) at ([xshift=0.4em]s4.east) {$m$};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,red] (s1) at ([yshift=-1.0em,xshift=0.5em]remark1.north east){\tiny{1}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,ugreen] (s2) at ([xshift=0.4em]s1.east) {\tiny{2}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,orange] (s3) at ([xshift=0.4em]s2.east) {\tiny{3}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=3.0pt,ublue] (s4) at ([xshift=0.4em]s3.east) {.};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=1.5pt,purple] (s5) at ([xshift=0.4em]s4.east) {\tiny{$m$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,red,fill=red] (t1) at ([yshift=-2.2em]s1.center) {{\color{white} $n$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ugreen,fill=ugreen] (t2) at ([yshift=-2.2em]s2.center) {{\color{white} $n$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,orange,fill=orange] (t3) at ([yshift=-2.2em]s3.center) {{\color{white} $n$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ublue,fill=ublue] (t4) at ([yshift=-2.2em]s4.center) {{\color{white} $n$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,purple,fill=purple] (t5) at ([yshift=-2.2em]s5.center) {{\color{white} $n$}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,red,fill=red] (t1) at ([yshift=-1.7em]s1.center) {{\color{white} \tiny{$n$}}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ugreen,fill=ugreen] (t2) at ([yshift=-1.7em]s2.center) {{\color{white} \tiny{$n$}}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,orange,fill=orange] (t3) at ([yshift=-1.7em]s3.center) {{\color{white} \tiny{$n$}}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ublue,fill=ublue] (t4) at ([yshift=-1.7em]s4.center) {{\color{white} \tiny{$n$}}};
\node [anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,purple,fill=purple] (t5) at ([yshift=-1.7em]s5.center) {{\color{white} \tiny{$n$}}};
\draw [->,thick] ([yshift=-0.1em]s1.south) -- ([yshift=0.1em]t1.north);
\draw [->,thick] ([yshift=-0.1em]s2.south) -- ([yshift=0.1em]t2.north);
......@@ -63,7 +72,7 @@
\begin{pgfonlayer}{background}
{
\node[rectangle,draw,inner sep=0.2em,fill=blue!10,minimum width=2.4in] [fit = (remark1) (s1) (t5)] (remark1label) {};
\node[rectangle,draw,inner sep=0.2em,fill=blue!10,minimum width=2.2in] [fit = (remark1) (t5)] (remark1label) {};
}
\end{pgfonlayer}
}
......@@ -72,27 +81,101 @@
%% remark 2
\begin{scope}
{\footnotesize
\node [anchor=north west,draw,inner sep=2pt,fill=blue!10,minimum width=2.4in] (remark2) at ([yshift=-0.5em]remark1label.south west) {$best$用于保存当前最好的翻译结果};
{
\node [anchor=north west,draw,inner sep=2pt,fill=blue!10,minimum width=2.2in] (remark2) at ([yshift=-0.5em]remark1label.south west) {$best$用于保存当前最好的翻译结果 };
}
\end{scope}
%% end of remark 2
%% remark 3
\begin{scope}
{\footnotesize
\node [anchor=north west,draw,inner sep=2pt,fill=blue!10,minimum width=2.4in] (remark3) at ([yshift=-0.5em]remark2.south west) {$h$用于保存每步生成的所有译文候选};
{
\node [anchor=north west,draw,inner sep=2pt,fill=blue!10,minimum width=2.2in] (remark3) at ([yshift=-0.5em]remark2.south west) {$h$用于保存每步生成的所有译文候选 };
}
\end{scope}
%% end of remark 3
%% remark 4
\begin{scope}
{
\node [anchor=north west,inner sep=2pt,align=left] (remark4) at ([xshift=0.43em,yshift=-0.8em]remark3.south west) {\textsc{Join}($a,b$) 返回\\$a$$b$ 的所有组合 };
{\scriptsize
\node [anchor=north west,inner sep=1pt,align=center,draw] (a1) at ([yshift=-0.5em]remark4.north east) {a1\\a2};
\node [anchor=west] (join) at (a1.east) {$\times$};
\node [anchor=north west,inner sep=1pt,align=center,draw] (b1) at ([xshift=1.5em]a1.north east) {b1\\b2};
\node [anchor=west] (join) at (b1.east) {$=$};
\node [anchor=north west,inner sep=1pt,align=center,draw] (result) at ([xshift=1.5em]b1.north east) {a1b1 a1b2\\a2b1 a2b2};
}
\begin{pgfonlayer}{background}
{
\draw [->,thick] (line2highlight.east) ..controls +(east:1em) and +(west:1em).. (remark1label.west);
\draw [->,thick] (line3highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.6em]remark2.south west);
\draw [->,thick] (line5highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.6em]remark3.south west);
\node[rectangle,draw,inner sep=2pt,fill=blue!10,minimum width=2.2in] [fit = (remark4) (result)] (remark4label) {};
}
\end{pgfonlayer}
}
\end{scope}
%% end of remark 4
%% remark 5
\begin{scope}
{
\node [anchor=north west,align=left] (remark5) at ([xshift=0.6em,yshift=-1.6em]remark4.south west) {\textsc{PruneForTop1}\\保留得分最高的结果};
\node [anchor=west,draw,inner sep=1pt] (s1) at ([yshift=-0.5em,xshift=1.2em]remark5.north east){\tiny{0.234}};
\node [anchor=north west,draw,inner sep=1pt] (s2) at ([yshift=-0.2em]s1.south west){\tiny{0.197}};
\node [anchor=north west,draw,inner sep=1pt] (s3) at ([yshift=-0.2em]s2.south west){\tiny{0.083}};
\draw [-] ([yshift=-0.1em,xshift=-0.2em]s1.south west) -- ([yshift=-0.1em,xshift=3em]s1.south east);
\node [anchor=west] (top1) at ([xshift=0.1em]s1.east) {\tiny{\color{red}{$\gets$ top1}}};
\begin{pgfonlayer}{background}
{
\node[rectangle,draw,inner sep=0.2em,fill=blue!10,minimum width=2.2in] [fit = (remark5) (top1)] (remark5label) {};
}
\end{pgfonlayer}
}
\end{scope}
\%% end of remark 5
%% remark 6
\begin{scope}
{
\node [anchor=north west,align=left] (remark6) at ([xshift=-0.34em,yshift=-1.3em]remark5.south west) {记录已经翻译过\\的源语单词};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,red] (s1) at ([yshift=-1.0em,xshift=0.5em]remark6.north east){\tiny{1}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,ugreen] (s2) at ([xshift=0.4em]s1.east) {\tiny{2}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,orange] (s3) at ([xshift=0.4em]s2.east) {\tiny{3}};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=3.0pt,ublue] (s4) at ([xshift=0.4em]s3.east) {.};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=1.5pt,purple] (s5) at ([xshift=0.4em]s4.east) {\tiny{$m$}};
\draw [-,thick,red] (s1.north east) -- (s1.south west);
\draw [-,thick,orange] (s3.north east) -- (s3.south west);
\begin{pgfonlayer}{background}
{
\node[rectangle,draw,inner sep=0.2em,fill=blue!10,minimum width=2.2in] [fit = (remark6) (s5)] (remark6label) {};
}
\end{pgfonlayer}
}
\end{scope}
\%% end of remark 6
{
\draw [->,thick] (line2highlight.east) ..controls +(east:1em) and +(west:1em).. (remark1label.west);
}
{
\draw [->,thick] (line3highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.3em]remark2.south west);
\draw [->,thick] (line5highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.3em]remark3.south west);
}
{
\draw [->,thick] (line8highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.5em]remark4label.west);
}
{
\draw [->,thick] (line9highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.5em]remark5label.west);
}
{
\draw [->,thick] (line10highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.5em]remark6label.south west);
}
}
\end{tikzpicture}
......
\begin{tikzpicture}
\node [anchor=west,inner sep=2pt,fill=green!20] (eq1) at (0,0) {$L(f,\lambda)$};
......
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
{
{
\node [anchor=west] (st) at (0,0) {\textbf{s}};
\node [anchor=north] (taut) at ([yshift=-3em]st.south) {\textbf{$\tau$}};
\node [anchor=north] (phit) at ([yshift=-3em]taut.south) {\textbf{$\phi$}};
\node [anchor=north] (tt) at ([yshift=-3em]phit.south) {\textbf{t}};
}
{\scriptsize
\node [anchor=west,minimum height=2.5em,minimum width=5.5em] (sf1) at ([xshift=1em]st.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s1) at ([xshift=2.3em]sf1.east) {科学家};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s2) at ([xshift=2.3em]s1.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s3) at ([xshift=2.3em]s2.east) {并不};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (s4) at ([xshift=2.3em]s3.east) {知道};
}
{
{\scriptsize
\node [anchor=west] (tau11) at ([xshift=1.5em]taut.east) {$\tau_0$};
\node [anchor=west] (tau12) at ([xshift=-0.5em]tau11.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau1) [fit = (tau11) (tau12)] {};
\node [anchor=west] (tau21) at ([xshift=1.9em]tau1.east) {$\tau_1$};
\node [anchor=west] (tau22) at ([xshift=-0.5em]tau21.north east) {\tiny{1.科学家}};
\node [anchor=west] (tau23) at ([xshift=-0.5em]tau21.south east) {\tiny{2.们}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau2)[fit = (tau21) (tau22) (tau23)] {};
\node [anchor=west] (tau31) at ([xshift=2.1em]tau2.east) {$\tau_2$};
\node [anchor=west] (tau32) at ([xshift=-0.5em]tau31.east) {\tiny{1.NULL}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau3) [fit = (tau31) (tau32)] {};
\node [anchor=west] (tau41) at ([xshift=2.3em]tau3.east) {$\tau_3$};
\node [anchor=west] (tau42) at ([xshift=-0.5em]tau41.east) {\tiny{1.并不}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau4) [fit = (tau41) (tau42)] {};
\node [anchor=west] (tau51) at ([xshift=2.3em]tau4.east) {$\tau_4$};
\node [anchor=west] (tau52) at ([xshift=-0.5em]tau51.east) {\tiny{1.知道}};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (tau5) [fit = (tau51) (tau52)] {};
}
\draw [->,thick] ([xshift=-0.5em,yshift=-0.2em]tau22.north) -- (s1.south);
\draw [->,thick] (tau23.east) -- (s2.south);
\draw [->,thick] ([xshift=-0.1em]tau4.north) -- (s3.south);
\draw [->,thick] ([xshift=-0.1em]tau5.north) -- (s4.south);
}
{
{\scriptsize
\node [anchor=west] (phi11) at ([xshift=2.4em]phit.east) {$\phi_0$};
\node [anchor=west] (phi12) at ([xshift=-0.5em]phi11.east) {0};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (phi1) [fit = (phi11) (phi12)] {};
\node [anchor=west] (phi21) at ([xshift=3em]phi1.east) {$\phi_1$};
\node [anchor=west] (phi22) at ([xshift=-0.5em]phi21.east) {2};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (phi2) [fit = (phi21) (phi22)] {};
\node [anchor=west] (phi31) at ([xshift=3em]phi2.east) {$\phi_2$};
\node [anchor=west] (phi32) at ([xshift=-0.5em]phi31.east) {0};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (phi3) [fit = (phi31) (phi32)] {};
\node [anchor=west] (phi41) at ([xshift=3em]phi3.east) {$\phi_3$};
\node [anchor=west] (phi42) at ([xshift=-0.5em]phi41.east) {1};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (phi4) [fit = (phi41) (phi42)] {};
\node [anchor=west] (phi51) at ([xshift=3em]phi4.east) {$\phi_4$};
\node [anchor=west] (phi52) at ([xshift=-0.5em]phi51.east) {1};
\node [rounded rectangle,draw,line width=1pt,minimum height=3.4em,minimum width=7.8em] (phi5) [fit = (phi51) (phi52)] {};
}
\draw [->,thick] (phi1.north) -- (tau1.south);
\draw [->,thick] (phi2.north) -- (tau2.south);
\draw [->,thick] ([xshift=0.05em]phi3.north) -- (tau3.south);
\draw [->,thick] ([xshift=0.05em]phi4.north) -- (tau4.south);
\draw [->,thick] ([xshift=0.05em]phi5.north) -- (tau5.south);
}
\draw [->,thick,dashed] ([yshift=-1.2em]st.south west) -- ([yshift=-0.8em]s4.south east);
\draw [->,thick,dashed] ([yshift=-5.8em]st.south west) -- ([yshift=-5.4em]s4.south east);
\draw [->,thick,dashed] ([yshift=-10.3em]st.south west) -- ([yshift=-9.9em]s4.south east);
{
{\scriptsize
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (t1) at ([xshift=1.2em]tt.east) {$t_0$};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (t2) at ([xshift=2.1em]t1.east) {Scientists};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (t3) at ([xshift=2.3em]t2.east) {do};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (t4) at ([xshift=2.3em]t3.east) {not};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2.5em,minimum width=5.5em] (t5) at ([xshift=2.3em]t4.east) {konw};
}
\draw [->,thick] ([xshift=-0.1em]t1.north) -- (phi1.south);
\draw [->,thick] ([xshift=0.05em]t2.north) -- (phi2.south);
\draw [->,thick] ([xshift=0.05em]t3.north) -- (phi3.south);
\draw [->,thick] ([xshift=0.05em]t4.north) -- (phi4.south);
\draw [->,thick] ([xshift=0.05em]t5.north) -- (phi5.south);
}
{\scriptsize
\node [anchor=west] (sent11) at ([xshift=1em,yshift=-1em]s4.south east) {把这些元语};
\node [anchor=west] (sent12) at ([yshift=-1em]sent11.west) {言单词放在};
\node [anchor=west] (sent13) at ([yshift=-1em]sent12.west) {合适的位置};
\node [anchor=west] (sent21) at ([yshift=-3em]sent13.west) {确定生成元};
\node [anchor=west] (sent22) at ([yshift=-1em]sent21.west) {语言单词};
\node [anchor=west] (sent31) at ([yshift=-4em]sent22.west) {确定生成元};
\node [anchor=west] (sent32) at ([yshift=-1em]sent31.west) {语言单词的};
\node [anchor=west] (sent33) at ([yshift=-1em]sent32.west) {个数};
}
{\scriptsize
\node [anchor=west] (f1) at ([yshift=-2em]t1.south west) {$\phi_{0}=0,\phi_{1}=2,\phi_{3}=0,\phi_{4}=1$};
\node [anchor=west] (f2) at ([yshift=-2em]f1.west) {$\tau_{0}=\{ \},\tau_{1}=\{ \tau_{11}=' \textrm{科学家}',\tau_{12}=' \textrm{}' \},\phi_{3}=\{ \tau_{31}=' \textrm{并不}' \},\phi_{4}=\{ \tau_{41}=' \textrm{知道}' \}$};
\node [anchor=west] (f3) at ([yshift=-2em]f2.west) {$\pi_{0}=\{ \},\pi_{1}=\{\pi_{11}=1,\pi_{12}=2\},\pi_{2}=\{ \},\pi_{3}=\{\pi_{31}=3\},\pi_{4}=\{\pi_{41}=4\}$};
}
}
\end{tikzpicture}
%---------------------------------------------------------------------
\ No newline at end of file
%%% outline
%-------------------------------------------------------------------------
%%% 简易机器翻译系统 - step 3 decoding - example
\begin{tikzpicture}
\begin{scope}[scale=0.6]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{1}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{1}|t)=0.5$};
\draw [-,very thick](eq1.south) -- (eq3.north);
\draw [-,very thick](eq2.south) -- (eq4.north);
\node [anchor=west] (eq7) at ([xshift=13.1em,yshift=1.4em]eq2.east) {};
\node [anchor=west] (eq8) at ([xshift=13.1em,yshift=-25.6em]eq2.east) {};
\node [anchor=south] (eq9) at ([xshift=0.0em,yshift=0.0em]eq7.north) {吃早饭 $\Leftrightarrow $ Have breakfast};
\draw [-,very thick,dotted](eq7.south) -- (eq8.north);
\end{scope}
\begin{scope}[scale=0.6,xshift=0.0,yshift=-10.0em]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{2}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{2}|t)=0.1$};
\draw [-,very thick](eq1.south) -- (eq4.north);
\draw [-,very thick](eq2.south) -- (eq3.north);
\end{scope}
\begin{scope}[scale=0.6,xshift=0.0,yshift=-20.0em]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{3}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{3}|t)=0.1$};
\draw [-,very thick](eq1.south) -- (eq3.north);
\draw [-,very thick](eq2.south) -- (eq3.north);
\end{scope}
\begin{scope}[scale=0.6,xshift=29.0em,yshift=0.0em]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{4}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{4}|t)=0.1$};
\draw [-,very thick](eq1.south) -- (eq4.north);
\draw [-,very thick](eq2.south) -- (eq4.north);
\end{scope}
\begin{scope}[scale=0.6,xshift=29.0em,yshift=-10.0em]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{5}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{5}|t)=0.05$};
\draw [-,very thick](eq1.south) -- (eq3.north);
\draw [-,very thick](eq1.south) -- (eq4.north);
\draw [-,very thick](eq2.south) -- (eq3.north);
\node [anchor=west,very thick,draw=red,minimum width=1.5em,minimum height=1.5em] (w1) at (eq5.west){};
\node [anchor=west,very thick,draw=red,minimum width=7.7em,minimum height=1.5em] (w2) at (eq6.west){};
\end{scope}
\begin{scope}[scale=0.6,xshift=29.0em,yshift=-20.0em]
\node [anchor=west] (eq1) at (0,0) {};
\node [anchor=west] (eq2) at ([xshift=3.0em,yshift=0.0em]eq1.east) {早饭};
\node [anchor=north] (eq3) at ([xshift=0.0em,yshift=-2.0em]eq1.south) {Have};
\node [anchor=north] (eq4) at ([xshift=0.0em,yshift=-2.0em]eq2.south) {breakfast};
\node [anchor=east] (eq5) at ([xshift=-1.0em,yshift=-1.8em]eq1.west) {$a_{6}$};
\node [anchor=west] (eq6) at ([xshift=1.0em,yshift=-1.8em]eq2.east) {$\textrm{P}(s,a_{6}|t)=0.05$};
\draw [-,very thick](eq1.south) -- (eq3.north);
\draw [-,very thick](eq2.south) -- (eq4.north);
\draw [-,very thick](eq2.south) -- (eq3.north);
\node [anchor=west,very thick,draw=red,minimum width=1.5em,minimum height=1.5em] (w1) at (eq5.west){};
\node [anchor=west,very thick,draw=red,minimum width=7.7em,minimum height=1.5em] (w2) at (eq6.west){};
\end{scope}
\end{tikzpicture}
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
{
{\footnotesize
\node [anchor=north west,minimum height=2em,minimum width=4em] (s11) at (0,0) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (s1) at ([xshift=2em]s11.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (s2) at ([xshift=2em]s1.east) {改变};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (s3) at ([xshift=2em]s2.east) {主意};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (s4) at ([xshift=2em]s3.east) {};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (s5) at ([xshift=2em]s4.east) {};
\node [anchor=south] (nu1) at (s1.north) {1};
\node [anchor=south] (nu2) at (s2.north) {2};
\node [anchor=south] (nu3) at (s3.north) {3};
\node [anchor=south] (nu4) at (s4.north) {4};
\node [anchor=south] (nu5) at (s5.north) {5};
}
{
{\footnotesize
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t1) at ([yshift=-5.5em]s11.west) {$t_0$};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t2) at ([xshift=2em]t1.east) {I};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t3) at ([xshift=2em]t2.east) {changed};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t4) at ([xshift=2em]t3.east) {my};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t5) at ([xshift=2em]t4.east) {mind};
\node [rectangle,draw,anchor=west,line width=1pt,minimum height=2em,minimum width=4em] (t6) at ([xshift=2em]t5.east) {.};
\node [anchor=north] (nd1) at (t2.south) {[1]};
\node [anchor=north] (nd2) at (t3.south) {[2]};
\node [anchor=north] (nd3) at (t5.south) {[3]};
\node [anchor=north] (nd4) at (t6.south) {[4]};
}
\draw [->,thick] (s1.south) -- (t2.north);
\draw [->,thick] (s2.south) -- (t3.north);
\draw [->,thick] (s3.south) -- (t5.north);
\draw [->,thick] (s4.south) -- (t1.north);
\draw [->,thick] (s5.south) -- (t6.north);
}
\node [anchor=east] (ss) at ([xshift=-0.5em]s1.west) {\textbf{s}};
\node [anchor=east] (tt) at ([xshift=-0.5em]t1.west) {\textbf{t}};
}
\end{tikzpicture}
%---------------------------------------------------------------------
\ No newline at end of file
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (s1) at (0,0) {\footnotesize{$s_1$}:我};
\node [anchor=west] (s2) at ([xshift=0.5em]s1.east) {\footnotesize{$s_2$}:对};
\node [anchor=west] (s3) at ([xshift=0.5em]s2.east) {\footnotesize{$s_3$}:你};
\node [anchor=west] (s4) at ([xshift=0.5em]s3.east) {\footnotesize{$s_4$}:感到};
\node [anchor=west] (s5) at ([xshift=0.5em]s4.east) {\footnotesize{$s_5$}:满意};
\end{scope}
\begin{scope}[yshift=-3.0em]
\node [anchor=west] (t1) at (0.35em,0) {\footnotesize{$t_1$}:I};
\node [anchor=west] (t2) at ([xshift=0.3em,yshift=-0.1em]t1.east) {\footnotesize{$t_2$}:am};
\node [anchor=west] (t3) at ([xshift=0.3em,yshift=0.1em]t2.east) {\footnotesize{$t_3$}:satisfied};
\node [anchor=west] (t4) at ([xshift=0.3em]t3.east) {\footnotesize{$t_4$}:with};
\node [anchor=west] (t5) at ([xshift=0.3em,yshift=-0.2em]t4.east) {\footnotesize{$t_5$}:you};
\end{scope}
\draw [-,thick,ublue,dashed] (s1.south) -- (t1.north);
\draw [-,thick,ublue,dashed] (s4.south) -- ([yshift=0.3em]t2.north);
\draw [-,thick,ublue,dashed] (s2.south) ..controls +(south:1em) and +(north:1em).. (t4.north);
\draw [-,thick,ublue,dashed] (s3.south) ..controls +(south:0.5em) and +(north:1.5em).. (t5.north);
\draw [-,thick,ublue,dashed] (s5.south) -- (t3.north);
\end{tikzpicture}
%---------------------------------------------------------------------
\begin{center}
%%% outline
%-------------------------------------------------------------------------
{
......@@ -31,4 +31,3 @@
\end{tikzpicture}
}
%---------------------------------------------------------------------
\end{center}
......@@ -43,75 +43,68 @@
%-------------------------------------------------------------------------
%%% 简易机器翻译系统 - step 3 decoding - example
\begin{tikzpicture}
{\footnotesize
\node [anchor=west] (mid) at (0,0) {$\alpha(1,0)\alpha(2,0) + \alpha(1,0)\alpha(2,1) + \alpha(1,0)\alpha(2,2) +$};
\node [anchor=west] (mid2) at ([yshift=-2em]mid.west) {$\alpha(1,1)\alpha(2,0) + \alpha(1,1)\alpha(2,1) + \alpha(1,1)\alpha(2,2)+$};
\node [anchor=west] (mid3) at ([yshift=-2em]mid2.west) {$\alpha(1,2)\alpha(2,0) + \alpha(1,2)\alpha(2,1) + \alpha(1,2)\alpha(2,2)$};
}
\begin{pgfonlayer}{background}
\node[rectangle,draw=ublue,red,inner sep=0.1em,fill=white] [fit = (mid) (mid2) (mid3)] (exampleeq) {};
\end{pgfonlayer}
{\footnotesize
{
\node [anchor=north] (eq1) at ([xshift=2em,yshift=-2em]exampleeq.south west) {$\sum\limits_{y_1=0}^{2} \sum\limits_{y_2=0}^{2} \alpha(1,y_1)\alpha(2,y_2)$};
\node [anchor=west] (eq1part2) at ([xshift=-1em,yshift=-3em]eq1.west) {$=$};
\node [anchor=west] (eq1part3) at ([xshift=-0.5em]eq1part2.east) {$\sum\limits_{y_1=0}^{2} \sum\limits_{y_2=0}^{2} \prod\limits_{x=1}^{2} $};
\node [anchor=west,inner sep=2pt] (eq1part4) at ([xshift=-0.3em]eq1part3.east) {$\alpha(x,y_x)$};
}
{
\node [anchor=north] (eq2) at ([xshift=-2em,yshift=-2em]exampleeq.south east) {$(\alpha(1,0)+\alpha(1,1)+\alpha(1,2))\cdot$};
\node [anchor=west] (eq2part2) at ([yshift=-1.5em]eq2.west) {$(\alpha(2,0)+\alpha(2,1)+\alpha(2,2))$};
\node [anchor=west] (eq2part3) at ([xshift=2.1in]eq1part2.east){$=$};
\node [anchor=west] (eq2part4) at ([xshift=-0.5em]eq2part3.east){$\prod\limits_{x=1}^{2} \sum\limits_{y=0}^{2}$};
\node [anchor=west,inner sep=2pt] (eq2part5) at ([xshift=-0.3em]eq2part4.east){$\alpha(x,y)$};
}
}
\begin{pgfonlayer}{background}
{
\node[rectangle,draw=ublue,red,inner sep=0.1em,fill=white] [fit = (eq1) (eq1part2) (eq1part3)] (eq1full) {};
}
{
\node[rectangle,draw=ublue,red,inner sep=0.1em,fill=white] [fit = (eq2) (eq2part2) (eq2part3) (eq2part4)] (eq2full) {};
}
\end{pgfonlayer}
{
\draw [->,thick] ([xshift=-3em]exampleeq.south) .. controls +(south:1.5em) and +(north:1.5em) .. (eq1full.north);
}
{
\draw [->,thick] ([xshift=3em]exampleeq.south) .. controls +(south:1.5em) and +(north:1.5em) .. (eq2full.north);
}
{
\node [anchor=west] at ([xshift=0.7em]eq1full.east) {\LARGE{\textbf{=}}};
}
{
{\large
\node [anchor=west] (feq) at ([xshift=3em,yshift=-3em]eq1full.south west) {$\sum\limits_{a_1=0}^{l} ... \sum\limits_{a_m=0}^{l} \prod\limits_{j=1}^{m}$};
\node [anchor=west,inner sep=2pt,fill=blue!20] (feqpart2) at ([xshift=-0.3em]feq.east) {$f(s_j|t_{a_j})$};
\node [anchor=west,inner sep=1pt] (feqpart3) at (feqpart2.east) {=};
\node [anchor=west] (feqpart4) at (feqpart3.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l}$};
\node [anchor=west,inner sep=2pt,fill=blue!20] (feqpart5) at ([xshift=-0.3em]feqpart4.east) {$f(s_j|t_i)$};
}
\draw [->,thick] (eq1part4.south) .. controls +(south:2.5em) and +(north:2.5em) .. (feqpart2.north);
\draw [->,thick] (eq2part5.south) .. controls +(south:1.5em) and +(north:1.5em) .. (feqpart5.north);
\node [anchor=west,inner sep=2pt,fill=blue!20] (eq1part4) at ([xshift=-0.3em]eq1part3.east) {\footnotesize{$\alpha(x,y_x)$}};
\node [anchor=west,inner sep=2pt,fill=blue!20] (eq2part5) at ([xshift=-0.3em]eq2part4.east){\footnotesize{$\alpha(x,y)$}};
}
\begin{scope}
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num1) at (0,0) {C};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num1-1) at ([yshift=-3.0em]num1.south) {};
\draw [->,very thick,ublue]([yshift=-0.2em]num1.south) -- ([yshift=0.2em]num1-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num2) at ([xshift=3.5em]num1.east) {B};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num2-1) at ([yshift=-3.0em]num2.south) {};
\draw [->,very thick]([xshift=0.2em]num1.east) -- ([xshift=-0.2em]num2.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num2.south) -- ([yshift=0.2em]num2-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num3) at ([xshift=3.5em]num2.east) {A};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num3-1) at ([yshift=-3.0em]num3.south) {};
\draw [->,very thick]([xshift=0.2em]num2.east) -- ([xshift=-0.2em]num3.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num3.south) -- ([yshift=0.2em]num3-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num4) at ([xshift=3.5em]num3.east) {B};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num4-1) at ([yshift=-3.0em]num4.south) {};
\draw [->,very thick]([xshift=0.2em]num3.east) -- ([xshift=-0.2em]num4.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num4.south) -- ([yshift=0.2em]num4-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num5) at ([xshift=3.5em]num4.east) {C};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num5-1) at ([yshift=-3.0em]num5.south) {};
\draw [->,very thick]([xshift=0.2em]num4.east) -- ([xshift=-0.2em]num5.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num5.south) -- ([yshift=0.2em]num5-1.north);
%%%%%%%%%%%%%%%%%%%%%%%%%%
\node [anchor=west,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](num6) at ([xshift=3.5em]num5.east) {A};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](num6-1) at ([yshift=-3.0em]num6.south) {};
\draw [->,very thick]([xshift=0.2em]num5.east) -- ([xshift=-0.2em]num6.west);
\draw [->,very thick,ublue]([yshift=-0.2em]num6.south) -- ([yshift=0.2em]num6-1.north);
\node [anchor=north](word1) at ([xshift=1.0em,yshift=-1.0em]num1-1.south) {图示说明:};
\node [anchor=north,draw,thick,minimum width=3em, minimum height=2.2em,fill=green!30,drop shadow](word2) at ([xshift=-1.0em,yshift=-1.0em]word1.south) {C};
\node [anchor=west](word2-2) at ([xshift=1.5em]word2.east) {一个隐含状态};
\node [anchor=north,circle,draw,thick,minimum width=3em,fill=red!30,drop shadow](word3) at ([xshift=-1.0em,yshift=-5.5em]word1.south) {};
\node [anchor=west](word3-2) at ([xshift=1.5em]word3.east) {一个可见状态};
\draw [->,very thick]([xshift=5.2em]word2-2.east) -- ([xshift=8.3em]word2-2.east);
\node [anchor=west](word4) at ([xshift=9.8em]word2-2.east) {从一个隐含状态到下一个};
\node [anchor=north](word4-1) at ([xshift=-2.0em]word4.south) {隐含状态的转换};
\draw [->,very thick,ublue]([xshift=16.6em,yshift=-0.2em]word3.north) -- ([xshift=16.6em,yshift=0.2em]word3.south);
\node [anchor=north](word5) at ([xshift=2.0em,yshift=-1.65em]word4-1.south) {从一个隐含状态到可见状};
\node [anchor=north](word5-1) at ([xshift=-3.6em]word5.south) {态的输出};
\end{scope}
\end{tikzpicture}
%---------------------------------------------------------------------
\end{CJK}
\end{document}
......
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
{
\node [pos=0.5,left,xshift=-0.5em,yshift=2.0em] (label2) {\footnotesize{{$t^1$ =$<$s$>$ {\color{red}machine}\; {\color{red}translation}\; is\; just\; translation\; by\; computer\; $<$/s$>$ }}};
\node [anchor=north west] (label2part2) at ([yshift=0.3em]label2.south west) {\footnotesize{{$t^2$ =$<$s$>$ how\; does\;this\; {\color{red}machine}\;work\; $?$ $<$/s$>$ }}};
\node [anchor=north west] (label2part3) at ([yshift=0.3em]label2part2.south west) {\footnotesize{{$t^3$ =$<$s$>$ we\; are\;replaced\;the\; old\; adding\; {\color{red}machine}\;with\;a\; computer\; $<$/s$>$ }}};
\node [anchor=north west] (label2part4) at ([yshift=0.3em]label2part3.south west) {\footnotesize{{$t^4$ =$<$s$>$ several\; approaches\; to\;{\color{red}machine}\;learning\; are\; used\; to\; solve\; problems\; $?$\; $<$/s$>$ }}};
}
\end{scope}
\end{tikzpicture}
%---------------------------------------------------------------------
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\definecolor{ugreen}{rgb}{0,0.5,0}
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\node [anchor=west,inner sep=2pt,fill=red!20,thick,minimum width=3.6em,minimum height=0.8em] (s1) at (0,0) {$\phi$};
{%第一列
\node [anchor=north west] (label1) at ([xshift=2.5em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第1步}}};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s21) at ([xshift=2.0em,yshift=3.5em]s1.east) {$w_1^1$};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s22) at ([xshift=2.0em,yshift=0.0em]s1.east) {$w_2^1$};
\node [anchor=west] (s23) at ([xshift=3.3em,yshift=-3.2em]s1.east) {$\vdots$};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s24) at ([xshift=2.0em,yshift=-7.0em]s1.east) {\scriptsize{$w_{m \bullet n}^1$}};
}
{
\draw [->,thick] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s21.west);
\draw [->,thick] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s22.west);
\draw [->,thick] ([yshift=0.0em]s1.east) -- ([xshift=-1.3em,yshift=-0.2em]s23.west);
\draw [->,thick] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s24.west);
}
{%第二列
\node [anchor=north west] (label2) at ([xshift=9.3em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第2步}}};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s31) at ([xshift=8.8em,yshift=3.5em]s1.east) {$w_1^2$};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s32) at ([xshift=8.8em,yshift=0.0em]s1.east) {$w_2^2$};
\node [anchor=west] (s33) at ([xshift=10.1em,yshift=-3.2em]s1.east) {$\vdots$};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s34) at ([xshift=8.8em,yshift=-7.0em]s1.east) {\tiny{$w_{(m-1) \bullet n}^2$}};
}
{
\draw [->,thick] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s31.west);
\draw [->,thick] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s32.west);
\draw [->,thick] ([yshift=0.0em]s21.east) -- ([xshift=-1.3em,yshift=-0.2em]s33.west);
\draw [->,thick] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s34.west);
\draw [->,thick] ([yshift=0.0em]s22.east) -- ([yshift=0.0em]s31.west);
\draw [->,thick] ([yshift=0.0em]s22.east) -- ([yshift=0.0em]s32.west);
\draw [->,thick] ([yshift=0.0em]s22.east) -- ([xshift=-1.3em,yshift=-0.2em]s33.west);
\draw [->,thick] ([yshift=0.0em]s22.east) -- ([yshift=0.0em]s34.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s23.east) -- ([yshift=0.0em]s31.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s23.east) -- ([yshift=0.0em]s32.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s23.east) -- ([xshift=-1.3em,yshift=-0.3em]s33.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s23.east) -- ([yshift=0.0em]s34.west);
\draw [->,thick] ([yshift=0.0em]s24.east) -- ([yshift=0.0em]s31.west);
\draw [->,thick] ([yshift=0.0em]s24.east) -- ([yshift=0.0em]s32.west);
\draw [->,thick] ([yshift=0.0em]s24.east) -- ([xshift=-1.3em,yshift=-0.2em]s33.west);
\draw [->,thick] ([yshift=0.0em]s24.east) -- ([yshift=0.0em]s34.west);
}
{%第三列
\node [anchor=west] (s41) at ([xshift=15.6em,yshift=3.5em]s1.east) {$\cdots$};
\node [anchor=west] (s42) at ([xshift=15.6em,yshift=0.0em]s1.east) {$\cdots$};
\node [anchor=west] (s43) at ([xshift=15.6em,yshift=-3.5em]s1.east) {$\cdots$};
\node [anchor=west] (s44) at ([xshift=15.6em,yshift=-7.0em]s1.east) {$\cdots$};
\draw [->,thick] ([yshift=0.0em]s31.east) -- ([yshift=0.0em]s41.west);
\draw [->,thick] ([yshift=0.0em]s31.east) -- ([yshift=0.0em]s42.west);
\draw [->,thick] ([yshift=0.0em]s31.east) -- ([yshift=0.0em]s43.west);
\draw [->,thick] ([yshift=0.0em]s31.east) -- ([yshift=0.0em]s44.west);
\draw [->,thick] ([yshift=0.0em]s32.east) -- ([yshift=0.0em]s41.west);
\draw [->,thick] ([yshift=0.0em]s32.east) -- ([yshift=0.0em]s42.west);
\draw [->,thick] ([yshift=0.0em]s32.east) -- ([yshift=0.0em]s43.west);
\draw [->,thick] ([yshift=0.0em]s32.east) -- ([yshift=0.0em]s44.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s41.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s42.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s43.west);
\draw [->,thick] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s44.west);
\draw [->,thick] ([yshift=0.0em]s34.east) -- ([yshift=0.0em]s41.west);
\draw [->,thick] ([yshift=0.0em]s34.east) -- ([yshift=0.0em]s42.west);
\draw [->,thick] ([yshift=0.0em]s34.east) -- ([yshift=0.0em]s43.west);
\draw [->,thick] ([yshift=0.0em]s34.east) -- ([yshift=0.0em]s44.west);
}
{%第四列
\node [anchor=north west] (label3) at ([xshift=19.4em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第m步}}};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s51) at ([xshift=19.0em,yshift=3.5em]s1.east) {$w_1^m$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s52) at ([xshift=19.0em,yshift=0.0em]s1.east) {$w_2^m$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s53) at ([xshift=19.0em,yshift=-3.5em]s1.east) {$w_{?}^{m}$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s54) at ([xshift=19.0em,yshift=-7.0em]s1.east) {\scriptsize{$w_{1 \bullet n}^m$}};
\draw [->,thick] ([yshift=0.0em]s41.east) -- ([yshift=0.0em]s51.west);
\draw [->,thick] ([yshift=0.0em]s42.east) -- ([yshift=0.0em]s52.west);
\draw [->,thick] ([yshift=0.0em]s43.east) -- ([yshift=0.0em]s53.west);
\draw [->,thick] ([yshift=0.0em]s44.east) -- ([yshift=0.0em]s54.west);
}
\end{tikzpicture}
%---------------------------------------------------------------------
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\definecolor{ugreen}{rgb}{0,0.5,0}
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\node [anchor=west,inner sep=2pt,fill=red!20,thick,minimum width=3.6em,minimum height=0.8em] (s1) at (0,0) {$\phi$};
{%第一列
\node [anchor=north west] (label1) at ([xshift=2.5em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第1步}}};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s21) at ([xshift=2.0em,yshift=3.5em]s1.east) {$w_1^1$};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s22) at ([xshift=2.0em,yshift=0.0em]s1.east) {$w_2^1$};
\node [anchor=west] (s23) at ([xshift=3.3em,yshift=-3.2em]s1.east) {$\vdots$};
\node [anchor=west,inner sep=2pt,fill=green!20,thick,minimum width=3.6em,minimum height=0.8em] (s24) at ([xshift=2.0em,yshift=-7.0em]s1.east) {\scriptsize{$w_{m \bullet n}^1$}};
}
{
\draw [->,thick,red] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s21.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s22.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s1.east) -- ([xshift=-1.3em,yshift=-0.2em]s23.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s1.east) -- ([yshift=0.0em]s24.west);
}
{%第二列
\node [anchor=north west] (label2) at ([xshift=9.3em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第2步}}};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s31) at ([xshift=8.8em,yshift=3.5em]s1.east) {$w_1^2$};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s32) at ([xshift=8.8em,yshift=0.0em]s1.east) {$w_2^2$};
\node [anchor=west] (s33) at ([xshift=10.1em,yshift=-3.2em]s1.east) {$\vdots$};
\node [anchor=west,inner sep=2pt,fill=blue!20,thick,minimum width=3.6em,minimum height=0.8em] (s34) at ([xshift=8.8em,yshift=-7.0em]s1.east) {\tiny{$w_{(m-1) \bullet n}^2$}};
}
{
\draw [->,thick,densely dashed] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s31.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s32.west);
\draw [->,thick,red] ([yshift=0.0em]s21.east) -- ([xshift=-1.3em,yshift=-0.2em]s33.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s21.east) -- ([yshift=0.0em]s34.west);
}
{%第三列
\node [anchor=west] (s41) at ([xshift=15.6em,yshift=3.5em]s1.east) {$\cdots$};
\node [anchor=west] (s42) at ([xshift=15.6em,yshift=0.0em]s1.east) {$\cdots$};
\node [anchor=west] (s43) at ([xshift=15.6em,yshift=-3.5em]s1.east) {$\cdots$};
\node [anchor=west] (s44) at ([xshift=15.6em,yshift=-7.0em]s1.east) {$\cdots$};
\draw [->,thick,densely dashed] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s41.west);
\draw [->,thick,red] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s42.west);
\draw [->,thick,densely dashed] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s43.west);
\draw [->,thick,densely dashed] ([xshift=1.3em,yshift=-0.3em]s33.east) -- ([yshift=0.0em]s44.west);
}
{%第四列
\node [anchor=north west] (label3) at ([xshift=19.4em,yshift=6.3em]s1.east) {{\scriptsize \textbf{第m步}}};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s51) at ([xshift=19.0em,yshift=3.5em]s1.east) {$w_1^m$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s52) at ([xshift=19.0em,yshift=0.0em]s1.east) {$w_2^m$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s53) at ([xshift=19.0em,yshift=-3.5em]s1.east) {$w_{?}^{m}$};
\node [anchor=west,inner sep=2pt,fill=orange!20,thick,minimum width=3.6em,minimum height=0.8em] (s54) at ([xshift=19.0em,yshift=-7.0em]s1.east) {\scriptsize{$w_{1 \bullet n}^m$}};
\draw [->,thick,densely dashed] ([yshift=0.0em]s41.east) -- ([yshift=0.0em]s51.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s42.east) -- ([yshift=0.0em]s52.west);
\draw [->,thick,red] ([yshift=0.0em]s43.east) -- ([yshift=0.0em]s53.west);
\draw [->,thick,densely dashed] ([yshift=0.0em]s44.east) -- ([yshift=0.0em]s54.west);
}
\end{tikzpicture}
%---------------------------------------------------------------------
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\node [anchor=west] (eq1) at (0,0) {$\textrm{P}(s,a|t)=$};
\node [anchor=west,inner sep=1pt,minimum height=2.64em] (eq2) at (eq1.east) {$\textrm{P}(m|t)$};
\node [anchor=west,inner sep=1pt,minimum height=2.64em] (eq3) at ([xshift=1pt]eq2.east) {$\prod\limits_{j=1}^{m}$};
\node [anchor=west,inner sep=1pt,minimum height=2.64em] (eq4) at ([xshift=1pt]eq3.east) {$\textrm{P}(a_j|a_{1}^{j-1},s_{1}^{j-1},m,t)$};
\node [anchor=west,inner sep=1pt,minimum height=2.64em] (eq5) at ([xshift=1pt]eq4.east) {$\textrm{P}(s_j|a_{1}^{j},s_{1}^{j-1},m,t)$};
{
\node [anchor=west,inner sep=1pt,minimum height=2.64em,fill=red!20] (eq2) at (eq1.east) {$\textrm{P}(m|t)$};
}
{
\node [anchor=west,inner sep=1pt,minimum height=2.64em,fill=blue!20] (eq3) at ([xshift=1pt]eq2.east) {$\prod\limits_{j=1}^{m}$};
}
{
\node [anchor=west,inner sep=1pt,minimum height=2.64em,fill=green!20] (eq4) at ([xshift=1pt]eq3.east) {$\textrm{P}(a_j|a_{1}^{j-1},s_{1}^{j-1},m,t)$};
}
{
\node [anchor=west,inner sep=1pt,minimum height=2.64em,fill=purple!20] (eq5) at ([xshift=1pt]eq4.east) {$\textrm{P}(s_j|a_{1}^{j},s_{1}^{j-1},m,t)$};
}
{
\node [anchor=north,draw,circle,inner sep=1pt,ublue] (c1) at ([yshift=-1pt]eq2.south) {\tiny{\textbf{1}}};
}
{
\node [anchor=north,draw,circle,inner sep=1pt,ublue] (c2) at ([yshift=-1pt]eq3.south) {\tiny{\textbf{2}}};
}
{
\node [anchor=north,draw,circle,inner sep=1pt,ublue] (c3) at ([yshift=-1pt]eq4.south) {\tiny{\textbf{3}}};
}
{
\node [anchor=north,draw,circle,inner sep=1pt,ublue] (c4) at ([yshift=-1pt]eq5.south) {\tiny{\textbf{4}}};
}
\end{tikzpicture}
%---------------------------------------------------------------------
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
{\small
\node [anchor=west,inner sep=2pt] (s1) at (0,0) {$s_1$:在};
\node [anchor=west,inner sep=2pt] (s2) at ([xshift=1em]s1.east) {$s_2$:桌子};
\node [anchor=west,inner sep=2pt] (s3) at ([xshift=1em]s2.east) {$s_3$:上};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-1.7em]s1.center) {$t_1$:on};
\node [anchor=north,inner sep=2pt] (t2) at ([yshift=-1.6em]s2.center) {$t_2$:the};
\node [anchor=north,inner sep=2pt] (t3) at ([yshift=-1.6em]s3.center) {$t_3$:table};
\node [anchor=east,inner sep=2pt] (t0) at ([xshift=-1.5em]t1.west) {$t_0$};
\draw [-] (s1.south) -- (t0.north);
\draw [-] (s2.south) -- (t3.north);
\draw [-] (s3.south) -- (t1.north);
}
\end{tikzpicture}
%---------------------------------------------------------------------
\begin{center}
\begin{tikzpicture}
{
\node [anchor=west,inner sep=2pt] (s1) at (0,0) {$s_1$:在};
\node [anchor=west,inner sep=2pt] (s2) at ([xshift=2em]s1.east) {$s_2$:桌子};
\node [anchor=west,inner sep=2pt] (s3) at ([xshift=2em]s2.east) {$s_3$:上};
\node [anchor=north,inner sep=2pt] (t1) at ([yshift=-2.4em]s1.center) {$t_1$:on};
\node [anchor=north,inner sep=2pt] (t2) at ([yshift=-2.4em]s2.center) {$t_2$:the};
\node [anchor=north,inner sep=2pt] (t3) at ([yshift=-2.4em]s3.center) {$t_3$:table};
\node [anchor=east,inner sep=2pt] (t0) at ([xshift=-2.2em]t1.west) {$t_0$};
\draw [-,dashed,thick] (s1.south) -- (t0.north);
\draw [-,dashed,thick] (s2.south) -- (t3.north);
\draw [-,dashed,thick] (s3.south) -- (t1.north);
}
\draw [-,dashed,thick,red] (s2.south) -- (t3.north);
\end{tikzpicture}
\end{center}
\ No newline at end of file
\begin{tikzpicture}
\node [anchor=west] (eq1) at (0,0) {$\sum\limits_{a_1=0}^{l} ... \sum\limits_{a_m=0}^{l} \prod\limits_{j=1}^{m} f(s_j|t_{a_j})$};
\node [anchor=west] (eq1part2) at (eq1.east) {$=$};
\node [anchor=west,inner sep=2pt] (eq1part3) at (eq1part2.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i)$};
{
\node [anchor=west,inner sep=2pt,fill=red!20] (eq1part3) at (eq1part2.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i)$};
}
{
\node [anchor=west] (eq2) at ([xshift=5em,yshift=-4.5em]eq1.west) {$\textrm{P}(s|t) = \frac{\epsilon}{(l+1)^{m}} $};
\node [anchor=west,inner sep=2pt] (eq2part2) at ([xshift=-0.3em]eq2.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i)$};
\node [anchor=east] (eq2label) at ([xshift=-0em,yshift=0.2em]eq2.west) {\small{IBM模型1:}};
\node [anchor=west,inner sep=2pt,fill=red!20] (eq2part2) at ([xshift=-0.3em]eq2.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i)$};
}
{
\node [anchor=west] (eq3) at ([xshift=5em,yshift=-7.5em]eq1.west) {$\textrm{P}(s|t) = \epsilon$};
\node [anchor=west,inner sep=2pt] (eq3part2) at ([xshift=-0.3em]eq3.east) {$\prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} a(i|j,m,l) f(s_j|t_i)$};
\node [anchor=east] (eq3label) at ([xshift=-0em,yshift=0.2em]eq3.west) {\small{类似的,IBM模型2:}};
}
\begin{pgfonlayer}{background}
{
\node[rectangle,draw=red,inner sep=2pt] [fit = (eq2) (eq2part2) (eq2label) (eq3) (eq3part2) (eq3label)] {};
}
\end{pgfonlayer}
{
\draw [->,thick] ([xshift=-1em]eq1part3.south) .. controls +(south:1.3em) and +(north:1.3em) .. ([xshift=1em]eq2part2.north);
}
\end{tikzpicture}
\begin{tikzpicture}
\node [anchor=west] (eq1) at (0,0) {$\hat{\theta}$};
\node [anchor=west] (eq2) at ([yshift=-0.2em]eq1.east) {=};
\node [anchor=west,inner sep=2pt] (eq3) at ([yshift=-0.0em]eq2.east) {$\argmax$};
\node [anchor=north,inner sep=1pt] (eq3part2) at ([yshift=-0.2em]eq3.south) {\scriptsize{$\theta$}};
\node [anchor=west,inner sep=2pt] (eq4) at ([xshift=0.1em]eq3.east) {$\textrm{P}_{\theta}(s|t)$};
{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.35em] (eq3) at ([yshift=-0.0em]eq2.east) {$\argmax$};
\node [anchor=west,inner sep=2pt,fill=green!20] (eq4) at ([xshift=0.1em]eq3.east) {$\textrm{P}_{\theta}(s|t)$};
\node [anchor=north,draw,inner sep=3pt,fill=red!20] (eq3label) at ([yshift=-1.5em]eq3.south west) {\footnotesize{\textbf{求最优参数}}};
\node [anchor=north,draw,inner sep=3pt,fill=green!20] (eq4label) at ([yshift=-1.5em]eq4.south east) {\footnotesize{\textbf{目标函数}}};
\draw [->,thick] ([xshift=-1em]eq3.south) .. controls +(south:1em) and +(north:1em) .. (eq3label.north);
\draw [->,thick] (eq4.south) .. controls +(south:1em) and +(north:1em) .. (eq4label.north);
}
\end{tikzpicture}
\begin{tikzpicture}
\node[anchor=west,inner sep=2pt] (eq11) at (0,0) {\large{$\frac{\partial \big[ \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i) \big]}{\partial f(s_u|t_v)}$}};
\node[anchor=west,inner sep=2pt] (eq12) at ([yshift=-9pt]eq11.east) {=};
\node[anchor=west,inner sep=2pt,fill=red!20] (eq13) at ([yshift=2pt]eq12.east) {\large{$\frac{\partial \big[ \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i) \big]}{\partial \big[ \sum\limits_{i=0}^{l}f(s_u|t_i) \big]}$}};
\node[anchor=west,inner sep=2pt] (eq14) at ([yshift=-1pt]eq13.east) {$\cdot$};
\node[anchor=west,inner sep=2pt,fill=blue!20,minimum height=4em] (eq15) at ([yshift=8pt]eq14.east) {\large{$\frac{\partial \big[ \sum\limits_{i=0}^{l}f(s_u|t_i) \big]}{\partial f(s_u|t_v)}$}};
\node[anchor=south,inner sep=1pt] (label1) at ([yshift=1pt]eq13.north) {\footnotesize{$\partial g(z)/\partial z$}};
\node[anchor=south,inner sep=1pt] (label2) at ([yshift=1pt]eq15.north) {\footnotesize{$\partial z/\partial f$}};
\node[anchor=north west,inner sep=2pt] (eq21) at (eq13.south west) {$\frac{\sum\limits_{j=1}^{m} \delta(s_j,s_u)}{\sum\limits_{i=0}^{l}f(s_u|t_i)} \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l} f(s_j|t_i) \cdot \sum\limits_{i=0}^{l} \delta(t_i,t_v)$};
\node[anchor=east,inner sep=2pt] (eq20) at (eq21.west) {=};
\end{tikzpicture}
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
{\large
\node [anchor=west,minimum height=3em,inner sep=2pt] (eq11) at (0,0) {max};
\node [anchor=west,inner sep=2pt] (eq12) at ([xshift=2pt]eq11.east) {$\Big( \frac{\epsilon}{(l+1)^{m}} \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l}$};
\node [anchor=west,inner sep=2pt] (eq13) at (eq12.east) {$f(s_j|t_i)$};
\node [anchor=west,inner sep=2pt] (eq14) at ([yshift=0.2em]eq13.east) {$\Big)$};
\node [anchor=north west,minimum height=1.8em,inner sep=2pt] (eq21) at ([yshift=-0.5em]eq11.south west) {s.t.};
\node [anchor=west] (eq22) at ([xshift=0.5em,yshift=-0.1em]eq21.east) {\normalsize{for each word $t_y$}:};
\node [anchor=west] (eq23) at ([xshift=0.1em,yshift=-0.0em]eq22.east) {$\sum_{s_x} f(s_x|t_y) = 1$};
{
\node [anchor=west,minimum height=3em,inner sep=2pt,fill=green!20] (eq11) at (0,0) {max};
\node [anchor=west,draw,thin,ublue,inner sep=2pt,fill=blue!20] (eq13) at (eq12.east) {\black{$f(s_j|t_i)$}};
\node [anchor=north west,minimum height=1.8em,inner sep=2pt,fill=purple!20] (eq21) at ([yshift=-0.5em]eq11.south west) {s.t.};
\node [anchor=west,fill=orange!20] (eq23) at ([xshift=0.1em,yshift=-0.0em]eq22.east) {$\sum_{s_x} f(s_x|t_y) = 1$};
}
\begin{pgfonlayer}{background}
{
\node[rectangle,red,inner sep=0pt,fill=red!20] [fit = (eq12) (eq13) (eq14)] (eq1full) (eq1obj) {};
}
\end{pgfonlayer}
}
{
\node [anchor=west,draw,fill=green!20] (label1) at ([xshift=-2em,yshift=3em]eq11.north west) {最大化函数};
\node [anchor=west,draw,fill=red!20] (label2) at ([xshift=4em]label1.east) {目标函数};
\node [anchor=west,draw,fill=blue!20] (label3) at ([xshift=4em]label2.east) {参数};
\node [anchor=west,draw,fill=purple!20] (label4) at ([xshift=-2em,yshift=-2.5em]eq21.south west) {subject to=满足...约束};
\node [anchor=west,draw,fill=orange!20] (label5) at ([xshift=3em]label4.east) {翻译概率归一化约束条件};
\draw [<-,thick] ([xshift=-2em]label1.south) .. controls +(south:2em) and +(north:2em) .. (eq11.north);
\draw [<-,thick] ([xshift=-0em]label2.south) .. controls +(south:1.7em) and +(north:1.7em) .. (eq1obj.north);
\draw [<-,thick] ([xshift=-0em]label3.south) .. controls +(south:2.5em) and +(north:2.5em) .. (eq13.north);
\draw [<-,thick] ([xshift=2em]label4.north) .. controls +(north:1.5em) and +(south:1.5em) .. (eq21.south);
\draw [<-,thick] ([xshift=0em]label5.north) .. controls +(north:1.0em) and +(south:1.0em) .. (eq23.south);
}
\end{tikzpicture}
\begin{tikzpicture}
\node [anchor=west,inner sep=2pt,fill=green!20] (eq1) at (0,0) {$L(f,\lambda)$};
\node [anchor=west,inner sep=2pt] (eq2) at (eq1.east) {$=$};
\node [anchor=west,inner sep=2pt] (eq3) at (eq2.east) {$\frac{\epsilon}{(l+1)^{m}} \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l}$};
\node [anchor=west,inner sep=2pt] (eq4) at (eq3.east) {\black{$f(s_j|t_{i})$}};
\node [anchor=west,inner sep=2pt] (eq5) at (eq4.east) {$-$};
\node [anchor=north west,inner sep=2pt] (eq6) at ([yshift=-6pt]eq3.south west) {$\sum_{t_y}$};
\node [anchor=west,inner sep=1pt,minimum height=1.85em] (eq7) at (eq6.east) {$\lambda_{t_y}$};
\node [anchor=west,inner sep=1pt,minimum height=1.5em] (eq8) at ([xshift=3pt]eq7.east) {$(\sum_{s_x}$};
\node [anchor=west,inner sep=1pt,minimum height=1.5em] (eq9) at (eq8.east) {\black{$f(s_x|t_y)$}};
\node [anchor=west,inner sep=1pt,minimum height=1.5em] (eq10) at (eq9.east) {$-1)$};
{
\node [anchor=west,inner sep=2pt,fill=green!20] (eq1) at (0,0) {$L(f,\lambda)$};
\node [anchor=west,inner sep=2pt] (eq2) at (eq1.east) {$=$};
\node [anchor=west,inner sep=2pt] (eq3) at (eq2.east) {$\frac{\epsilon}{(l+1)^{m}} \prod\limits_{j=1}^{m} \sum\limits_{i=0}^{l}$};
\node [anchor=west,inner sep=2pt,draw,ublue,fill=blue!20] (eq4) at (eq3.east) {\black{$f(s_j|t_{i})$}};
\node [anchor=west,inner sep=2pt] (eq5) at (eq4.east) {$-$};
\node [anchor=north west,inner sep=2pt] (eq6) at ([yshift=-6pt]eq3.south west) {$\sum_{t_y}$};
\node [anchor=west,inner sep=1pt,fill=purple!20,minimum height=1.85em] (eq7) at (eq6.east) {$\lambda_{t_y}$};
\node [anchor=west,inner sep=1pt,minimum height=1.5em] (eq8) at ([xshift=3pt]eq7.east) {$(\sum_{s_x}$};
\node [anchor=west,inner sep=1pt,draw,ublue,fill=blue!20,minimum height=1.5em] (eq9) at (eq8.east) {\black{$f(s_x|t_y)$}};
\node [anchor=west,inner sep=1pt,minimum height=1.5em] (eq10) at (eq9.east) {$-1)$};
}
\begin{pgfonlayer}{background}
\node[rectangle,red,inner sep=2pt,fill=red!20] [fit = (eq3) (eq4)] (oldobj) {};
{
\node[rectangle,red,inner sep=2pt,fill=orange!20] [fit = (eq8) (eq9) (eq10)] (constraint) {};
}
\end{pgfonlayer}
\node [anchor=west,draw,fill=green!20] (label1) at ([xshift=-2em,yshift=3em]eq1.north west) {新目标函数};
\node [anchor=west,draw,fill=red!20] (label2) at ([xshift=2em]label1.east) {旧目标函数};
{
\node [anchor=west,draw,fill=blue!20] (label3) at ([xshift=2em]label2.east) {参数:词翻译概率};
\node [anchor=west,draw,fill=purple!20] (label4) at ([xshift=-4em,yshift=-2.5em]eq6.south west) {参数:拉格朗日乘数};
\node [anchor=west,draw,fill=orange!20] (label5) at ([xshift=3em]label4.east) {参数约束条件};
}
\draw [<-,thick] ([xshift=-1em]label1.south) .. controls +(south:2em) and +(north:2em) .. (eq1.north);
\draw [<-,thick] ([xshift=-1em]label2.south) .. controls +(south:1.0em) and +(north:1.0em) .. (oldobj.north);
{
\draw [<-,thick] ([xshift=0em]label3.south) .. controls +(south:6.5em) and +(north:1.5em) .. (eq9.north);
\draw [<-,thick] ([xshift=0em]label3.south) .. controls +(south:1.5em) and +(north:1.5em) .. (eq4.north);
\draw [<-,thick] ([xshift=-2em]label4.north) .. controls +(north:1.5em) and +(south:1.5em) .. (eq7.south);
\draw [<-,thick] ([xshift=0em]label5.north) .. controls +(north:1.5em) and +(south:1.5em) .. (constraint.south);
}
\end{tikzpicture}
......@@ -298,8 +298,66 @@ year={2015}
year={1972},
publisher={Prentice-Hall Englewood Cliffs, NJ}
}
@inproceedings{huang2008advanced,
title={Advanced Dynamic Programming in CL},
author={Huang, Liang},
year={2008}
}
@article{och2004alignment,
title={The alignment template approach to statistical machine translation},
author={Och, Franz Josef and Ney, Hermann},
journal={Computational linguistics},
volume={30},
number={4},
pages={417--449},
year={2004},
publisher={MIT Press}
}
@inproceedings{koehn2003statistical,
title={Statistical phrase-based translation},
author={Koehn, Philipp and Och, Franz Josef and Marcu, Daniel},
booktitle={Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume 1},
pages={48--54},
year={2003},
organization={Association for Computational Linguistics}
}
@article{och2003systematic,
title={A systematic comparison of various statistical alignment models},
author={Och, Franz Josef and Ney, Hermann},
journal={Computational linguistics},
volume={29},
number={1},
pages={19--51},
year={2003},
publisher={MIT Press}
}
@inproceedings{ittycheriah2005maximum,
title={A maximum entropy word aligner for Arabic-English machine translation},
author={Ittycheriah, Abraham and Roukos, Salim},
booktitle={Proceedings of the conference on Human Language Technology and Empirical Methods in Natural Language Processing},
pages={89--96},
year={2005},
organization={Association for Computational Linguistics}
}
@article{xiao2013unsupervised,
title={Unsupervised sub-tree alignment for tree-to-tree translation},
author={Xiao, Tong and Zhu, Jingbo},
journal={Journal of Artificial Intelligence Research},
volume={48},
pages={733--782},
year={2013}
}
@inproceedings{vogel1996hmm,
title={HMM-based word alignment in statistical translation},
author={Vogel, Stephan and Ney, Hermann and Tillmann, Christoph},
booktitle={Proceedings of the 16th conference on Computational linguistics-Volume 2},
pages={836--841},
year={1996},
organization={Association for Computational Linguistics}
}
\ No newline at end of file
......@@ -54,8 +54,7 @@
%----------------------------------------------------------------------------------------
\IfFileExists{C:/WINDOWS/win.ini}
{\newcommand{\mycfont}{you}}
{\newcommand{\mycfont}{gbsn}}
{\newcommand{\mycfont}{song}}
\begin{CJK}{UTF8}{\mycfont}
\end{CJK}
......@@ -102,8 +101,8 @@
%----------------------------------------------------------------------------------------
% CHAPTERS
%----------------------------------------------------------------------------------------
\include{Chapter1/chapter1}
\include{Chapter2/chapter2}
%\include{Chapter1/chapter1}
%\include{Chapter2/chapter2}
\include{Chapter3/chapter3}
......
......@@ -546,9 +546,10 @@ addtohook={%
\newcommand{\parinterval}{\noindent\hspace{2em}}%定义变量替代原来开头的控制缩进
\usepackage{tikz-qtree}
\usepackage{array}
\usepackage{booktabs}
\usepackage{bm}
\usetikzlibrary{shapes.misc}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论