Commit 18993aa4 by 曹润柘

update chapter 4

parent d1c4df30
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
\end{scope} \end{scope}
\draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-8em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-8em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2em,yshift=-3em]sent.south);
\draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.5em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.5em,yshift=-2em]sent.south);
\draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=12.5em,yshift=-2em]sent.south); \draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=12.5em,yshift=-2em]sent.south);
......
...@@ -662,7 +662,6 @@ F(X)=\int_{-\infty}^x f(x)dx ...@@ -662,7 +662,6 @@ F(X)=\int_{-\infty}^x f(x)dx
} }
\end{center} \end{center}
\vspace{-0.3em}
\parinterval 可以看到,1-gram语言模型只是$n$-gram语言模型的一种特殊形式。$n$-gram的优点在于,它所使用的历史信息是有限的,即$n-1$个单词。这种性质也反映了经典的马尔可夫链的思想\cite{liuke-markov-2004}\cite{resnick1992adventures}有时也被称作马尔可夫假设或者马尔可夫属性。因此$n$-gram也可以被看作是变长序列上的一种马尔可夫模型,比如,2-gram语言模型对应着1阶马尔可夫模型,3-gram语言模型对应着2阶马尔可夫模型,以此类推。 \parinterval 可以看到,1-gram语言模型只是$n$-gram语言模型的一种特殊形式。$n$-gram的优点在于,它所使用的历史信息是有限的,即$n-1$个单词。这种性质也反映了经典的马尔可夫链的思想\cite{liuke-markov-2004}\cite{resnick1992adventures}有时也被称作马尔可夫假设或者马尔可夫属性。因此$n$-gram也可以被看作是变长序列上的一种马尔可夫模型,比如,2-gram语言模型对应着1阶马尔可夫模型,3-gram语言模型对应着2阶马尔可夫模型,以此类推。
\parinterval 那么,如何计算$\textrm{P}(w_m|w_{m-n+1} ... w_{m-1})$呢?有很多种选择,比如: \parinterval 那么,如何计算$\textrm{P}(w_m|w_{m-n+1} ... w_{m-1})$呢?有很多种选择,比如:
...@@ -1015,7 +1014,7 @@ s_0 \overset{r_1}{\Rightarrow} s_1 \overset{r_2}{\Rightarrow} s_2 \overset{r_3}{ ...@@ -1015,7 +1014,7 @@ s_0 \overset{r_1}{\Rightarrow} s_1 \overset{r_2}{\Rightarrow} s_2 \overset{r_3}{
\end{displaymath} \end{displaymath}
\begin{itemize} \begin{itemize}
\item $\forall i \in [0,n], s_i \in (N\cup\Sigma)^*$ \hspace{3.5em} $\lhd$ $s_i$为合法的字符串 \item $\forall i \in [0,n], s_i \in (N\cup\Sigma)^*$ \hspace{3.5em} $\lhd$ $s_i$为合法的字符串
\item $\forall j \in [1,n], r_j \in R$ \hspace{6.3em} $\lhd$ $r_j$$G$的规则 \item $\forall j \in [1,n], r_j \in R$ \hspace{6.3em} $\lhd$ $r_j$$G$的规则
\item $s_0 \in S$ \hspace{10.9em} $\lhd$ $s_0$为起始非终结符 \item $s_0 \in S$ \hspace{10.9em} $\lhd$ $s_0$为起始非终结符
...@@ -1106,7 +1105,6 @@ s_0 \overset{r_1}{\Rightarrow} s_1 \overset{r_2}{\Rightarrow} s_2 \overset{r_3}{ ...@@ -1106,7 +1105,6 @@ s_0 \overset{r_1}{\Rightarrow} s_1 \overset{r_2}{\Rightarrow} s_2 \overset{r_3}{
\end{eqnarray} \end{eqnarray}
\noindent 即,在给定规则左部的情况下生成规则右部的可能性。进一步,在上下文无关文法中,每条规则之间的使用都是相互独立的 \footnote[3]{如果是上下文有关文法,规则会形如 $a\alpha b\to a\beta b$,这时$\alpha \to \beta $的过程会依赖前后上下文$a$$b$}。因此可以把$\textrm{P}(d)$分解为规则概率的乘积: \noindent 即,在给定规则左部的情况下生成规则右部的可能性。进一步,在上下文无关文法中,每条规则之间的使用都是相互独立的 \footnote[3]{如果是上下文有关文法,规则会形如 $a\alpha b\to a\beta b$,这时$\alpha \to \beta $的过程会依赖前后上下文$a$$b$}。因此可以把$\textrm{P}(d)$分解为规则概率的乘积:
\begin{eqnarray} \begin{eqnarray}
\textrm{P}(d) & = & \textrm{P}(r_1 \cdot r_2 \cdot ... \cdot r_n) \nonumber \\ \textrm{P}(d) & = & \textrm{P}(r_1 \cdot r_2 \cdot ... \cdot r_n) \nonumber \\
& = & \textrm{P}(r_1) \cdot \textrm{P}(r_2) \cdots \textrm{P}(r_n) & = & \textrm{P}(r_1) \cdot \textrm{P}(r_2) \cdots \textrm{P}(r_n)
...@@ -1178,7 +1176,7 @@ r_6: & & \textrm{VP} \to \textrm{VV}\ \textrm{NN} \nonumber ...@@ -1178,7 +1176,7 @@ r_6: & & \textrm{VP} \to \textrm{VV}\ \textrm{NN} \nonumber
\begin{itemize} \begin{itemize}
\item 在建模方面,本章介绍的三个任务均采用的是基于人工先验知识进行模型设计的思路。也就是,问题所表达的现象被``一步一步''生成出来。这是一种典型的生成式建模思想,它把要解决的问题看作一些观测结果的隐含变量(比如,句子是观测结果,分词结果是隐含在背后的变量),之后通过对隐含变量生成观测结果的过程进行建模,以达到对问题进行数学描述的目的。这类模型一般需要依赖一些独立性假设,假设的合理性对最终的性能有较大影响。相对{\small\sffamily\bfseries{生成模型}}(Generative Model),另一类方法{\small\sffamily\bfseries{判别模型}}(Discriminative Model),它直接描述了从隐含变量生成观测结果的过程,这样对问题的建模更加直接,同时这类模型可以更加灵活的引入不同的特征。判别式模型在自然语言处理中也有广泛应用\cite{shannon1948mathematical}\cite{ng2002discriminative}。 在本书的第四章也会使用到判别式模型。 \item 在建模方面,本章介绍的三个任务均采用的是基于人工先验知识进行模型设计的思路。也就是,问题所表达的现象被``一步一步''生成出来。这是一种典型的生成式建模思想,它把要解决的问题看作一些观测结果的隐含变量(比如,句子是观测结果,分词结果是隐含在背后的变量),之后通过对隐含变量生成观测结果的过程进行建模,以达到对问题进行数学描述的目的。这类模型一般需要依赖一些独立性假设,假设的合理性对最终的性能有较大影响。相对{\small\sffamily\bfseries{生成模型}}(Generative Model),另一类方法{\small\sffamily\bfseries{判别模型}}(Discriminative Model),它直接描述了从隐含变量生成观测结果的过程,这样对问题的建模更加直接,同时这类模型可以更加灵活的引入不同的特征。判别式模型在自然语言处理中也有广泛应用\cite{shannon1948mathematical}\cite{ng2002discriminative}。 在本书的第四章也会使用到判别式模型。
\item 从现在自然语言处理的前沿看,基于端到端学习的深度学习方法在很多任务中都取得了领先的性能。但是,本章并没有涉及深度学习及相关方法,这是由于笔者认为:{\color{red} 对问题的建模是自然语言处理的基础,对问题的本质刻画并不会因为方法的改变而改变}。因此,本章的内容没有太多的陷入到更加复杂的模型和算法设计中,相反,我们希望关注对基本问题的理解和描述。不过,一些前沿方法仍可以作为参考,包括:基于条件随机场和双向长短时记忆模型的序列标注模型\cite{lafferty2001conditional}\cite{huang2015bidirectional}\cite{ma2016end}、神经语言模型\cite{bengio2003neural}\cite{mikolov2010recurrent}、神经句法分析模型\cite{chen2014fast}\cite{zhu2015long} \item 从现在自然语言处理的前沿看,基于端到端学习的深度学习方法在很多任务中都取得了领先的性能。但是,本章并没有涉及深度学习及相关方法,这是由于笔者认为:对问题的建模是自然语言处理的基础,对问题的本质刻画并不会因为方法的改变而改变。因此,本章的内容没有太多的陷入到更加复杂的模型和算法设计中,相反,我们希望关注对基本问题的理解和描述。不过,一些前沿方法仍可以作为参考,包括:基于条件随机场和双向长短时记忆模型的序列标注模型\cite{lafferty2001conditional}\cite{huang2015bidirectional}\cite{ma2016end}、神经语言模型\cite{bengio2003neural}\cite{mikolov2010recurrent}、神经句法分析模型\cite{chen2014fast}\cite{zhu2015long}
\item 此外,本章并没有对模型的推断方法进行深入介绍。比如,对于一个句子如何有效的找到概率最大的分词结果?显然,简单枚举是不可行的。对于这类问题比较简单的解决方法是使用动态规划\cite{huang2008advanced}。如果使用动态规划的条件不满足,可以考虑使用更加复杂的搜索策略,并配合一定剪枝方法。实际上,无论是$n$-gram语言模型还是简单的上下文无关文法都有高效的推断方法。比如,$n$-gram语言模型可以被视为概率有限状态自动机,因此可以直接使用成熟的自动机工具。对于更复杂的句法分析问题,可以考虑使用移进-规约方法来解决推断问题\cite{aho1972theory} \item 此外,本章并没有对模型的推断方法进行深入介绍。比如,对于一个句子如何有效的找到概率最大的分词结果?显然,简单枚举是不可行的。对于这类问题比较简单的解决方法是使用动态规划\cite{huang2008advanced}。如果使用动态规划的条件不满足,可以考虑使用更加复杂的搜索策略,并配合一定剪枝方法。实际上,无论是$n$-gram语言模型还是简单的上下文无关文法都有高效的推断方法。比如,$n$-gram语言模型可以被视为概率有限状态自动机,因此可以直接使用成熟的自动机工具。对于更复杂的句法分析问题,可以考虑使用移进-规约方法来解决推断问题\cite{aho1972theory}
\end{itemize} \end{itemize}
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
{ {
% red rule 4 % red rule 4
\begin{scope}[red, scale=0.6, xshift=16em, yshift=-11em, level distance=20pt] \begin{scope}[scale=0.6, xshift=16em, yshift=-11em, level distance=20pt]
\begin{scope}[anchor=north east, xshift=-6em] \Tree[.IP [.NN ] [.VP ]] \end{scope} \begin{scope}[anchor=north east, xshift=-6em] \Tree[.IP [.NN ] [.VP ]] \end{scope}
\draw[->] (-1.7,0.1) -- (-0.9,0.1); \draw[->] (-1.7,0.1) -- (-0.9,0.1);
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
} }
\node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h1) (h5) (h6)] (gl1) {}; \node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h1) (h5) (h6)] (gl1) {};
\node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h21) (h27)] (gl2) {}; \node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h21) (h25) (h27)] (gl2) {};
\draw [->,ublue,thick] ([xshift=0.6em,yshift=0.2em]n4.south) .. controls +(south:2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west); \draw [->,ublue,thick] ([xshift=0.6em,yshift=0.2em]n4.south) .. controls +(south:2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west);
\draw [->,ublue,thick] ([xshift=0em,yshift=1em]gl1.east) .. controls +(south:3em) and +(east:0em) .. ([xshift=-0em,yshift=1.6em]gl2.west); \draw [->,ublue,thick] ([xshift=0em,yshift=0em]gl1.east) .. controls +(north:2.2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west);
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 组合规则 %%% 组合规则
\begin{minipage}[b]{0.35\textwidth} \begin{minipage}[b]{0.38\textwidth}
{\footnotesize {\footnotesize
\renewcommand*{\arraystretch}{1.3} \renewcommand*{\arraystretch}{1.3}
\begin{tabular}{l l} \begin{tabular}{l l}
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
{$r_7$} & {IP(NP$_1$ VP$_2$) $\to$ NP$_1$ VP$_2$} \\ {$r_7$} & {IP(NP$_1$ VP$_2$) $\to$ NP$_1$ VP$_2$} \\
{\red{$r_{1,7}$}} & {IP(NP(PN(他)) VP$_1$) $\to$} \\ {\red{$r_{1,7}$}} & {IP(NP(PN(他)) VP$_1$) $\to$} \\
& {he VP$_1$}\\ & {he VP$_1$}\\
{\red{$r_{1,6}$}} & {IP(NP(PN(他)) VP(PP$_1$ VP$_2$))} \\ {\red{$r_{1,6,7}$}} & {IP(NP(PN(他)) VP(PP$_1$ VP$_2$))} \\
{\red{\ $^{,7}$}} & {$\to$ he VP$_2$ PP$_1$}\\ & {$\to$ he VP$_2$ PP$_1$}\\
{\red{$r_{1,5}$}} & {IP(NP(PN(他)) } \\ {\red{$r_{1,5,6,7}$}} & {IP(NP(PN(他)) } \\
{\red{\ $^{,6,7}$}} & {VP(P$_1$ NP$_2$ VP$_3$))}\\ & {VP(P$_1$ NP$_2$ VP$_3$))}\\
& {$\to$ he VP$_3$ P$_1$ NP$_2$}\\ & {$\to$ he VP$_3$ P$_1$ NP$_2$}\\
& \\ & \\
\end{tabular} \end{tabular}
......
...@@ -97,8 +97,8 @@ ...@@ -97,8 +97,8 @@
} }
\draw[-] ([xshift=-0.3em,yshift=-0.3em]k1.north west) -- ([xshift=-0.3em,yshift=-10.7em]k1.south west); \draw[-] ([xshift=-0.3em,yshift=-0.3em]k1.north west) -- ([xshift=-0.3em,yshift=-10.7em]k1.south west);
\draw[-] ([xshift=-0.3em,yshift=-0.3em]b1.north west) -- ([xshift=-0.3em,yshift=-10.7em]b1.south west); %\draw[-] ([xshift=-0.3em,yshift=-0.3em]b1.north west) -- ([xshift=-0.3em,yshift=-10.7em]b1.south west);
\draw[-] ([xshift=-0em,yshift=-0.3em]y1.north west) -- ([xshift=-0em,yshift=-10.7em]y1.south west); %\draw[-] ([xshift=-0em,yshift=-0.3em]y1.north west) -- ([xshift=-0em,yshift=-10.7em]y1.south west);
\end{tikzpicture} \end{tikzpicture}
\end{center} \end{center}
......
...@@ -8,22 +8,22 @@ ...@@ -8,22 +8,22 @@
\tikzstyle{srcnode} = [anchor=south west] \tikzstyle{srcnode} = [anchor=south west]
\begin{scope}[scale=0.85] \begin{scope}[scale=0.85]
\node[srcnode] (c1) at (0,0) {\small{\textbf{Function} CYK-Algorithm($\textbf{s},G$)}}; \node[srcnode] (c1) at (0,0) {\normalsize{\textbf{Function} CYK-Algorithm($\textbf{s},G$)}};
\node[srcnode,anchor=north west] (c21) at ([xshift=1.5em,yshift=0.4em]c1.south west) {\small{\textbf{fore} $j=0$ to $ J - 1$}}; \node[srcnode,anchor=north west] (c21) at ([xshift=1.5em,yshift=0.4em]c1.south west) {\normalsize{\textbf{fore} $j=0$ to $ J - 1$}};
\node[srcnode,anchor=north west] (c22) at ([xshift=1.5em,yshift=0.4em]c21.south west) {\small{$span[j,j+1 ]$.Add($A \to a \in G$)}}; \node[srcnode,anchor=north west] (c22) at ([xshift=1.5em,yshift=0.4em]c21.south west) {\normalsize{$span[j,j+1 ]$.Add($A \to a \in G$)}};
\node[srcnode,anchor=north west] (c3) at ([xshift=-1.5em,yshift=0.4em]c22.south west) {\small{\textbf{for} $l$ = 1 to $J$}}; \node[srcnode,anchor=north west] (c3) at ([xshift=-1.5em,yshift=0.4em]c22.south west) {\normalsize{\textbf{for} $l$ = 1 to $J$}};
\node[srcnode,anchor=west] (c31) at ([xshift=6em]c3.east) {\small{// length of span}}; \node[srcnode,anchor=west] (c31) at ([xshift=6em]c3.east) {\normalsize{// length of span}};
\node[srcnode,anchor=north west] (c4) at ([xshift=1.5em,yshift=0.4em]c3.south west) {\small{\textbf{for} $j$ = 0 to $J-l$}}; \node[srcnode,anchor=north west] (c4) at ([xshift=1.5em,yshift=0.4em]c3.south west) {\normalsize{\textbf{for} $j$ = 0 to $J-l$}};
\node[srcnode,anchor=north west] (c41) at ([yshift=0.4em]c31.south west) {\small{// beginning of span}}; \node[srcnode,anchor=north west] (c41) at ([yshift=0.4em]c31.south west) {\normalsize{// beginning of span}};
\node[srcnode,anchor=north west] (c5) at ([xshift=1.5em,yshift=0.4em]c4.south west) {\small{\textbf{for} $k$ = $j$ to $j+l$}}; \node[srcnode,anchor=north west] (c5) at ([xshift=1.5em,yshift=0.4em]c4.south west) {\normalsize{\textbf{for} $k$ = $j$ to $j+l$}};
\node[srcnode,anchor=north west] (c51) at ([yshift=0.4em]c41.south west) {\small{// partition of span}}; \node[srcnode,anchor=north west] (c51) at ([yshift=0.4em]c41.south west) {\normalsize{// partition of span}};
\node[srcnode,anchor=north west] (c6) at ([xshift=1.5em,yshift=0.4em]c5.south west) {\small{$hypos$ = Compose($span[j, k], span[k, j+l]$)}}; \node[srcnode,anchor=north west] (c6) at ([xshift=1.5em,yshift=0.4em]c5.south west) {\normalsize{$hypos$ = Compose($span[j, k], span[k, j+l]$)}};
\node[srcnode,anchor=north west] (c7) at ([yshift=0.4em]c6.south west) {\small{$span[j, j+l]$.Update($hypos$)}}; \node[srcnode,anchor=north west] (c7) at ([yshift=0.4em]c6.south west) {\normalsize{$span[j, j+l]$.Update($hypos$)}};
\node[srcnode,anchor=north west] (c8) at ([xshift=-4.5em,yshift=0.4em]c7.south west) {\small{\textbf{return} $span[0, J]$}}; \node[srcnode,anchor=north west] (c8) at ([xshift=-4.5em,yshift=0.4em]c7.south west) {\normalsize{\textbf{return} $span[0, J]$}};
\node[anchor=west] (c9) at ([xshift=0em,yshift=1.7em]c1.west) {\scriptsize{\textrm{参数:}\textbf{s}为输入字符串。$G$为输入CFG。$J$为待分析字符串长度。}}; \node[anchor=west] (c9) at ([xshift=-3.2em,yshift=1.7em]c1.west) {\small{\textrm{参数:}\textbf{s}为输入字符串。$G$为输入CFG。$J$为待分析字符串长度。}};
\node[anchor=west] (c10) at ([xshift=0em,yshift=1.3em]c9.west) {\scriptsize{\textrm{输出:字符串全部可能的语法分析结果}}}; \node[anchor=west] (c10) at ([xshift=0em,yshift=1.3em]c9.west) {\small{\textrm{输出:字符串全部可能的语法分析结果}}};
\node[anchor=west] (c11) at ([xshift=0em,yshift=1.3em]c10.west) {\scriptsize{\textrm{输入:符合乔姆斯基范式的待分析字符串和一个上下文无关文法(CFG)}}}; \node[anchor=west] (c11) at ([xshift=0em,yshift=1.3em]c10.west) {\small{\textrm{输入:符合乔姆斯基范式的待分析字符串和一个上下文无关文法(CFG)}}};
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
\node[anchor=north west] (r7) at ([yshift=-0.4em]r61.south west) {$r_7$}; \node[anchor=north west] (r7) at ([yshift=-0.4em]r61.south west) {$r_7$};
\node[anchor=west] (rc7) at ([xshift=0em]r7.east) {$\textrm{X} \; \to \; \langle\ \text{组织 的}, \; \; \text{of}\ \rangle$}; \node[anchor=west] (rc7) at ([xshift=0em]r7.east) {$\textrm{X} \; \to \; \langle\ \text{组织 的}, \; \; \text{of}\ \rangle$};
\end{scope} \end{scope}
\node[anchor=south] (l1) at ([xshift=-9em,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}$}};
} }
\end{tikzpicture} \end{tikzpicture}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 引入短语翻译 %%% 引入短语翻译
{\scriptsize {\small
\begin{tabular}{l | l} \begin{tabular}{l | l}
{{\red{\sout{单词}}}词串翻译表} & P \\ \hline {{\red{\sout{单词}}}词串翻译表} & P \\ \hline
$\to$ I & 0.6 \\ $\to$ I & 0.6 \\
......
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 引入短语翻译 %%% 引入短语翻译
\begin{minipage}[c]{0.55\linewidth} \begin{minipage}[c]{0.48\linewidth}
\vspace{1em} \vspace{1em}
\begin{center} \begin{center}
\begin{tikzpicture} \begin{tikzpicture}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\begin{center} \begin{center}
\begin{tikzpicture} \begin{tikzpicture}
{\scriptsize {\small
\begin{scope}[sibling distance=5pt, level distance = 22pt] \begin{scope}[sibling distance=5pt, level distance = 22pt]
\Tree[.\node(s1){VP}; [.\node(s2){PP}; ] [.\node(s3){VP}; [.\node(s4){VV}; \node[fill=white](w1){表示}; ] [.\node(s5){NN}; ] ] ] \Tree[.\node(s1){VP}; [.\node(s2){PP}; ] [.\node(s3){VP}; [.\node(s4){VV}; \node[fill=white](w1){表示}; ] [.\node(s5){NN}; ] ] ]
\end{scope} \end{scope}
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la4) at (a41) {}; \node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la4) at (a41) {};
\node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la5) at (a30) {}; \node[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50] (la5) at (a30) {};
\node[anchor=west] (f1) at ([xshift=3em,yshift=0.8em]a43.east) {\footnotesize{$\textrm{P}_{lex}(\bar{t}|\bar{s})=w(t_1|s_1)\times$}}; \node[anchor=west] (f1) at ([xshift=3em,yshift=0.8em]a43.east) {\footnotesize{$\textrm{P}_{\textrm{lex}}(\bar{t}|\bar{s})=w(t_1|s_1)\times$}};
\node[anchor=north] (f2) at ([xshift=5.2em]f1.south) {\footnotesize{$\frac{1}{2}(w(t_2|s_2)+w(t_4|s_2))\times$}}; \node[anchor=north] (f2) at ([xshift=5.2em]f1.south) {\footnotesize{$\frac{1}{2}(w(t_2|s_2)+w(t_4|s_2))\times$}};
\node[anchor=north west] (f3) at (f2.south west) {\footnotesize{$w(N|s_3)\times$}}; \node[anchor=north west] (f3) at (f2.south west) {\footnotesize{$w(N|s_3)\times$}};
\node[anchor=north west] (f4) at (f3.south west) {\footnotesize{$w(t_4|s_4)\times$}}; \node[anchor=north west] (f4) at (f3.south west) {\footnotesize{$w(t_4|s_4)\times$}};
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\begin{scope}[yshift=-0in] \begin{scope}[yshift=-0in]
{\tiny {\scriptsize
\node[anchor=west] (ref) at (0,0) {{\sffamily\bfseries{参考答案:}} The Chinese star performance troupe presented a wonderful Peking opera as well as singing and dancing }; \node[anchor=west] (ref) at (0,0) {{\sffamily\bfseries{参考答案:}} The Chinese star performance troupe presented a wonderful Peking opera as well as singing and dancing };
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
\node[anchor=west] (synhifstpart6) at (synhifstpart5.east) {.}; \node[anchor=west] (synhifstpart6) at (synhifstpart5.east) {.};
\node[anchor=north west] (input) at ([yshift=-10em]synhifst.south west) {\sffamily\bfseries{源语句法树:}}; \node[anchor=north west] (input) at ([yshift=-6.5em]synhifst.south west) {\sffamily\bfseries{源语句法树:}};
\begin{scope}[scale = 0.9, grow'=up, sibling distance=15pt, level distance=23pt, xshift=2.8in, yshift=-2.8in] \begin{scope}[scale = 0.9, grow'=up, sibling distance=5pt, level distance=23pt, xshift=3.49in, yshift=-2.8in]
\Tree[.\node(tn1){IP}; \Tree[.\node(tn1){IP};
[.\node(tn2){NP}; \edge[roof]; \node[](seg1){中国$_1$ 明星$_2$ 艺术团$_3$}; ] [.\node(tn2){NP}; \edge[roof]; \node[](seg1){中国$_1$ 明星$_2$ 艺术团$_3$}; ]
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
\node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h21) (h25)] (gl2) {}; \node [rectangle,inner sep=0.1em,rounded corners=1pt,draw] [fit = (h21) (h25)] (gl2) {};
\draw [->,ublue,thick] ([xshift=0.6em,yshift=0.2em]n2.south) .. controls +(south:2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west); \draw [->,ublue,thick] ([xshift=0.6em,yshift=0.2em]n2.south) .. controls +(south:2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west);
\draw [->,ublue,thick] ([xshift=0em,yshift=2em]gl1.east) .. controls +(south:3em) and +(east:0em) .. ([xshift=-0em,yshift=1.6em]gl2.west); \draw [->,ublue,thick] ([xshift=0em,yshift=1em]gl1.east) .. controls +(north:2.2em) and +(east:0em) .. ([xshift=-0em,yshift=2em]gl2.west);
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\begin{center} \begin{center}
\begin{tikzpicture} \begin{tikzpicture}
{\scriptsize {
\begin{scope}[sibling distance=5pt, level distance = 22pt] \begin{scope}[sibling distance=5pt, level distance = 22pt]
\Tree[.\node(s1){VP}; [.\node(s2){PP}; ] [.\node(s3){VP}; [.\node(s4){VV}; \node[fill=white](w1){表示}; ] [.\node(s5){NN}; ] ] ] \Tree[.\node(s1){VP}; [.\node(s2){PP}; ] [.\node(s3){VP}; [.\node(s4){VV}; \node[fill=white](w1){表示}; ] [.\node(s5){NN}; ] ] ]
\end{scope} \end{scope}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\begin{center} \begin{center}
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope}[scale=0.9,level distance=30pt,sibling distance=0pt] \begin{scope}[scale=0.9,level distance=30pt,sibling distance=7pt]
{\scriptsize {\scriptsize
\Tree[.\node(bsn0){IP}; \Tree[.\node(bsn0){IP};
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
\draw [->,thick] (bsw3.east) -- (target.west); \draw [->,thick] (bsw3.east) -- (target.west);
\node [anchor=west] (sourcelabel) at ([xshift=4em,yshift=-1em]bsn0.east) {显式输入的结构}; \node [anchor=west] (sourcelabel) at ([xshift=4em,yshift=-1em]bsn0.east) {显式输入的结构};
\node [anchor=west] (source2) at ([xshift=5em]target.east) {猫 喜欢 吃}; \node [anchor=west] (source2) at ([xshift=3.3em]target.east) {$\ \ \;$喜欢$\ \;$\ };
\node [anchor=west] (target2) at ([xshift=1em]source2.east) {Cats like eating fish}; \node [anchor=west] (target2) at ([xshift=1em]source2.east) {Cats like eating fish};
\node [anchor=north,inner sep=3pt] (cap2) at ([xshift=2em,yshift=-1em]target2.south west) {(b) 基于串的解码}; \node [anchor=north,inner sep=3pt] (cap2) at ([xshift=1.1em,yshift=-1em]target2.south west) {(b) 基于串的解码};
\draw [->,thick] (source2.east) -- (target2.west); \draw [->,thick] (source2.east) -- (target2.west);
\begin{scope}[xshift=2.55in,yshift=-1em,sibling distance=3pt] \begin{scope}[xshift=2.55in,yshift=-1em,sibling distance=7pt]
\Tree[.\node(bsn0){IP}; \Tree[.\node(bsn0){IP};
[.\node(bsn1){NP}; [.\node(bsn1){NP};
[.\node(bsn2){NN}; ] [.\node(bsn2){NN}; ]
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
\node [anchor=west] (p1line1) at ([xshift=3.5em,yshift=0.5em]a75.east) {\footnotesize{M(monotone):单调调序}}; \node [anchor=west] (p1line1) at ([xshift=3.5em,yshift=0.5em]a75.east) {\footnotesize{M(monotone):单调调序}};
\node [anchor=north west] (p1line2) at ([xshift=0,yshift=-1em]p1line1.south west) {\footnotesize{S(swap): 与前面一个短语}}; \node [anchor=north west] (p1line2) at ([xshift=0,yshift=-1em]p1line1.south west) {\footnotesize{S(swap): 与前面一个短语}};
\node [anchor=north west] (p1line3) at ([xshift=3.5em]p1line2.south west) {\footnotesize{位置进行交换}}; \node [anchor=north west] (p1line3) at ([xshift=3.5em]p1line2.south west) {\footnotesize{位置进行交换}};
\node [anchor=north west] (p1line4) at ([xshift=-3.8em,yshift=-1em]p1line3.south west) {\footnotesize{D(discontinuous):非连续调序}}; \node [anchor=north west] (p1line4) at ([xshift=-3.5em,yshift=-1em]p1line3.south west) {\footnotesize{D(discontinuous):非连续调序}};
\node [anchor=east] (p1line5) at ([xshift=0em,yshift=3em]p1line4.east) {}; \node [anchor=east] (p1line5) at ([xshift=0em,yshift=3em]p1line4.east) {};
\node [anchor=east] (p1line6) at ([xshift=0em,yshift=7em]p1line4.east) {}; \node [anchor=east] (p1line6) at ([xshift=0em,yshift=7em]p1line4.east) {};
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
\begin{center} \begin{center}
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope}[scale=0.9] \begin{scope}[scale=1]
\Tree[.\node(sn1){VP}; \Tree[.\node(sn1){VP};
[.\node(sn2){VV}; \node(scw1){提高}; ] [.\node(sn2){VV}; \node(scw1){提高}; ]
[.\node(sn3){NN}; ] [.\node(sn3){NN}; ]
......
...@@ -48,31 +48,31 @@ ...@@ -48,31 +48,31 @@
\end{scope} \end{scope}
\node[anchor=north](t1) at (4.7,0.3){{\scriptsize{抽取得到的规则(子树对齐)}}}; \node[anchor=north](t1) at (4.7,0.3){{\footnotesize{抽取得到的规则(子树对齐)}}};
\node[anchor=north](t2) at ([xshift=3.7em,yshift=0.5em]t1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}}; \node[anchor=north](t2) at ([xshift=3.7em,yshift=0.5em]t1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}};
\node[anchor=north](t3) at ([xshift=-7.7em,yshift=0.0em]t2.south){\color{gray!70}\scriptsize{$r_1$}}; \node[anchor=north](t3) at ([xshift=-7.7em,yshift=0.0em]t2.south){\color{gray!70}\footnotesize{$r_1$}};
\node[anchor=west](t3-1) at ([xshift=0.0em,yshift=0.0em]t3.east){\color{gray!70}\scriptsize{AS(了) $\rightarrow$ DT(the)}}; \node[anchor=west](t3-1) at ([xshift=0.0em,yshift=0.0em]t3.east){\color{gray!70}\footnotesize{AS(了) $\rightarrow$ DT(the)}};
\node[anchor=north](t4) at ([xshift=0.0em,yshift=0.0em]t3.south){\color{gray!70}\scriptsize{$r_2$}}; \node[anchor=north](t4) at ([xshift=0.0em,yshift=0.0em]t3.south){\color{gray!70}\footnotesize{$r_2$}};
\node[anchor=west](t4-1) at ([xshift=0.0em,yshift=0.0em]t4.east){\color{gray!70}\scriptsize{NN(进口) $\rightarrow$ NNS(imports)}}; \node[anchor=west](t4-1) at ([xshift=0.0em,yshift=0.0em]t4.east){\color{gray!70}\footnotesize{NN(进口) $\rightarrow$ NNS(imports)}};
\node[anchor=north](t5) at ([xshift=0.0em,yshift=0.0em]t4.south){\scriptsize{$r_3$}}; \node[anchor=north](t5) at ([xshift=0.0em,yshift=0.0em]t4.south){\footnotesize{$r_3$}};
\node[anchor=west](t5-1) at ([xshift=0.0em,yshift=0.0em]t5.east){\scriptsize{AD(大幅度) $\rightarrow$ RB(drastically)}}; \node[anchor=west](t5-1) at ([xshift=0.0em,yshift=0.0em]t5.east){\footnotesize{AD(大幅度) $\rightarrow$ RB(drastically)}};
\node[anchor=north](t6) at ([xshift=0.0em,yshift=0.0em]t5.south){\scriptsize{$r_4$}}; \node[anchor=north](t6) at ([xshift=0.0em,yshift=0.0em]t5.south){\footnotesize{$r_4$}};
\node[anchor=west](t6-1) at ([xshift=0.0em,yshift=0.0em]t6.east){\scriptsize{VV(下降) $\rightarrow$ VBN(fallen)}}; \node[anchor=west](t6-1) at ([xshift=0.0em,yshift=0.0em]t6.east){\footnotesize{VV(下降) $\rightarrow$ VBN(fallen)}};
\node[anchor=north](t7) at ([xshift=0.0em,yshift=0.0em]t6.south){\color{gray!70}\scriptsize{$r_5$}}; \node[anchor=north](t7) at ([xshift=0.0em,yshift=0.0em]t6.south){\color{gray!70}\footnotesize{$r_5$}};
\node[anchor=west](t7-1) at ([xshift=0.0em,yshift=0.0em]t7.east){\color{gray!70}\scriptsize{IP(NN$_1$ VP(AD$_2$ VP(VV$_3$ AS$_4$)) $\rightarrow$}}; \node[anchor=west](t7-1) at ([xshift=0.0em,yshift=0.0em]t7.east){\color{gray!70}\footnotesize{IP(NN$_1$ VP(AD$_2$ VP(VV$_3$ AS$_4$)) $\rightarrow$}};
\node[anchor=north](t8) at ([xshift=7.4em,yshift=0.0em]t7.south){\color{gray!70}\tiny{S(NP(DT$_4$ NNS$_1$) VP(VBZ(have) ADVP(RB$_2$ VBN$_3$))}}; \node[anchor=north](t8) at ([xshift=9.4em,yshift=0.0em]t7.south){\color{gray!70}\scriptsize{S(NP(DT$_4$ NNS$_1$) VP(VBZ(have) ADVP(RB$_2$ VBN$_3$))}};
\node[anchor=north](s3) at ([xshift=0.0em,yshift=-1.3em]t7.south){\red{\scriptsize{$r_{6}$}}}; \node[anchor=north](s3) at ([xshift=0.0em,yshift=-1.3em]t7.south){\red{\footnotesize{$r_{6}$}}};
\node[anchor=west](s3-1) at ([xshift=0.0em,yshift=0.0em]s3.east){\red{\scriptsize{AS(了) $\rightarrow$ VBZ(have)}}}; \node[anchor=west](s3-1) at ([xshift=0.0em,yshift=0.0em]s3.east){\red{\footnotesize{AS(了) $\rightarrow$ VBZ(have)}}};
\node[anchor=north](s4) at ([xshift=0.0em,yshift=0.0em]s3.south){\red{\scriptsize{$r_{7}$}}}; \node[anchor=north](s4) at ([xshift=0.0em,yshift=0.0em]s3.south){\red{\footnotesize{$r_{7}$}}};
\node[anchor=west](s4-1) at ([xshift=0.0em,yshift=0.0em]s4.east){\red{\scriptsize{NN(进口) $\rightarrow$}}}; \node[anchor=west](s4-1) at ([xshift=0.0em,yshift=0.0em]s4.east){\red{\footnotesize{NN(进口) $\rightarrow$}}};
\node[anchor=north](s5) at ([xshift=0.0em,yshift=0.0em]s4.south){\scriptsize{\color{white}{$r_{?}$}}}; \node[anchor=north](s5) at ([xshift=0.0em,yshift=0.0em]s4.south){\footnotesize{\color{white}{$r_{?}$}}};
\node[anchor=west](s5-1) at ([xshift=0.0em,yshift=0.0em]s5.east){\red{\scriptsize{NP(DT(the) NNS(imports))}}}; \node[anchor=west](s5-1) at ([xshift=0.0em,yshift=0.0em]s5.east){\red{\footnotesize{NP(DT(the) NNS(imports))}}};
\node[anchor=north](s6) at ([xshift=0.0em,yshift=0.0em]s5.south){\red{\scriptsize{$r_{8}$}}}; \node[anchor=north](s6) at ([xshift=0.0em,yshift=0.0em]s5.south){\red{\footnotesize{$r_{8}$}}};
\node[anchor=west](s6-1) at ([xshift=0.0em,yshift=0.0em]s6.east){\red{\scriptsize{VP(AD$_1$ VP(VV$_2$ AS$_3$)) $\rightarrow$}}}; \node[anchor=west](s6-1) at ([xshift=0.0em,yshift=0.0em]s6.east){\red{\footnotesize{VP(AD$_1$ VP(VV$_2$ AS$_3$)) $\rightarrow$}}};
\node[anchor=north](s7) at ([xshift=0.0em,yshift=0.0em]s6.south){\red{\scriptsize{\color{white}{$r_{?}$}}}}; \node[anchor=north](s7) at ([xshift=0.0em,yshift=0.0em]s6.south){\red{\footnotesize{\color{white}{$r_{?}$}}}};
\node[anchor=west](s7-1) at ([xshift=0.0em,yshift=0.0em]s7.east){\red{\scriptsize{VP(VBZ$_3$ ADVP(RB$_1$ VBN$_2$)}}}; \node[anchor=west](s7-1) at ([xshift=0.0em,yshift=0.0em]s7.east){\red{\footnotesize{VP(VBZ$_3$ ADVP(RB$_1$ VBN$_2$)}}};
\node[anchor=north](s8) at ([xshift=0.0em,yshift=0.0em]s7.south){\red{\scriptsize{$r_{9}$}}}; \node[anchor=north](s8) at ([xshift=0.0em,yshift=0.0em]s7.south){\red{\footnotesize{$r_{9}$}}};
\node[anchor=west](s8-1) at ([xshift=0.0em,yshift=0.0em]s8.east){\red{\scriptsize{IP(NN$_1$ VP$_2$) $\rightarrow$ S(NP$_1$ VP$_2$)}}}; \node[anchor=west](s8-1) at ([xshift=0.0em,yshift=0.0em]s8.east){\red{\footnotesize{IP(NN$_1$ VP$_2$) $\rightarrow$ S(NP$_1$ VP$_2$)}}};
\end{tikzpicture} \end{tikzpicture}
...@@ -44,30 +44,30 @@ ...@@ -44,30 +44,30 @@
\end{scope} \end{scope}
\node[anchor=north](t1) at (4.5,0.3){{\scriptsize{抽取得到的规则}}}; \node[anchor=north](t1) at (4.5,0.3){{\footnotesize{抽取得到的规则}}};
\node[anchor=north](t2) at ([xshift=5.5em,yshift=0.5em]t1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}}; \node[anchor=north](t2) at ([xshift=5.5em,yshift=0.5em]t1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}};
\node[anchor=north](t3) at ([xshift=-7.7em,yshift=0.0em]t2.south){\scriptsize{$r_1$}}; \node[anchor=north](t3) at ([xshift=-7.7em,yshift=0.0em]t2.south){\footnotesize{$r_1$}};
\node[anchor=west](t3-1) at ([xshift=0.0em,yshift=0.0em]t3.east){\scriptsize{AS(了) $\rightarrow$ DT(the)}}; \node[anchor=west](t3-1) at ([xshift=0.0em,yshift=0.0em]t3.east){\footnotesize{AS(了) $\rightarrow$ DT(the)}};
\node[anchor=north](t4) at ([xshift=0.0em,yshift=0.0em]t3.south){\scriptsize{$r_2$}}; \node[anchor=north](t4) at ([xshift=0.0em,yshift=0.0em]t3.south){\footnotesize{$r_2$}};
\node[anchor=west](t4-1) at ([xshift=0.0em,yshift=0.0em]t4.east){\scriptsize{NN(进口) $\rightarrow$ NNS(imports)}}; \node[anchor=west](t4-1) at ([xshift=0.0em,yshift=0.0em]t4.east){\footnotesize{NN(进口) $\rightarrow$ NNS(imports)}};
\node[anchor=north](t5) at ([xshift=0.0em,yshift=0.0em]t4.south){\scriptsize{$r_3$}}; \node[anchor=north](t5) at ([xshift=0.0em,yshift=0.0em]t4.south){\footnotesize{$r_3$}};
\node[anchor=west](t5-1) at ([xshift=0.0em,yshift=0.0em]t5.east){\scriptsize{AD(大幅度) $\rightarrow$ RB(drastically)}}; \node[anchor=west](t5-1) at ([xshift=0.0em,yshift=0.0em]t5.east){\footnotesize{AD(大幅度) $\rightarrow$ RB(drastically)}};
\node[anchor=north](t6) at ([xshift=0.0em,yshift=0.0em]t5.south){\scriptsize{$r_4$}}; \node[anchor=north](t6) at ([xshift=0.0em,yshift=0.0em]t5.south){\footnotesize{$r_4$}};
\node[anchor=west](t6-1) at ([xshift=0.0em,yshift=0.0em]t6.east){\scriptsize{VV(下降) $\rightarrow$ VBN(fallen)}}; \node[anchor=west](t6-1) at ([xshift=0.0em,yshift=0.0em]t6.east){\footnotesize{VV(下降) $\rightarrow$ VBN(fallen)}};
\node[anchor=north](t7) at ([xshift=0.0em,yshift=0.0em]t6.south){\scriptsize{$r_6$}}; \node[anchor=north](t7) at ([xshift=0.0em,yshift=0.0em]t6.south){\footnotesize{$r_6$}};
\node[anchor=west](t7-1) at ([xshift=0.0em,yshift=0.0em]t7.east){\scriptsize{IP(NN$_1$ VP(AD$_2$ VP(VV$_3$ AS$_4$)) $\rightarrow$}}; \node[anchor=west](t7-1) at ([xshift=0.0em,yshift=0.0em]t7.east){\footnotesize{IP(NN$_1$ VP(AD$_2$ VP(VV$_3$ AS$_4$)) $\rightarrow$}};
\node[anchor=north](t8) at ([xshift=7.4em,yshift=0.0em]t7.south){\tiny{S(NP(DT$_4$ NNS$_1$) VP(VBZ(have) ADVP(RB$_2$ VBN$_3$))}}; \node[anchor=north](t8) at ([xshift=9.4em,yshift=0.0em]t7.south){\scriptsize{S(NP(DT$_4$ NNS$_1$) VP(VBZ(have) ADVP(RB$_2$ VBN$_3$))}};
\node[anchor=north](s1) at ([yshift=-8.0em]t1.south){{\scriptsize{无法得到的规则}}}; \node[anchor=north](s1) at ([yshift=-8.0em]t1.south){{\footnotesize{无法得到的规则}}};
\node[anchor=north](s2) at ([xshift=5.5em,yshift=0.5em]s1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}}; \node[anchor=north](s2) at ([xshift=5.5em,yshift=0.5em]s1.south){\underline{\qquad \qquad \qquad \quad \qquad \qquad \qquad \qquad \qquad}};
\node[anchor=north](s3) at ([xshift=-7.7em,yshift=0.0em]s2.south){\scriptsize{$r_{?}$}}; \node[anchor=north](s3) at ([xshift=-7.7em,yshift=0.0em]s2.south){\footnotesize{$r_{?}$}};
\node[anchor=west](s3-1) at ([xshift=0.0em,yshift=0.0em]s3.east){\scriptsize{AS(了) $\rightarrow$ VBZ(have)}}; \node[anchor=west](s3-1) at ([xshift=0.0em,yshift=0.0em]s3.east){\footnotesize{AS(了) $\rightarrow$ VBZ(have)}};
\node[anchor=north](s4) at ([xshift=0.0em,yshift=0.0em]s3.south){\scriptsize{$r_{?}$}}; \node[anchor=north](s4) at ([xshift=0.0em,yshift=0.0em]s3.south){\footnotesize{$r_{?}$}};
\node[anchor=west](s4-1) at ([xshift=0.0em,yshift=0.0em]s4.east){\scriptsize{NN(进口) $\rightarrow$}}; \node[anchor=west](s4-1) at ([xshift=0.0em,yshift=0.0em]s4.east){\footnotesize{NN(进口) $\rightarrow$}};
\node[anchor=north](s5) at ([xshift=0.0em,yshift=0.0em]s4.south){\scriptsize{\color{white}{$r_{?}$}}}; \node[anchor=north](s5) at ([xshift=0.0em,yshift=0.0em]s4.south){\footnotesize{\color{white}{$r_{?}$}}};
\node[anchor=west](s5-1) at ([xshift=0.0em,yshift=0.0em]s5.east){\scriptsize{NP(DT(the) NNS(imports))}}; \node[anchor=west](s5-1) at ([xshift=0.0em,yshift=0.0em]s5.east){\footnotesize{NP(DT(the) NNS(imports))}};
\node[anchor=north](s6) at ([xshift=0.0em,yshift=0.0em]s5.south){\scriptsize{$r_{?}$}}; \node[anchor=north](s6) at ([xshift=0.0em,yshift=0.0em]s5.south){\footnotesize{$r_{?}$}};
\node[anchor=west](s6-1) at ([xshift=0.0em,yshift=0.0em]s6.east){\scriptsize{IP(NN$_1$ VP$_2$) $\rightarrow$ S(NP$_1$ VP$_2$)}}; \node[anchor=west](s6-1) at ([xshift=0.0em,yshift=0.0em]s6.east){\footnotesize{IP(NN$_1$ VP$_2$) $\rightarrow$ S(NP$_1$ VP$_2$)}};
\end{tikzpicture} \end{tikzpicture}
......
% !Mode:: "TeX:UTF-8"
% !TEX encoding = UTF-8 Unicode
\def\CTeXPreproc{Created by ctex v0.2.13, don't edit!}
\documentclass[cjk,t,compress,12pt]{beamer}
\usepackage{pstricks}
\usepackage{etex}
\usepackage{eso-pic,graphicx}
\usepackage{fancybox}
\usepackage{amsmath,amssymb}
\usepackage{setspace}
\usepackage{xcolor}
\usepackage{CJK}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{hyperref}
\usepackage{ulem}
\usepackage{multirow}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usetikzlibrary{calc,intersections}
\usetikzlibrary{matrix}
\usetikzlibrary{patterns}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usetikzlibrary{shadows}
\usetikzlibrary{shadows.blur}
\usepgflibrary{arrows}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{positioning,fit,calc}
\usetikzlibrary{mindmap,backgrounds} % mind map
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\setbeamertemplate{items}[ball]
\usefonttheme[onlymath]{serif}
\definecolor{ugreen}{rgb}{0,0.5,0}
\definecolor{lgreen}{rgb}{0.9,1,0.8}
\definecolor{xtgreen1}{rgb}{0.824,0.898,0.8}
\definecolor{xtgreen}{rgb}{0.914,0.945,0.902}
\definecolor{lightgray}{gray}{0.85}
\setbeamercolor{uppercol}{fg=white,bg=ugreen}
\setbeamercolor{lowercol}{fg=black,bg=xtgreen}
\definecolor{darkred}{rgb}{0.55, 0.0, 0.0}
\definecolor{alizarin}{rgb}{0.82, 0.1, 0.26}
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\setbeamercolor{uppercolblue}{fg=white,bg=ublue}
\setbeamercolor{lowercolblue}{fg=black,bg=blue!10}
\usefonttheme[onlylarge]{structurebold}
\newlength{\mystep}
\newlength{\base}
\newlength{\wseg}
\newlength{\hseg}
\newlength{\wnode}
\newlength{\hnode}
\IfFileExists{C:/WINDOWS/win.ini}
{\newcommand{\mycfont}{you}}
{\newcommand{\mycfont}{gbsn}}
\begin{CJK}{UTF8}{\mycfont}
\end{CJK}
\setbeamerfont*{frametitle}{size=\large,series=\bfseries}
\setbeamertemplate{navigation symbols}{\begin{CJK}{UTF8}{\mycfont} 第四章 基于短语和句法的统计翻译模型 \hspace*{2em} 肖桐\&朱靖波 \end{CJK} \hspace*{2em} \today \hspace*{2em} \insertframenumber{}/\inserttotalframenumber}
\setbeamertemplate{itemize items}[circle] % if you want a circle
\setbeamertemplate{itemize subitem}[triangle] % if you want a triangle
\setbeamertemplate{itemize subsubitem}[ball] % if you want a ball
\begin{document}
\begin{CJK}{UTF8}{\mycfont}
\title{\Large{基于短语和句法的统计翻译模型}}
\author{\large{\textbf{肖桐\ \ 朱靖波}}}
\institute{
\blue{\url{xiaotong@mail.neu.edu.cn}} \black{} \\
\blue{\url{zhujingbo@mail.neu.edu.cn}} \black{} \\
\vspace{1.0em}
东北大学 自然语言处理实验室 \\
\blue{\underline{\url{http://www.nlplab.com}}} \black{} \\
\vspace{0.2cm}
\hspace{0.1cm} \includegraphics[scale=0.1]{../Figures/logo.pdf}
}
\date{}
\maketitle
\setlength{\leftmargini}{1em}
\setlength{\leftmarginii}{1em}
%%%------------------------------------------------------------------------------------------------------------
\section{使用更大的翻译单元}
%%%------------------------------------------------------------------------------------------------------------
\section{基于短语的模型}
%%%------------------------------------------------------------------------------------------------------------
\subsection{建模}
%%%------------------------------------------------------------------------------------------------------------
\subsection{短语抽取}
%%%------------------------------------------------------------------------------------------------------------
\subsection{判别式模型及特征}
%%%------------------------------------------------------------------------------------------------------------
\subsection{最小错误率训练}
%%%------------------------------------------------------------------------------------------------------------
\subsection{栈解码}
%%%------------------------------------------------------------------------------------------------------------
\section{基于层次短语的模型}
%%%------------------------------------------------------------------------------------------------------------
\subsection{同步上下文无关文法}
%%%------------------------------------------------------------------------------------------------------------
\subsection{层次短语规则及翻译特征}
%%%------------------------------------------------------------------------------------------------------------
\subsection{基于chart的解码}
%%%------------------------------------------------------------------------------------------------------------
\subsection{剪枝}
%%%------------------------------------------------------------------------------------------------------------
\section{基于语言学句法的模型}
%%%------------------------------------------------------------------------------------------------------------
\subsection{基于树结构的文法}
%%%------------------------------------------------------------------------------------------------------------
\subsection{翻译规则抽取}
%%%------------------------------------------------------------------------------------------------------------
\subsection{引入双语句法信息}
%%%------------------------------------------------------------------------------------------------------------
\subsection{规则匹配}
%%%------------------------------------------------------------------------------------------------------------
\subsection{改进方法}
%%%------------------------------------------------------------------------------------------------------------
%%% last slide
\begin{frame}{Last Slide}
\vspace{1em}
\begin{center}
\begin{tikzpicture}
\begin{scope}[level distance=25pt]
\node[] (x) at (-4,0) {};
\begin{scope}[sibling distance=15pt]
\Tree[.\node(en1){VP};
[.\node(en2){VP};
[.VB \textbf{Thank} ]
[.PRP \textbf{you} ]
]
[.\node(en3){ADJP};
[.RB \textbf{very} ]
[.JJ \textbf{much} ]
]
]
\end{scope}
\begin{scope}[grow'=up, xshift=-0.2in, yshift=-2.6in, sibling distance=34pt]
\Tree[.\node(cn1){VP};
[.\node(cn2){ADVP}; [.AD \textbf{非常} ] ]
[.\node(cn3){VP};
[.VV \textbf{感谢} ]
[.PR \textbf{大家} ]
]
]
\end{scope}
\draw[<->, very thick, dotted, red] (cn1.east) .. controls +(east:4.5) and +(east:4.5) .. (en1.east);
\draw[<->, very thick, dotted, ugreen] (cn2.east) .. controls +(east:2) and +(west:2) .. (en3.west);
\draw[<->, very thick, dotted, blue] (cn3.west) .. controls +(west:2) and +(south:2) .. (en2.south);
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame}
\end{CJK}
\end{document}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论