%%%------------------------------------------------------------------------------------------------------------ %%% 回顾基于词的翻译模型 \begin{tikzpicture} \begin{scope} \node [anchor=west] (s1) at (0,0) {\textbf{我}}; \node [anchor=west] (s2) at ([xshift=2em]s1.east) {\textbf{对}}; \node [anchor=west] (s3) at ([xshift=2em]s2.east) {\textbf{你}}; \node [anchor=west] (s4) at ([xshift=2em]s3.east) {\textbf{感到}}; \node [anchor=west] (s5) at ([xshift=2em]s4.east) {\textbf{满意}}; \node [anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west) {\scriptsize{\textbf{待翻译句子(已经分词):}}}; \draw [->,very thick,ublue] (s1.south) -- ([yshift=-0.7em]s1.south); \draw [->,very thick,ublue] (s2.south) -- ([yshift=-0.7em]s2.south); \draw [->,very thick,ublue] (s3.south) -- ([yshift=-0.7em]s3.south); \draw [->,very thick,ublue] (s4.south) -- ([yshift=-0.7em]s4.south); \draw [->,very thick,ublue] (s5.south) -- ([yshift=-0.7em]s5.south); {\small \node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south) {I}; \node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=2.5em] (t12) at ([yshift=-0.8em]t11.south) {me}; \node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=2.5em] (t13) at ([yshift=-0.8em]t12.south) {I'm}; \node [anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west) {\tiny{{\color{white} \textbf{1}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west) {\tiny{{\color{white} \textbf{1}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west) {\tiny{{\color{white} \textbf{1}}}}; { \node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=6.55em] (t14) at ([yshift=-0.8em]t13.south west) {I'm \quad \quad}; \node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=6.55em] (t15) at ([yshift=-0.8em]t14.south west) {I \quad \quad}; \node [anchor=north west,inner sep=1pt,fill=black] (tl14) at (t14.north west) {\tiny{{\color{white} \textbf{1-2}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl15) at (t15.north west) {\tiny{{\color{white} \textbf{1-2}}}}; } \node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.6em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south) {to}; \node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.6em,minimum width=2.5em] (t22) at ([yshift=-0.8em]t21.south) {with}; \node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.6em,minimum width=2.5em] (t23) at ([yshift=-0.8em]t22.south) {for}; \node [anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west) {\tiny{{\color{white} \textbf{2}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west) {\tiny{{\color{white} \textbf{2}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west) {\tiny{{\color{white} \textbf{2}}}}; { \node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.6em,minimum width=6.55em] (t24) at ([yshift=-0.8em,xshift=-2.6em]t15.south east) {for you}; \node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.6em,minimum width=6.55em] (t25) at ([yshift=-0.8em]t24.south west) {with you}; \node [anchor=north west,inner sep=1pt,fill=black] (tl24) at (t24.north west) {\tiny{{\color{white} \textbf{2-3}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl25) at (t25.north west) {\tiny{{\color{white} \textbf{2-3}}}}; } \node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.6em,minimum width=2.5em] (t31) at ([yshift=-1em]s3.south) {you}; \node [anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west) {\tiny{{\color{white} \textbf{3}}}}; { \node [anchor=west,inner sep=2pt,fill=blue!20,minimum height=1.6em,minimum width=13.35em] (t32) at ([xshift=1.4em]t14.east) {\quad \; you are satisfied}; \node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.6em,minimum width=7.45em] (t33) at ([yshift=-0.8em]t32.south west) {$\phi$ \quad \; \ }; \node [anchor=north west,inner sep=1pt,fill=black] (tl32) at (t32.north west) {\tiny{{\color{white} \textbf{3-5}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl33) at (t33.north west) {\tiny{{\color{white} \textbf{3-4}}}}; } \node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.6em,minimum width=3em] (t41) at ([yshift=-1em]s4.south) {$\phi$}; \node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.6em,minimum width=3em] (t42) at ([yshift=-0.8em]t41.south) {show}; \node [anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west) {\tiny{{\color{white} \textbf{4}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west) {\tiny{{\color{white} \textbf{4}}}}; { \node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=9.00em] (t43) at ([xshift=1.75em]t24.east) {satisfied}; \node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.6em,minimum width=9.00em] (t44) at ([yshift=-0.8em]t43.south west) {satisfactory}; \node [anchor=north west,inner sep=1pt,fill=black] (tl43) at (t43.north west) {\tiny{{\color{white} \textbf{4-5}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl44) at (t44.north west) {\tiny{{\color{white} \textbf{4-5}}}}; } \node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.6em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south) {satisfy}; \node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.6em,minimum width=4.5em] (t52) at ([yshift=-0.8em]t51.south) {satisfied}; \node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.6em,minimum width=4.5em] (t53) at ([yshift=-0.8em]t52.south) {satisfies}; \node [anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west) {\tiny{{\color{white} \textbf{5}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west) {\tiny{{\color{white} \textbf{5}}}}; \node [anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west) {\tiny{{\color{white} \textbf{5}}}}; } {\tiny \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt11) at (t11.south) {{\color{white} \textbf{$\funp{P}$=0.4}}}; \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt12) at (t12.south) {{\color{white} \textbf{$\funp{P}$=0.2}}}; \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt13) at (t13.south) {{\color{white} \textbf{$\funp{P}$=0.4}}}; { \node [anchor=north,inner sep=1pt,minimum width=10.9em,fill=black] (pt14) at (t14.south) {{\color{white} \textbf{$\funp{P}$=0.1}\quad \quad}}; \node [anchor=north,inner sep=1pt,minimum width=10.9em,fill=black] (pt15) at (t15.south) {{\color{white} \textbf{$\funp{P}$=0.2}\quad \quad}}; } \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt21) at (t21.south) {{\color{white} \textbf{$\funp{P}$=0.4}}}; \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt22) at (t22.south) {{\color{white} \textbf{$\funp{P}$=0.3}}}; \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt23) at (t23.south) {{\color{white} \textbf{$\funp{P}$=0.3}}}; { \node [anchor=north,inner sep=1pt,minimum width=10.9em,fill=black] (pt24) at (t24.south) {{\color{white} \textbf{$\funp{P}$=0.2}}}; \node [anchor=north,inner sep=1pt,minimum width=10.9em,fill=black] (pt25) at (t25.south) {{\color{white} \textbf{$\funp{P}$=0.1}}}; } \node [anchor=north,inner sep=1pt,minimum width=4.2em,fill=black] (pt31) at (t31.south) {{\color{white} \textbf{$\funp{P}$=1}}}; { \node [anchor=north,inner sep=1pt,minimum width=22.2em,fill=black] (pt33) at (t32.south) {{\color{white} \textbf{\quad $\funp{P}$=0.4}}}; \node [anchor=north,inner sep=1pt,minimum width=12.4em,fill=black] (pt33) at (t33.south) {{\color{white} \textbf{$\funp{P}$=0.3}\quad \quad \quad \;}}; } \node [anchor=north,inner sep=1pt,minimum width=5em,fill=black] (pt41) at (t41.south) {{\color{white} \textbf{$\funp{P}$=0.5}}}; \node [anchor=north,inner sep=1pt,minimum width=5em,fill=black] (pt42) at (t42.south) {{\color{white} \textbf{$\funp{P}$=0.5}}}; { \node [anchor=north,inner sep=1pt,minimum width=15em,fill=black] (pt43) at (t43.south) {{\color{white} \textbf{$\funp{P}$=0.3}}}; \node [anchor=north,inner sep=1pt,minimum width=15em,fill=black] (pt44) at (t44.south) {{\color{white} \textbf{$\funp{P}$=0.2}}}; } \node [anchor=north,inner sep=1pt,minimum width=7.5em,fill=black] (pt51) at (t51.south) {{\color{white} \textbf{$\funp{P}$=0.5}}}; \node [anchor=north,inner sep=1pt,minimum width=7.5em,fill=black] (pt52) at (t52.south) {{\color{white} \textbf{$\funp{P}$=0.4}}}; \node [anchor=north,inner sep=1pt,minimum width=7.5em,fill=black] (pt53) at (t53.south) {{\color{white} \textbf{$\funp{P}$=0.1}}}; } \end{scope} \begin{scope} {\small } \end{scope} \begin{scope} \draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=0em,xshift=-0.5em]t11.north west) -- ([xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label2) {\footnotesize{\textbf{单词翻译}}}; { \draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.62em]t13.west) -- ([xshift=0.8em,yshift=-0.62em]t13.east) -- ([xshift=-0.2em,yshift=-0.62em]t22.west) -- ([xshift=0.8em,yshift=-0.62em]t22.east) -- ([xshift=-0.2em,yshift=-0.62em]t31.west) -- ([xshift=0.8em,yshift=-0.62em]t31.east) -- ([xshift=-0.2em,yshift=-0.62em]t41.west) -- ([xshift=0.8em,yshift=-0.62em]t41.east) -- ([xshift=-0.2em,yshift=-0.62em]t52.west) -- ([xshift=1.2em,yshift=-0.62em]t52.east); } { \draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.5em]t15.west) -- ([xshift=0.8em,yshift=-0.5em]t15.east) -- ([xshift=-0.2em,yshift=-0.5em]t32.west) -- ([xshift=1.2em,yshift=-0.5em]t32.east); \draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=-0.42em]t13.west) -- ([xshift=0.8em,yshift=-0.42em]t13.east) -- ([xshift=-0.2em,yshift=-0.5em]t25.west) -- ([xshift=0.8em,yshift=-0.5em]t25.east) -- ([xshift=-0.2em,yshift=-0.42em]t41.west) -- ([xshift=0.8em,yshift=-0.42em]t41.east) -- ([xshift=-0.2em,yshift=-0.42em]t52.west) -- ([xshift=1.2em,yshift=-0.42em]t52.east); } { \draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=-0.2em,xshift=-0.5em]t13.south west) -- ([yshift=-6.3em,xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label3) {\footnotesize{\textbf{短语翻译}}}; } { \node [anchor=north west] (wtranslabel) at ([yshift=-5em]t15.south west) {\scriptsize{翻译路径(仅包含单词)}}; \draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] ([xshift=0.2em]wtranslabel.east) -- ([xshift=1.2em]wtranslabel.east); } { \node [anchor=north west] (ptranslabel) at ([yshift=-6.5em]t15.south west) {\scriptsize{翻译路径(含有短语)}}; \draw [->,ultra thick,ublue,line width=1.5pt,opacity=0.7] ([xshift=0.95em]ptranslabel.east) -- ([xshift=1.95em]ptranslabel.east); } \end{scope} \end{tikzpicture}