\definecolor{ublue}{rgb}{0.152,0.250,0.545} \definecolor{ugreen}{rgb}{0,0.5,0} %%% outline %------------------------------------------------------------------------- \begin{tikzpicture} \begin{scope}[sibling distance=0pt,level distance=17pt] {\footnotesize \Tree[.\node[inner sep=2pt](t1n1){IP}; [.\node[inner sep=2pt](t1n2){NP}; [.\node[inner sep=2pt](t1n3){NN}; 狗 ] ] [.\node[inner sep=2pt](t1n4){VP}; [.\node[inner sep=2pt](t1n5){VV}; 喜欢 ] [.\node[inner sep=2pt](t1n6){VP}; [.\node[inner sep=2pt](t1n7){VV}; 吃 ] [.\node[inner sep=2pt](t1n8){NN}; 骨头 ] ] ] ] } \end{scope} \begin{scope}[sibling distance=0pt,level distance=17pt,yshift=-7em] {\footnotesize \Tree[.\node[inner sep=2pt](t2n1){IP}; [.\node[inner sep=2pt](t2n2){VP}; [.\node[inner sep=2pt](t2n3){VV}; \node[](t2w1){请}; ] ] [.\node[inner sep=2pt](t2n4){IP}; [.\node[inner sep=2pt](t2n5){VP}; [.\node[inner sep=2pt](t2n6){VV}; 看 ] ] [.\node[inner sep=2pt](t2n7){NP}; [.\node[inner sep=2pt](t2n8){QP}; [.\node[inner sep=2pt](t2n9){CD}; 一 ] [.\node[inner sep=2pt](t2n10){M}; 个 ] ] [.\node[inner sep=2pt](t2n11){ADJP}; [.\node[inner sep=2pt](t2n12){JJ}; 新 ] ] [.\node[inner sep=2pt](t2n13){NP}; [.\node[inner sep=2pt](t2n14){NN}; \node[](t2wn){句子}; ] ] ] ] ] } \end{scope} \node [anchor=south] (treebanklabel) at (t1n1.north) {{\color{ublue} 数据:树库}}; \begin{pgfonlayer}{background} \node[rectangle,draw=ublue, inner sep=0.2em] [fit = (treebanklabel) (t1n1) (t2w1) (t2wn)] (treebank) {}; \end{pgfonlayer} \node [anchor=north west] (math1) at ([xshift=2em]treebank.north east) {$\funp{P}$(VP $\to$ VV NN)}; \node [anchor=north west] (math1part2) at ([xshift=-1em,yshift=0.2em]math1.south west) {$=\frac{\textrm{VP和VV NN同时出现的次数=1}}{\textrm{VP出现的次数}=4}$}; \node [anchor=north west] (math1part3) at ([yshift=0.2em]math1part2.south west){$=\frac{1}{4}$}; \node [anchor=north west] (math2) at ([yshift=-6em]math1.north west) {$\funp{P}$(NP $\to$ NN)}; \node [anchor=north west] (math2part2) at ([xshift=-1em,yshift=0.2em]math2.south west) {$=\frac{\textrm{NP和NN同时出现的次数=2}}{\textrm{NP出现的次数}=3}$}; \node [anchor=north west] (math2part3) at ([yshift=0.2em]math2part2.south west){$=\frac{2}{3}$}; \node [anchor=north west] (math3) at ([yshift=-6em]math2.north west) {$\funp{P}$(IP $\to$ NP NP)}; \node [anchor=north west] (math3part2) at ([xshift=-1em,yshift=0.2em]math3.south west) {$=\frac{\textrm{IP和NP NP同时出现的次数=0}}{\textrm{IP出现的次数}=3}$}; \node [anchor=north west] (math3part3) at ([yshift=0.2em]math3part2.south west){$=\frac{0}{3}$}; \begin{pgfonlayer}{background} \path [] (t1n4.north east) -- (t1n4.north west) -- (t1n4.south west) -- (t1n4.south east); \path [] (t1n6.north east) -- (t1n6.north west) -- (t1n6.south west) -- (t1n6.south east); \path [] (t2n2.north east) -- (t2n2.north west) -- (t2n2.south west) -- (t2n2.south east); \path [] (t2n5.north east) -- (t2n5.north west) -- (t2n5.south west) -- (t2n5.south east); \path [] (t1n6.north west) -- (t1n7.north west) -- (t1n7.south west) -- (t1n8.south east) -- (t1n8.north east) -- (t1n6.north east); \path [] (t1n2.north east) -- (t1n2.north west) -- (t1n2.south west) -- (t1n2.south east); \path [] (t2n7.north east) -- (t2n7.north west) -- (t2n7.south west) -- (t2n7.south east); \path [] (t2n13.north east) -- (t2n13.north west) -- (t2n13.south west) -- (t2n13.south east); \path [] (t1n2.north west) -- (t1n3.south west) -- (t1n3.south east) -- (t1n2.north east) -- (t1n2.north west); \path [] (t2n13.north west) -- (t2n14.south west) -- (t2n14.south east) -- (t2n13.north east) -- (t2n13.north west); \path [] (t1n1.north east) -- (t1n1.north west) -- (t1n1.south west) -- (t1n1.south east); \path [] (t2n4.north east) -- (t2n4.north west) -- (t2n4.south west) -- (t2n4.south east); \path [] (t2n1.north east) -- (t2n1.north west) -- (t2n1.south west) -- (t2n1.south east); \end{pgfonlayer} \end{tikzpicture} %---------------------------------------------------------------------