figure-role-of-syntax-tree-in-different-decoding-methods.tex 2.2 KB
Newer Older
曹润柘 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
%%%------------------------------------------------------------------------------------------------------------
%%%  基于串的解码方法
\begin{center}
\begin{tikzpicture}

\begin{scope}[scale=0.9,level distance=30pt,sibling distance=7pt]

{\small
\Tree[.\node(bsn0){IP};
          [.\node(bsn1){NP};
               [.\node(bsn2){NN}; \node(bsw1){}; ]
          ]
          [.\node(bsn3){VP};
               [.\node(bsn4){VV}; \node(bsw2){喜欢}; ]
               [.\node(bsn5){VP}; \edge[roof]; \node(bsw3){\ }; ]
          ]
     ]

\node [anchor=west] (target) at ([xshift=1em]bsw3.east) {Cats like eating fish};
曹润柘 committed
20
\node [anchor=north,inner sep=3pt] (cap1) at ([xshift=-1.0em,yshift=-1em]target.south west) {(a) 基于树的解码};
曹润柘 committed
21 22 23
\draw [->,thick] (bsw3.east) -- (target.west);
\node [anchor=west] (sourcelabel) at ([xshift=6em,yshift=-1em]bsn0.east) {显式输入的结构};

曹润柘 committed
24
\node [anchor=west] (source2) at ([xshift=3.3em,yshift=0.0em]target.east) {$\ \ \;$喜欢$\ \;$\ };
曹润柘 committed
25
\node [anchor=west] (target2) at ([xshift=1em]source2.east) {Cats like eating fish};
曹润柘 committed
26
\node [anchor=north,inner sep=3pt] (cap2) at ([xshift=-1.5em,yshift=-1em]target2.south west) {(b) 基于串的解码};
曹润柘 committed
27 28 29 30 31 32 33 34
\draw [->,thick] (source2.east) -- (target2.west);

\begin{pgfonlayer}{background}
{
\path [draw,dashed,rectangle,inner sep=1em,thick,blue,rounded corners=5pt] ([xshift=-3em,yshift=0.5em]bsn0.north west) -- ([xshift=5.3em,yshift=0.5em]bsn0.north east) -- ([xshift=5.3em,yshift=-10.5em]bsn0.north east) -- ([xshift=-3em,yshift=-10.5em]bsn0.north west) -- ([xshift=-3em,yshift=0.5em]bsn0.north west);
}
\end{pgfonlayer}

曹润柘 committed
35
\begin{scope}[xshift=3.18in,yshift=-0.28em,sibling distance=10pt]
曹润柘 committed
36 37 38 39 40 41 42 43 44 45 46
\Tree[.\node(bsn0){IP};
          [.\node(bsn1){NP};
               [.\node(bsn2){NN}; ]
          ]
          [.\node(bsn3){VP};
               [.\node(bsn4){VV}; ]
               [.\node(bsn5){VP}; ]
          ]
     ]

\begin{pgfonlayer}{background}
曹润柘 committed
47
\node [draw,dashed,rectangle,inner sep=0.7em,thick,red,rounded corners=5pt] (box) [fit = (bsn0) (bsn1) (bsn2) (bsn3) (bsn4) (bsn5)] {};
曹润柘 committed
48 49 50 51 52 53 54 55 56 57 58
\node [anchor=north west] (boxlabel) at ([xshift=2em,yshift=-2em]box.north east) {隐含结构};
\end{pgfonlayer}

\end{scope}

}

\end{scope}

\end{tikzpicture}
\end{center}