figure-rules-of-grammar.tex 2.51 KB
Newer Older
曹润柘 committed
1 2 3 4 5 6 7 8 9 10

\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\definecolor{ugreen}{rgb}{0,0.5,0}


%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\small
\node [anchor=west,inner sep=2pt] (r1) at (0,0) {$r_1$: NN $\to$};
孟霞 committed
11
\node [anchor=west,inner sep=2pt] (r2) at ([xshift=9em]r1.east) {$r_2$: VV $\to$ 喜欢};
曹润柘 committed
12 13 14 15 16 17 18 19 20 21
\node [anchor=north west,inner sep=2pt] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};

\node [anchor=north west,inner sep=2pt] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};

\node [anchor=north west,inner sep=2pt] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};


孟霞 committed
22 23 24 25
\node [anchor=west,inner sep=2pt,fill=blue!30] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt,fill=blue!30] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt,fill=blue!30] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt,fill=blue!30] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
曹润柘 committed
26

孟霞 committed
27
\node [anchor=north west,inner sep=2pt,fill=red!30] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};
曹润柘 committed
28

孟霞 committed
29 30 31
\node [anchor=north west,inner sep=2pt,fill=green!30] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt,fill=green!30] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt,fill=green!30] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
曹润柘 committed
32

孟霞 committed
33
\node [anchor=north west,fill=blue!30] (sent1) at ([yshift=-0.4em]r7.south west) {$r_1,r_2,r_3,r_4$};
曹润柘 committed
34 35
\node [anchor=west] (sent1part2) at (sent1.east) {为生成单词词性的规则};

孟霞 committed
36
\node [anchor=north west,fill=red!30] (sent2) at ([yshift=-0.2em]sent1.south west) {$r_5$};
曹润柘 committed
37 38
\node [anchor=west] (sent2part2) at (sent2.east) {为单变量规则,它将词性NN进一步抽象为名词短语NP};

孟霞 committed
39
\node [anchor=north west,fill=green!30] (sent3) at ([yshift=-0.2em]sent2.south west){$r_6,r_7,r_8$};
曹润柘 committed
40 41 42 43 44 45
\node [anchor=west] (sent3part2) at (sent3.east) {为句法结构规则,比如$r_8$表示了主(NP)+谓(VP)结构};
\end{tikzpicture}

%---------------------------------------------------------------------