figure-derivation-of-hierarchical-phrase-and-tree-structure-model.tex 4.27 KB
Newer Older
曹润柘 committed
1 2 3 4
%------------------------------------------------------------------------------------------------------------
%%%  句法树(层次短语)
\begin{tikzpicture}
{\scriptsize
5
\begin{scope}[sibling distance=1pt, level distance = 27pt]
曹润柘 committed
6
{\scriptsize
曹润柘 committed
7 8 9 10 11
\Tree[.\node(n1){\seq{S}};
        [.\node(n2){\seq{S}};
	        [.\node(n3){\seq{S}};
		        [.\node(n4){\seq{S}};
		            [.\node(n5){\seq{X}}; \node(cw1){}; ]
曹润柘 committed
12
		        ]
13
		        [.\node(n6){\seq{X}}; \node(cw2){}; ]
曹润柘 committed
14
		    ]
曹润柘 committed
15
	        [.\node(n7){\seq{X}};
16
	            [. \node(cw3){没有}; ]
曹润柘 committed
17 18 19
	            [. \node(cw4){执行}; ]
	        ]
        ]
曹润柘 committed
20
        [.\node(n8){\seq{X}};
21
            [. \node(cw5){公司}; ]
曹润柘 committed
22
            [.\node(n9){\seq{X}};
23
                [. \node(cw6){董事会}; ]
曹润柘 committed
24 25
                [. \node(cw7){}; ]
            ]
26
            [. \node(cw8){决定}; ]
曹润柘 committed
27 28 29 30 31 32 33
        ]
     ]

\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n1.north east) {{\color{white} \tiny{$r_2$}}};
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n2.north west) {{\color{white} \tiny{$r_2$}}};
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n3.north west) {{\color{white} \tiny{$r_2$}}};
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n4.north west) {{\color{white} \tiny{$r_1$}}};{\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n5.north west) {{\color{white} \tiny{$r_3$}}};}
34
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em,yshift=-0.5em]n6.south east) {{\color{white} \tiny{$r_4$}}};
曹润柘 committed
35 36 37 38 39 40 41 42 43 44 45 46
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n7.north east) {{\color{white} \tiny{$r_5$}}};
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n8.north east) {{\color{white} \tiny{$r_6$}}};
\node[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n9.north east) {{\color{white} \tiny{$r_7$}}};

}
\end{scope}

\begin{scope}[xshift = 1.8in, yshift = 0.1in]
\node (rules) {\textbf{层次短语翻译规则:}};
\draw[-] (rules.south west)--([xshift=1.8in]rules.south west);

\node[anchor=north west] (r1) at ([yshift=-0.2em]rules.south west) {$r_1$};
曹润柘 committed
47
\node[anchor=west] (rc1) at ([xshift=0.0em]r1.east) {$\textrm{S} \; \to \; \langle\ \seq{X}_1, \; \; \seq{X}_1\ \rangle$};
曹润柘 committed
48 49

\node[anchor=north west] (r2) at ([yshift=-0.4em]r1.south west) {$r_2$};
曹润柘 committed
50
\node[anchor=west] (rc2) at ([xshift=0em]r2.east) {$\textrm{S} \; \to \; \langle\  \textrm{S}_1 \; \seq{X}_2, \; \; \textrm{S}_1 \; \seq{X}_2\ \rangle$};
曹润柘 committed
51 52

\node[anchor=north west] (r3) at ([yshift=-0.4em]r2.south west) {$r_3$};
曹润柘 committed
53
\node[anchor=west] (rc3) at ([xshift=0em]r3.east) {$\seq{X} \; \to \; \langle\  \text{}, \; \; \text{but}\ \rangle$};
曹润柘 committed
54 55

\node[anchor=north west] (r4) at ([yshift=-0.4em]r3.south west) {$r_4$};
56
\node[anchor=west] (rc4) at ([xshift=0em]r4.east) {$\seq{X} \; \to \; \langle\  \text{}, \; \; \text{he}\ \rangle$};
曹润柘 committed
57 58

\node[anchor=north west] (r5) at ([yshift=-0.4em]r4.south west) {$r_5$};
59
\node[anchor=west] (rc5) at ([xshift=0em]r5.east) {$\seq{X} \; \to \; \langle\  \text{没有} \; \text{执行}, \; \; \text{}$};
曹润柘 committed
60 61

\node[anchor=north west] (r52) at ([yshift=-0.4em]r5.south west) {{\color{white} $r_5$}};
62
\node[anchor=west] (rc52) at ([xshift=2.9em]r52.east) {$\text{did not implemente}\ \rangle$};
曹润柘 committed
63 64

\node[anchor=north west] (r6) at ([yshift=-0.4em]r52.south west) {$r_6$};
65
\node[anchor=west] (rc6) at ([xshift=0em]r6.east) {$\seq{X} \; \to \; \langle\ \text{公司} \; \seq{X}_1 \; \text{决定}, $};
曹润柘 committed
66 67

\node[anchor=north west] (r61) at ([yshift=-0.4em]r6.south west) {{\color{white} $r_6$}};
68
\node[anchor=west] (rc61) at ([xshift=2.9em]r61.east) {$\text{the decision} \; \seq{X}_1 \; \text{the board of directors}\ \rangle$};
曹润柘 committed
69 70

\node[anchor=north west] (r7) at ([yshift=-0.4em]r61.south west) {$r_7$};
71
\node[anchor=west] (rc7) at ([xshift=0em]r7.east) {$\seq{X} \; \to \; \langle\ \text{董事会\ \ }, \; \; \text{of}\ \rangle$};
曹润柘 committed
72 73
\end{scope}

74
\node[anchor=south] (l1) at ([xshift=-6em,yshift=1em]rules.north) {\normalsize{${d = r_3}{\circ r_1}{ \circ r_4}{ \circ r_2}{ \circ r_5}{ \circ r_2}{ \circ r_7}{ \circ r_6}{ \circ r_2}$}};
曹润柘 committed
75 76 77

}
\end{tikzpicture}