%%%------------------------------------------------------------------------------------------------------------ %%% 规则抽取 \begin{center} \begin{tikzpicture} {\small \begin{scope}[sibling distance=25pt, level distance=20pt] \Tree[.\node(n1){IP}; [.\node(n2){NP}; [.\node(n3){PN}; \node(cw1){他}; ]] [.\node(n4){VP}; [.\node(n5){PP}; [.\node(n6){P}; \node(cw2){对}; ] [.\node(n7){NP}; [.\node(n8){NN}; \node(cw3){回答}; ] ] ] [.\node[minimum height=0.7em,minimum width=1.8em](n9){}; [.\node(n10){VV}; \node(cw4){表示}; ] [.\node(n11){NN}; \node(cw5){满意}; ] ] ] ] \node[anchor=north,minimum size=18pt,align=center] (tw1) at ([yshift=-6.0em]cw1.south){he\\\footnotesize{1}}; \node[anchor=west,minimum size=18pt,align=center] (tw2) at ([yshift=-0.1em,xshift=1.1em]tw1.east){was\\\footnotesize{2}}; \node[anchor=west,minimum size=18pt,align=center,minimum height=2.6em,minimum width=4em] (tw3) at ([yshift=0.1em,xshift=1.1em]tw2.east){}; \node[anchor=west,minimum size=18pt,align=center] (tw4) at ([xshift=1.1em]tw3.east){with\\\footnotesize{4}}; \node[anchor=west,minimum size=18pt,align=center] (tw5) at ([xshift=1.1em]tw4.east){the\\\footnotesize{5}}; \node[anchor=west,minimum size=18pt,align=center] (tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east){answer\\\footnotesize{6}}; \node[anchor=north,minimum size=18pt,align=center] (empty) at ([xshift=-2.0em]cw1.south){}; \draw[dashed] (cw1.south) -- ([yshift=-0.4em]tw1.north); \draw[dashed] (cw2.south) .. controls +(south:1.6) and +(north:0.6) .. ([yshift=-0.4em]tw4.north); \draw[dashed] (cw3.south) -- ([yshift=-0.4em]tw5.north); \draw[dashed] (cw3.south) -- ([yshift=-0.4em]tw6.north); \draw[dashed] (cw4.south) .. controls +(south:2.0) and +(north:0.6) .. ([yshift=-0.4em]tw3.north); \draw[dashed] (cw5.south) .. controls +(south:2.0) and +(north:0.6) .. ([yshift=-0.4em]tw3.north); \begin{pgfonlayer}{background} { \node [fill=blue!30] [fit = (cw2) (cw3) (n7) (n8)] (rule1box1) {}; \node [fill=blue!30] [fit = (n4) (n9)] (rule1box2) {}; \node [fill=blue!30] [fit = (tw3) (tw4) (tw5) (tw6)] (rule1box3) {}; \path [fill=blue!30] ([xshift=0.05em]rule1box2.north west) -- ([xshift=-0.3em,yshift=0.3em]n5.north west) -- ([yshift=-0.05em]rule1box1.north west) -- ([xshift=0.05em,yshift=-0.05em]rule1box2.south west) -- ([xshift=0.05em]rule1box2.north west); } \node [rectangle,fill=orange!20,inner sep=0] [fit = (n11)] (n11box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n4)] (n4box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n1)] (n1box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n2)] (n2box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n3)] (n3box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n5)] (n5box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n6)] (n6box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n7)] (n7box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n8)] (n8box) {}; \node [rectangle,fill=green!20,inner sep=0] [fit = (n9)] (n9box) {}; \node [rectangle,fill=orange!20,inner sep=0] [fit = (n10)] (n10box) {}; \end{pgfonlayer} \node [anchor=north west, minimum size=1.2em, fill=green!20] (land1) at ([xshift=1.5em,yshift=-1em]cw5.south east) {}; \node [anchor=west] (land1label) at (land1.east) {\footnotesize{可信}}; \node [anchor=north west, minimum size=1.2em, fill=orange!20] (land2) at ([yshift=-0.3em]land1.south west) {}; \node [anchor=west] (land2label) at (land2.east) {\footnotesize{不可信}}; { \node [draw,thick,red,fill=red!20,anchor=north,minimum height=2.2em,minimum width=2.5em] (var1) at ([yshift=1.2em]n9.north) {{\color{black} VP}}; \node [draw,thick,red,fill=red!20] [fit = (tw3)] (var1v2) {{\color{black} \large{VP}}}; \node [anchor=west] (var1label) at ([yshift=0.5em]var1.east) {\footnotesize{\red{变量}}}; \node [anchor=south] (var1v2label) at ([xshift=-2em]var1v2.north) {\footnotesize{\red{变量}}}; } \end{scope} } \end{tikzpicture} \end{center}