figure-translation-hypothesis-extension.tex 5.6 KB
Newer Older
曹润柘 committed
1 2 3 4 5 6
%%%------------------------------------------------------------------------------------------------------------
%%% 什么是解码
\begin{center}
\begin{tikzpicture}
\begin{scope}
{
曹润柘 committed
7
\node [anchor=north,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h0) at (0,0) {\small{null}};
曹润柘 committed
8 9
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west) {\tiny{{\color{white} \textbf{0}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt0) at (h0.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=1}}}};
曹润柘 committed
10 11 12
}

{
曹润柘 committed
13 14 15
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h1) at ([xshift=3em]h0.east) {\small{on}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h2) at ([xshift=3em,yshift=3em]h0.east) {\small{table}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h3) at ([xshift=3em,yshift=-3em]h0.east) {\small{there is}};
曹润柘 committed
16 17 18 19 20 21
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl1) at (h1.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl2) at (h2.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl3) at (h3.north west) {\tiny{{\color{white} \textbf{3}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt1) at (h1.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.2}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt2) at (h2.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.3}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt3) at (h3.south) {\footnotesize{{\color{white} \textbf{P=0.5}}}};
曹润柘 committed
22

曹润柘 committed
23 24 25
\draw [->,very thick,ublue] ([xshift=0.1em]h0.east) -- ([xshift=-0.1em]h1.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h0.east) -- ([xshift=-0.1em]h2.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h0.east) -- ([xshift=-0.1em]h3.west);
曹润柘 committed
26 27 28
}

{
曹润柘 committed
29 30 31 32 33
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h4) at ([xshift=3em,yshift=-1.8em]h3.east) {\small{one}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h5) at ([xshift=3em,yshift=1.2em]h3.east) {\small{an apple}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=3.5em] (h6) at ([xshift=3em,yshift=1.2em]h1.east) {\small{table}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4em] (h7) at ([xshift=3em,yshift=1.2em]h5.east) {\small{on the table}};
\node [anchor=west,inner sep=2pt,fill=red!40,minimum height=2em,minimum width=4.6em] (h8) at ([xshift=3em,yshift=-2em]h5.east) {\small{\ \;apple}};
曹润柘 committed
34

曹润柘 committed
35 36 37 38 39
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl4) at (h4.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl5) at (h5.north west) {\tiny{{\color{white} \textbf{4-5}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl6) at (h6.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl7) at (h7.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north west,inner sep=1.5pt,fill=black] (hl8) at (h8.north west) {\tiny{{\color{white} \textbf{5}}}};
曹润柘 committed
40

曹润柘 committed
41 42 43 44 45
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt4) at (h4.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.1}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt5) at (h5.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.4}}}};
\node [anchor=north,inner sep=1pt,minimum width=3.5em,fill=black] (pt6) at (h6.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.3}}}};
\node [anchor=north,inner sep=1pt,minimum width=4.6em,fill=black] (pt7) at (h7.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.4}}}};
\node [anchor=north,inner sep=1pt,minimum width=4.6em,fill=black] (pt8) at (h8.south) {\footnotesize{{\color{white} \textbf{$\funp{P}$=0.2}}}};
曹润柘 committed
46

曹润柘 committed
47 48
\draw [->,very thick,ublue] ([xshift=0.1em]h6.east) -- ([xshift=1em,yshift=0.7em]h6.east);
\draw [->,very thick,ublue] ([xshift=0.1em]h6.east) -- ([xshift=1em,yshift=-0.7em]h6.east);
曹润柘 committed
49

曹润柘 committed
50 51
\draw [->,very thick,ublue] ([xshift=0.1em]h2.east) -- ([xshift=1em,yshift=0.7em]h2.east);
\draw [->,very thick,ublue] ([xshift=0.1em]h2.east) -- ([xshift=1em,yshift=-0.7em]h2.east);
曹润柘 committed
52

曹润柘 committed
53
\draw [->,very thick,ublue] ([xshift=0.1em]h1.east) -- ([xshift=1em,yshift=0.7em]h1.east);
曹润柘 committed
54

曹润柘 committed
55 56 57
\draw [->,very thick,ublue] ([xshift=0.1em]h3.east) -- ([xshift=-0.1em]h4.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h3.east) -- ([xshift=-0.1em]h5.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h3.east) -- ([xshift=-0.1em]h6.west);
曹润柘 committed
58

曹润柘 committed
59 60
\draw [->,very thick,ublue] ([xshift=0.1em]h5.east) -- ([xshift=-0.1em]h7.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h5.east) -- ([xshift=1em,yshift=-0.7em]h5.east);
曹润柘 committed
61

曹润柘 committed
62 63
\draw [->,very thick,ublue] ([xshift=0.1em]h4.east) -- ([xshift=-0.1em]h8.west);
\draw [->,very thick,ublue] ([xshift=0.1em]h4.east) -- ([xshift=1em,yshift=-0.7em]h4.east);
曹润柘 committed
64 65 66
}

{
曹润柘 committed
67 68
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.6em]h0.west) -- ([xshift=0.0em,yshift=-0.6em]h0.east) -- ([xshift=-0.2em,yshift=-0.6em]h3.west) -- ([xshift=0.0em,yshift=-0.6em]h3.east) -- ([xshift=-0.2em,yshift=-0.6em]h5.west) -- ([xshift=0.0em,yshift=-0.6em]h5.east) -- ([xshift=-0.2em,yshift=-0.6em]h7.west) -- ([xshift=1.5em,yshift=-0.6em]h7.east);
\node [anchor=north west] (wtranslabel) at ([yshift=-4.3em]h0.south west) {\small{翻译路径:}};
曹润柘 committed
69 70 71 72 73
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{center}