Commit a27ef1c4 by 孟霞

合并分支 'master' 到 'mengxia'

Master

查看合并请求 !887
parents f8d39eca 906e3b82
......@@ -2,7 +2,7 @@
\begin{tikzpicture}
\def\neuronsep{1}
\tikzstyle{neuronnode} = [minimum size=1em,circle,draw,thick,ublue,inner sep=1pt, fill=white,align=center]
\tikzstyle{neuronnode} = [minimum size=1.5em,circle,draw=ublue,very thick,inner sep=0pt, fill=white,align=center]
%standard
......@@ -11,67 +11,115 @@
}
\foreach \n in {1,...,4}{
\node [neuronnode] (neuron1\n) at (1.2\neuronsep ,\n * \neuronsep) {};
\node [neuronnode] (neuron1\n) at (1.5\neuronsep ,\n * \neuronsep) {};
}
\foreach \n in {1,...,4}{
\node [neuronnode] (neuron2\n) at (2.4*\neuronsep ,\n * \neuronsep) {};
\node [neuronnode] (neuron2\n) at (3*\neuronsep ,\n * \neuronsep) {};
}
\node [neuronnode] (neuron3) at (3.6*\neuronsep ,2.5 * \neuronsep) {};
\node [neuronnode] (neuron3) at (4.5*\neuronsep ,2.5 * \neuronsep) {};
\foreach \n in {1,...,4}{
\foreach \m in {1,...,4}{
\draw [->] (neuron0\n.east) -- (neuron1\m.west);
\foreach \n / \o in {1/180,2/165,3/150,4/135}{
\draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron11.\o);
}
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\foreach \m in {2,3}{
\draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron1\m.\o);
}
}
\foreach \n in {1,...,4}{
\foreach \m in {1,...,4}{
\draw [->] (neuron1\n.east) -- (neuron2\m.west);
\foreach \n / \o in {1/225,2/210,3/195,4/180}{
\draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron14.\o);
}
%\foreach \n in {1,...,4}{
% \foreach \m in {1,...,4}{
% \draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron2\m.west);
% }
%}
\foreach \n / \o in {1/180,2/165,3/150,4/135}{
\draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron21.\o);
}
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\foreach \m in {2,3}{
\draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron2\m.\o);
}
}
\foreach \n in {1,...,4}{
\draw [->] (neuron2\n.east) -- (neuron3.west);
\foreach \n / \o in {1/225,2/210,3/195,4/180}{
\draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron24.\o);
}
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\draw [->,line width=0.2mm] (neuron2\n.east) -- (neuron3.\o);
}
%drop
%layer1
\foreach \n in {1,3,4}{
\node [neuronnode] (neuron4\n) at (5*\neuronsep,\n * \neuronsep) {};
\node [neuronnode] (neuron4\n) at (7*\neuronsep,\n * \neuronsep) {};
}
\node [neuronnode,dashed] (neuron42) at (5*\neuronsep,2 * \neuronsep) {};
\node [neuronnode,dashed] (neuron42) at (7*\neuronsep,2 * \neuronsep) {};
%layer1
\foreach \n in {1,2,4}{
\node [neuronnode] (neuron5\n) at (6.2*\neuronsep ,\n * \neuronsep) {};
\node [neuronnode] (neuron5\n) at (8.5*\neuronsep ,\n * \neuronsep) {};
}
\node [neuronnode,dashed] (neuron53) at (6.2*\neuronsep,3 * \neuronsep) {};
\node [neuronnode,dashed] (neuron53) at (8.5*\neuronsep,3 * \neuronsep) {};
%layer3
\foreach \n in {1,4}{
\node [neuronnode] (neuron6\n) at (7.4*\neuronsep ,\n * \neuronsep) {};
\node [neuronnode] (neuron6\n) at (10*\neuronsep ,\n * \neuronsep) {};
}
\node [neuronnode,dashed] (neuron62) at (7.4*\neuronsep ,2 * \neuronsep) {};
\node [neuronnode,dashed] (neuron63) at (7.4*\neuronsep ,3 * \neuronsep) {};
\node [neuronnode,dashed] (neuron62) at (10*\neuronsep ,2 * \neuronsep) {};
\node [neuronnode,dashed] (neuron63) at (10*\neuronsep ,3 * \neuronsep) {};
%layer4
\node [neuronnode] (neuron7) at (8.6*\neuronsep ,2.5 * \neuronsep) {};
\node [neuronnode] (neuron7) at (11.5*\neuronsep ,2.5 * \neuronsep) {};
\foreach \n in {1,3,4}{
\foreach \m in {1,2,4}{
\draw [->] (neuron4\n.east) -- (neuron5\m.west);
}
%\foreach \n in {1,3,4}{
% \foreach \m in {1,2,4}{
% \draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron5\m.west);
% }
%}
\foreach \n / \o in {1/180,3/150,4/135}{
\draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron51.\o);
}
\foreach \n in {1,2,4}{
\foreach \m in {1,4}{
\draw [->] (neuron5\n.east) -- (neuron6\m.west);
\foreach \n / \o in {1/220,3/170,4/140}{
\foreach \m in {2}{
\draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron5\m.\o);
}
}
\foreach \n in {1,4}{
\draw [->] (neuron6\n.east) -- (neuron7.west);
\foreach \n / \o in {1/225,3/195,4/180}{
\draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron54.\o);
}
%\foreach \n in {1,2,4}{
% \foreach \m in {1,4}{
% \draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron6\m.west);
% }
%}
\foreach \n / \o in {1/180,2/165,4/135}{
\draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron61.\o);
}
\foreach \n / \o in {1/225,2/210,4/180}{
\draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron64.\o);
}
%\foreach \n in {1,4}{
% \draw [->,line width=0.2mm] (neuron6\n.east) -- (neuron7.west);
%}
\foreach \n / \o in {1/220,4/140}{
\draw [->,line width=0.2mm] (neuron6\n.east) -- (neuron7.\o);
}
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=5.5em,rounded corners=15pt,align=left,draw,fill=red!15] (n1) at (0,0) {Decoder\\Encoder};
\node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=8em,rounded corners=15pt,align=left,draw,fill=red!15] (n1) at (0,0) {Decoder\\Encoder};
\node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=5.5em,rounded corners=15pt,align=left,draw,fill=green!15] (n2) at ([xshift=10em,yshift=0em]n1.east) {Decoder\\Encoder};
\node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=8em,rounded corners=15pt,align=left,draw,fill=green!15] (n2) at ([xshift=14em,yshift=0em]n1.east) {Decoder\\Encoder};
\node[anchor=south,inner sep=0mm,font=\small] (a1) at ([xshift=0em,yshift=1em]n1.north) {演员$p$};
......@@ -24,8 +24,8 @@
%\draw [->,dotted,very thick] ([xshift=0em,yshift=0em]n1.east) .. controls ([xshift=3em,yshift=-1em]n1.-90) and ([xshift=-3em,yshift=-1em]n2.-90) .. (n2.west);
\node[anchor=west,inner sep=0mm] (n3) at ([xshift=2.1em,yshift=1em]n1.east) {$Q_1,Q_2,\ldots,Q_J$};
\node[anchor=west,inner sep=0mm] (n4) at ([xshift=2.9em,yshift=-1em]n1.east) {$\tilde{{y}}_1,\tilde{{y}}_2,\ldots,\tilde{{y}}_J$};
\node[anchor=west,inner sep=0mm] (n3) at ([xshift=4.1em,yshift=1em]n1.east) {$Q_1,Q_2,\ldots,Q_J$};
\node[anchor=west,inner sep=0mm] (n4) at ([xshift=4.9em,yshift=-1em]n1.east) {$\tilde{{y}}_1,\tilde{{y}}_2,\ldots,\tilde{{y}}_J$};
\draw [->,thick] ([xshift=-0.1em,yshift=0.6em]n2.west) -- ([xshift=0.1em,yshift=0.6em]n1.east);
\draw [->,thick] ([xshift=0.1em,yshift=-0.6em]n1.east) -- ([xshift=-0.1em,yshift=-0.6em]n2.west);
......
\begin{tikzpicture}
\begin{scope}
\tikzstyle{cirnode}=[circle,minimum size=3em,font=\footnotesize,draw]
\tikzstyle{cirnode}=[rectangle,rounded corners=2pt,minimum height=2em,minimum width=3em,font=\footnotesize,draw=blue!50!white!50,fill=blue!20,thick]
\tikzstyle{recnode}=[rectangle,rounded corners=2pt,inner sep=0mm,minimum height=1.8em,minimum width=6em]
\node [anchor=west,cirnode] (n1) at (0, 0) {$\mathbi{h}_{i-2}^l$};
......@@ -11,24 +11,24 @@
\node [anchor=west,cirnode] (n5) at ([xshift=1.2em,yshift=0em]n4.east) {$\mathbi{h}_{i+2}^l$};
\begin{pgfonlayer}{background}
\node [anchor=center,red!30,minimum height=4.5em,minimum width=21em,very thick,draw] (c3) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,ugreen!30,minimum height=4em,minimum width=12.5em,very thick,draw] (c2) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,orange!30,minimum height=3.5em,minimum width=3.6em,very thick,draw] (c1) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,red!30,minimum height=3.5em,minimum width=21em,very thick,draw] (c3) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,ugreen!30,minimum height=3em,minimum width=13em,very thick,draw] (c2) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,orange!30,minimum height=2.5em,minimum width=4em,very thick,draw] (c1) at ([xshift=0em,yshift=0em]n3.center) {};
\end{pgfonlayer}
\node [anchor=south,recnode,fill=red!20] (r1) at ([xshift=-3.5em,yshift=2.5em]n2.north) {$\textrm{head}_1$};
\node [anchor=south,recnode,fill=orange!20] (r2) at ([xshift=0em,yshift=2.5em]n3.north) {$\textrm{head}_2$};
\node [anchor=south,recnode,fill=ugreen!20] (r3) at ([xshift=3.5em,yshift=2.5em]n4.north) {$\textrm{head}_3$};
\node [anchor=south,cirnode] (n6) at ([xshift=0em,yshift=1em]r2.north) {$\mathbi{h}_{i}^{l+1}$};
\node [anchor=south,cirnode] (n6) at ([xshift=0em,yshift=1.5em]r2.north) {$\mathbi{h}_{i}^{l+1}$};
\draw [->,very thick,orange!30] ([xshift=0em,yshift=0em]c1.north) -- ([xshift=0em,yshift=0em]r2.south);
\draw [->,very thick,ugreen!30] ([xshift=3em,yshift=0em]c2.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r3.south);
\draw [->,very thick,red!30] ([xshift=-3em,yshift=0em]c3.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r1.south);
\draw [->] ([xshift=0em,yshift=0em]r1.north) -- ([xshift=0em,yshift=0em]n6.south west);
\draw [->] ([xshift=0em,yshift=0em]r2.north) -- ([xshift=0em,yshift=0em]n6.south);
\draw [->] ([xshift=0em,yshift=0em]r3.north) -- ([xshift=0em,yshift=0em]n6.south east);
\draw [->,red!30,very thick] ([xshift=0em,yshift=0em]r1.north) -- ([xshift=-0.1em,yshift=-0.05em]n6.south);
\draw [->,orange!30,very thick] ([xshift=0em,yshift=0em]r2.north) -- ([xshift=0em,yshift=0em]n6.south);
\draw [->,ugreen!30,very thick] ([xshift=0em,yshift=0em]r3.north) -- ([xshift=0.1em,yshift=-0.05em]n6.south);
\end{scope}
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{node1} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!80]
\tikzstyle{node2} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!40]
\tikzstyle{node3} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!20]
\tikzstyle{node4} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt]
\tikzstyle{node5} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!20]
\tikzstyle{node6} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!40]
\tikzstyle{node7} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!80]
\begin{scope}[scale=1.0]
\foreach \i / \j / \k / \z in
{0/6/1/-3, 1/6/1/-3, 2/6/1/-3, 3/6/1/-3, 4/6/2/-2, 5/6/3/-1, 6/6/4/0,
0/5/1/-3, 1/5/1/-3, 2/5/1/-3, 3/5/2/-2, 4/5/3/-1, 5/5/4/0, 6/5/5/1,
0/4/1/-3, 1/4/1/-3, 2/4/2/-2, 3/4/3/-1, 4/4/4/0, 5/4/5/1, 6/4/6/2,
0/3/1/-3, 1/3/2/-2, 2/3/3/-1, 3/3/4/0, 4/3/5/1, 5/3/6/2, 6/3/7/3,
0/2/2/-2, 1/2/3/-1, 2/2/4/0, 3/2/5/1, 4/2/6/2, 5/2/7/3, 6/2/7/3,
0/1/3/-1, 1/1/4/0, 2/1/5/1, 3/1/6/2, 4/1/7/3, 5/1/7/3, 6/1/7/3,
0/0/4/0, 1/0/5/1, 2/0/6/2, 3/0/7/3, 4/0/7/3, 5/0/7/3, 6/0/7/3}
\node[node\k] (a\i\j) at (2*1em*\i + 0*0em,2*1em*\j + 0*0em) {$\mathbi{w}_{\z}$};
\foreach \i / \j / \k in
{0/6/1, 0/5/2, 0/4/3, 0/3/4, 0/2/5, 0/1/6, 0/0/7}
\node[anchor=east] (n\k) at ([xshift=-0.5em,yshift=0em]a\i\j.west) {\j};
\foreach \i / \j / \k in
{0/0/8, 1/0/9, 2/0/10, 3/0/11, 4/0/12, 5/0/13, 6/0/14}
\node[anchor=north] (n\k) at ([xshift=-0em,yshift=-0.5em]a\i\j.south) {\i};
%\node [anchor=north] (n1) at ([xshift=0em,yshift=0em]a00.south west) {};
\end{scope}
\end{tikzpicture}
\ No newline at end of file
......@@ -5,7 +5,7 @@
\node(river)[word, right of = figure, xshift=5cm, yshift=0.35cm, fill=blue!45]{river};
\node(mountain)[word, above of = river, yshift=0.75cm, fill=blue!45]{mountain};
\node(child)[word, above of = mountain, yshift=0.75cm, fill=blue!15]{child};
\node(man)[word, above of = child, yshift=0.75cm, fill=blue!25]{girl};
\node(woman)[word, above of = child, yshift=0.75cm, fill=blue!25]{girl};
\node(jump)[word, below of = river, yshift=-0.75cm, fill=blue!30]{jump};
\node(bank)[word, below of = jump, yshift=-0.75cm, fill=blue!65]{bank};
\node(sky)[word, below of = bank, yshift=-0.75cm, fill=blue!30]{sky};
......@@ -22,12 +22,12 @@
\draw[->, thick](yn_1)to([yshift=-0.1cm]decoder.south);
\draw[->, thick]([yshift=0.1cm]decoder.north)to(yn_2);
\draw[->, thick, color=blue!45]([xshift=0.05cm]river.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!45]([xshift=0.05cm]mountain.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!15]([xshift=0.05cm]child.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!25]([xshift=0.05cm]man.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]jump.east)to([xshift=-0.05cm]cir.west);
\draw[->, very thick, color=blue!65]([xshift=0.05cm]bank.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]sky.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!15]([xshift=0.05cm]tree.east)to([xshift=-0.05cm]cir.west);
\draw[->, thick, color=blue!25]([xshift=0.05cm]woman.east)to([xshift=-0.05cm]cir.north);
\draw[->, thick, color=blue!15]([xshift=0.05cm]child.east)to([yshift=0.7em,xshift=0.4em]cir.west);
\draw[->, thick, color=blue!45]([xshift=0.05cm]mountain.east)to([yshift=0.5em,xshift=0.15em]cir.west);
\draw[->, thick, color=blue!45]([xshift=0.05cm]river.east)to([yshift=0.15em]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]jump.east)to([yshift=-0.15em]cir.west);
\draw[->, very thick, color=blue!65]([xshift=0.05cm]bank.east)to([yshift=-0.5em,xshift=0.15em]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]sky.east)to([yshift=-0.7em,xshift=0.4em]cir.west);
\draw[->, thick, color=blue!15]([xshift=0.05cm]tree.east)to([xshift=-0.05em]cir.south);
\end{tikzpicture}
\ No newline at end of file
......@@ -13,32 +13,32 @@
{
\begin{scope}
\node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {{88}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {{87}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {{45}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.2cm]s3.east) {{47}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{15}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.7cm]s1.east) {{87}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.7cm]s2.east) {{45}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.7cm]s3.east) {{47}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{15}};
\end{scope}
\begin{scope}[yshift=-1cm]
\begin{scope}[yshift=-1.2cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{5}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.2cm]s1.east) {{230}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{500}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{39}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.2cm]s6.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.2cm]s7.east) {{15}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.7cm]s1.east) {{230}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.7cm]s2.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.7cm]s3.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{500}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{39}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.7cm]s6.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.7cm]s7.east) {{15}};
\end{scope}
\begin{scope}[yshift=-2cm]
\begin{scope}[yshift=-2.4cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{975}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.2cm]s2.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {{294}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{69}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{15}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.7cm]s1.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.7cm]s2.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.7cm]s3.east) {{294}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{69}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{15}};
\end{scope}
......
......@@ -9,34 +9,34 @@
\begin{tikzpicture}
\begin{scope}
\node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.2cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {\small{数据}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.2cm]s6.east) {...};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.55cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.55cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {\small{数据}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.55cm]s6.east) {...};
\end{scope}
\begin{scope}[yshift=-1cm]
\begin{scope}[yshift=-1.2cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {现在};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.2cm]s1.east) {已经};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {不少};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {\small{}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.2cm]s6.east) {数据};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.2cm]s7.east) {};
\node[anchor=west] (s9) at ([xshift=0.2cm]s8.east) {...};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.55cm]s1.east) {已经};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.55cm]s3.east) {不少};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {\small{}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.55cm]s6.east) {数据};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.55cm]s7.east) {};
\node[anchor=west] (s9) at ([xshift=0.55cm]s8.east) {...};
\end{scope}
\begin{scope}[yshift=-2cm]
\begin{scope}[yshift=-2.4cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {确实};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.2cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {疑问};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.2cm]s6.east) {...};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.55cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.55cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {疑问};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.55cm]s6.east) {...};
\end{scope}
\end{tikzpicture}
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}
\begin{axis}[
width=10cm, height=4.5cm,
width=12cm, height=4.5cm,
symbolic x coords={未抽取词,do,want,what,am,people,look},
xtick=data,
ytick={0,0.05,0.1,0.15,0.2,0.25},
xlabel={低概率词汇},
ylabel={词汇概率},
legend pos=outer north east,
xlabel style={align=right,xshift=5.3cm,yshift=0.8cm,font=\footnotesize},
xlabel style={align=right,xshift=6.5cm,yshift=0.8cm,font=\footnotesize},
ylabel style={rotate=-90,yshift=2cm,xshift=1cm,font=\footnotesize},
y tick style={opacity=0},
x tick style={opacity=0},
......@@ -24,7 +24,7 @@
ymin=0,
ymax=0.25]
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};
\addplot [ybar,bar shift=2mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)};
\addplot [ybar,bar shift=2.15mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)};
\legend{未平滑,平滑后}
\end{axis}
\end{tikzpicture}
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}
\begin{axis}[
width=12cm,
width=14cm,
height=4cm,
xlabel={{$\funp{P}(x)$}},
ylabel={{$\funp{I}(x)$}},
......
......@@ -10,55 +10,55 @@
\begin{scope}
{\footnotesize
\foreach \i in {1,...,5}{
\node [draw,thick,minimum size=10pt] at (\i,0) {1};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {1};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{1}) = 5/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{1}) = 5/30$};
\end{scope}
\begin{scope}[yshift=-2.5em]
{\footnotesize
\foreach \i in {1,...,4}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{red} 2}};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{red} 2}};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{2}) = 4/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{2}) = 4/30$};
\end{scope}
\begin{scope}[yshift=-5.0em]
{\footnotesize
\foreach \i in {1,...,6}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{ublue} 3}};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{ublue} 3}};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{3}) = 6/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{3}) = 6/30$};
\end{scope}
\begin{scope}[yshift=-7.5em]
{\footnotesize
\foreach \i in {1,...,12}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{ugreen} 4}};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{ugreen} 4}};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{4}) = 12/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{4}) = 12/30$};
\end{scope}
\begin{scope}[yshift=-10.0em]
{\footnotesize
\foreach \i in {1,...,2}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{purple} 5}};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{purple} 5}};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{5}) = 2/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{5}) = 2/30$};
\end{scope}
\begin{scope}[yshift=-12.5em]
{\footnotesize
\foreach \i in {1,...,1}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{orange} 6}};
\node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{orange} 6}};
}
}
\node [anchor=west] at (33em,0) {$\funp{P}(\text{6}) = 1/30$};
\node [anchor=west] at (43em,0) {$\funp{P}(\text{6}) = 1/30$};
\end{scope}
\end{tikzpicture}
......
......@@ -13,41 +13,41 @@
{
\begin{scope}
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{4}}};
\end{scope}
\begin{scope}[yshift=-1cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{6}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{6}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{{\color{red}{1}}}};
\end{scope}
\begin{scope}[yshift=-2cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{4}}};
\end{scope}
}
\end{tikzpicture}
......
......@@ -12,41 +12,41 @@
\begin{scope}
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{{\color{ublue} 3}}}};
\end{scope}
\begin{scope}[yshift=-1cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\end{scope}
\begin{scope}[yshift=-2cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{orange} 6}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{orange} 6}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{1}}};
\end{scope}
\end{tikzpicture}
......
......@@ -13,7 +13,7 @@
\draw [->,thick,] (s1.north east) .. controls +(north east:1em) and +(north west:1em).. (t.north west) node[pos=0.5,below] {\tiny{正确翻译}};
\node [draw,red,fill=red!10,thick,anchor=center,circle,inner sep=3.5pt] (s) at ([xshift=13em,yshift=0em]s1.east) {\black{$\seq{s}$}};
\node [draw,red,fill=red!10,thick,anchor=center,circle,inner sep=3.5pt] (s) at ([xshift=14em,yshift=0em]s1.east) {\black{$\seq{s}$}};
\node [draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t1) at ([xshift=1in]s.east) {\black{$\seq{t}_1$}};
\node [draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t2) at ([xshift=3em,yshift=2em]t1.north east) {\black{$\seq{t}_2$}};
\node [draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t3) at ([xshift=1em,yshift=4em]t1.north east) {\black{$\seq{t}_3$}};
......@@ -29,7 +29,7 @@
\draw [->,thick] (s.south east) .. controls +(300:3em) and +(south west:1em).. (t4.south west) node[pos=0.5,below] {\tiny{$\funp{P}(\seq{t}_4|\seq{s})=0.1$}};
\node [anchor=center] (foot1) at ([xshift=3.8em,yshift=-3.5em]s1.south) {\small{(a) 人的翻译候选空间}};
\node [anchor=center] (foot2) at ([xshift=7em,yshift=-3.5em]s.south) {\small{(b) 机器的翻译候选空间}};
\node [anchor=center] (foot2) at ([xshift=8em,yshift=-3.5em]s.south) {\small{(b) 机器的翻译候选空间}};
\end{tikzpicture}
......
\begin{tikzpicture}
\begin{scope}[scale=0.8]
\begin{scope}[scale=1.0]
\draw [-,very thick] (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0) sin (7,-1);
\draw [-latex,thick] (-0.5,-1.2) -- (8,-1.2);
......
......@@ -4,32 +4,32 @@
\definecolor{ugreen}{rgb}{0,0.5,0}
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\node [anchor=west] (sent) at (0,0) {\scriptsize{源文:我对你感到满意}};
\node [anchor=west,draw,thick,minimum width=10.5em,minimum height=1.2em] (sent-1) at (0,0) {};
\node [anchor=west] (sent) at (0,0) {\small{源文:我对你感到满意}};
\node [anchor=west,draw,thick,minimum width=11.7em,minimum height=1.5em] (sent-1) at (0,0) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,red] (s1) at ([xshift=0.15em,yshift=-2.7em]sent.south west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ugreen] (s2) at ([xshift=1.3em]s1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,orange] (s3) at ([xshift=1.3em]s2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ublue] (s4) at ([xshift=1.3em]s3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,purple] (s5) at ([xshift=1.3em]s4.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,red] (s1) at ([xshift=0.15em,yshift=-3.0em]sent.south west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ugreen] (s2) at ([xshift=1.5em]s1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,orange] (s3) at ([xshift=1.5em]s2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ublue] (s4) at ([xshift=1.5em]s3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,purple] (s5) at ([xshift=1.5em]s4.east) {};
{
\node [anchor=west,draw,thick,circle,minimum size=0.3em,red,fill=red] (t1) at ([yshift=-2.5em]s1.west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ugreen,fill=ugreen] (t2) at ([xshift=1.3em]t1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,orange,fill=orange] (t3) at ([xshift=1.3em]t2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ublue,fill=ublue] (t4) at ([xshift=1.3em]t3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,purple,fill=purple] (t5) at ([xshift=1.3em]t4.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,red,fill=red] (t1) at ([yshift=-2.5em]s1.west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ugreen,fill=ugreen] (t2) at ([xshift=1.5em]t1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,orange,fill=orange] (t3) at ([xshift=1.5em]t2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ublue,fill=ublue] (t4) at ([xshift=1.5em]t3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,purple,fill=purple] (t5) at ([xshift=1.5em]t4.east) {};
}
{
\node [anchor=west,draw,thick,circle,minimum size=0.3em,red,fill=red] (ft1) at ([yshift=-2.5em]t1.west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ublue,fill=ublue] (ft2) at ([xshift=1.3em]ft1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,purple,fill=purple] (ft3) at ([xshift=1.3em]ft2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,ugreen,fill=ugreen] (ft4) at ([xshift=1.3em]ft3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.3em,orange,fill=orange] (ft5) at ([xshift=1.3em]ft4.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,red,fill=red] (ft1) at ([yshift=-2.5em]t1.west) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ublue,fill=ublue] (ft2) at ([xshift=1.5em]ft1.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,purple,fill=purple] (ft3) at ([xshift=1.5em]ft2.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,ugreen,fill=ugreen] (ft4) at ([xshift=1.5em]ft3.east) {};
\node [anchor=west,draw,thick,circle,minimum size=0.5em,orange,fill=orange] (ft5) at ([xshift=1.5em]ft4.east) {};
}
\draw [->,thick,double] ([yshift=-0.1em]sent-1.south) -- ([yshift=-1.0em]sent-1.south);
\draw [->,thick,double] ([yshift=-0.2em]sent-1.south) -- ([yshift=-1.1em]sent-1.south);
{
\draw [->,thick] ([yshift=-0.1em]s1.south) -- ([yshift=0.1em]t1.north);
......@@ -46,38 +46,33 @@
\draw [->,thick] ([yshift=-0.1em]t5.south) -- ([yshift=0.1em]ft3.north);
}
{
\node [anchor=north west] (label1) at ([xshift=0.6em,yshift=0.0em]sent-1.south east) {{分析}};
\node [anchor=north west] (label2) at ([yshift=-1.5em]label1.south west) {{转换}};
\node [anchor=north west] (label3) at ([yshift=-1.1em]label2.south west) {{生成}};
\node [anchor=north west] (label1) at ([xshift=1em,yshift=-0.5em]sent-1.south east) {{分析}};
\node [anchor=north west] (label2) at ([yshift=-1.3em]label1.south west) {{转换}};
\node [anchor=north west] (label3) at ([yshift=-1.0em]label2.south west) {{生成}};
}
{\scriptsize
{\small
\begin{scope}
\node [anchor=west] (ss1) at ([xshift=-1.6em,yshift=1.5em]s1.east) {};
\node [anchor=west] (ss2) at ([xshift=1.4em]ss1.east) {};
\node [anchor=west] (ss3) at ([xshift=1.5em]ss2.east) {};
\node [anchor=west] (ss4) at ([xshift=1.0em]ss3.east) {感到};
\node [anchor=west] (ss5) at ([xshift=0.4em]ss4.east) {满意};
\node [anchor=west] (ss1) at ([xshift=-1.6em,yshift=1.2em]s1.east) {};
\node [anchor=west] (ss2) at ([xshift=1.2em]ss1.east) {};
\node [anchor=west] (ss3) at ([xshift=1.1em]ss2.east) {};
\node [anchor=west] (ss4) at ([xshift=0.5em]ss3.east) {感到};
\node [anchor=west] (ss5) at ([xshift=0.2em]ss4.east) {满意};
\end{scope}
\begin{scope}[yshift=-3em]
\node [anchor=west] (tt1) at ([xshift=-1.2em,yshift=-1.5em]ft1.east) {I};
\node [anchor=west] (tt2) at ([xshift=1.7em,yshift=-0.1em]tt1.east) {am};
\node [anchor=west] (tt3) at ([xshift=0.3em,yshift=0.1em]tt2.east) {satisfied};
\node [anchor=west] (tt4) at ([xshift=-0.1em]tt3.east) {with};
\node [anchor=west] (tt5) at ([xshift=0.7em,yshift=-0.2em]tt4.east) {you};
\node [anchor=west] (tt2) at ([xshift=1.4em,yshift=-0.1em]tt1.east) {am};
\node [anchor=west] (tt3) at ([xshift=-0.1em,yshift=0.1em]tt2.east) {satisfied};
\node [anchor=west] (tt4) at ([xshift=-0.5em]tt3.east) {with};
\node [anchor=west] (tt5) at ([xshift=0.3em,yshift=-0.2em]tt4.east) {you};
\end{scope}
}
\node [anchor=west] (sent2) at ([xshift=-3.0em,yshift=-1.8em]tt2.south) {\scriptsize{译文:I am satisfied with you }};
\node [anchor=west,draw,thick,minimum width=10.5em,minimum height=1.2em] (sent-2) at ([xshift=-3.0em,yshift=-1.8em]tt2.south) {};
\node [anchor=west] (sent2) at ([xshift=-3.2em,yshift=-2.0em]tt2.south) {\small{译文:I am satisfied with you }};
\node [anchor=west,draw,thick,minimum width=11.7em,minimum height=1.5em] (sent-2) at ([xshift=-3.2em,yshift=-2.0em]tt2.south) {};
\draw [->,thick,double] ([yshift=1.1em]sent-2.north) -- ([yshift=0.2em]sent-2.north);
\draw [->,thick,double] ([yshift=1.0em]sent-2.north) -- ([yshift=0.1em]sent-2.north);
\begin{pgfonlayer}{background}
{
%\node[rectangle,draw=ublue,thick, inner sep=0mm] [fit =(sent)] {};
%\node[rectangle,draw=ublue,thick, inner sep=0mm] [fit =(sent2)] {};
}
\end{pgfonlayer}
\end{tikzpicture}
......
......@@ -200,11 +200,12 @@ IBM模型由Peter F. Brown等人于上世纪九十年代初提出\upcite{DBLP:jo
\parinterval 以汉译英为例,当翻译“我”这个单词时,可能直接会想到用“I”、“me”或“I'm”作为它的译文,而几乎不会选择“you”、“satisfied”等含义相差太远的译文。这是为什么呢?如果从统计学的角度来看,无论是何种语料,包括教材、新闻、小说等,绝大部分情况下“我”都翻译成了“I”、“me”等,几乎不会看到我被翻译成“you”或“satisfied”的情况。可以说“我”翻译成“I”、“me”等属于高频事件,而翻译成“you”、“satisfied”等属于低频或小概率事件。因此人在翻译时也是选择在统计意义上概率更大的译文,这也间接反映出统计模型可以在一定程度上描述人的翻译习惯和模式。
\parinterval\ref{tab:5-1}展示了汉语到英语的单词翻译实例及相应的翻译概率。可以看到,“我”翻译成“I”的概率最高,为0.5。这是符合人类对翻译的认知的。此外,这种概率化的模型避免了非0即1的判断,所有的译文都是可能的,只是概率不同。这也使得统计模型可以覆盖更多的翻译现象,甚至捕捉到一些人所忽略的情况。\\ \\ \\
\parinterval\ref{tab:5-1}展示了汉语到英语的单词翻译实例及相应的翻译概率。可以看到,“我”翻译成“I”的概率最高,为0.5。这是符合人类对翻译的认知的。此外,这种概率化的模型避免了非0即1的判断,所有的译文都是可能的,只是概率不同。这也使得统计模型可以覆盖更多的翻译现象,甚至捕捉到一些人所忽略的情况。
%----------------------------------------------
\begin{table}[htp]
\centering
\caption{汉译英单词翻译概率}
\begin{tabular}{c | c c}
源语言 & 目标语言 & 翻译概率 \\ \hline
& I & 0.50 \\
......@@ -214,7 +215,6 @@ IBM模型由Peter F. Brown等人于上世纪九十年代初提出\upcite{DBLP:jo
& am & 0.10 \\
... & ... & ... \\
\end{tabular}
\caption{汉译英单词翻译概率}
\label{tab:5-1}
\end{table}
%----------------------------------------------
......@@ -1033,8 +1033,14 @@ f(s_u|t_v) &= &\lambda_{t_v}^{-1} \cdot \funp{P}(\seq{s}| \seq{t}) \cdot c_{\mat
f(s_u|t_v)&=&\frac{c_{\mathbb{E}}(s_u|t_v;\seq{s},\seq{t})} { \sum\limits_{s'_u} c_{\mathbb{E}}(s'_u|t_v;\seq{s},\seq{t}) }
\label{eq:5-44}
\end{eqnarray}
%----------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter5/Figures/figure-calculation-formula&iterative-process-of-function}
\caption{$f(s_u|t_v)$的计算公式和迭代过程}
\label{fig:5-27}
\end{figure}
%----------------------------------------------
\parinterval 进一步,假设有$K$个互译的句对(称作平行语料):
$\{(\seq{s}^{[1]},\seq{t}^{[1]}),...,(\seq{s}^{[K]},\seq{t}^{[K]})\}$$f(s_u|t_v)$的期望频次为:
......@@ -1048,15 +1054,6 @@ c_{\mathbb{E}}(s_u|t_v)&=&\sum\limits_{k=1}^{K} c_{\mathbb{E}}(s_u|t_v;s^{[k]},
%----------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter5/Figures/figure-calculation-formula&iterative-process-of-function}
\caption{$f(s_u|t_v)$的计算公式和迭代过程}
\label{fig:5-27}
\end{figure}
%----------------------------------------------
%----------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter5/Figures/figure-em-algorithm-flow-chart}
\caption{EM算法流程图(IBM模型1)}
\label{fig:5-28}
......
......@@ -27,7 +27,7 @@
\node[anchor=west,inner sep=0pt,font=\footnotesize,rotate=45] at([xshift=0.1cm+\bc*4,yshift=0.4em]o.east){you};
\node[anchor=east,inner sep=0pt,font=\small] at([xshift=\bc*4.5,yshift=-1.0cm-\bc*4]o.west){(a)对齐实例1};
\end{scope}
\begin{scope}[xshift=15.0em]
\begin{scope}[xshift=17.0em]
\filldraw [fill=white,drop shadow] (0,0) rectangle (\bc*8,\bc*6);
\filldraw [fill=black] (0,\bc*5) rectangle (\bc*1,\bc*6);
\filldraw [fill=black] (\bc*1,\bc*3) rectangle (\bc*2,\bc*4);
......
......@@ -6,19 +6,19 @@
\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$}:满意};
\node [anchor=west] (s1) at (0,0) {\small{$s_1$}:我};
\node [anchor=west] (s2) at ([xshift=0.5em]s1.east) {\small{$s_2$}:对};
\node [anchor=west] (s3) at ([xshift=0.5em]s2.east) {\small{$s_3$}:你};
\node [anchor=west] (s4) at ([xshift=0.5em]s3.east) {\small{$s_4$}:感到};
\node [anchor=west] (s5) at ([xshift=0.5em]s4.east) {\small{$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=1.0em,yshift=0.0em]t1.east) {\footnotesize{$t_2$}:am};
\node [anchor=west] (t3) at ([xshift=0.3em,yshift=0.0em]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.0em]t4.east) {\footnotesize{$t_5$}:you};
\begin{scope}[yshift=-3.5em]
\node [anchor=west] (t1) at (0.45em,0) {\small{$t_1$}:I};
\node [anchor=west] (t2) at ([xshift=1.0em,yshift=0.0em]t1.east) {\small{$t_2$}:am};
\node [anchor=west] (t3) at ([xshift=0.3em,yshift=0.0em]t2.east) {\small{$t_3$}:satisfied};
\node [anchor=west] (t4) at ([xshift=0.3em]t3.east) {\small{$t_4$}:with};
\node [anchor=west] (t5) at ([xshift=0.3em,yshift=-0.0em]t4.east) {\small{$t_5$}:you};
\end{scope}
......
......@@ -154,8 +154,6 @@
\parinterval 需要注意的是,公式\eqref{eq:6-7}之所以被看作是一种隐马尔可夫模型,是由于其形式与标准的一阶隐马尔可夫模型无异。$\funp{P}(a_{j}|a_{j-1},l)$可以被看作是一种状态转移概率,$f(s_{j}|t_{a_j})$可以被看作是一种发射概率。关于隐马尔可夫模型具体的数学描述也可参考{\chapterthree}中的相关内容。
%----------------------------------------------------------------------------------------
% NEW SECTION
%----------------------------------------------------------------------------------------
......@@ -175,6 +173,15 @@
\parinterval 这里将会给出另一个翻译模型,能在一定程度上解决上面提到的问题\upcite{DBLP:journals/coling/BrownPPM94,och2003systematic}。该模型把目标语言生成源语言的过程分解为如下几个步骤:首先,确定每个目标语言单词生成源语言单词的个数,这里把它称为{\small\sffamily\bfseries{繁衍率}}\index{繁衍率}{\small\sffamily\bfseries{产出率}}\index{产出率}(Fertility)\index{Fertility};其次,决定目标语言句子中每个单词生成的源语言单词都是什么,即决定生成的第一个源语言单词是什么,生成的第二个源语言单词是什么,以此类推。这样每个目标语言单词就对应了一个源语言单词列表;最后把各组源语言单词列表中的每个单词都放置到合适的位置上,完成目标语言译文到源语言句子的生成。
%----------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter6/Figures/figure-probability-translation-process}
\caption{基于产出率的翻译模型执行过程}
\label{fig:6-5}
\end{figure}
%----------------------------------------------
\parinterval 对于句对$(\seq{s},\seq{t})$,令$\varphi$表示产出率,同时令${\tau}$表示每个目标语言单词对应的源语言单词列表。图{\ref{fig:6-5}}描述了一个英语句子生成汉语句子的过程。
\begin{itemize}
......@@ -184,18 +191,8 @@
\item 其次,确定英语句子中每个单词生成的汉语单词列表。比如“Scientists”生成“科学家”和“们”两个汉语单词,可表示为${\tau}_1=\{{\tau}_{11}=\textrm{“科学家”},{\tau}_{12}=\textrm{“们”}\}$。 这里用特殊的空标记NULL表示翻译对空的情况;
\vspace{0.3em}
\item 最后,把生成的所有汉语单词放在合适的位置。比如“科学家”和“们”分别放在$\seq{s}$的位置1和位置2。可以用符号$\pi$记录生成的单词在源语言句子$\seq{s}$中的位置。比如“Scientists” 生成的汉语单词在$\seq{s}$ 中的位置表示为${\pi}_{1}=\{{\pi}_{11}=1,{\pi}_{12}=2\}$
\vspace{0.3em}
\end{itemize}
%----------------------------------------------
\begin{figure}[htp]
\centering
\input{./Chapter6/Figures/figure-probability-translation-process}
\caption{基于产出率的翻译模型执行过程}
\label{fig:6-5}
\end{figure}
%----------------------------------------------
\parinterval 为了表述清晰,这里重新说明每个符号的含义。$\seq{s}$$\seq{t}$$m$$l$分别表示源语言句子、目标语言译文、源语言单词数量以及译文单词数量。$\mathbf{\varphi}$$\mathbf{\tau}$$\mathbf{\pi}$分别表示产出率、生成的源语言单词以及它们在源语言句子中的位置。${\varphi}_{i}$表示第$i$个目标语言单词$t_i$的产出率。${\tau}_{i}$${\pi}_i$ 分别表示$t_i$生成的源语言单词列表及其在源语言句子$\seq{s}$中的位置列表。
\parinterval 可以看出,一组$\tau$$\pi$(记为$<\tau,\pi>$)可以决定一个对齐$\seq{a}$和一个源语句子$\seq{s}$
......
......@@ -5,9 +5,9 @@
\begin{scope}[minimum height = 18pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=gray!20] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=gray!20] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=gray!20] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
......@@ -16,16 +16,16 @@
\begin{scope}[xshift=15em,minimum height = 18pt]
\begin{scope}[xshift=17em,minimum height = 18pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=gray!20] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=red!20] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=gray!20] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
{
\node[anchor=west,fill=red!20] (t1) at (0, -1.5) {\footnotesize{There is}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t1) at (0, -1.5) {\footnotesize{There is}};
\path[<->, thick] (s2.south) edge (t1.north);
}
......@@ -37,17 +37,17 @@
\begin{scope}[yshift=-9.5em,minimum height = 18pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=gray!20] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=gray!20] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=red!20] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
{
\node[anchor=west,fill=gray!20] (t1) at (0, -1.5) {\footnotesize{There is}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t1) at (0, -1.5) {\footnotesize{There is}};
\path[<->, thick] (s2.south) edge (t1.north);
}
{
\node[anchor=west,fill=red!20] (t2) at ([xshift=1em]t1.east) {\footnotesize{an apple}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=1em]t1.east) {\footnotesize{an apple}};
\path[<->, thick] (s3.south) edge (t2.north);
}
\node[anchor=north] (l) at ([xshift=7em,yshift=-0.5em]t0.south) {\small{(c)\ 找到译文第二个词}};
......@@ -56,24 +56,24 @@
\begin{scope}[xshift=15em,yshift=-9.5em,minimum height = 18pt]%[scale=0.5]
\begin{scope}[xshift=17em,yshift=-9.5em,minimum height = 18pt]%[scale=0.5]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=red!20] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=gray!20] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=gray!20] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\footnotesize{桌子 上}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em]s1.east) {\footnotesize{}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=1em]s2.east) {\footnotesize{一个 苹果}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
{
\node[anchor=west,fill=gray!20] (t1) at (0, -1.5) {\footnotesize{There is}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t1) at (0, -1.5) {\footnotesize{There is}};
\path[<->, thick] (s2.south) edge (t1.north);
}
{
\node[anchor=west,fill=gray!20] (t2) at ([xshift=1em]t1.east) {\footnotesize{an apple}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=1em]t1.east) {\footnotesize{an apple}};
\path[<->, thick] (s3.south) edge (t2.north);
}
{
\node[anchor=west,fill=red!20] (t3) at ([xshift=1em]t2.east) {\footnotesize{on the table}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t3) at ([xshift=1em]t2.east) {\footnotesize{on the table}};
\path[<->, thick] (s1.south) edge (t3.north);
}
\node[anchor=north] (l) at ([xshift=7em,yshift=-0.5em]t0.south) {\small{(d)\ 找到译文第三个词}};
......
......@@ -87,9 +87,9 @@
\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=green,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) {};
\node [rectangle,draw=green,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (c03) (c21)] (phrase3) {};
\end{pgfonlayer}
\end{scope}
......
......@@ -6,17 +6,17 @@
\begin{scope}[minimum height = 18pt]
{\small
\node[anchor=north,fill=green!20] (s1) at (0,0) {进口};
\node [anchor=north,fill=red!20] (s2) at ([xshift=4em,yshift=0em]s1.north) {大幅度};
\node[anchor=north,fill=blue!20] (s3) at ([xshift=4.5em,yshift=0em]s2.north) {下降 了};
\node[anchor=north,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0,0) {进口};
\node [anchor=north,fill=red!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=4em,yshift=0em]s1.north) {大幅度};
\node[anchor=north,fill=blue!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=4.5em,yshift=0em]s2.north) {下降 了};
\node[anchor=west,fill=green!20] (t1) at ([xshift=0em,yshift=-4em]s1.west) {The imports have};
\node[anchor=north,fill=red!20] (t2) at ([xshift=8em,yshift=0em]t1.north) {drastically};
\node[anchor=north,fill=blue!20] (t3) at ([xshift=5.7em,yshift=0em]t2.north) {fallen};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t1) at ([xshift=0em,yshift=-4em]s1.west) {The imports have};
\node[anchor=north,fill=red!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=8em,yshift=0em]t1.north) {drastically};
\node[anchor=north,fill=blue!20,draw,thick,rounded corners=0.3em] (t3) at ([xshift=5.7em,yshift=0em]t2.north) {fallen};
\path[<->, thick] (s1.south) edge (t1.north);
\path[<->, thick] (s2.south) edge (t2.north);
\path[<->, thick] (s3.south) edge (t3.north);
\path[<->, thick] ([yshift=-0.1em]s1.south) edge ([yshift=0.1em]t1.north);
\path[<->, thick] ([yshift=-0.1em]s2.south) edge ([yshift=0.1em]t2.north);
\path[<->, thick] ([yshift=-0.1em]s3.south) edge ([yshift=0.1em]t3.north);
}
\node[anchor=south] (s0) at ([xshift=-2em,yshift=0em]s1.south) {$\seq{s}$};
......
......@@ -66,10 +66,10 @@
}
\begin{pgfonlayer}{background}
{
\node [rectangle,inner sep=0.1em,fill=ugreen!10] [fit = (line1)] (box1) {};
\node [rectangle,inner sep=0.1em,fill=green!10,draw,thick,rounded corners=0.3em] [fit = (line1)] (box1) {};
}
{
\node [rectangle,inner sep=0.1em,fill=red!10] [fit = (line2) (line3)] (box2) {};
\node [rectangle,inner sep=0.1em,fill=red!10,draw,thick,rounded corners=0.3em] [fit = (line2) (line3)] (box2) {};
}
\end{pgfonlayer}
......
......@@ -39,7 +39,7 @@
\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) {\small{$\funp{P}_{\textrm{lex}}(\bar{t}|\bar{s})=\sigma (t_1|s_1)\times$}};
\node[anchor=west] (f1) at ([xshift=4em,yshift=0.8em]a43.east) {\small{$\funp{P}_{\textrm{lex}}(\bar{t}|\bar{s})=\sigma (t_1|s_1)\times$}};
\node[anchor=north] (f2) at ([xshift=5.2em]f1.south) {\small{$\frac{1}{2}(\sigma (t_2|s_2)+\sigma (t_3|s_2))\times$}};
\node[anchor=north west] (f3) at (f2.south west) {\small{$\sigma (N|s_3)\times$}};
\node[anchor=north west] (f4) at (f3.south west) {\small{$\sigma (t_4|s_4)\times$}};
......
......@@ -6,20 +6,20 @@
\begin{scope}[minimum height = 18pt]
{\small
\node[anchor=north,fill=green!20] (s1) at (0,0) {进口};
\node [anchor=west,fill=red!20] (s2) at ([xshift=1em,yshift=0em]s1.east) {大幅度};
\node[anchor=west,fill=blue!20] (s3) at ([xshift=1em,yshift=0em]s2.east) {下降\ \ \ };
\node[anchor=north,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0,0) {进口};
\node [anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em,yshift=0em]s1.east) {大幅度};
\node[anchor=west,fill=blue!20,draw,thick,rounded corners=0.3em] (s3) at ([xshift=1em,yshift=0em]s2.east) {下降\ \ \ };
\node[anchor=west,fill=green!20] (t1) at ([xshift=0em,yshift=-4em]s1.west) {The imports have};
\node[anchor=west,fill=red!20] (t2) at ([xshift=1em,yshift=0em]t1.east) {drastically};
\node[anchor=west,fill=blue!20] (t3) at ([xshift=1em,yshift=0em]t2.east) {fallen};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t1) at ([xshift=0em,yshift=-4em]s1.west) {The imports have};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=1em,yshift=0em]t1.east) {drastically};
\node[anchor=west,fill=blue!20,draw,thick,rounded corners=0.3em] (t3) at ([xshift=1em,yshift=0em]t2.east) {fallen};
\path[<->, thick] (s1.south) edge (t1.north);
\path[<->, thick] (s2.south) edge (t2.north);
\path[<->, thick] (s3.south) edge (t3.north);
\path[<->, thick] ([yshift=-0.1em]s1.south) edge ([yshift=0.1em]t1.north);
\path[<->, thick] ([yshift=-0.1em]s2.south) edge ([yshift=0.1em]t2.north);
\path[<->, thick] ([yshift=-0.1em]s3.south) edge ([yshift=0.1em]t3.north);
}
\node[anchor=south] (s0) at ([xshift=-3em,yshift=0em]s1.south) {源语言:};
\node[anchor=south] (s0) at ([xshift=-3.5em,yshift=0em]s1.south) {源语言:};
\node[anchor=east] (t0) at ([xshift=0em,yshift=-3.5em]s0.east) {目标语言:};
\end{scope}
......
......@@ -60,7 +60,7 @@
\end{scope}
\begin{scope}[xshift = 1.5in, yshift = 1.3in]
\begin{scope}[xshift = 1.7in, yshift = 1.3in]
{\scriptsize
\node (rules) {\textbf{抽取得到的短语:}};
\draw[-] (rules.south west)--([xshift=2.0in]rules.south west);
......
......@@ -50,19 +50,19 @@
{
\node [anchor=west] (p1line1) at ([xshift=4em,yshift=1em]a75.east) {\footnotesize{$\bar{s}_i$: 天气\ \ \ \ \ \ }};
\node [anchor=west] (p1line1) at ([xshift=5em,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=west] (p2line1) at ([xshift=5em]a72.east) {\footnotesize{$\bar{s}_j$: 真\ \ \ \ \ }};
\node [anchor=north west] (p2line2) at ([xshift=0]p2line1.south west) {\footnotesize{$\bar{t}_j$: very\ \ \ good\ \ \ \ \ \ \ \ }};
\node [anchor=east] (p2line3) at ([xshift=0em,yshift=-4em]p1line2.east) {};
\begin{pgfonlayer}{background}
{
\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) (p2line3)] (box2) {};
\node [rectangle,draw=green,thick,inner sep=0.4em,fill=white,drop shadow] [fit = (a33) (a42)] (phrase2) {};
\node [rectangle,inner sep=0.2em,fill=red!15,draw=red,thick] [fit = (p1line1) (p1line2)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=green!15,draw=green,thick] [fit = (p2line1) (p2line2) (p2line3)] (box2) {};
}
\end{pgfonlayer}
......
......@@ -4,9 +4,9 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em];
\tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em];
\tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em];
\tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em,draw,thick];
\tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em,draw,thick];
\tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em,draw,thick];
\node [datanode,anchor=north west,minimum height=1.7em,minimum width=8em] (bitext) at (0,0) {{ \small{训练用双语数据}}};
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (phrase) at ([yshift=-1.5em]bitext.south) {{ \small{短语抽取及打分}}};
......@@ -20,16 +20,16 @@
\node [decodingnode,anchor=north,minimum height=1.7em,minimum width=8em] (decoding) at ([yshift=-2em]reordertable.south) {{ \small{解码器}}};
\draw [->,very thick] ([yshift=-0.1em]bitext.south) -- ([yshift=0.1em]phrase.north);
\draw [->,very thick] (bitext.south east) -- ([yshift=0.1em]reorder.north west);
\draw [->,very thick] ([yshift=-0.1em]monotext.south) -- ([yshift=0.1em]lm.north);
\draw [->,very thick] ([yshift=-0.1em]phrase.south) -- ([yshift=0.1em]phrasetable.north);
\draw [->,very thick] ([yshift=-0.1em]reorder.south) -- ([yshift=0.1em]reordertable.north);
\draw [->,very thick] ([yshift=-0.1em]lm.south) -- ([yshift=0.1em]lmtable.north);
\draw [->,thick] ([yshift=-0.1em]bitext.south) -- ([yshift=0.1em]phrase.north);
\draw [->,thick] (bitext.south east) -- ([yshift=0.1em]reorder.north west);
\draw [->,thick] ([yshift=-0.1em]monotext.south) -- ([yshift=0.1em]lm.north);
\draw [->,thick] ([yshift=-0.1em]phrase.south) -- ([yshift=0.1em]phrasetable.north);
\draw [->,thick] ([yshift=-0.1em]reorder.south) -- ([yshift=0.1em]reordertable.north);
\draw [->,thick] ([yshift=-0.1em]lm.south) -- ([yshift=0.1em]lmtable.north);
\draw [->,very thick] ([yshift=-0.1em]phrasetable.south east) -- ([yshift=0.1em,xshift=-3em]decoding.north);
\draw [->,very thick] ([yshift=-0.1em]reordertable.south) -- ([yshift=0.1em,xshift=0em]decoding.north);
\draw [->,very thick] ([yshift=-0.1em]lmtable.south west) -- ([yshift=0.1em,xshift=3em]decoding.north);
\draw [->,thick] ([yshift=-0.1em]phrasetable.south east) -- ([yshift=0.1em,xshift=-3em]decoding.north);
\draw [->,thick] ([yshift=-0.1em]reordertable.south) -- ([yshift=0.1em,xshift=0em]decoding.north);
\draw [->,thick] ([yshift=-0.1em]lmtable.south west) -- ([yshift=0.1em,xshift=3em]decoding.north);
\end{scope}
\end{tikzpicture}
......
......@@ -6,17 +6,17 @@
\begin{scope}[minimum height = 20pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=green!20] (s1) at (0, 0) {\small{\ \ 桌子\ \ \ \ \;}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\small{\ \ 桌子\ \ \ \ \;}};
\node[anchor=south] (n1) at ([xshift=-2.5em,yshift=-0.5em]s1.north) {\small{1}};
\node[anchor=south] (n2) at ([xshift=-0.7em,yshift=-0.5em]s1.north) {\small{2}};
\node[anchor=south] (n3) at ([xshift=1.2em,yshift=-0.5em]s1.north) {\small{3}};
\node[anchor=south] (n4) at ([xshift=2.7em,yshift=-0.5em]s1.north) {\small{4}};
\node[anchor=west,fill=red!20] (s2) at ([xshift=1em]s1.east) {\small{苹果}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=1em]s1.east) {\small{苹果}};
\node[anchor=south] (n5) at ([yshift=-0.5em]s2.north) {\small{5}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
\node[anchor=west,fill=red!20] (t1) at (0, -1.5) {\small{the apple}};
\node[anchor=west,fill=green!20] (t2) at ([xshift=1.3em]t1.east) {\small{on the table}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t1) at (0, -1.5) {\small{the apple}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=1.3em]t1.east) {\small{on the table}};
\path[<->, thick] (s1.south) edge (t2.north);
\path[<->, thick] (s2.south) edge (t1.north);
......@@ -34,8 +34,8 @@
\node[anchor=north] (d1) at ([xshift=-0.1em,yshift=-0.1em]distance.south) {+4};
\node[anchor=north] (d2) at ([yshift=-1.8em]d1.south) {-5};
\node[anchor=north west,fill=blue!20] (m1) at ([xshift=-1em,yshift=-0.0em]t1.south west) {\small{$\rm{start}_1\ \ -\ \ \rm{end}_{0}\ \ -\ \ 1$\quad =\quad 5\ -\ 0\ -\ 1}};
\node[anchor=north west,fill=blue!20] (m2) at ([xshift=-1em,yshift=-0.0em]t2.south west) {\small{$\rm{start}_2\ \ -\ \ \rm{end}_{1}\ \ -\ \ 1$\quad =\quad 1\ -\ 5\ -\ 1}};
\node[anchor=north west,fill=blue!20,draw,thick,rounded corners=0.3em] (m1) at ([xshift=-1em,yshift=-0.0em]t1.south west) {\small{$\rm{start}_1\ \ -\ \ \rm{end}_{0}\ \ -\ \ 1$\quad =\quad 5\ -\ 0\ -\ 1}};
\node[anchor=north west,fill=blue!20,draw,thick,rounded corners=0.3em] (m2) at ([xshift=-1em,yshift=-0.0em]t2.south west) {\small{$\rm{start}_2\ \ -\ \ \rm{end}_{1}\ \ -\ \ 1$\quad =\quad 1\ -\ 5\ -\ 1}};
\draw[-] ([xshift=0.08in]target.south west)--([xshift=2.4in]target.south west);
......
......@@ -6,15 +6,15 @@
\begin{scope}[minimum height = 20pt]
\node[anchor=east] (s0) at (-0.5em, 0) {$\seq{s}$};
\node[anchor=west,fill=green!20] (s1) at (0, 0) {\footnotesize{在 桌子 上 的}};
\node[anchor=west,fill=red!20] (s2) at ([xshift=1em]s1.east) {\footnotesize{苹果}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (s1) at (0, 0) {\footnotesize{在 桌子 上 的}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (s2) at ([xshift=2em]s1.east) {\footnotesize{苹果}};
\node[anchor=east] (t0) at (-0.5em, -1.5) {$\seq{t}$};
\node[anchor=west,fill=red!20] (t1) at (0, -1.5) {\footnotesize{the apple}};
\node[anchor=west,fill=green!20] (t2) at ([xshift=1em]t1.east) {\footnotesize{on the table}};
\node[anchor=west,fill=red!20,draw,thick,rounded corners=0.3em] (t1) at (0, -1.5) {\footnotesize{the apple}};
\node[anchor=west,fill=green!20,draw,thick,rounded corners=0.3em] (t2) at ([xshift=2em]t1.east) {\footnotesize{on the table}};
\path[<->, thick] (s1.south) edge (t2.north);
\path[<->, thick] (s2.south) edge (t1.north);
\path[<->, thick] ([yshift=-0.1em]s1.south) edge ([yshift=0.1em]t2.north);
\path[<->, thick] ([yshift=-0.1em]s2.south) edge ([yshift=0.1em]t1.north);
\end{scope}
\end{tikzpicture}
......
......@@ -27,7 +27,7 @@
\node[anchor=north] (label3) at ([xshift=0em,yshift=-2.5em]label2.north) {取值};
}
\node[anchor=north] (l1) at ([xshift=0em,yshift=-2.5em]x3.south) {\small{(a)搜索空间}};
\node[anchor=north] (l1) at ([xshift=0em,yshift=-1.0em]x3.south) {\small{(a)搜索空间}};
\end{scope}
\begin{scope}[scale=0.55,xshift=3.2in]
......@@ -68,7 +68,7 @@
\node[anchor=north] (e4) at ([xshift=0,yshift=-0.2em]e3.south) {$w_M = 1.00$};
}
\node[anchor=north] (l1) at ([xshift=0em,yshift=-2.5em]x3.south) {\small{(b)一条搜索路径}};
\node[anchor=north] (l1) at ([xshift=0em,yshift=-1.0em]x3.south) {\small{(b)一条搜索路径}};
\end{scope}
\begin{scope}[scale=0.55,xshift=6.8in]
......@@ -119,6 +119,6 @@
\node[anchor=north] (label2) at ([xshift=0em,yshift=-2.5em]label1.north) {种组合};
}
\node[anchor=north] (l1) at ([xshift=0em,yshift=-2.5em]x3.south) {\small{(c)多条搜索路径}};
\node[anchor=north] (l1) at ([xshift=0em,yshift=-1.0em]x3.south) {\small{(c)多条搜索路径}};
\end{scope}
\end{tikzpicture}
\ No newline at end of file
......@@ -55,14 +55,11 @@
\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.5em,yshift=-1em]p1line3.south west) {\footnotesize{D(discontinuous):非连续调序}};
\node [anchor=north west] (p1line4) at ([xshift=-3.8em,yshift=-1em]p1line3.south west) {\footnotesize{D(discontinuous):非连续调序}};
\node [anchor=east] (p1line5) at ([xshift=0em,yshift=3em]p1line4.east) {};
\node [anchor=east] (p1line6) at ([xshift=0em,yshift=7em]p1line4.east) {};
%\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}
{
\node [rectangle,thick,inner sep=0.3em,fill=blue!40,drop shadow,fill opacity=0.85] [fit = (a05)] (phrase1) {};
......@@ -70,9 +67,9 @@
\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) (p1line6)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=ugreen!10] [fit = (p1line2) (p1line3) (p1line5)] (box2) {};
\node [rectangle,inner sep=0.2em,fill=orange!10] [fit = (p1line4)] (box3) {};
\node [rectangle,inner sep=0.2em,fill=red!10,draw,thick,rounded corners=0.3em] [fit = (p1line1) (p1line6)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=green!10,draw,thick,rounded corners=0.3em] [fit = (p1line2) (p1line3) (p1line5)] (box2) {};
\node [rectangle,inner sep=0.2em,fill=orange!10,draw,thick,rounded corners=0.3em] [fit = (p1line4)] (box3) {};
}
\end{pgfonlayer}
......
......@@ -41,18 +41,18 @@
\node[tgtnode] (tgt7) at ([yshift=-0.5*1.0cm]tgt6.north east) {\scriptsize{?}};
\node[tgtnode] (tgt8) at ([yshift=-0.5*1.0cm]tgt7.north east) {\scriptsize{EOS}};
\node [anchor=west] (p1line1) at ([xshift=4em,yshift=1em]a57.east) {\footnotesize{$\bar{s}_i$: 什么\ \ \ \ \ \ }};
\node [anchor=west] (p1line1) at ([xshift=5em,yshift=1em]a57.east) {\footnotesize{$\bar{s}_i$: 什么\ \ \ \ \ \ }};
\node [anchor=north west] (p1line2) at ([xshift=0]p1line1.south west) {\footnotesize{$\bar{t}_i$: learned\ \ \ nothing\ \ \ ? \ \ \ \ \ \ \ \ \ \ \ \ }};
\node [anchor=west] (p2line1) at ([xshift=4em]a53.east) {\footnotesize{$\bar{s}_j$: 到\ \ \ ?}};
\node [anchor=west] (p2line1) at ([xshift=5em]a53.east) {\footnotesize{$\bar{s}_j$: 到\ \ \ ?}};
\node [anchor=north west] (p2line2) at ([xshift=0]p2line1.south west) {\footnotesize{$\bar{t}_j$: Have\ \ \ you\ \ \ learned\ \ \ nothing}};
\node [anchor=east] (p1line3) at ([xshift=0em,yshift=2.9cm]p2line2.east) {};
\begin{pgfonlayer}{background}
\node [rectangle,draw=red,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (a26) (a44)] (phrase1) {};
\node [rectangle,draw=ugreen,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (a01) (a32)] (phrase2) {};
\node [rectangle,inner sep=0.2em,fill=red!10] [fit = (p1line1) (p1line2) (p1line3)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=green!10] [fit = (p2line1) (p2line2)] (box2) {};
\node [rectangle,draw=green,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (a01) (a32)] (phrase2) {};
\node [rectangle,inner sep=0.2em,fill=red!15,draw=red,thick] [fit = (p1line1) (p1line2) (p1line3)] (box1) {};
\node [rectangle,inner sep=0.2em,fill=green!15,draw=green,thick] [fit = (p2line1) (p2line2)] (box2) {};
\end{pgfonlayer}
\draw [->,thick,dotted] ([yshift=-0.8em]phrase1.east) .. controls +(east:1.5) and +(west:1) .. (box1.west);
......
......@@ -28,7 +28,7 @@
\begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.2em,rounded corners=1pt,fill=blue!10!white] [fit = (c1) (c21) (c3) (c6) (c7) (c8) (c11)] (gl1) {};
\node [rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (c1) (c21) (c3) (c6) (c7) (c8) (c11)] (gl1) {};
\end{pgfonlayer}
\end{scope}
......
......@@ -4,23 +4,23 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle{cnode} = [minimum width=7.0em,minimum height=2.5em,rounded corners=0.2em];
\tikzstyle{xnode} = [minimum width=4.5em,minimum height=2.5em,rounded corners=0.2em];
\tikzstyle{cnode} = [minimum width=7.0em,minimum height=2.5em,rounded corners=0.2em,draw,thick];
\tikzstyle{xnode} = [minimum width=4.5em,minimum height=2.5em,rounded corners=0.2em,draw,thick];
\node[cnode,anchor=south,minimum width=10.0em,fill=green!25,align=center] (cat0) at (0,0) {\footnotesize{(广义上)}\\\footnotesize{基于句法的模型}};
\node[cnode,anchor=north,fill=red!25,align=left] (cat1) at ([xshift=-6.5em,yshift=-2em]cat0.south) {\footnotesize{基于形式文法}\\\footnotesize{的模型}};
\node[cnode,anchor=north,fill=blue!25,align=left] (cat2) at ([xshift=6.5em,yshift=-2em]cat0.south) {\footnotesize{基于语言学}\\\footnotesize{句法的模型}};
\node[cnode,anchor=north,fill=red!25,align=left] (cat1) at ([xshift=-7.5em,yshift=-2em]cat0.south) {\footnotesize{基于形式文法}\\\footnotesize{的模型}};
\node[cnode,anchor=north,fill=blue!25,align=left] (cat2) at ([xshift=7.5em,yshift=-2em]cat0.south) {\footnotesize{基于语言学}\\\footnotesize{句法的模型}};
\node[xnode,anchor=north,fill=red!25,align=left] (itg) at ([xshift=-2.5em,yshift=-2.0em]cat1.south) {\footnotesize{反向转录}\\\footnotesize{文法}};
\node[xnode,anchor=north,fill=red!25,align=left] (hiero) at ([xshift=2.5em,yshift=-2.0em]cat1.south) {\footnotesize{层次短语}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=blue!25,align=left] (s2t) at ([xshift=-5.0em,yshift=-2.0em]cat2.south) {\footnotesize{串到树}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=red!25,align=left] (itg) at ([xshift=-3.5em,yshift=-2.0em]cat1.south) {\footnotesize{反向转录}\\\footnotesize{文法}};
\node[xnode,anchor=north,fill=red!25,align=left] (hiero) at ([xshift=3.5em,yshift=-2.0em]cat1.south) {\footnotesize{层次短语}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=blue!25,align=left] (s2t) at ([xshift=-5.5em,yshift=-2.0em]cat2.south) {\footnotesize{串到树}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=blue!25,align=left] (t2s) at ([xshift=0.0em,yshift=-2.0em]cat2.south) {\footnotesize{树到串}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=blue!25,align=left] (t2t) at ([xshift=5.0em,yshift=-2.0em]cat2.south) {\footnotesize{树到树}\\\footnotesize{模型}};
\node[xnode,anchor=north,fill=blue!25,align=left] (t2t) at ([xshift=5.5em,yshift=-2.0em]cat2.south) {\footnotesize{树到树}\\\footnotesize{模型}};
\draw [-,thick] ([yshift=0.1em,xshift=1em]cat0.south) -- ([xshift=-1.5em,yshift=-0.1em]cat2.north);
\draw [-,thick] ([yshift=0.1em,xshift=-1em]cat0.south) -- ([xshift=1.5em,yshift=-0.1em]cat1.north);
\draw [-,thick] ([yshift=-0.1em,xshift=1em]cat0.south) -- ([xshift=-1.5em,yshift=0.1em]cat2.north);
\draw [-,thick] ([yshift=-0.1em,xshift=-1em]cat0.south) -- ([xshift=1.5em,yshift=0.1em]cat1.north);
\draw [-,thick] ([yshift=0.1em]itg.north) -- ([xshift=-0.5em,yshift=-0.1em]cat1.south);
\draw [-,thick] ([yshift=0.1em]hiero.north) -- ([xshift=0.5em,yshift=-0.1em]cat1.south);
\draw [-,thick] ([yshift=0.1em]s2t.north) -- ([xshift=-0.8em,yshift=-0.1em]cat2.south);
......
......@@ -39,7 +39,7 @@
}
\end{scope}
\begin{scope}[xshift = 1.8in, yshift = 0.1in]
\begin{scope}[xshift = 2.0in, yshift = 0.1in]
\node (rules) {\textbf{层次短语翻译规则:}};
\draw[-] (rules.south west)--([xshift=1.8in]rules.south west);
......
......@@ -6,16 +6,16 @@
\Tree[.S [.NN ] [.VP [.AD ] [.VP [.VV ] [.AS ] ] ] ]
\end{scope}
\begin{scope}[xshift=1.25in,yshift=0.25in]
\begin{scope}[xshift=1.5in,yshift=0.25in]
\node [anchor=north west,align=left] (string1) at (0,0) {[S \\\hspace{1em}NN\\\hspace{1em}VP[\\\hspace{2.5em}AD \\\hspace{2.5em}VP[\\\hspace{4em}VV \\\hspace{4em}AS]]]};
\end{scope}
\begin{scope}[xshift=2.78in,yshift=-0.80in]
\begin{scope}[xshift=3.3in,yshift=-0.80in]
\node [anchor=west,align=left] (string2) at (0,0) {(S NN VP(AD \\ VP(VV AS)))};
\end{scope}
\node [anchor=north west] (cap1) at (-1.5em,-1in) {{(a) 树状表示}};
\node [anchor=west] (cap2) at ([xshift=0.5in]cap1.east) {{(b) 序列表示(缩进)}};
\node [anchor=west] (cap3) at ([xshift=0.3in]cap2.east) {{(c) 序列表示}};
\node [anchor=west] (cap2) at ([xshift=0.7in]cap1.east) {{(b) 序列表示(缩进)}};
\node [anchor=west] (cap3) at ([xshift=0.7in]cap2.east) {{(c) 序列表示}};
}
\end{tikzpicture}
\ No newline at end of file
......@@ -4,9 +4,9 @@
\begin{tikzpicture}
\begin{scope}
\tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em];
\tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em];
\tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em];
\tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em,draw,thick];
\tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em,draw,thick];
\tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em,draw,thick];
\node [datanode,anchor=north west,minimum height=1.7em,minimum width=8em] (bitext) at (0,0) {{ \small{训练用双语数据}}};
\node [modelnode, anchor=north west,minimum height=1.7em,minimum width=8em] (gi) at ([xshift=2em,yshift=-0.2em]bitext.south east) {{ \small{文法(规则)抽取}}};
......@@ -21,18 +21,18 @@
\node [modelnode,anchor=south west,minimum height=1.7em,minimum width=8em] (lm) at ([xshift=2em,yshift=0.2em]tuning.north east) {{ \small{$n$-gram语言建模}}};
\node [datanode,anchor=south west,minimum height=1.7em,minimum width=8em] (lmmodel) at ([xshift=2em,yshift=0.2em]decoding.north east) {{ \small{语言模型}}};
\draw [->,very thick] ([yshift=-0.3em,xshift=0.1em]bitext.east) -- ([yshift=0.1em]gi.north west);
\draw [->,very thick] ([yshift=-0.1em]gi.south west) -- ([yshift=0.3em,xshift=0.1em]birules.east);
\draw [->,very thick] ([yshift=-0.3em,xshift=0.1em]birules.east) -- ([yshift=0.1em]training.north west);
\draw [->,very thick] ([yshift=-0.1em]training.south west) -- ([yshift=0.3em,xshift=0.1em]model.east);
\draw [->,very thick] ([yshift=-0.3em,xshift=0.1em]model.east) -- ([yshift=0.1em]tuning.north west);
\draw [->,very thick] ([yshift=-0.1em]tuning.south) -- ([yshift=0.1em]decoding.north);
\draw [->,very thick] ([yshift=0.3em,xshift=0.1em]tuningdata.east) -- ([yshift=-0.1em]tuning.south west);
\draw [->,thick] ([yshift=-0.3em,xshift=0.1em]bitext.east) -- ([yshift=0.1em]gi.north west);
\draw [->,thick] ([yshift=-0.1em]gi.south west) -- ([yshift=0.3em,xshift=0.1em]birules.east);
\draw [->,thick] ([yshift=-0.3em,xshift=0.1em]birules.east) -- ([yshift=0.1em]training.north west);
\draw [->,thick] ([yshift=-0.1em]training.south west) -- ([yshift=0.3em,xshift=0.1em]model.east);
\draw [->,thick] ([yshift=-0.3em,xshift=0.1em]model.east) -- ([yshift=0.1em]tuning.north west);
\draw [->,thick] ([yshift=-0.1em]tuning.south) -- ([yshift=0.1em]decoding.north);
\draw [->,thick] ([yshift=0.3em,xshift=0.1em]tuningdata.east) -- ([yshift=-0.1em]tuning.south west);
\draw [->,very thick] ([yshift=-0.1em]monotext.south) -- ([yshift=0.1em]lm.north);
\draw [->,very thick] ([yshift=-0.1em]lm.south) -- ([yshift=0.1em]lmmodel.north);
\draw [->,very thick] ([yshift=0.3em,xshift=-0.1em]lmmodel.west) -- ([yshift=-0.1em]tuning.south east);
\draw [->,very thick] ([yshift=-0.3em,xshift=-0.1em]lmmodel.west) -- ([yshift=0.1em]decoding.north east);
\draw [->,thick] ([yshift=-0.1em]monotext.south) -- ([yshift=0.1em]lm.north);
\draw [->,thick] ([yshift=-0.1em]lm.south) -- ([yshift=0.1em]lmmodel.north);
\draw [->,thick] ([yshift=0.3em,xshift=-0.1em]lmmodel.west) -- ([yshift=-0.1em]tuning.south east);
\draw [->,thick] ([yshift=-0.3em,xshift=-0.1em]lmmodel.west) -- ([yshift=0.1em]decoding.north east);
\end{scope}
\end{tikzpicture}
\end{center}
......@@ -32,8 +32,8 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,draw=red,inner sep=1pt,thick,fill=white,drop shadow] [fit = (rule1s1) (rule1s4)] (rule1s) {};
\node [rectangle,draw=red,inner sep=2pt,thick,fill=white,drop shadow] [fit = (rule1t1) (rule1t4)] (rule1t) {};
\node [rectangle,draw=red,inner sep=1pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule1s1) (rule1s4)] (rule1s) {};
\node [rectangle,draw=red,inner sep=2pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule1t1) (rule1t4)] (rule1t) {};
\draw [<->,dotted,thick,red] ([xshift=0.1em]rule1s.east) -- ([xshift=-0.1em]rule1t.west);
}
\end{pgfonlayer}
......@@ -70,8 +70,8 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,draw=blue,inner sep=4pt,thick,fill=white,drop shadow] [fit = (rule2s1) (rule2s3)] (rule2s) {};
\node [rectangle,draw=blue,inner sep=4pt,thick,fill=white,drop shadow] [fit = (rule2t1) (rule2t3)] (rule2t) {};
\node [rectangle,draw=blue,inner sep=4pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule2s1) (rule2s3)] (rule2s) {};
\node [rectangle,draw=blue,inner sep=4pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule2t1) (rule2t3)] (rule2t) {};
\draw [<->,dotted,thick,blue] ([xshift=0.1em]rule2s.east) -- ([xshift=-0.1em]rule2t.west);
}
\end{pgfonlayer}
......@@ -92,8 +92,8 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,draw=ugreen,inner sep=1pt,thick,fill=white,drop shadow] [fit = (rule3s1) (rule3s2)] (rule3s) {};
\node [rectangle,draw=ugreen,inner sep=2pt,thick,fill=white,drop shadow] [fit = (rule3t1) (rule3t2)] (rule3t) {};
\node [rectangle,draw=ugreen,inner sep=1pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule3s1) (rule3s2)] (rule3s) {};
\node [rectangle,draw=ugreen,inner sep=2pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule3t1) (rule3t2)] (rule3t) {};
\draw [<->,dotted,thick,ugreen] ([xshift=0.1em]rule3s.east) -- ([xshift=-0.1em]rule3t.west);
}
\end{pgfonlayer}
......@@ -122,8 +122,8 @@
\begin{pgfonlayer}{background}
{
\node [rectangle,draw=orange,inner sep=4pt,thick,fill=white,drop shadow] [fit = (rule4s1) (rule4s3)] (rule4s) {};
\node [rectangle,draw=orange,inner sep=4pt,thick,fill=white,drop shadow] [fit = (rule4t1) (rule4t3)] (rule4t) {};
\node [rectangle,draw=orange,inner sep=4pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule4s1) (rule4s3)] (rule4s) {};
\node [rectangle,draw=orange,inner sep=4pt,thick,fill=white,drop shadow,rounded corners=0.3em] [fit = (rule4t1) (rule4t3)] (rule4t) {};
\draw [<->,dotted,thick,orange] ([xshift=0.1em]rule4s.east) -- ([xshift=-0.1em]rule4t.west);
}
\end{pgfonlayer}
......
......@@ -65,7 +65,7 @@
\end{scope}
\begin{scope} [yshift = -1.87in, xshift = 1.9in]
\begin{scope} [yshift = -1.87in, xshift = 2.2in]
{
\begin{scope}[level distance=20pt]
\node[scale=0.8, inner sep=0.1cm,align=center,draw] (cfrag1) at
......
......@@ -7130,7 +7130,7 @@ author = {Yoshua Bengio and
@inproceedings{Katharopoulos2020TransformersAR,
title={Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention},
author={Angelos Katharopoulos and Apoorv Vyas and Nikolaos Pappas and Franccois Fleuret},
publisher={CoRR},
publisher={International Conference on Machine Learning},
year={2020},
volume={abs/2006.16236}
}
......@@ -9331,6 +9331,20 @@ author = {Zhuang Liu and
publisher = {Conference on Empirical Methods in Natural Language Processing},
year = {2016}
}
@inproceedings{tu2017neural,
title={Neural machine translation with reconstruction},
author={Tu, Zhaopeng and Liu, Yang and Shang, Lifeng and Liu, Xiaohua and Li, Hang},
publisher={AAAI Conference on Artificial Intelligence},
volume={31},
number={1},
year={2017}
}
@inproceedings{li2020train,
title={Train large, then compress: Rethinking model size for efficient training and inference of transformers},
author={Li, Zhuohan and Wallace, Eric and Shen, Sheng and Lin, Kevin and Keutzer, Kurt and Klein, Dan and Gonzalez, Joseph E},
publisher={arXiv preprint arXiv:2002.11794},
year={2020}
}
%%%%% chapter 15------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
......@@ -600,6 +600,7 @@ addtohook={%
%----------------------------------------------------------------------------------------
\usepackage{pgffor}%图片中使用\foreach语句
%\usepackage{ulem}%使用/sout
\usepackage{soul}
%----------------------------------------------------------------------------------------
% Chapter 6
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论