\def\CTeXPreproc{Created by ctex v0.2.13, don't edit!}
\documentclass[cjk,t,compress,12pt]{beamer}
%\documentclass{article}
%\usepackage{beamerarticle}
\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}

\usepgflibrary{arrows} % LATEX and plain TEX and pure pgf
\usetikzlibrary{arrows} % LATEX and plain TEX when using Tik Z
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes,shadows}

\usetikzlibrary{positioning,fit,calc}

\usetikzlibrary{mindmap,backgrounds} % mind map

\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

\setbeamertemplate{items}[ball]
\usefonttheme[onlymath]{serif}  % fout of math

\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{ublue}{rgb}{0,0.298,0.525}
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\setbeamercolor{uppercolblue}{fg=white,bg=ublue}
\setbeamercolor{lowercolblue}{fg=black,bg=blue!10}


%\usetheme{default}
%\usetheme{Darmstadt}
%\usetheme{Madrid}
%\usetheme{Frankfurt}
%\usetheme{Dresden}
%\usetheme{Boadilla}
%\usecolortheme{dolphin}


\usefonttheme[onlylarge]{structurebold}

\begin{CJK}{GBK}{song}
\end{CJK}

\setbeamerfont*{frametitle}{size=\large,series=\bfseries}
\setbeamertemplate{navigation symbols}{\begin{CJK}{GBK}{hei} 第一章 机器翻译简介 \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 wnat a triangle
\setbeamertemplate{itemize subsubitem}[ball] % if you want a ball

\begin{document}

\begin{CJK}{GBK}{you}

\title{\LARGE{机器翻译简介}}
\subtitle{背景 + 概念 + 方法概述}
\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{机器翻译}

%%%------------------------------------------------------------------------------------------------------------
\subsection{基本概念}

%%%------------------------------------------------------------------------------------------------------------
%%% 啥是翻译
\begin{frame}{翻译}

广义上来说，"翻译"是指把一个事物转化为另一个事物的过程。这个概念多使用在\alert{对可序列化的符号串的转化}上，比如
\begin{itemize}
\item \textbf{程序编译}：\\
      从一种编程语言的代码转化到另外一种语言的代码
\item \textbf{文字翻译}：\\
      从一种语言文字转化到另一种语言文字
\item \textbf{蛋白质生物合成第一步}：\\
      从一种RNA分子序列转化到特定氨基酸序列
\end{itemize}

\vspace{1em}

\visible<2>{
这里我们只关注从一种语言的文字序列\alert{翻译}到另外一种语言的文字序列的过程，即\alert{自然语言的翻译}

\vspace{-2em}

\begin{center}
\begin{tikzpicture}
\node [fill=blue!50] (s) at (0,0) {我们在翻译一段文字};
\node [anchor=west,fill=red!50] (t) at ([xshift=0.3in]s.east) {We are translating a piece of text};
\node [anchor=south west] (slabel) at (s.north west) {\small{中文}};
\node [anchor=south west] (tlabel) at (t.north west) {\small{英文}};
%\draw[->,thick] (s.east)--(t.west) node[pos=0.5, above,yshift=1em] {\small{translation}};
\draw[->,thick] (s.east)--(t.west);
\end{tikzpicture}
\end{center}

}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 啥是机器翻译
\begin{frame}{啥是机器翻译}
\begin{minipage}[c][5cm][t]{0.46\textwidth}
传统观念上，翻译是由\alert{人工}完成
\begin{itemize}
\item 精度高
\item \textbf{但是}，费时费力
\end{itemize}
\vspace{1em}
\includegraphics[scale=0.5]{./Figures/human.jpg}
\end{minipage}
\hfill
\visible<2>{
\begin{minipage}[c][5cm][t]{0.48\textwidth}
\alert{机器翻译}是指由计算机完成自动翻译，而非人工
\begin{itemize}
\item 精度有限，有时非常差
\item \textbf{但是}，速度快成本极低
\end{itemize}
\vspace{1em}
\includegraphics[scale=0.58]{./Figures/machine.jpg}
\end{minipage}
}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{机器翻译发展简史}

%%%------------------------------------------------------------------------------------------------------------
%%% 最早的翻译 - 实例
\begin{frame}{早期的(人工)翻译}

\begin{minipage}{0.55\textwidth}

\vspace{1em}
\begin{itemize}
\item 人类文明最早的翻译记录
    \begin{itemize}
    \item 罗塞塔石碑(Rosetta Stone)
    \item 刻有埃及国王诏书
    \item 石碑上用希腊文字、古埃及文字和当时的通俗体文字刻了同样的内容
    \end{itemize}

\item 宗教文献翻译
    \begin{itemize}
    \item 中国的邻国在很长时间内都没有自己的文字，直到佛教传入
    \item 在西方，一项最早被记录的翻译活动是将旧约圣经译成希腊语
    \item 罗马圣哲杰罗姆将圣经翻译成拉丁语
    \end{itemize}
\end{itemize}
\end{minipage}
\hfill
\begin{minipage}{0.43\textwidth}
\centering
\includegraphics[scale=0.6]{./Figures/rosetta-stone.jpg}
\end{minipage}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 机器翻译如何开始
\begin{frame}{机器翻译的开始}
\begin{itemize}
\item 20世纪30年代初，法国科学家G.B.阿尔楚尼提出了用机器来进行翻译的想法
\item 40年代，美国科学家W. Weaver 和英国工程师A. D. Booth提出了利用计算机进行语言自动翻译的想法
\item 1949年，W. Weaver 发表《翻译备忘录》 ，正式提出机器翻译的思想
\end{itemize}
\begin{center}
\includegraphics[scale=0.45]{./Figures/eniac.jpg}
\end{center}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 进入低谷
\begin{frame}{受挫期}
\vspace{-0.5em}
\begin{minipage}{0.60\textwidth}
{\footnotesize
\begin{itemize}
\item 从20世纪50、60年代，美国和苏联两个超级大国由于政治和经济的需要也对机器翻译研究给予了相当大的重视
\item \alert{不幸的是}
    \begin{itemize}
    \item 1964年，美国科学院成立了语言自动处理咨询委员会(ALPAC委员会)，开始了为期两年的综合调查分析和测试
    \item 1966年11月，该委员会公布了一个题为《语言与机器》的报告(简称ALPAC报告)
    \item 该报告全面否定了机器翻译的可行性，并建议停止对机器翻译项目的资金支持
    \end{itemize}
\end{itemize}
}
\end{minipage}
\begin{minipage}{0.38\textwidth}
\vspace{1em}
\includegraphics[scale=0.26]{./Figures/language-and-machines.pdf}
\end{minipage}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 重新崛起
\begin{frame}{快速成长期}
\begin{itemize}
\item 进入70年代后，国与国之间的语言障碍显得更为严重，传统的人工作业方式已经远远不能满足需求
\item 特别是90年代后期，随着 Internet 的普遍应用，机器翻译迎来了一个新的发展机遇
    \begin{itemize}
    \item 有关机器翻译研究的会议频繁召开
    \item 各种机器翻译公司的成立
    \end{itemize}
\item 互联网巨头的免费自动翻译服务更是把机器翻译带进新时代
\end{itemize}
\begin{center}
\includegraphics[scale=0.30]{./Figures/google.jpg}
\end{center}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 爆发
\begin{frame}{进一步爆发}
\begin{itemize}
\item 2013年深度学习被应用于机器翻译，受到广泛关注
    \begin{itemize}
    \item 端到端学习不依赖过多的先验假设
    \item 神经网络的连续空间模型有更强的表示能力
    \item 深度网络学习算法的发展和GPU等并行计算模式为训练大规模神经网络提供了可能
    \end{itemize}
\item<2-> 时至今日，神经机器翻译已经成为新的范式，大有全面替代统计机器翻译之势 \\
\vspace{0.5em}
\begin{tabular}{c c}
\includegraphics[scale=0.19]{./Figures/wmt-participation.jpg}
&
\includegraphics[scale=0.14]{./Figures/encdec.jpg}
\end{tabular}
\end{itemize}

\visible<2->{
\vspace{-1em}
\begin{center}
{\footnotesize
机器翻译已经成为巨头们的必争之地（图：WMT19参赛队伍）
}
\end{center}
}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{今天的机器翻译}

%%%------------------------------------------------------------------------------------------------------------
%%% 翻译质量如何
\begin{frame}{翻译质量}
\begin{itemize}
\item 到了今天，机器翻译的质量究竟如何？\alert{客气地说}
    \begin{itemize}
    \item 受限条件下，机器翻译的结果可以接近人工翻译的结果
    \item 开放式翻译任务，机器翻译的结果并不理想
    \end{itemize}

\item<2-> \alert{不客气地说}，机器翻译的质量远没有达到人们的期望
    \begin{itemize}
    \item 高精度同声传译 - 还需要打磨
    \item 小说的翻译 - 可以想一想
    \item 古代诗词 - ？？？ 不要开玩笑
    \end{itemize}

\item<3-> 真实的结果 - 汉英新闻领域翻译
\end{itemize}
\vspace{-0.4em}

\begin{minipage}[b]{0.49\textwidth}
\begin{center}
\visible<3->{
\begin{center}
\begin{tikzpicture}
\node [anchor=south west, fill=red, minimum width=1.5cm, minimum height=2.3cm] (mt) at (1,0) {{\color{white} \textbf{机器}}};
\node [anchor=south west, fill=ugreen, minimum width=1.5cm, minimum height=2.7cm] (human) at ([xshift=0.5cm]mt.south east) {{\color{white} \textbf{人}}};
\node [anchor=south] (mtscore) at (mt.north) {3.9};
\node [anchor=south] (humanscore) at (human.north) {4.7};
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=0.5cm]human.south east);
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt.south west);
\end{tikzpicture}
\end{center}
\footnotesize{人工评价(5分满)}
}
\end{center}
\end{minipage}
\begin{minipage}[b]{0.49\textwidth}
\begin{center}
\visible<4->{
\begin{center}
\begin{tikzpicture}
\node [anchor=south west, fill=red, minimum width=1.5cm, minimum height=1.5cm] (mt) at (1,0) {{\color{white} \textbf{机器}}};
\node [anchor=south west, fill=ugreen, minimum width=1.5cm, minimum height=2.7cm] (human) at ([xshift=0.5cm]mt.south east) {{\color{white} \textbf{人}}};
\node [anchor=south] (mtscore) at (mt.north) {47\%};
\node [anchor=south] (humanscore) at (human.north) {100\%};
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=0.5cm]human.south east);
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt.south west);
\end{tikzpicture}
\end{center}
\footnotesize{自动评价}
}
\end{center}
\end{minipage}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 一个翻译实例
\begin{frame}{机器翻译没有用？}

\begin{itemize}
\item 机器翻译一点儿用都没有？
    \begin{itemize}
    \item<4-> 确实，二者有差距
    \item<5-> 如果考虑速度 - 哦？
    \item<6-> 换个情况：如果我们要翻译100万篇这样的文档
        \begin{itemize}
        \item 人工的成本无法想象，消耗的时间更是难以计算
        \item 而计算机集群只需要1天，而且只有电力消耗
        \end{itemize}
    \end{itemize}
\end{itemize}

\vspace{-0.5em}

\begin{minipage}[t]{0.47\textwidth}
\visible<2->{
\only<2>{
\begin{beamerboxesrounded}[upper=uppercolblue,lower=lowercolblue,shadow=true]{源文(约500字)}
{\scriptsize
\begin{spacing}{0.9}
过去，曾经有一个小岛，上面住着喜悦，悲伤，知识，爱，等各种情绪。
一天，这些情绪发现这个小岛即将沉没，所以大家都陆续准备船只，打算离开小岛。
只有爱留了下来。她要坚持到最后一刻。
过了几天，小岛真的要沉没了，爱想找别人帮助。
此时，财富正好乘着一艘大船经过。
爱说：“财富，你能不能带我离开？”...
\end{spacing}
}
\end{beamerboxesrounded}
}
\only<3->{
\begin{beamerboxesrounded}[upper=uppercolblue,lower=lowercolblue,shadow=true]{人工翻译 \only<5->{- 耗时20分钟}}
{\scriptsize
\begin{spacing}{0.9}
Once upon a time there was a small island where lived all kinds of emotions like JOY, SADNESS, KNOWLEDGE and LOVE.
One day, these emotions found that the island was sinking, so one by one they prepared the boat and planned to leave.
None but LOVE chose to stay there. She was determined to persist till the last moment.
A few days later, almost the whole island sunk into the sea, and LOVE had to seek for help.
At that moment, WEALTH was ...
\end{spacing}
}
\end{beamerboxesrounded}
}
}%\visible<2->
\end{minipage}
\hfill
\begin{minipage}[t]{0.47\textwidth}
\visible<2->{
\begin{beamerboxesrounded}[upper=uppercolblue,lower=lowercolblue,shadow=true]{机器翻译 \only<5->{- 耗时2秒钟}}
{\scriptsize
\begin{spacing}{0.9}
In the past, there has been a small island, \only<2-3>{on top of}\only<4->{\alert{\underline{on top of}}} joy, sadness, knowledge, love, all kinds of emotions.
One day, these emotions \only<2-3>{that}\only<4->{\alert{\underline{that}}} this is a small island, so we all \only<2-3>{have}\only<4->{\alert{\underline{have}}} to prepare for the vessel to leave the island.
\only<2-3>{The only love to stay}\only<4->{\alert{\underline{The only love to stay}}}. She wanted \only<2-3>{to go to the last minute}\only<4->{\alert{\underline{to go to the last minute}}}.
After a few days, the small island is to be sunk, \only<2-3>{would like}\only<4->{\alert{\underline{would like}}} to seek help from the others.
At that time, \only<2-3>{the wealth by a boat}\only<4->{\alert{\underline{the wealth by a boat}}}.
\only<2-3>{Wealth}\only<4->{\alert{\underline{Wealth}}}, said: "\only<2-3>{You can}\only<4->{\alert{\underline{You can}}} take me to ...
\end{spacing}
}
\end{beamerboxesrounded}
}%\visible<2->
\end{minipage}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 可能的应用
\begin{frame}{真的很有用！}

% 例子1 - 专利翻译
\begin{minipage}[b]{0.70\textwidth}
\begin{enumerate}
\item 专利翻译
    \begin{itemize}
    \item 对上千万专利文档进行翻译的人工代价几乎为天文数字
    \item 机器翻译（集群）仅需几天
    \end{itemize}
\end{enumerate}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.17]{./Figures/patent-translation.jpg}
\end{center}
\end{minipage}\\

\vspace{0.3em}

\visible<2->{
% 例子2 - 网络数据侦测
\begin{minipage}[b]{0.70\textwidth}
\begin{enumerate}
\setcounter{enumi}{1}
\item 网络环境海量数据的翻译
    \begin{itemize}
    \item 情报部门对信息的截获与侦测
    \item 数据量超大，机器翻译几乎是唯一的选择
    \end{itemize}
\end{enumerate}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.22]{./Figures/web-translation.jpg}
\end{center}
\end{minipage}\\
}

\vspace{0.3em}

\visible<3->{
% 例子3 - 翻译结果后编辑
\begin{minipage}[b]{0.70\textwidth}
\begin{enumerate}
\setcounter{enumi}{2}
\item 翻译结果后编辑
    \begin{itemize}
    \item 在机器翻译的结果上人工修改，生成可交付的翻译结果
    \item 市场很大
    \end{itemize}
\end{enumerate}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.245]{./Figures/postediting.jpg}
\end{center}
\end{minipage}\\
}

\vspace{0.3em}

\visible<4->{
% 例子4 - 全球化
\begin{minipage}[b]{0.70\textwidth}
\begin{enumerate}
\setcounter{enumi}{3}
\item 全球化
    \begin{itemize}
    \item 一个公司的产品，在各个国家推广
    \item 文档翻译的人工成本很高，而机器翻译可以很好的完成这个工作
    \end{itemize}
\end{enumerate}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.22]{./Figures/globalization.jpg}
\end{center}
\end{minipage}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 基本内容
\begin{frame}{是否有兴趣？}
\vspace{0.5em}
\begin{spacing}{1.1}
\begin{itemize}
\item 如果你是...，那么你一定会对机器翻译感兴趣
    \begin{enumerate}
    \item 计算机、语言学、应用数学及相关专业的科研技术人员
    \item 翻译人员且能接受利用计算机提高工作效率
    \item 所有有翻译需求的企业技术人员
    \item ...
    \end{enumerate}
\item<2-> 这里重点介绍当今主流的机器翻译原理、方法及实现技术（统计/神经机器翻译）
    \begin{enumerate}
    \item \textbf{第一部分：基本概念 (Sections 1-2)}\\
          不涉及深入的机器翻译技术 - 面向所有人
    \item \textbf{第二部分：统计机器翻译 (Sections 3-4)}\\
          统计机器翻译的建模，进一步介绍基于词、短语、句法的模型及实现方法
    \item \textbf{第三部分：神经机器翻译 (Sections 5-6)}\\
          基于神经网络的机器翻译建模，包括：张量计算基础、基于神经网络的语言模型和翻译模型
    \end{enumerate}
\end{itemize}
\end{spacing}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\section{基本方法}

%%%------------------------------------------------------------------------------------------------------------
\subsection{框架}

%%%------------------------------------------------------------------------------------------------------------
%%% 机器翻译研究的内容
\begin{frame}{说了半天，机器翻译是个啥东西？}

\vspace{0.5em}

\begin{minipage}[b]{0.65\textwidth}
\begin{itemize}
\item 如果你对自然语言处理技术有了解
\begin{itemize}
\item 那就不需要解释了
\end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[b]{0.32\textwidth}
\begin{minipage}[b]{0.35\textwidth}
\includegraphics[scale=0.1]{./Figures/human.jpg}
\end{minipage}
\begin{minipage}[b]{0.15\textwidth}
\small{vs.}
\end{minipage}
\begin{minipage}[b]{0.38\textwidth}
\includegraphics[scale=0.12]{./Figures/machine.jpg}
\end{minipage}
\end{minipage}


\begin{itemize}

% 软件定义
\item<2-> 如果你使用过Baidu翻译且对软件技术有些了解
    \begin{itemize}
    \item 机器翻译系统实际就是一个软件，输入是待翻译句子/文本，输出是译文句子/文本
    \end{itemize}

% 对于外行人，避免误解
\item<3-> \alert{请}对没听说过机器翻译的同学\alert{注意}：
    \begin{itemize}
    \item<3-> 机器翻译系统和QQ类似，就是可以在计算机上运行的工具 \\
    机器翻译系统 = 软件工具
    \item<4-> 但是，机器翻译系统\alert{不是QQ} \\
    机器翻译系统 $\ne$ 好看的按钮 \\
    机器翻译系统 $\ne$ 美丽的图标 \\
    \item<5-> 机器翻译是完成自动翻译所执行的"不可见的程序"\\
    \vspace{0.5em}
    \begin{tikzpicture}
    \node [thick,rounded corners=3mm,draw=blue!50!black!50,top color=white,bottom color=blue!50!black!20] (s) at (0,0) {输入文字};
    \node [thick,draw=red!50!black!50,top color=white,bottom color=red!50!black!20,anchor=west] (mt) at ([xshift=0.3in]s.east) {\begin{tabular}{c}机器翻译\\???\end{tabular}};
    \node [thick,rounded corners=3mm,draw=blue!50!black!50,top color=white,bottom color=blue!50!black!20,anchor=west] (t) at ([xshift=0.3in]mt.east) {输出译文};
    \draw[-latex,thick] (s.east)--(mt.west);
    \draw[-latex,thick] (mt.east)--(t.west);
    \end{tikzpicture}
    \end{itemize}
\end{itemize}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 机器翻译 = 数据 + 系统
\begin{frame}{又说了半天，机器翻译到底是个啥东西？}
\begin{center}
\begin{tikzpicture}
\node [thick,rounded corners=3mm,draw=blue!50!black!50,top color=white,bottom color=blue!50!black!20] (s) at (0,0) {输入文字};
\node [thick,minimum width=6em,draw=red!50!black!50,top color=white,bottom color=red!50!black!20,anchor=west] (mt) at ([xshift=0.3in]s.east) {\begin{tabular}{c}机器翻译\\???\end{tabular}};
\node [thick,rounded corners=3mm,draw=blue!50!black!50,top color=white,bottom color=blue!50!black!20,anchor=west] (t) at ([xshift=0.3in]mt.east) {输出译文};
\visible<2->{
\node [draw=ugreen,fill=ugreen,minimum width=3.1em,minimum height=1.5em,anchor=south west] (part1) at (mt.south west) {{\color{white} 1}};
\node [draw=ublue,fill=ublue,minimum width=3.1em,minimum height=1.5em,anchor=south east] (part2) at (mt.south east) {{\color{white} 2}};
}
\draw[-latex,thick] (s.east)--(mt.west);
\draw[-latex,thick] (mt.east)--(t.west);

\visible<3->{
\begin{scope}[yshift=-0.8in]
\node [] (part1label) at (0,0) {\includegraphics[scale=0.07]{./Figures/oil.jpg}};
\node [anchor=north west] (part1text) at ([xshift=-2em,yshift=0.5em]part1label.south west) {\begin{tabular}{l}\alert{资源}：可以使机器翻译\\系统运行的"汽油"\end{tabular}};
\end{scope}
}

\visible<4->{
\begin{scope}[yshift=-0.8in,xshift=2.2in]
\node [] (part2label) at (0,0.3em) {\includegraphics[scale=0.22]{./Figures/truck.jpg}};
\node [anchor=north west] (part2text) at ([xshift=-2em,yshift=0em]part2label.south west) {\begin{tabular}{l}\alert{系统}：利用资源完成\\完成自动翻译的程序\end{tabular}};
\end{scope}
}

\visible<3->{
\draw[<-,thick] (part1label.north)..controls +(north:0.6) and +(south:0.6)..([yshift=0.2em]part1.south);
}

\visible<4->{
\draw[<-,thick] ([yshift=-0.2em]part2label.north)..controls +(north:0.6) and +(south:0.6)..([yshift=0.2em]part2.south);
}

\end{tikzpicture}
\end{center}

\vspace{-1.0em}

\begin{itemize}
\item<5-> 可以说，所有机器翻译系统都是由两部分组成
    \begin{enumerate}
    \item 资源是指翻译\alert{规则}、双(单)语\alert{数据}、\alert{知识库}等等翻译知识，且这些'知识'是计算机可读的
    \item 系统是各种机器翻译算法的\alert{程序实现}
    \end{enumerate}
\end{itemize}

\visible<6->{
\begin{tikzpicture}
\node [draw,thick,red] (note) at (0,0) {\alert{\textbf{注意：任何机器翻译系统没有翻译资源的支持都是白搭！}}};
\end{tikzpicture}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{基于规则的机器翻译}

%%%------------------------------------------------------------------------------------------------------------
%%% 基于规则的机器翻译
\begin{frame}{如何进行机器翻译？ - 基于规则的方法}

\alert{基于规则的机器翻译}：以词典和（人工书写的）规则库构成知识源，用一系列规则的组合完成翻译
\begin{itemize}
\item 规则的形式：\textbf{If} ..., \textbf{then} ...
\end{itemize}

\begin{tikzpicture}
\begin{scope}
\visible<2->{
{\small
\node [anchor=north west] (rule1) at (0,0) {\textbf{1: If} 源='我', \textbf{then} 译='I'};
\node [anchor=north west] (rule2) at ([yshift=0.1em]rule1.south west) {\textbf{2: If} 源='你', \textbf{then} 译='you'};
\node [anchor=north west] (rule3) at ([yshift=0.1em]rule2.south west) {\textbf{3: If} 源='感到 满意',};
\node [anchor=north west] (rule3part2) at ([yshift=0.5em]rule3.south west) {\textbf{\hspace{0.95em} then} 译='be satisfied with'};
\node [anchor=north west] (rule4) at ([yshift=0.1em]rule3part2.south west) {\textbf{4: If} 源='对 ... 动词[表态度]'};
\node [anchor=north west] (rule4part2) at ([yshift=0.5em]rule4.south west) {\textbf{\hspace{0.95em} then} 调序[动词 + 对象]};
\node [anchor=north west] (rule5) at ([yshift=0.1em]rule4part2.south west) {\textbf{5: If} 译文主语是'I'};
\node [anchor=north west] (rule5part2) at ([yshift=0.5em]rule5.south west) {\textbf{\hspace{0.95em} then} be动词为'am/was'};
\node [anchor=north west] (rule6) at ([yshift=0.1em]rule5part2.south west) {\textbf{6: If} 源语是主谓结构};
\node [anchor=north west] (rule6part2) at ([yshift=0.5em]rule6.south west) {\textbf{\hspace{0.95em} then} 译文为主谓结构};
\node [anchor=south west] (rulebaselabel) at (rule1.north west) {{\color{ublue} 资源：规则库}};
}

\begin{pgfonlayer}{background}
\visible<2->{
  \node[rectangle,draw=ublue, inner sep=0mm] [fit = (rule1) (rule2) (rule3) (rule3part2) (rule4) (rule4part2) (rule5) (rule5part2) (rule6) (rule6part2) (rulebaselabel)] {};
}
\end{pgfonlayer}
}

\end{scope}

\begin{scope}[xshift=2.3in]
\visible<3->{
\node [anchor=north west,inner sep=1mm] (w1) at (0,1.7em) {我};
\node [anchor=north west,inner sep=1mm] (w2) at ([xshift=0.3em]w1.north east) {对};
\node [anchor=north west,inner sep=1mm] (w3) at ([xshift=0.3em]w2.north east) {你};
\node [anchor=north west,inner sep=1mm] (w4) at ([xshift=0.3em]w3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (w5) at ([xshift=0.3em]w4.north east) {满意};
}
\end{scope}

\visible<4>{
\draw[->,dotted,thick,red] (rule1.east)..controls +(east:0.6) and +(west:0.6)..(w1.west) node[pos=0.25,below,xshift=0.3em,yshift=0.0em] (applyr1) {\alert{\tiny{\textbf{规则1}}}};}
\visible<4->{
\node [anchor=north,inner sep=1mm] (t1) at ([yshift=-0.6em]w1.south) {I};
\draw[->,thick,ublue] (w1.south)--(t1.north);
}

\visible<5>{
\draw[->,dotted,thick,red] (rule2.east)..controls +(east:2.5) and +(south west:0.5)..([yshift=0.3em]w3.south west) node[pos=0.2,below,xshift=0.3em,yshift=0.0em] (applyr2) {\alert{\tiny{\textbf{规则2}}}};}
\visible<5->{
\node [anchor=north,inner sep=1mm] (t3) at ([yshift=-0.6em]w3.south) {you};
\draw[->,thick,ublue] (w3.south)--(t3.north);
}

\visible<6>{
\draw[->,dotted,thick,red] ([xshift=-0.5em]rule3part2.east)..controls +(east:4.1) and +(south west:0.5)..([yshift=0.1em,xshift=0.2em]w4.south west) node[pos=0.2,below,xshift=0.3em,yshift=0.0em] (applyr3) {\alert{\tiny{\textbf{规则3}}}};
}
\visible<6->{
\draw[-] ([yshift=0.2em]w4.south west)--([yshift=0.2em]w5.south east);
\node [anchor=north,inner sep=1mm] (t45) at ([yshift=-2em]w5.south) {be satisfied with};
\draw[->,thick,ublue] ([yshift=0.1em]w4.south east)..controls +(south:0.6) and +(north:0.6)..(t45.north);
}

\visible<7->{
\node [anchor=north west,inner sep=1mm] (t35) at ([yshift=-3.5em,xshift=-1em]t3.south) {be satisfied with you};
\draw[->,thick,ublue] (t3.south)..controls +(south:1.5) and +(north:1.0)..([xshift=-1em]t35.north east);
\draw[->,thick,ublue] (t45.south)..controls +(south:1.0) and +(north:0.5)..([xshift=3em]t35.north west);
}
\visible<7>{
\draw[->,dotted,thick,red] ([xshift=-0.2em]rule4part2.east)..controls +(east:1.5) and +( west:1.5)..(t35.west) node[pos=0.8,above,xshift=0.3em,yshift=0.0em] (applyr4) {\alert{\tiny{\textbf{规则4}}}};
}

\visible<8->{
\node [anchor=north west,inner sep=1mm] (t15) at ([yshift=-2em,xshift=-2em]t35.south west) {I be satisfied with you};
\draw[->,thick,ublue] (t35.south)..controls +(south:0.8) and +(north:0.8)..([xshift=-5em]t15.north east);
\draw[->,thick,ublue] (t1.south)..controls +(south:1.5) and +(north:1.5)..([xshift=0.5em]t15.north west);
}
\visible<8>{
\draw[->,dotted,thick,red] ([xshift=-0.2em]rule6part2.east)..controls +(east:1.5) and +( west:1.5)..(t15.west) node[pos=0.9,above,xshift=0.3em,yshift=0.0em] (applyr6) {\alert{\tiny{\textbf{规则6}}}};
}

\visible<9->{
\node [anchor=north west,inner sep=1mm] (t15final) at ([yshift=-2em]t15.south west) {I am satisfied with you};
\node [draw,circle,thick,dotted,ublue,minimum width=1.5em] (be1) at ([xshift=1.35em]t15.west) {};
\draw[->,thick,ublue] (be1.south)..controls +(south:0.6) and +(north:0.6)..([xshift=1.8em,yshift=-0.0em]t15final.north west);
}
\visible<9>{
\draw[->,dotted,thick,red] ([xshift=-0.2em]rule5part2.east)..controls +(east:1.5) and +( west:1.5)..(t15final.west) node[pos=0.9,below,xshift=0.3em,yshift=0.0em] (applyr6) {\alert{\tiny{\textbf{规则5}}}};
}


\begin{pgfonlayer}{background}
\visible<10->{
  \node[rectangle,thick,draw=red, inner sep=0mm] [fit = (t15final)] {};
  \node[] (finaloutput) at ([yshift=0.5em]t15final.north) {\alert{\footnotesize{输出翻译结果}}};
}
\end{pgfonlayer}


\end{tikzpicture}

\end{frame} %基于规则的机器翻译

%%%------------------------------------------------------------------------------------------------------------
\subsection{基于实例的机器翻译}

%%%------------------------------------------------------------------------------------------------------------
%%% 基于实例的机器翻译
\begin{frame}{如何进行机器翻译？ - 基于实例的方法}
\alert{基于实例的机器翻译}：在双语句库中找到与待翻译句子相似的实例，之后对其译文进行必要修改，得到最终的译文
\begin{itemize}
\item 特例：翻译记忆(TM)只查找能够精确匹配的例句输出
\end{itemize}

\begin{tikzpicture}
\begin{scope}
\visible<2->{
{\small
\node [anchor=north west] (example1) at (0,0) {\textbf{1:} 源='什么 时候 开始 ?'};
\node [anchor=north west] (example1part2) at ([yshift=0.5em]example1.south west) {\hspace{1em} 译='When will it start ?'};
\node [anchor=north west] (example2) at ([yshift=0.1em]example1part2.south west) {\textbf{2:} 源='我 对 他 感到 高兴'};
\node [anchor=north west] (example2part2) at ([yshift=0.5em]example2.south west) {\hspace{1em} 译='I am happy with him'};
\node [anchor=north west] (example3) at ([yshift=0.1em]example2part2.south west) {\hspace{1em} ...};
\node [anchor=south west] (examplebaselabel) at (example1.north west) {{\color{ublue} 资源1：翻译实例库}};
}
}

\begin{pgfonlayer}{background}
\visible<2->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (examplebaselabel)] {};
}
\end{pgfonlayer}

\end{scope}

\begin{scope} [yshift=-1.3in]
{\small
\visible<2->{
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:} 我 $\to$ I $\mid$ me};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:} 你 $\to$ you};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} 满意 \hspace{-0.5em} $\to$ \hspace{-0.5em} satisfy \hspace{-0.2em}$\mid$\hspace{-0.1em} satisfied ... };
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {\hspace{1em} ...};
\node [anchor=south west] (dictionarylabel) at (entry1.north west) {{\color{ublue} 资源2：翻译词典}};
}
}

\begin{pgfonlayer}{background}
\visible<2->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (dictionarylabel)] {};
}
\end{pgfonlayer}

\end{scope}

\begin{scope}[xshift=2.3in]
\visible<3->{
\node [anchor=north west,inner sep=1mm] (w1) at (0,1.7em) {我};
\node [anchor=north west,inner sep=1mm] (w2) at ([xshift=0.3em]w1.north east) {对};
\node [anchor=north west,inner sep=1mm] (w3) at ([xshift=0.3em]w2.north east) {你};
\node [anchor=north west,inner sep=1mm] (w4) at ([xshift=0.3em]w3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (w5) at ([xshift=0.3em]w4.north east) {满意};
}
\end{scope}

\visible<4>{
\draw[<->,dotted,thick,red] (example1.east)..controls +(east:0.8) and +(west:0.8)..(w1.west) node[pos=0.4,below,xshift=1em,yshift=0.2em] (sim1) {\alert{\tiny{\textbf{相似度=0}}}};
}

\visible<5>{
\draw[<->,dotted,thick,red] (example2.east)..controls +(east:0.8) and +(west:0.8)..(w1.west) node[pos=0.4,right,xshift=0em,yshift=0.2em] (sim2) {\alert{\tiny{\textbf{相似度=0.6}}}};
}

\begin{scope}[xshift=2.3in,yshift=-0.2in]
\visible<6->{
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {我};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {对};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {他};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {高兴};
}
\end{scope}

\begin{scope}[xshift=2.3in,yshift=-0.6in]
\visible<6->{
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {happy};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em]e4.east) {him};
}
\end{scope}

\visible<6->{
\draw[<->,dotted,thick,red] (example2.east)..controls +(east:0.6) and +(west:0.6)..(c1.west) node[pos=0.9,left,xshift=0.6em,yshift=0.4em] (simexample) {\alert{\tiny{\textbf{相似实例}}}};
\draw[<->,dotted,thick,red] ([xshift=-0.2em]example2part2.east)..controls +(east:0.5) and +(west:0.5)..(e1.west);
}

\visible<7->{
\draw[<->,dotted,thick,ublue] (w3.south)--(c3.north) node[pos=0.5,right] (mismatch1) {\alert{\tiny{\textbf{不匹配}}}};
\draw[dotted,thick,ublue] ([yshift=0.4em]c3.south east)..controls +(south:0.3) and +(north:0.4)..([yshift=-0.4em]e5.north west);
}

\visible<8->{
\draw[<->,dotted,thick,ublue] (w5.south)--(c5.north) node[pos=0.5,right] (mismatch1) {\alert{\tiny{\textbf{不匹配}}}};
\draw[dotted,thick,ublue] ([xshift=0.5em,yshift=0.2em]c5.south west)--([xshift=-0.5em,yshift=-0.2em]e3.north);
}

\visible<9->{
\draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em] (step1) {\alert{\tiny{\textbf{用'你'替换'他'}}}};

\draw[->,dotted,thick,red] (entry2.east)..controls +(east:4) and +(west:4)..([yshift=-0.6em,xshift=-0.5em]e3.south) ;
}

\begin{scope}[xshift=2.3in,yshift=-0.9in]
\visible<9->{
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {我};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {对};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {\textbf{{\color{ublue} 你}}};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {高兴};
}
\end{scope}

\begin{scope}[xshift=2.3in,yshift=-1.3in]
\visible<9->{
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {happy};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em,yshift=-0.2em]e4.east) {\textbf{{\color{ublue} you}}};
}
\end{scope}

\visible<9->{
\draw[dotted,thick,ublue] ([yshift=0.4em]c3.south east)..controls +(south:0.3) and +(north:0.4)..([yshift=-0.4em]e5.north west);
}

\visible<10->{
\draw[double,->,thick,ublue] (e3.south)--([yshift=-1.2em]e3.south) node[pos=0.5,right,xshift=0.2em] (step1) {\alert{\tiny{\textbf{用'满意'替换'高兴'}}}};

\draw[->,dotted,thick,red] ([xshift=-1.3em,yshift=-0.5em]entry3.north east)..controls +(east:2) and +(west:3)..([yshift=-0.6em,xshift=-0.5em]e3.south) ;
}

\begin{scope}[xshift=2.3in,yshift=-1.6in]
\visible<10->{
\node [anchor=north west,inner sep=1mm] (c1) at (0,0) {我};
\node [anchor=north west,inner sep=1mm] (c2) at ([xshift=0.3em]c1.north east) {对};
\node [anchor=north west,inner sep=1mm] (c3) at ([xshift=0.3em]c2.north east) {你};
\node [anchor=north west,inner sep=1mm] (c4) at ([xshift=0.3em]c3.north east) {感到};
\node [anchor=north west,inner sep=1mm] (c5) at ([xshift=0.3em]c4.north east) {\textbf{{\color{ublue} 满意}}};
}
\end{scope}

\begin{scope}[xshift=2.3in,yshift=-2.0in]
\visible<10->{
\node [anchor=west,inner sep=1mm] (e1) at (0,0) {I};
\node [anchor=west,inner sep=1mm] (e2) at ([xshift=0.3em]e1.east) {am};
\node [anchor=west,inner sep=1mm] (e3) at ([xshift=0.3em]e2.east) {\textbf{{\color{ublue} satisfied}}};
\node [anchor=west,inner sep=1mm] (e4) at ([xshift=0.3em]e3.east) {with};
\node [anchor=west,inner sep=1mm] (e5) at ([xshift=0.3em,yshift=-0.2em]e4.east) {you};
}
\end{scope}

\visible<10->{
\draw[dotted,thick,ublue] ([xshift=0.5em,yshift=0.2em]c5.south west)..controls +(south:0.3) and +(north:0.3)..([xshift=-0.5em,yshift=-0.2em]e3.north);
}

\begin{pgfonlayer}{background}
\visible<11->{
\node[rectangle,draw=red,thick,inner sep=0mm] [fit = (e1) (e2) (e3) (e4) (e5)] {};
\node[anchor=north] (outputlabel) at (e3.south) {\small{\textbf{\alert{输出翻译结果}}}};
}
\end{pgfonlayer}

\end{tikzpicture}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{统计机器翻译}

%%%------------------------------------------------------------------------------------------------------------
%%% 统计机器翻译
\begin{frame}{如何进行机器翻译？ - 基于统计的方法}
\alert{统计机器翻译}：利用统计模型从双/单语语料中自动学习翻译知识，之后这些知识对新句子进行翻译
\begin{itemize}
\item 建模 + 学习知识 + 利用这些知识进行翻译
\end{itemize}

\begin{tikzpicture}

\visible<2->{
\begin{scope}
{\footnotesize
\node [anchor=north west] (example1) at (0,0) {\textbf{1:} 源='他 在 哪 ?'};
\node [anchor=north west] (example1part2) at ([yshift=0.5em]example1.south west) {\hspace{1em} 译='Where is he ?'};
\node [anchor=north west] (example2) at ([yshift=0.1em]example1part2.south west) {\textbf{2:} 源='我 真高兴'};
\node [anchor=north west] (example2part2) at ([yshift=0.5em]example2.south west) {\hspace{1em} 译='I'm so happy'};
\node [anchor=north west] (example3) at ([yshift=0.1em]example2part2.south west) {\textbf{3:} 源='出发 ！'};
\node [anchor=north west] (example3part2) at ([yshift=0.5em]example3.south west) {\hspace{1em} 译='Let's go!'};
\node [anchor=north west] (example4) at ([yshift=0.1em]example3part2.south west) {\hspace{1em} ...};
\node [anchor=south west] (bidatalabel) at (example1.north west) {{\color{ublue} 资源1：双语平行语料}};
}

\begin{pgfonlayer}{background}
\visible<2->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (example3part2) (example4) (bidatalabel)] (bidata) {};
}
\end{pgfonlayer}

\end{scope}
}

\visible<4->{
\begin{scope} [yshift=-1.55in]
{\footnotesize
\node [anchor=north west] (entry1) at (0,0) {\textbf{1:} What is NiuTrans ?};
\node [anchor=north west] (entry2) at ([yshift=0.1em]entry1.south west) {\textbf{2:} Are you fulfilled ?};
\node [anchor=north west] (entry3) at ([yshift=0.1em]entry2.south west) {\textbf{3:} Yes, you are right .};
\node [anchor=north west] (entry4) at ([yshift=0.1em]entry3.south west) {\hspace{1em} ...};
\node [anchor=south west] (monodatalabel) at (entry1.north west) {{\color{ublue} 资源2：单语语料}};
}

\begin{pgfonlayer}{background}
\visible<4->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (monodatalabel)] (monodata) {};
}
\end{pgfonlayer}

\end{scope}
}

\visible<3->{
\begin{scope}[xshift=1.7in]
{\scriptsize
\node [anchor=north west] (phrase1) at (0,0) {$\textrm{Pr}(\textrm{我} \to \textrm{I}) = 0.7$};
\node [anchor=north west] (phrase2) at ([yshift=0.1em]phrase1.south west) {$\textrm{Pr}(\textrm{我} \to \textrm{me}) = 0.3$};
\node [anchor=north west] (phrase3) at ([yshift=0.1em]phrase2.south west) {$\textrm{Pr}(\textrm{你} \to \textrm{you}) = 0.9$};
\node [anchor=north west] (phrase4) at ([yshift=0.1em]phrase3.south west) {$\textrm{Pr}(\textrm{开心} \to \textrm{happy})$};
\node [anchor=north west] (phrase4part2) at ([yshift=0.5em]phrase4.south west) {$ = 0.5$};
\node [anchor=north west] (phrase5) at ([yshift=0.1em]phrase4part2.south west) {$\textrm{Pr}(\textrm{满意} \to \textrm{satisfied})$};
\node [anchor=north west] (phrase5part2) at ([yshift=0.5em]phrase5.south west) {$ = 0.4$};
\node [anchor=north west] (phrase6) at ([yshift=0.0em]phrase5part2.south west) {...\vspace{2em}};
\node [anchor=south west] (phrasetablelabel) at (phrase1.north west) {{\color{ublue} \small{翻译模型}}};
}

\begin{pgfonlayer}{background}
\visible<3->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (phrase1) (phrase2) (phrase3) (phrase4) (phrase4part2) (phrase5) (phrase5part2) (phrase6) (phrasetablelabel)] (phrasetable) {};
}
\end{pgfonlayer}

\end{scope}
}

\visible<5->{
\begin{scope}[xshift=1.7in,yshift=-1.55in]
{\scriptsize
\node [anchor=north west] (ngram1) at (0,0) {$\textrm{Pr}(\textrm{I}) = 0.0001$};
\node [anchor=north west] (ngram2) at ([yshift=0.0em]ngram1.south west) {$\textrm{Pr}(\textrm{I} \to \textrm{am}) = 0.623$};
\node [anchor=north west] (ngram3) at ([yshift=0.0em]ngram2.south west) {$\textrm{Pr}(\textrm{I} \to \textrm{was}) = 0.21$};
\node [anchor=north west] (ngram4) at ([yshift=-0.2em]ngram3.south west) {...};
\node [anchor=south west] (lmlabel) at (ngram1.north west) {{\color{ublue} \small{语言模型}}};
}

\begin{pgfonlayer}{background}
\visible<5->{
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (ngram1) (ngram2) (ngram3) (ngram4) (lmlabel)] (langaugemodel) {};
}
\end{pgfonlayer}

\end{scope}
}

\visible<3->{
\draw[->,thick,ublue] (bidata.east)--([xshift=1.7em]bidata.east) node[pos=0.5,above] (simexample) {\alert{\scriptsize{\textbf{学习}}}};
}

\visible<5->{
\draw[->,thick,ublue] (monodata.east)--([xshift=1.7em]monodata.east) node[pos=0.5,above] (simexample) {\alert{\scriptsize{\textbf{学习}}}};
}

\begin{scope}[xshift=3.6in]
{\footnotesize
\visible<7->{
\node[anchor=center] (srcsentence) at (0,0) {我 对 你 感到 满意};
}

\visible<8->{
\node[anchor=north west] (translations) at ([xshift=-1em,yshift=-1em]srcsentence.south west) {
{\scriptsize
\begin{tabular}{l | l}
翻译假设 & \visible<9->{概率} \\
\hline
I to you happy & \visible<9->{0.01}\\
You satisfied & \visible<9->{0.02}\\
I satisfied with you & \visible<9->{0.10}\\
I'm satisfied with you & \visible<9->{0.46}\\
I satisfied you, what & \visible<9->{0.23}\\
You can have it & \visible<9->{0.01}\\
You and me & \visible<9->{0.02}\\
\end{tabular}
}
};
}

\visible<6->{
\node[anchor=west,double,draw=ublue,thick] (decoder) at ([xshift=1em,yshift=-12em]srcsentence.south west) {翻译引擎};

\draw[->,thick,ublue] ([yshift=1em]phrasetable.south east) .. controls +(east:1.0em) and +(west:2.5em) .. (decoder.west);
\draw[->,thick,ublue] ([yshift=-2em]langaugemodel.east) .. controls +(east:1.0em) and +(west:1.5em) .. (decoder.west);
}

\visible<8->{
\draw[->,thick,double,ublue] (decoder.north) -- ([yshift=2em]decoder.north) node[pos=0.5,right] (decodinglabel) {\alert{\tiny{\textbf{枚举所有可能}}}};
}

\visible<9->{
\draw[->,thick,double,ublue] (decoder.east) .. controls +(east:3.5em) .. ([xshift=3.5em,yshift=2.8em]decoder.east) node[pos=0.3,below] (decodinglabel) {\alert{\tiny{\textbf{计算翻译可能性}}}};
}

\visible<10->{
\node[anchor=west,draw,thick,red,minimum width=11em,minimum height=1em] (outputlabel) at ([xshift=-0.5em,yshift=-5.5em]srcsentence.south west){};
\node[anchor=west] (outputlabel2) at ([xshift=-0.3em]outputlabel.east) {\alert{\tiny{\textbf{输出}}}};
}

}
\end{scope}

\end{tikzpicture}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{神经机器翻译}

%%%------------------------------------------------------------------------------------------------------------
%%% 神经机器翻译
\begin{frame}{如何进行机器翻译？ - 基于神经网络的方法}
\alert{神经机器翻译}：把字符串表示成实数向量，翻译被看做序列到序列转化。这个过程由\alert{编码器-解码器}网络计算，不需要依赖人工先验或者语言学规则 \\
\vspace{0.5em}

\begin{tikzpicture}

\begin{scope}
\small{
\node [anchor=south west,minimum width=15em] (source) at (0,0) {\textbf{source}: 我\ \ \ \ 对\ \ \ \ 你\ \ \ \ 感到\ \ \ \ 满意};
\visible<3->{
\node [anchor=south west,minimum width=15em] (target) at ([yshift=12em]source.north west) {\textbf{target}: I\ \ am\ \ \ satisfied\ \ \ with\ \ \ you};
}
\visible<2->{
\node [anchor=center,minimum width=9.6em,minimum height=1.8em,draw,rounded corners=0.3em] (hidden) at ([yshift=6em]source.north) {};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!20] (cell01) at ([xshift=0.2em]hidden.west) {\footnotesize{.2}};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!10] (cell02) at (cell01.east) {\footnotesize{-1}};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!70] (cell03) at (cell02.east) {\footnotesize{6}};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!50] (cell04) at (cell03.east) {\footnotesize{5}};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!30] (cell05) at (cell04.east) {\footnotesize{.7}};
\node [anchor=west,minimum width=1.5em,minimum size=1.5em,fill=ugreen!10] (cell06) at (cell05.east) {\footnotesize{-2}};
}

\visible<2->{
\filldraw [fill=red!20,draw=white] (source.north west) -- (source.north east) -- ([xshift=-0.2em,yshift=-0.1em]hidden.south east) -- ([xshift=0.2em,yshift=-0.1em]hidden.south west);
}
\visible<3->{
\filldraw [fill=blue!20,draw=white] (target.south west) -- (target.south east) -- ([xshift=-0.2em,yshift=0.1em]hidden.north east) -- ([xshift=0.2em,yshift=0.1em]hidden.north west);
}
\visible<2->{
\draw [->,thick] (source.north west) -- ([xshift=0.2em,yshift=-0.1em]hidden.south west);
\draw [->,thick] (source.north east) -- ([xshift=-0.2em,yshift=-0.1em]hidden.south east);
}
\visible<3->{
\draw [->,thick] ([xshift=0.2em,yshift=0.1em]hidden.north west) -- (target.south west);
\draw [->,thick] ([xshift=-0.2em,yshift=0.1em]hidden.north east) -- (target.south east);
}
}

\visible<4->{
\node [anchor=south] (enclabel) at ([yshift=2em]source.north) {\large{\textbf{Encoder}}};
\node [anchor=north] (declabel) at ([yshift=-2em]target.south) {\large{\textbf{Decoder}}};
\node [anchor=east,align=left] (hiddenlabel) at (hidden.west) {\scriptsize{represe-}\\\scriptsize{ntation}};
}

\end{scope}

\begin{scope}[xshift=16.8em,yshift=6em]

\visible<5->{
\tikzstyle{numbernode} = [fill=blue!30,minimum height=0.8em,minimum width=0.8em,circle,draw,inner sep=1pt]
\tikzstyle{numbernode2} = [fill=ugreen!30,minimum height=0.8em,minimum width=0.8em,circle,draw,inner sep=1pt]

\node[anchor=west,numbernode] (neuron01) at (0,0) {};
\node[anchor=west,numbernode] (neuron02) at ([xshift=0.3em]neuron01.east) {};
\node[anchor=west,numbernode] (neuron03) at ([xshift=0.3em]neuron02.east) {};
\node[anchor=west,numbernode] (neuron04) at ([xshift=0.3em]neuron03.east) {};

\node[anchor=west,numbernode] (neuron11) at ([xshift=2em]neuron04.east) {};
\node[anchor=west,numbernode] (neuron12) at ([xshift=0.3em]neuron11.east) {};
\node[anchor=west,numbernode] (neuron13) at ([xshift=0.3em]neuron12.east) {};
\node[anchor=west,numbernode] (neuron14) at ([xshift=0.3em]neuron13.east) {};

\node[anchor=west,numbernode2] (neuron21) at ([xshift=1.5em,yshift=3em]neuron02.north) {};
\node[anchor=west,numbernode2] (neuron22) at ([xshift=0.3em]neuron21.east) {};
\node[anchor=west,numbernode2] (neuron23) at ([xshift=0.3em]neuron22.east) {};
\node[anchor=west,numbernode2] (neuron24) at ([xshift=0.3em]neuron23.east) {};
\node[anchor=west,numbernode2] (neuron25) at ([xshift=0.3em]neuron24.east) {};

\begin{pgfonlayer}{background}
\visible<5->{
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron01) (neuron02) (neuron03) (neuron04)] (layer1) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron11) (neuron12) (neuron13) (neuron14)] (layer2) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron21) (neuron22) (neuron23) (neuron24) (neuron25)] (layer3) {};
}
\end{pgfonlayer}

% input and output labels
\draw[->,thick,align=center] ([yshift=-0.8em]layer1.south)--([yshift=-0.1em]layer1.south) node [pos=0,anchor=north,inner sep=3pt] (word01) {\footnotesize{input} \footnotesize{(word)}};
\draw[->,thick,align=center] ([yshift=-0.8em]layer2.south)--([yshift=-0.1em]layer2.south) node [pos=0,anchor=north,inner sep=3pt] (word02) {\footnotesize{input} \footnotesize{(word)}};
\draw[<-,thick,align=center] ([yshift=0.8em]layer3.north)--([yshift=0.1em]layer3.north) node [pos=0,anchor=south,inner sep=0] (outputnode) {\footnotesize{output} \footnotesize{(representation)}};

% layer and neuron labels
\node[anchor=west] (layerlabel3) at (layer3.east) {\footnotesize{layer}};

% connections
\draw[-] (neuron01)--(neuron21); \draw[-] (neuron02)--(neuron21); \draw[-] (neuron03)--(neuron21); \draw[-] (neuron04)--(neuron21);
\node[anchor=north] (connections) at ([yshift=-0.7em,xshift=0.5em]layer3.south) {\textbf{...}};
\node[anchor=west] (conntections2) at ([xshift=0.5em]connections.east) {\textbf{...}};

\begin{pgfonlayer}{background}
\visible<5->{
\node[draw,thin,minimum width=11em,align=left,rounded corners=1pt,fill=red!5,drop shadow] [fit = (outputnode) (word01) (word02) ] (netbox) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron01) (neuron02) (neuron03) (neuron04)] (layer1) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron11) (neuron12) (neuron13) (neuron14)] (layer2) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron21) (neuron22) (neuron23) (neuron24) (neuron25)] (layer3) {};
}
\end{pgfonlayer}

\draw [->,very thick,dotted] (enclabel.east) ..controls + (east:2em) and +(west:2em).. ([yshift=-1em]netbox.west);

\node [anchor=north] (netlabel) at (netbox.south) {\footnotesize{sample network of the encoder}};
}

\end{scope}

\end{tikzpicture}
\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{对比}

%%%------------------------------------------------------------------------------------------------------------
%%% 不同方法的简单对比
\begin{frame}{对比}

不同机器翻译方法

\vspace{-1em}
\begin{center}
\begin{tabular}{l | l l l l}
& \parbox{3.8em}{\textbf{规则}} & \parbox{3.8em}{\textbf{实例}} & \parbox{3.8em}{\textbf{统计}} & \parbox{3.8em}{\textbf{神经}} \\
\hline

人工写规则 & 是 & 否 & 否 & 否\\
人工代价 & 高 & 一般 & 几乎没有 & 几乎没有 \pause \\
数据驱动 & 否 & 是 & 是 & 是\\
依赖数据质量 & N/A & 高 & 低 & 较低\\
抗噪声能力 & 低 & 低 & 高 & 较高 \pause \\
使用范围 & 受限领域 & 受限领域 & 通用领域 & 通用领域 \\
翻译精度 & 高 & 较高 & 不确定 & 不确定 \\

\end{tabular}
\end{center}
\vspace{-1em}

\visible<4->{
\begin{itemize}
\item 基于规则和实例的机器翻译是\alert{傻子}：依赖人工或高质量(词对齐)数据，翻译精度高，但是系统泛化能力有限
\item 统计和神经机器翻译是\alert{疯子}：只依赖数据，不依赖人工，系统健壮性强，但是精度不稳定且翻译过程难以人工干预
\end{itemize}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\section{机器翻译课程学习}

%%%------------------------------------------------------------------------------------------------------------
\subsection{动机}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译
\begin{frame}{学习机器翻译 - 理由}

\begin{spacing}{1.2}
\begin{itemize}
\item 为啥要学习机器翻译(MT)？
    \begin{itemize}
    \item 当今自然语言处理乃至人工智能领域的热点
    \item 应用机器学习框架，数据驱动，不需人工
    \item 技术受到广泛关注，已经商用，如Google翻译、Baidu翻译
    \end{itemize}

\item<2-> 如果上面的理由还不够充分，我们可以换个说法
    \begin{itemize}
    \item<3-> MT是很cool的technology - 什么big data、什么deep learning都可以往上扯
    \item<4-> MT能帮你找个好job - 看看最近互联网公司的招聘广告？
    \item<4-> MT是你paper work的很好的题目 - 看看ACL的论文
    \item<4-> MT是你拿project非常好的选题 - 看看做SMT的老师
    \item<5-> MT能帮你找个girlfriend - 这个还得靠自己
    \end{itemize}
\end{itemize}

\vspace{0.5em}

\visible<6->{
\begin{tikzpicture}
\node [draw,thick,red] (note) at (0,0) {\alert{\textbf{总之，机器翻译可以帮助你成家立业、改变世界！}}};
\end{tikzpicture}
}
\end{spacing}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
\subsection{课程学习}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译 - 推荐书籍
\begin{frame}{学习机器翻译 - 参考资料}

\vspace{0.5em}

\begin{minipage}[b]{0.70\textwidth}
\begin{itemize}
\item 推荐教材《Statistical Machine Translation》
    \begin{itemize}
    \item 经典之作，内容全面
    \item 作者是SMT大牛Philipp Koehn
    \item 被很多欧美高校和机器翻译研究者使用
    \item 建议阅读英文版本，不过也有中文版本
    \end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.4]{./Figures/smtbook.jpg}
\end{center}
\end{minipage}\\

\visible<2->{
\begin{itemize}
\item 一个介绍机器翻译研究的网站\\
\url{http://www.statmt.org/}
\item 关于机器翻译和自然语言处理的论文\\
\url{http://www.mt-archive.info/}\\
\url{http://anthology.aclweb.org/}\\
\item 关注一些会议，如ACL、NAACL、EMNLP、COLING、WMT、AMTA
\item Google搜索一下machine translation course
\end{itemize}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译 - 系统
\begin{frame}{学习机器翻译 - 开源机器翻译系统}

机器翻译的发展可以归功于两个重要方面：\\
\alert{\textbf{开源系统 + 评测}}

\vspace{0.5em}

\visible<2->{
\begin{minipage}[b]{0.70\textwidth}
\begin{itemize}
\item \textbf{Moses}\\
\url{http://www.statmt.org/moses/}
    \begin{itemize}
    \item 做MT的人都知道
    \item Philipp Koehn所带领团队开发
    \item 历史较长、性能优良、功能最全面
    \end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=1.8]{./Figures/moses.png}
\end{center}
\end{minipage}\\
}

\visible<3->{
\begin{minipage}[t]{0.70\textwidth}
\begin{itemize}
\item \textbf{NiuTrans}\\
\url{http://www.nlplab.com/NiuPlan/NiuTrans.html}
    \begin{itemize}
    \item 东北大学自然语言处理实验室开发
    \item 模型完整、性能不差、使用简单
    \item 良好的中文技术支持
    \end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\vspace{1em}
\includegraphics[scale=0.4]{./Figures/niutrans.png}
\end{center}
\end{minipage}\\
}

\vspace{0.5em}

\visible<4->{
\begin{itemize}
\item 其它一些非常优秀的开源SMT系统： Silkroad、Joshua、cdec、Phrasal、HiFST、Jane等
\end{itemize}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译 - 系统
\begin{frame}{学习机器翻译 - 开源机器翻译系统(2)}

\begin{minipage}[t]{0.70\textwidth}
\begin{itemize}
\item \textbf{Tensor2Tensor}\\
\url{https://github.com/tensorflow/tensor2tensor}
    \begin{itemize}
    \item 最新的基于深度学习的系统
    \item 支持Transformer等模型
    \item 使用Tensorflow，功能强大
    \end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.2]{./Figures/t2tlogo.jpg}
\end{center}
\end{minipage}\\

\vspace{1em}

\begin{minipage}[t]{0.70\textwidth}
\begin{itemize}
\item \textbf{Fairseq}\\
\url{https://github.com/facebookresearch/fairseq}
    \begin{itemize}
    \item Facebook出品，代码易读
    \item 基于Pytorch，简单易用
    \end{itemize}
\end{itemize}
\end{minipage}
\begin{minipage}[t]{0.27\textwidth}
\begin{center}
\includegraphics[scale=0.5]{./Figures/pytorchlogo.jpg}
\end{center}
\end{minipage}

\vspace{1em}

\visible<2->{
\begin{itemize}
\item \alert{开源机器翻译系统列表} \url{https://github.com/NiuTrans/MT-paper-lists}
\end{itemize}
}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译 - 数据
\begin{frame}{学习机器翻译 - 评测及实验数据}

\begin{itemize}

\item 现在研究使用的绝大多数数据都可以从\textbf{LDC}(Linguistic Data Consortium)上找到\\
\url{https://www.ldc.upenn.edu/}

\item<2-> 很多权威机构也组织各种机器翻译评测（比赛），可以作为研究的benchmark
    \begin{itemize}
    \item \textbf{NIST评测}：历史悠久，影响力巨大，翻译任务多，难度大，数据使用最广泛\\
    \url{http://www.itl.nist.gov/iad/mig/tests/mt/}
    \item \textbf{CWMT评测}：国内评测，发展迅速，翻译语言对丰富\\
    \url{http://nlp.ict.ac.cn/eval.php}
    \item \textbf{WMT评测}：欧洲语系翻译，数据可以免费下载
    \url{http://www.statmt.org/wmt14/}
    \item \textbf{IWSLT评测}：口语翻译评测
    \url{http://workshop2013.iwslt.org/}
    \item \textbf{NTCIR PatentMT}:专利翻译评测
    \url{http://ntcir.nii.ac.jp/PatentMT-2/}
    \end{itemize}

\end{itemize}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% 学习机器翻译 - 数据
\begin{frame}{关于课程}

关于课程有几点需要注意：

\begin{itemize}
\item 机器翻译的学习需要一些程序开发基础，任意的编程语言都可以
    \begin{itemize}
    \item C/C++，Python，Perl等
    \item 没有编程基础咋办？不耽误课程学习，但是练习无法进行
    \end{itemize}
\item 语言学知识、数学知识多多益善，但不是必须
\item<2-> 这门课程比较适合计算机相关专业的本科及研究生学习
    \begin{itemize}
    \item 国内很多高校和研究机构都开展机器翻译的研究
    \item 已经有很多相关的课程（如《自然语言处理》）
    \item 课件可以参考
    \end{itemize}
\item<3-> \textbf{\alert{最后，也是最重要的 - \\
    课程的所有练习都以NiuTrans为基础!!!!}}
    \begin{itemize}
    \item 完全自主开发，开源系统，便于学习代码
    \item NiuTrans团队维护，交流方便
    \end{itemize}
\end{itemize}

\end{frame}

%%%------------------------------------------------------------------------------------------------------------
%%% Oh, yeh!
\begin{frame}{第一节内容就这么结束了！}

\vspace{5em}

{\LARGE
\begin{center}
{\color{ublue} \textbf{谢谢! $\Leftrightarrow$ Thank You!}}
\end{center}
}

\end{frame}

\end{CJK}
\end{document}
