Commit e46c4b29 by Lee
parents 4618854c 686fef16
...@@ -124,52 +124,15 @@ ...@@ -124,52 +124,15 @@
\section{基于层次短语的模型} \section{基于层次短语的模型}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 短语系统的问题 - 数据稀疏和无法处理长距离依赖 %%% 使用翻译规则
\begin{frame}{基于短语的方法的不足} \begin{frame}{使用翻译规则描述翻译过程}
\begin{itemize} \begin{itemize}
\item 短语可以很好的捕捉词语之间的局部搭配和调序,但是长距离依赖需要更长的短语 \item 翻译过程可以用上述规则描述
\begin{itemize} \begin{itemize}
\item 实践中发现使用超过长度3的短语作用不大 \item 规则的源语和目标语端都对应连续的词串
\item 短语非常稀疏,包含多个词的短语大多非常低频 \item 每个变量在源语和目标语端可以被同步替换
\end{itemize} \end{itemize}
\vspace{0.5em}
\begin{center}
\begin{tabular}{l | r}
短语(中文) & 训练数据中出现频次 \\ \hline
包含 & 3341 \\
包含 多个 & 213 \\
包含 多个 词 & 12 \\
包含 多个 词 的 & 8 \\
包含 多个 词 的 短语 & 0 \\
包含 多个 词 的 短语 大多 & 0
\end{tabular}
\end{center}
\vspace{0.5em}
\item 简单使用短语和$n$-gram语言模型无法处理长距离的调序
\begin{itemize}
\item 引入独立的调序模型,比如简单的基于距离的调序
\item 当然,也可以设计更加复杂的调序模型
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 短语系统的问题 - 一个实例
\begin{frame}{基于短语的方法的不足 - 一个实例}
\begin{itemize}
\item 一个短语翻译不成功的例子
\end{itemize} \end{itemize}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\node [anchor=east] (shead) at (0,0) {源语:};
\end{scope}
\end{tikzpicture}
\end{center}
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
......
...@@ -1364,7 +1364,7 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P ...@@ -1364,7 +1364,7 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 短语系统的问题 %%% 短语系统的问题 - 数据稀疏和无法处理长距离依赖
\begin{frame}{基于短语的方法的不足} \begin{frame}{基于短语的方法的不足}
\begin{itemize} \begin{itemize}
\item 短语可以很好的捕捉词语之间的局部搭配和调序,但是长距离依赖需要更长的短语 \item 短语可以很好的捕捉词语之间的局部搭配和调序,但是长距离依赖需要更长的短语
...@@ -1373,24 +1373,94 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P ...@@ -1373,24 +1373,94 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\item 短语非常稀疏,包含多个词的短语大多非常低频 \item 短语非常稀疏,包含多个词的短语大多非常低频
\end{itemize} \end{itemize}
\vspace{0.5em}
\begin{center}
\begin{tabular}{l | r} \begin{tabular}{l | r}
短语(中文) & 训练数据中频次 \hline \\ 短语(中文) & 训练数据中出现频次 \\ \hline
包含 & 3341 \\ 包含 & 3341 \\
包含 多个 & 213 \\ 包含 多个 & 213 \\
包含 多个 词 & 12 \\
包含 多个 词 的 & 8 \\
包含 多个 词 的 短语 & 0 \\
包含 多个 词 的 短语 大多 & 0
\end{tabular} \end{tabular}
\end{center}
\vspace{0.5em}
\item<2-> 简单使用短语和$n$-gram语言模型无法处理长距离的调序
\begin{itemize}
\item 引入独立的调序模型,比如简单的基于距离的调序
\item 当然,也可以设计更加复杂的调序模型
\end{itemize}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 可能的解决方法 %%% 短语系统的问题 - 一个实例
\begin{frame}{需要更好的建模语言的层次结构} \begin{frame}{基于短语的方法的不足 - 一个实例}
% David Chiang ACL2005的论文 \begin{itemize}
\item 一个短语翻译不成功的例子(Chiang, 2015)
\end{itemize}
\vspace{-1.5em}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\node [anchor=east] (shead) at (0,0) {源语:};
\node [anchor=west] (swords) at (shead.east) {澳洲\ \ \ \ \ \ 北韩\ \ \ \ 邦交\ \ \ \ 少数\ \ 国家\ \ 之一};
\node [anchor=north east] (thead) at ([yshift=-0.8em]shead.south east) {短语系统:};
\node [anchor=west] (twords) at (thead.east) {Australia is diplomatic relations with North Korea};
\node [anchor=north west] (twords2) at ([yshift=-0.2em]twords.south west) {is one of the few countries};
\node [anchor=north east] (rhead) at ([yshift=-2.2em]thead.south east) {参考译文:};
\node [anchor=west] (rwords) at (rhead.east) {Australia is one of the few countries that have};
\node [anchor=north west] (rwords2) at ([yshift=-0.2em]rwords.south west) {diplomatic relations with North Korea};
\begin{pgfonlayer}{background}
\visible<2->{
\draw[fill=red!20,draw=white] ([xshift=-5.6em]twords.north) rectangle ([xshift=11em]twords.south);
\draw[fill=blue!20,draw=white] ([xshift=-4.8em]twords2.north) rectangle ([xshift=6.3em]twords2.south);
\node [anchor=south east,inner sep=1pt,fill=black] (l1) at ([xshift=11em]twords.south) {\tiny{{\color{white} 1}}};
\node [anchor=south east,inner sep=1pt,fill=black] (l2) at ([xshift=6.3em]twords2.south) {\tiny{{\color{white} 2}}};
}
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\begin{itemize}
\item<2-> 从短语系统翻译结果可以看出
\begin{itemize}
\item diplomatic relations with North Korea能够进行正确调序
\item one of the few countries能够进行正确调序
\item \textbf{但是},两个短语(\tikz{\node[fill=black,inner sep=2pt] {\tiny{{\color{white} 1}}};}\tikz{\node[fill=black,inner sep=2pt] {\tiny{{\color{white} 2}}};})没有正确调序 - 怎么办?
\end{itemize}
\end{itemize}
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 基于句法的翻译系统流程 %%% 引入层次短语规则
\begin{frame}{基于同步文法/句法的机器翻译流程} \begin{frame}{引入新的翻译单元}
% Manual第42页 \begin{itemize}
\item 显然,通过由连续单词构成的短语拼装出理想的译文需要比较复杂的机制。但是,语言是有``结构''的,我们可以用一种新的方式描述翻译:
\begin{displaymath}
<\textrm{}\ X_1\ \textrm{}\ X_2,\ \ \textrm{have}\ X_2\ \textrm{with}\ X_1>
\end{displaymath}
这里,$X_1$$X_2$表示变量,源语和目标语相同的变量表示对应关系,变量可以被其它连续词串替换。这样,这种源语言和目标语言的对应构成了一种翻译规则或模版,相当于把``$\textrm{}\ X_1\ \textrm{}\ X_2$''翻译为``$\textrm{have}\ X_2\ \textrm{with}\ X_1$'',调序信息就隐含在变量的编号里
\vspace{0.5em}
\item<2-> 类似的,可以写出很多这样的翻译规则
\vspace{-1.5em}
\begin{eqnarray}
<X_1\ \textrm{}\ X_2, & & X_1\ \textrm{is}\ X_2> \nonumber \\
<X_1\ \textrm{之一},& & \textrm{one\ \ of\ \ }X_1> \nonumber \\
<X_1\ \textrm{}\ X_2,& & X_2\ \textrm{that\ \ have\ \ }X_1> \nonumber
\end{eqnarray}
\end{itemize}
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
...@@ -1398,7 +1468,7 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P ...@@ -1398,7 +1468,7 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% 上下文无关文法 %%% 上下文无关文法
\begin{frame}{上下文无关文法} \begin{frame}{同步上下文无关文法}
% 形式定义 % 形式定义
\end{frame} \end{frame}
...@@ -1409,6 +1479,17 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P ...@@ -1409,6 +1479,17 @@ $d$是一个$(\textbf{s},\textbf{t})$上基于短语的翻译推导,$\textrm{P
\end{frame} \end{frame}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
%%% glue rule
\begin{frame}{胶水规则}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 基于句法的翻译系统流程
\begin{frame}{基于同步文法/句法的机器翻译流程}
% Manual第42页
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\subsection{层次短语规则及翻译特征} \subsection{层次短语规则及翻译特征}
%%%------------------------------------------------------------------------------------------------------------ %%%------------------------------------------------------------------------------------------------------------
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论