Commit ff4244f5 by xiaotong

tex files

parent c484bbe4
*.aux
*.log
*.nav
*.out
*.bak
*.snm
*.gz
*.toc
*.blg
\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{shapes,arrows,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{\underline{\url{xiaotong@mail.neu.edu.cn}}} \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{神经机器翻译}:把字符串表示成实数向量,翻译被看做序列到序列转化。这个过程由\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}
\end{CJK}
\end{document}
\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}
\RequirePackage{pgf}
\input{pgfsubpic.tex}
\endinput
% pgfsubpic.tex
% Version 1.1, 25 Dec 2009
% Copyright 2009 by David Chiang
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License along
% with this program; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
% New in version 1.1:
% - the ability to save a subpicture in local variables
% - nodes in subpictures are tracked if the subpicture is placed with arbitrary transforms
% - new \pgffitsubpicture macro to transform a subpicture (preserving aspect) to fit in a desired box
% To do:
% - speed up interpictureshift hook by promoting subsubpictures
\newdimen\pgf@subpicminx
\newdimen\pgf@subpicminy
\newdimen\pgf@subpicmaxx
\newdimen\pgf@subpicmaxy
% Special virtual node for current subpicture's bounding box
\expandafter\def\csname pgf@sh@ns@current subpicture\endcsname{rectangle}
\expandafter\def\csname pgf@sh@np@current subpicture\endcsname{%
\def\southwest{\pgfqpoint{\pgf@subpicminx}{\pgf@subpicminy}}%
\def\northeast{\pgfqpoint{\pgf@subpicmaxx}{\pgf@subpicmaxy}}%
}
\expandafter\def\csname pgf@sh@nt@current subpicture\endcsname{{\pgf@pt@aa}{\pgf@pt@ab}{\pgf@pt@ba}{\pgf@pt@bb}{\the\pgf@pt@x}{\the\pgf@pt@y}} % the transformation at invocation time
\expandafter\def\csname pgf@sh@pi@current subpicture\endcsname{\pgfpictureid}
% Create a pgfpicture inside an hbox for delayed placement
\def\pgfsubpicture{%
\expandafter\global\expandafter\setbox\pgf@hbox=\hbox\bgroup
\pgfinterruptpicture
\pgfpicture
\relax % not sure why. otherwise a curly brace immediately after causes an error
}
\def\endpgfsubpicture{
\global\pgf@subpicminx=\pgf@picminx
\global\pgf@subpicminy=\pgf@picminy
\global\pgf@subpicmaxx=\pgf@picmaxx
\global\pgf@subpicmaxy=\pgf@picmaxy
\global\edef\subpictureid{\pgfpictureid}%
\pgfsetbaseline{\pgf@picminy}%
\endpgfpicture%
\endpgfinterruptpicture%
\egroup
}
% Allocate registers for saving a subpicture. #1 is text, not a control sequence.
\def\pgfnewsubpicture#1{%
\expandafter\newbox\csname pgf@subpic@hbox@#1\endcsname
\expandafter\newdimen\csname pgf@subpic@minx@#1\endcsname
\expandafter\newdimen\csname pgf@subpic@miny@#1\endcsname
\expandafter\newdimen\csname pgf@subpic@maxx@#1\endcsname
\expandafter\newdimen\csname pgf@subpic@maxy@#1\endcsname
}
% saved subpictures are local to the current group
\def\pgfsavesubpicture#1{%
\expandafter\setbox\csname pgf@subpic@hbox@#1\endcsname\copy\pgf@hbox
\csname pgf@subpic@minx@#1\endcsname\pgf@subpicminx
\csname pgf@subpic@miny@#1\endcsname\pgf@subpicminy
\csname pgf@subpic@maxx@#1\endcsname\pgf@subpicmaxx
\csname pgf@subpic@maxy@#1\endcsname\pgf@subpicmaxy
\expandafter\edef\csname pgf@subpic@id@#1\endcsname{\subpictureid}
}
\def\pgfrestoresubpicture#1{%
\edef\act{\global\noexpand\setbox\pgf@hbox\noexpand\copy\csname pgf@subpic@hbox@#1\endcsname}\act
\expandafter\global\expandafter\pgf@subpicminx\csname pgf@subpic@minx@#1\endcsname
\expandafter\global\expandafter\pgf@subpicminy\csname pgf@subpic@miny@#1\endcsname
\expandafter\global\expandafter\pgf@subpicmaxx\csname pgf@subpic@maxx@#1\endcsname
\expandafter\global\expandafter\pgf@subpicmaxy\csname pgf@subpic@maxy@#1\endcsname
\xdef\subpictureid{\csname pgf@subpic@id@#1\endcsname}
}
% Place a previously-created subpicture, lining up its origin with the current origin
\def\pgfplacesubpicture{
\pgfscope
% expand current bounding box to accommodate subpicture
\pgfpathrectanglecorners{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}%
\pgfusepath{use as bounding box}%
%
% make the subpicture a node in the containing picture
\expandafter\gdef\csname pgf@sh@ns@\subpictureid\endcsname{rectangle}
\expandafter\xdef\csname pgf@sh@np@\subpictureid\endcsname{%
\noexpand\def\noexpand\southwest{\noexpand\pgfqpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}%
\noexpand\def\noexpand\northeast{\noexpand\pgfqpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}%
}%
\pgfgettransform\pgf@temp
\expandafter\xdef\csname pgf@sh@nt@\subpictureid\endcsname{\pgf@temp}%
\expandafter\xdef\csname pgf@sh@pi@\subpictureid\endcsname{\pgfpictureid}%
%
% align origin of subpicture with origin
\pgftransformshift{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}%
\pgfqboxsynced{\pgf@hbox}%
\endpgfscope
}
% Hook onto existing macro \pgf@shape@interpictureshift.
% This is called whenever we look up an anchor of a node.
% This hook recursively checks to see if the node's picture
% is a subpicture of another, and if so, adjusts its position accordingly.
% This is slow. It makes drawing trees O(n^2) in the depth of the tree.
% The alternative is to store, for each picture, a list of the nodes
% inside it. But this way doesn't require us to hijack \pgfnode, and
% is robust to re-placement of a subpicture. A compromise would be
% to store, for each picture, a list of the *subpictures* inside it.
\let\orig@pgf@shape@interpictureshift\pgf@shape@interpictureshift
\def\unwind@subpic#1{%
% is #1 the current picture?
\edef\subpicid{#1}%
\ifx\subpicid\pgfpictureid
% yes, we're done
\else
% does #1 have a parent picture?
\expandafter\ifx\csname pgf@sh@pi@#1\endcsname\relax
% no, the original node was not inside the current picture
\fallback
\else
% yes, apply transform and move up to parent picture
{%
\pgfsettransform{\csname pgf@sh@nt@#1\endcsname}%
\pgf@pos@transform{\pgf@x}{\pgf@y}%
\global\pgf@x=\pgf@x
\global\pgf@y=\pgf@y
}%
\unwind@subpic{\csname pgf@sh@pi@#1\endcsname}%
\fi
\fi
}
\def\pgf@shape@interpictureshift#1{%
\edef\fallback{\pgf@x=\the\pgf@x\pgf@y=\the\pgf@y\noexpand\orig@pgf@shape@interpictureshift{#1}}%
\unwind@subpic{\csname pgf@sh@pi@#1\endcsname}%
}
% \pgffitsubpicture{sw}{ne}
% Make the subpicture fit in the rectangle from sw to ne, preserving its aspect ratio.
\def\pgffitsubpicture#1#2{%
% current size
\pgfpointdiff{\pgfpointanchor{current subpicture}{south west}}{\pgfpointanchor{current subpicture}{north east}}%
\pgf@xa=\pgf@x \pgf@ya=\pgf@y
% desired size
\pgf@process{\pgfpointdiff{#1}{#2}}%
\pgf@xb=\pgf@x \pgf@yb=\pgf@y
\pgfmathparse{min(\pgf@xb/\pgf@xa,\pgf@yb/\pgf@ya)}%
\pgfmathparse{min(1,\pgfmathresult)}%
\pgftransformscale{\pgfmathresult}%
%
% current position
\pgfpointanchor{current subpicture}{center}%
\pgf@xa=\pgf@x \pgf@ya=\pgf@y
% desired position
% we scaled transform, so apply reverse scaling to argument
\pgfmathparse{1/\pgfmathresult}%
\pgf@process{\pgfpointscale{\pgfmathresult}{\pgfpointlineattime{0.5}{#1}{#2}}}%
\pgf@xb=\pgf@x \pgf@yb=\pgf@y
\pgfpointdiff{\pgfpoint{\pgf@xa}{\pgf@ya}}{\pgfpoint{\pgf@xb}{\pgf@yb}}%
\pgftransformshift{\pgfpoint{\pgf@x}{\pgf@y}}%
}
% utility functions -- not currently used
\def\pgfnodedelete#1{%
\expandafter\global\expandafter\let\csname pgf@sh@ns@#1\endcsname\relax
\expandafter\global\expandafter\let\csname pgf@sh@np@#1\endcsname\relax
\expandafter\global\expandafter\let\csname pgf@sh@nt@#1\endcsname\relax
\expandafter\global\expandafter\let\csname pgf@sh@pi@#1\endcsname\relax
\expandafter\global\expandafter\let\csname pgf@sh@ma@#1\endcsname\relax
}
\def\pgfnodeifexists#1#2#3{%
\expandafter\ifx\csname pgf@sh@ns@#1\endcsname\relax#3\else#2\fi
}
\RequirePackage{pgf}
\RequirePackage{pgffor}
\RequirePackage{pgfsubpic}
\input{pgftree.tex}
\endinput
% pgftree.tex
% Version 1.1, 25 Dec 2009
% Copyright 2009 by David Chiang
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License along
% with this program; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
% New in version 1.1:
% - major restructuring to not do arbitrary nesting of subpicture environments
% - sideways trees
% To do:
% - trees with all leaves at same level
% - if \nodename does not exist as desired, wrap inside a rectangle node
% - don't use pgfsubpic internals
\newdimen\levelsep \levelsep=30pt
\newdimen\subtreesep \subtreesep=2pt
\def\leveldirection{down}
\def\siblingdirection{right}
% definitions of growing directions
\def\pgftree@levelshift{\csname pgftree@levelshift@\leveldirection\endcsname}
\def\pgftree@parentanchor{\csname pgftree@parentanchor@\leveldirection\endcsname}
\def\pgftree@childanchor{\csname pgftree@childanchor@\leveldirection\endcsname}
% these assume that the current subpicture is the child
\def\pgftree@presiblingshift{\csname pgftree@presiblingshift@\siblingdirection\endcsname}
\def\pgftree@postsiblingshift{\csname pgftree@postsiblingshift@\siblingdirection\endcsname}
\def\pgftree@levelshift@down{\pgfpoint{0}{-\levelsep}}
\def\pgftree@parentanchor@down{south}
\def\pgftree@childanchor@down{north}
\def\pgftree@levelshift@up{\pgfpoint{0}{\levelsep}}
\def\pgftree@parentanchor@up{north}
\def\pgftree@childanchor@up{south}
\def\pgftree@levelshift@right{\pgfpoint{\levelsep}{0}}
\def\pgftree@parentanchor@right{east}
\def\pgftree@childanchor@right{west}
\def\pgftree@levelshift@left{\pgfpoint{-\levelsep}{0}}
\def\pgftree@parentanchor@left{west}
\def\pgftree@childanchor@left{east}
\def\pgftree@presiblingshift@right{\pgf@process{\pgf@x-\pgf@subpicminx \advance\pgf@x\subtreesep \pgf@y 0pt}}
\def\pgftree@postsiblingshift@right{\pgf@process{\pgf@x\pgf@subpicmaxx \pgf@y 0pt}}
\def\pgftree@presiblingshift@left{\pgf@process{\pgf@x-\pgf@subpicmaxx \advance\pgf@x-\subtreesep \pgf@y 0pt}}
\def\pgftree@postsiblingshift@left{\pgf@process{\pgf@x\pgf@subpicminx \pgf@y 0pt}}
\def\pgftree@presiblingshift@up{\pgf@process{\pgf@x 0pt \pgf@y-\pgf@subpicminy \advance\pgf@y\subtreesep}}
\def\pgftree@postsiblingshift@up{\pgf@process{\pgf@x 0pt \pgf@y\pgf@subpicmaxy}}
\def\pgftree@presiblingshift@down{\pgf@process{\pgf@x 0pt \pgf@y-\pgf@subpicmaxy \advance\pgf@y-\subtreesep}}
\def\pgftree@postsiblingshift@down{\pgf@process{\pgf@x 0pt \pgf@y\pgf@subpicminy}}
% for convenience if you are using \pgftree directly
\def\drawnode#1{\pgfnode{rectangle}{base}{#1}{\nodename}{\pgfusepath{discard}}}
\def\drawedge{%
\pgfpathmoveto{\pgfpointanchor{\parentnodename}{\pgftree@parentanchor}}%
\pgfpathlineto{\pgfpointanchor{\nodename}{\pgftree@childanchor}}%
\pgfusepath{stroke}}
% local variables that we need to assign to inside a \pgfforeach
\newdimen\pgftree@childx
\newdimen\pgftree@savechildx
\newdimen\pgftree@childy
\newdimen\pgftree@savechildy
\newcount\pgftree@childi
\newcount\pgftree@savechildi
%%% \pgftree{subtree}
\def\pgftree#1{%
\def\nodename{r}%
#1
\pgfplacesubpicture
}
%%% \pgfsubtree{root}{subtrees}
% The first argument draws the root node using PGF/TikZ commands.
% The node must be named \nodename.
% The second argument is an even-length sequence of tokens.
% Token 2n-1 in the sequence draws the nth edge. It should draw an edge from \parentnodename to \nodename.
% Token 2n in the sequence draws the nth subtree. Its root must be named \nodename.
\pgfnewsubpicture{children}
\pgfnewsubpicture{child}
\newdimen\pgftree@lastchildx
\newdimen\pgftree@lastchildy
\def\pgfsubtree#1#2{%
\let\parentnodename\nodename
\pgftree@savechildx=\pgftree@childx
\pgftree@savechildy=\pgftree@childy
\pgftree@savechildi=\pgftree@childi
% Build subpicture with all the children and their subtrees. Save it in "children"
{\pgftree@childx=0pt%
\pgftree@childy=0pt%
\pgftree@childi=0%
\process@children #2}%
\ifnum\pgftree@childi>0%
\begin{pgfsubpicture}%
% Create root node
#1
% Place children
% move down \levelsep
{\pgftransformshift{\pgftree@levelshift}%
% center so that parent is midway between origins of first and last children
\pgftransformshift{\pgfpointscale{-0.5}{\pgfpoint{\the\pgftree@childx}{\the\pgftree@childy}}}%
\pgfplacesubpicture}
% Draw the edges
{\pgftree@childi=0%
\process@edges #2}%
\end{pgfsubpicture}%
\else % leaf node
\begin{pgfsubpicture}%
#1
\end{pgfsubpicture}%
\fi
\global\pgftree@childi=\pgftree@savechildi
\global\pgftree@childx=\pgftree@savechildx
\global\pgftree@childy=\pgftree@savechildy
}
\def\process@children{%
\pgfutil@ifnextchar\egroup
{% No more children, step back to origin of last child
\global\pgftree@childx\pgftree@lastchildx
\global\pgftree@childy\pgftree@lastchildy
\global\pgftree@childi\pgftree@childi
\pgfrestoresubpicture{children}% pass children back to caller
}%
{\@process@children}%
}
\def\@process@children#1#2{% #1 is the edge, #2 is the child
% Build the current child and save it as "child"
{\edef\nodename{\parentnodename-\the\pgftree@childi}%
#2}%
\pgfsavesubpicture{child}%
\begin{pgfsubpicture}
% Place previous children (if any)
\ifnum\pgftree@childi>0%
\pgfrestoresubpicture{children}%
\pgfplacesubpicture
\fi
% Place current child
\pgfrestoresubpicture{child}%
\ifnum\pgftree@childi>0% the first child is always at 0
\pgftree@presiblingshift \global\advance\pgftree@childx\pgf@x \global\advance\pgftree@childy\pgf@y
\fi
\global\pgftree@lastchildx\pgftree@childx
\global\pgftree@lastchildy\pgftree@childy
{\pgftransformshift{\pgfpoint{\the\pgftree@childx}{\the\pgftree@childy}}%
\pgfplacesubpicture}%
\pgftree@postsiblingshift \global\advance\pgftree@childx\pgf@x \global\advance\pgftree@childy\pgf@y
\end{pgfsubpicture}%
% Save the augmented row of children back into "children"
\pgfsavesubpicture{children}%
\advance\pgftree@childi by 1%
\process@children
}
\def\process@edges{%
\pgfutil@ifnextchar\egroup
{}%
{\@process@edges}%
}
\def\@process@edges#1#2{%
\edef\nodename{\parentnodename-\the\pgftree@childi}%
#1%
\advance\pgftree@childi by 1%
\process@edges
}
\def\subtreeof#1{%
% the subpicture which contains a node also contains exactly its subtree
\csname pgf@sh@pi@#1\endcsname
}
% !Mode:: "TeX:GBK"
\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}
\usepackage{array}
\usepgflibrary{arrows} % LATEX and plain TEX and pure pgf
\usetikzlibrary{arrows} % LATEX and plain TEX when using Tik Z
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{shadows} % LATEX and plain TEX when using Tik Z
\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{词法、语法及概率思想基础}}
\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{中文分词}
%%% 进一步扩展,基于n-gram LM的方法
\begin{frame}{进一步扩展:基于$n$-gram语言模型的方法}
\begin{itemize}
\item 这种方法也被称作基于1-gram(统计)语言模型的方法\\
所谓统计语言模型就是计算$\textrm{P}(w_1 w_2 ... w_m)$的概率
\end{itemize}
{\scriptsize
\tabcolsep 5pt
\begin{tabular}{l | l | l l l}
链式法则 & 1-gram & 2-gram & ... & $n$-gram \\
$\textrm{P}(w_1 w_2 ... w_n)=$ & $\textrm{P}(w_1 w_2 ... w_n)=$ & $\textrm{P}(w_1 w_2 ... w_n)=$ & ... & $\textrm{P}(w_1 w_2 ... w_n)=$ \\
$\textrm{P}(w_1) \times$ & $\textrm{P}(w_1) \times$ & $\textrm{P}(w_1) \times$ & ... & $\textrm{P}(w_1) \times$ \\
$\textrm{P}(w_2|w_1) \times$ & $\textrm{P}(w_2) \times$ & $\textrm{P}(w_2|w_1) \times$ & ... & $\textrm{P}(w_2|w_1) \times$ \\
$\textrm{P}(w_3|w_1 w_2) \times$ & $\textrm{P}(w_3) \times$ & $\textrm{P}(w_3|w_2) \times$ & ... & $\textrm{P}(w_3|w_1 w_2) \times$ \\
$\textrm{P}(w_4|w_1 w_2 w_3) \times$ & $\textrm{P}(w_4) \times$ & $\textrm{P}(w_4|w_3) \times$ & ... & $\textrm{P}(w_4|w_1 w_2 w_3) \times$ \\
... & ... & ... & ... & ... \\
$\textrm{P}(w_m|w_1...w_{m-1})$ & $\textrm{P}(w_m)$ & $\textrm{P}(w_m|w_{m-1})$ & ... & $\textrm{P}(w_m|w_{m-n+1} ... w_{m-1})$ \\
\end{tabular}
}
\begin{itemize}
\item<2-> \textbf{$n$-gram语言模型}的核心思想就是当前词($w_m$)出现的概率只依赖于前$n-1$个词($w_{m-n+1} ... w_{m-1}$)
\vspace{-2em}
\begin{eqnarray}
& & \textrm{P}_{2\textrm{-gram}}(\textrm{'确实/现在/数据/很/多'}) \nonumber \\
& = & \textrm{P}(\textrm{'确实'}) \times \textrm{P}(\textrm{'现在'$|$'确实'}) \times \textrm{P}(\textrm{'数据'$|$'现在'}) \times \nonumber \\
& & \textrm{P}(\textrm{'很'$|$'数据'}) \times \textrm{P}(\textrm{'多'$|$'很'}) \nonumber
\end{eqnarray}
\vspace{-1em}
\item<2-> \textbf{训练} - 相对频率估计:$\textrm{P}(\textrm{'现在'$|$'确实'}) = \frac{count(\textrm{'确实 现在'})}{count(\textrm{'确实'})}$
\end{itemize}
\end{frame}
\subsection{统计思想}
\subsection{统计建模实例1:基于全切分的概率分词}
\end{CJK}
\end{document}
This source diff could not be displayed because it is too large. You can view the blob instead.
% tikz-qtree-compat.tex
% Version 1.1, 25 Dec 2009
\RequirePackage{tikz-qtree}
\let\orig@Tree\Tree
\def\Tree{\automath \qtreeprimes@internal \orig@Tree}
\def\qsetw#1{\message{\noexpand\qsetw is not supported, sorry!}}
\def\faketreewidth#1{\message{\noexpand\faketreewidth is not supported, sorry!}}
\def\qbalance{\message{\noexpand\qbalance is not supported, sorry!}}
\def\qframesubtree{\message{\noexpand\qframesubtree is not supported, sorry!}}
% Implement \qroof as a fancy leaf node
\newtoks\@qrooflabel
\def\qroof#1.{%
\begin{tikzpicture}[baseline]
{\pgftransformshift{\pgftree@levelshift}%
\node(qroofbot){#1};}
\@qroof
}
\def\@qroof{\@ifnextchar\egroup{%
% since we are putting the qroof inside a node, we already have an inner sep
% so for the purposes of defining our bounding box, we must eliminate inner sep
\begin{pgfsubpicture}
\node [inner sep=0pt] {\the\@qrooflabel};%
\end{pgfsubpicture}
\pgfpathrectanglecorners{\pgfpoint{\the\pgf@subpicminx}{\the\pgf@subpicminy}}{\pgfpoint{\the\pgf@subpicmaxx}{\the\pgf@subpicmaxy}}%
\pgfusepath{use as bounding box}%
\node (qrooftop) {\the\@qrooflabel};
\draw \roof@edge{qrooftop}{qroofbot};%
\end{tikzpicture}}
{\@@qroof}}
\def\@@qroof#1{\expandafter\@qrooflabel\expandafter{\the\@qrooflabel #1}\@qroof}
%%% This is lifted straight from qtree.sty
% and another odd convenience:
%
% Make _, ^ go into math mode automatically in the scope of \automath
%
{ % Temporarily change catcodes
\catcode`\_=\active
\catcode`\^=\active
\global\def\automath{%
\catcode`\_=\active
\catcode`\^=\active
\def_##1{\@ifnextchar^{\automath@two_{##1}}{\ensuremath{\sb{##1}}}}%
\def^##1{\@ifnextchar_{\automath@two^{##1}}{\ensuremath{\sp{##1}}}}}
}
\def\automath@two#1#2#3#4{\ensuremath{#1{#2}\relax #3{#4}}}
% Restore default catcodes for ^, _
\def\noautomath{\catcode`\_=8 \catcode`\^=7 }
% Let \0, \1, \2 produce ^0, $'$, $''$
% The \rlap results in better centering of the label (ignoring the
% superscript)
\def\qtreeprimes@internal{%
\def\0{\ifmmode ^0\else \rlap{$^0$}\fi}%
\def\1{\ifmmode '\else \rlap{$'$}\fi}%
\def\2{\ifmmode ''\else \rlap{$''$}\fi}%
}
% Same commands, but without the \rlap feature
\def\qtreeprimes{%
\def\0{\ensuremath{^0}}%
\def\1{\ensuremath{'}}%
\def\2{\ensuremath{''}}}
\RequirePackage{tikz}
\RequirePackage{pgftree}
\input{tikz-qtree.tex}
\endinput
% tikz-qtree.tex
% Version 1.1, 25 Dec 2009
% Copyright (C) 2002, 2009 by David Chiang
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License along
% with this program; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
% New in version 1.1:
% - sideways trees
%% These macros facilitate building up an object recursively before
%% putting it into the input stream.
\newtoks\@result
\def\@call#1#2{\let\@cont=#2\bgroup\@result={}#1}
\def\@return{\global\@result=\@result\egroup\@cont}
\def\@ifequal#1#2{\edef\testa{#1}\edef\testb{#2}\ifx\testa\testb}
%% scan a tree: this just scans a subtree and then puts it onto the
%% input stream
\def\Tree{\@call\@subtree\@Tree}
\def\@Tree{%
%\showthe\@result %debug
\ifpgfpicture % is there a test for tikzpicture?
\pgftree{\the\@result}%
\else
\tikzpicture[baseline]\pgftree{\the\@result}\endtikzpicture
\fi
}
%% scan a subtree
\newtoks\child@list
\newtoks\root@node
\def\@subtree[{%
\root@node={}%
\pgfutil@ifnextchar.{\@call\@interior\@@subtree}{\@@@subtree}}
\def\@@subtree{%
\root@node=\@result
\@@@subtree
}
\def\@@@subtree{%
\@call\@children\@@@@subtree
}
\def\@@@@subtree]{%
\child@list=\@result
\pgfutil@ifnextchar.{\@call\@interior\@@@@@subtree}{\@@@@@@subtree}}
\def\@@@@@subtree{%
%%% Check for mismatch.
\@ifequal{\the\root@node}{\pgfutil@empty}%
\root@node=\@result
\fi
\@ifequal{\the\root@node}{\the\@result}\else
\message{Warning: mismatched labels, \the\root@node{} and \the\@result.}%
\fi
\@@@@@@subtree
}
\def\@@@@@@subtree{%
\@ifequal{\the\root@node}{\pgfutil@empty}
\edef\act{\noexpand\@result={\noexpand\pgfsubtree{\noexpand\path coordinate (\noexpand\nodename);}{\the\child@list}}}%
\else
\edef\act{\noexpand\@result={\noexpand\pgfsubtree{\the\root@node}{\the\child@list}}}%
\fi
\act
\@return}
%% scan a sequence of subtrees or leaves
\newif\ifscanned@edge
\def\@children{%
\scanned@edgefalse
\child@list{}%
\@@children}
\def\@@children{%
\pgfutil@ifnextchar]{\@result\child@list\@return}{% end of children
\pgfutil@ifnextchar\edge{% explicit edge
\ifscanned@edge
\message{Warning: more than one edge given for a single child}\let\next\@@children % ignore
\else
\scanned@edgetrue\let\next\@@@children
\fi
\@call\@edge\next}{%
% else, a real node is next
\ifscanned@edge\else % no explicit edge, supply default
\expandafter\child@list\expandafter{\the\child@list{\edge@adapter{}}}%
\fi
\scanned@edgefalse
\pgfutil@ifnextchar[{\@call\@subtree\@@@children}% subtree
{\@call\@leaf\@@@children} % leaf
}}}
\def\@@@children{%
% wrap child inside curly braces
\expandafter\@result\expandafter{\expandafter{\the\@result}}
\edef\act{\noexpand\child@list{\the\child@list \the\@result}}\act
\@@children
}
\def\@interior.{\@result{\node[alias=\nodename][every tree node,every internal node]}\@label}
\def\@leaf{\@call\@label\@@leaf}
\def\@@leaf{\edef\act{\noexpand\@result{\noexpand\pgfsubtree{\noexpand\node[alias=\noexpand\nodename][every tree node,every leaf node]\the\@result}{}}}\act\@return}
\def\@edge\edge #1;{%
\@result{\edge@adapter{#1}}%
\@return}
\def\edge@adapter#1{%
\let\tikzparentnode\parentnodename
\let\tikzchildnode\nodename
\path edge from parent #1;%
}
% a label is either text or PGF/TikZ code starting with \node
\def\@label{\pgfutil@ifnextchar\node{\@litlabel}{\@@label}}
\def\@@label#1 {%
\expandafter\@result\expandafter{\the\@result{#1};}%
\@return}
% try to copy \node command into \@result without stripping braces
\def\@litlabel\node{\@@litlabel}
\def\@@litlabel{\pgfutil@ifnextchar\bgroup{\@@@litlabel}{\@@@@litlabel}}
\def\@@@litlabel#1{\expandafter\@result\expandafter{\the\@result {#1}}\@@litlabel}
\def\@@@@litlabel#1;{\expandafter\@result\expandafter{\the\@result #1;}\@return}
% predefined edges
\def\tree@edge#1#2{(#1.\pgftree@parentanchor) -- (#2.\pgftree@childanchor)}
\def\roof@edge#1#2{\csname roof@edge@\leveldirection\endcsname{#1}{#2}}
\def\roof@edge@down#1#2{(#1.south) -- (#2.north west) -- (#2.north east) -- cycle}
\def\roof@edge@up#1#2{(#1.north) -- (#2.south west) -- (#2.south east) -- cycle}
\def\roof@edge@left#1#2{(#1.west) -- (#2.north east) -- (#2.south east) -- cycle}
\def\roof@edge@right#1#2{(#1.east) -- (#2.north west) -- (#2.south west) -- cycle}
%%% Options
\tikzoption{level distance}{\pgfmathsetlength\levelsep{#1}}
\tikzoption{sibling distance}{\pgfmathsetlength\subtreesep{#1}} % different semantics
% I don't really like this scheme
\tikzoption{grow}{\csname grow@#1\endcsname}
\tikzoption{grow'}{\csname growprime@#1\endcsname}
\def\grow@up{\def\leveldirection{up}\def\siblingdirection{left}}
\def\grow@down{\def\leveldirection{down}\def\siblingdirection{right}}
\def\growprime@up{\def\leveldirection{up}\def\siblingdirection{right}}
\def\growprime@down{\def\leveldirection{down}\def\siblingdirection{left}}
\def\grow@left{\def\leveldirection{left}\def\siblingdirection{down}}
\def\grow@right{\def\leveldirection{right}\def\siblingdirection{up}}
\def\growprime@left{\def\leveldirection{left}\def\siblingdirection{up}}
\def\growprime@right{\def\leveldirection{right}\def\siblingdirection{down}}
% defaults appropriate for linguistic trees
\tikzset{every tree node/.style={anchor=base}}
\tikzset{every leaf node/.style={}}
\tikzset{every internal node/.style={}}
\def\tikz@edge@to@parent@path{\tree@edge{\tikzparentnode}{\tikzchildnode}}
% predefined roof style
\tikzset{roof/.style={edge from parent path=\roof@edge{\tikzparentnode}{\tikzchildnode}}}
% !Mode:: "TeX:GBK"
\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}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usetikzlibrary{shadows} % LATEX and plain TEX when using Tik Z
\usepgflibrary{arrows} % LATEX and plain TEX and pure pgf
\usetikzlibrary{arrows} % LATEX and plain TEX when using Tik Z
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{decorations.text}
\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 want a triangle
\setbeamertemplate{itemize subsubitem}[ball] % if you want a ball
\begin{document}
\begin{CJK}{GBK}{you}
\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{IBM模型}
\subsection{训练}
%%% outline
\begin{frame}{Landscape}
\vspace{-1em}
\begin{center}
\begin{tikzpicture}
\node [] (history) at (0,0) {\includegraphics[scale=0.29]{./Figures/mt-history.png}};
\visible<2->{
\draw[-,thick] ([xshift=-1.1in]history.south) coordinate (top01) -- ([yshift=-2em]top01);
\draw[-,thick] ([xshift=1in]history.south) coordinate (top02) -- ([yshift=-2em]top02);
\draw[-,thick] ([xshift=-0.3in]history.south east) coordinate (top03) -- ([yshift=-2em]top03);
\draw[<->,thick] ([yshift=-1em]top01) -- ([yshift=-1em]top02) node [pos=0.5,below,align=left,yshift=-0.5em] {\footnotesize{\textbf{Sections 3-4:}}\\\footnotesize{统计机器翻译}};
\draw[<->,thick] ([yshift=-1em]top02) -- ([yshift=-1em]top03) node [pos=0.5,below,align=left,yshift=-0.5em] {\footnotesize{\textbf{Sections 5-6:}}\\\footnotesize{神经机器翻译}};
}
\visible<3->{
\draw[<-,thick] ([xshift=-0.9in,yshift=-0.2in]history.north) coordinate (label01) -- ([yshift=1.5em,xshift=1.5em]label01) coordinate (label02);
\node[anchor=south west,align=left] (label) at ([xshift=-5em]label02) {\textbf{\alert{本章内容:}}\\统计机器翻译开山之作 - IBM模型\\\textit{The Mathematics of Statistical Machine Translation:}\\\textit{Parameter Estimation} by Peter E. Brown et al., 1993.};
}
\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.
% !Mode:: "TeX:GBK"
\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}
\usepackage{ulem}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usetikzlibrary{shadows} % LATEX and plain TEX when using Tik Z
\usepgflibrary{arrows} % LATEX and plain TEX and pure pgf
\usetikzlibrary{arrows} % LATEX and plain TEX when using Tik Z
\usetikzlibrary{decorations}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{decorations.text}
\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 want a triangle
\setbeamertemplate{itemize subsubitem}[ball] % if you want a ball
\begin{document}
\begin{CJK}{GBK}{you}
\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{翻译中为什么要使用短语}
%%%------------------------------------------------------------------------------------------------------------
%%% 回顾基于词的翻译模型
\begin{frame}{回顾 - 基于词的机器翻译}
\begin{itemize}
\item 对每个\alert{单词}的翻译进行(任意)组合
\end{itemize}
\vspace{-2em}
\begin{flushright}
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (s1) at (0,0) {\textbf{}};
\node [anchor=west] (s2) at ([xshift=2em]s1.east) {\textbf{}};
\node [anchor=west] (s3) at ([xshift=2em]s2.east) {\textbf{}};
\node [anchor=west] (s4) at ([xshift=2em]s3.east) {\textbf{表示}};
\node [anchor=west] (s5) at ([xshift=2em]s4.east) {\textbf{满意}};
\node [anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west) {\scriptsize{\textbf{\alert{待翻译句子(已经分词):}}}};
\draw [->,very thick,ublue] (s1.south) -- ([yshift=-0.7em]s1.south);
\draw [->,very thick,ublue] (s2.south) -- ([yshift=-0.7em]s2.south);
\draw [->,very thick,ublue] (s3.south) -- ([yshift=-0.7em]s3.south);
\draw [->,very thick,ublue] (s4.south) -- ([yshift=-0.7em]s4.south);
\draw [->,very thick,ublue] (s5.south) -- ([yshift=-0.7em]s5.south);
{\small
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south) {I};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.2em]t11.south) {me};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.2em]t12.south) {I'm};
\node [anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west) {\tiny{{\color{white} \textbf{1}}}};
\invisible{
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t14) at ([yshift=-0.2em]t13.south west) {I'm};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t15) at ([yshift=-0.2em]t14.south west) {I};
\node [anchor=north west,inner sep=1pt,fill=black] (tl14) at (t14.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl15) at (t15.north west) {\tiny{{\color{white} \textbf{1-2}}}};
}
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south) {to};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.2em]t21.south) {with};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.2em]t22.south) {for};
\node [anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west) {\tiny{{\color{white} \textbf{2}}}};
\invisible{
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t24) at ([yshift=-0.2em,xshift=-2.6em]t15.south east) {for you};
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t25) at ([yshift=-0.2em]t24.south west) {with you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl24) at (t24.north west) {\tiny{{\color{white} \textbf{2-3}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl25) at (t25.north west) {\tiny{{\color{white} \textbf{2-3}}}};
}
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=2.5em] (t31) at ([yshift=-1em]s3.south) {you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west) {\tiny{{\color{white} \textbf{3}}}};
\invisible{
\node [anchor=west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=13.35em] (t32) at ([xshift=1.4em]t14.east) {you are satisfied};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=7.45em] (t33) at ([yshift=-0.2em]t32.south west) {$\phi$};
\node [anchor=north west,inner sep=1pt,fill=black] (tl32) at (t32.north west) {\tiny{{\color{white} \textbf{3-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl33) at (t33.north west) {\tiny{{\color{white} \textbf{3-4}}}};
}
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south) {$\phi$};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south) {show};
\node [anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west) {\tiny{{\color{white} \textbf{4}}}};
\invisible{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t43) at ([xshift=1.75em]t24.east) {satisfied};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t44) at ([yshift=-0.2em]t43.south west) {satisfactory};
\node [anchor=north west,inner sep=1pt,fill=black] (tl43) at (t43.north west) {\tiny{{\color{white} \textbf{4-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl44) at (t44.north west) {\tiny{{\color{white} \textbf{4-5}}}};
}
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south) {satisfy};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.2em]t51.south) {satisfied};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.2em]t52.south) {satisfies};
\node [anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west) {\tiny{{\color{white} \textbf{5}}}};
}
{\tiny
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt11) at (t11.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt12) at (t12.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt13) at (t13.east) {{\color{white} \textbf{P=.4}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt14) at (t14.east) {{\color{white} \textbf{P=.1}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt15) at (t15.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt21) at (t21.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt22) at (t22.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt23) at (t23.east) {{\color{white} \textbf{P=.3}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt24) at (t24.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt25) at (t25.east) {{\color{white} \textbf{P=.1}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt31) at (t31.east) {{\color{white} \textbf{P=1}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t32.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t33.east) {{\color{white} \textbf{P=.3}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt41) at (t41.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt42) at (t42.east) {{\color{white} \textbf{P=.5}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt43) at (t43.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt44) at (t44.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt51) at (t51.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt52) at (t52.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt53) at (t53.east) {{\color{white} \textbf{P=.1}}};
}
\end{scope}
\begin{scope}
{\small
}
\end{scope}
\begin{scope}
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=0em,xshift=-0.5em]t11.north west) -- ([xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label2) {\footnotesize{\textbf{单词翻译}}};
\visible<2->{
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em]t13.west) -- ([xshift=0.8em]t13.east) -- ([xshift=-0.2em]t22.west) -- ([xshift=0.8em]t22.east) -- ([xshift=-0.2em]t31.west) -- ([xshift=0.8em]t31.east) -- ([xshift=-0.2em]t41.west) -- ([xshift=0.8em]t41.east) -- ([xshift=-0.2em]t52.west) -- ([xshift=1.2em]t52.east);
}
\invisible{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em]t15.west) -- ([xshift=0.8em]t15.east) -- ([xshift=-0.2em]t32.west) -- ([xshift=1.2em]t32.east);
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=0.1em]t13.west) -- ([xshift=0.8em,yshift=0.1em]t13.east) -- ([xshift=-0.2em]t25.west) -- ([xshift=0.8em]t25.east) -- ([xshift=-0.2em,yshift=0.1em]t41.west) -- ([xshift=0.8em,yshift=0.1em]t41.east) -- ([xshift=-0.2em,yshift=0.1em]t52.west) -- ([xshift=1.2em,yshift=0.1em]t52.east);
}
\invisible{
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=-0.2em,xshift=-0.5em]t13.south west) -- ([yshift=-6.3em,xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label3) {\footnotesize{\textbf{短语翻译}}};
}
\visible<2->{
\node [anchor=north west] (wtranslabel) at ([yshift=-4em]t15.south west) {\scriptsize{翻译路径(仅含有单词):}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1em]wtranslabel.east);
}
\invisible{
\node [anchor=north west] (ptranslabel) at ([yshift=-5.5em]t15.south west) {\scriptsize{翻译路径(含有短语):}};
\draw [->,ultra thick,ublue,line width=1.5pt,opacity=0.7] ([xshift=0.65em]ptranslabel.east) -- ([xshift=1.65em]ptranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{flushright}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 基于短语的翻译模型
\begin{frame}{基于"短语"的机器翻译}
\begin{itemize}
\item 对每个\alert{单词}\alert{连续词串}的翻译进行(任意)组合
\end{itemize}
\vspace{-2em}
\begin{flushright}
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (s1) at (0,0) {\textbf{}};
\node [anchor=west] (s2) at ([xshift=2em]s1.east) {\textbf{}};
\node [anchor=west] (s3) at ([xshift=2em]s2.east) {\textbf{}};
\node [anchor=west] (s4) at ([xshift=2em]s3.east) {\textbf{表示}};
\node [anchor=west] (s5) at ([xshift=2em]s4.east) {\textbf{满意}};
\node [anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west) {\scriptsize{\textbf{\alert{待翻译句子(已经分词):}}}};
\draw [->,very thick,ublue] (s1.south) -- ([yshift=-0.7em]s1.south);
\draw [->,very thick,ublue] (s2.south) -- ([yshift=-0.7em]s2.south);
\draw [->,very thick,ublue] (s3.south) -- ([yshift=-0.7em]s3.south);
\draw [->,very thick,ublue] (s4.south) -- ([yshift=-0.7em]s4.south);
\draw [->,very thick,ublue] (s5.south) -- ([yshift=-0.7em]s5.south);
{\small
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south) {I};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.2em]t11.south) {me};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.2em]t12.south) {I'm};
\node [anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west) {\tiny{{\color{white} \textbf{1}}}};
\visible<2->{
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t14) at ([yshift=-0.2em]t13.south west) {I'm};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t15) at ([yshift=-0.2em]t14.south west) {I};
\node [anchor=north west,inner sep=1pt,fill=black] (tl14) at (t14.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl15) at (t15.north west) {\tiny{{\color{white} \textbf{1-2}}}};
}
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south) {to};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.2em]t21.south) {with};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.2em]t22.south) {for};
\node [anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west) {\tiny{{\color{white} \textbf{2}}}};
\visible<2->{
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t24) at ([yshift=-0.2em,xshift=-2.6em]t15.south east) {for you};
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t25) at ([yshift=-0.2em]t24.south west) {with you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl24) at (t24.north west) {\tiny{{\color{white} \textbf{2-3}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl25) at (t25.north west) {\tiny{{\color{white} \textbf{2-3}}}};
}
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=2.5em] (t31) at ([yshift=-1em]s3.south) {you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west) {\tiny{{\color{white} \textbf{3}}}};
\visible<2->{
\node [anchor=west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=13.35em] (t32) at ([xshift=1.4em]t14.east) {you are satisfied};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=7.45em] (t33) at ([yshift=-0.2em]t32.south west) {$\phi$};
\node [anchor=north west,inner sep=1pt,fill=black] (tl32) at (t32.north west) {\tiny{{\color{white} \textbf{3-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl33) at (t33.north west) {\tiny{{\color{white} \textbf{3-4}}}};
}
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south) {$\phi$};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south) {show};
\node [anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west) {\tiny{{\color{white} \textbf{4}}}};
\visible<2->{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t43) at ([xshift=1.75em]t24.east) {satisfied};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t44) at ([yshift=-0.2em]t43.south west) {satisfactory};
\node [anchor=north west,inner sep=1pt,fill=black] (tl43) at (t43.north west) {\tiny{{\color{white} \textbf{4-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl44) at (t44.north west) {\tiny{{\color{white} \textbf{4-5}}}};
}
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south) {satisfy};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.2em]t51.south) {satisfied};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.2em]t52.south) {satisfies};
\node [anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west) {\tiny{{\color{white} \textbf{5}}}};
}
{\tiny
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt11) at (t11.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt12) at (t12.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt13) at (t13.east) {{\color{white} \textbf{P=.4}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt14) at (t14.east) {{\color{white} \textbf{P=.1}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt15) at (t15.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt21) at (t21.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt22) at (t22.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt23) at (t23.east) {{\color{white} \textbf{P=.3}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt24) at (t24.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt25) at (t25.east) {{\color{white} \textbf{P=.1}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt31) at (t31.east) {{\color{white} \textbf{P=1}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t32.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t33.east) {{\color{white} \textbf{P=.3}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt41) at (t41.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt42) at (t42.east) {{\color{white} \textbf{P=.5}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt43) at (t43.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt44) at (t44.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt51) at (t51.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt52) at (t52.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt53) at (t53.east) {{\color{white} \textbf{P=.1}}};
}
\end{scope}
\begin{scope}
{\small
}
\end{scope}
\begin{scope}
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=0em,xshift=-0.5em]t11.north west) -- ([xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label2) {\footnotesize{\textbf{单词翻译}}};
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em]t13.west) -- ([xshift=0.8em]t13.east) -- ([xshift=-0.2em]t22.west) -- ([xshift=0.8em]t22.east) -- ([xshift=-0.2em]t31.west) -- ([xshift=0.8em]t31.east) -- ([xshift=-0.2em]t41.west) -- ([xshift=0.8em]t41.east) -- ([xshift=-0.2em]t52.west) -- ([xshift=1.2em]t52.east);
\visible<3->{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em]t15.west) -- ([xshift=0.8em]t15.east) -- ([xshift=-0.2em]t32.west) -- ([xshift=1.2em]t32.east);
}
\visible<4->{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=0.1em]t13.west) -- ([xshift=0.8em,yshift=0.1em]t13.east) -- ([xshift=-0.2em]t25.west) -- ([xshift=0.8em]t25.east) -- ([xshift=-0.2em,yshift=0.1em]t41.west) -- ([xshift=0.8em,yshift=0.1em]t41.east) -- ([xshift=-0.2em,yshift=0.1em]t52.west) -- ([xshift=1.2em,yshift=0.1em]t52.east);
}
\visible<2->{
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=-0.2em,xshift=-0.5em]t13.south west) -- ([yshift=-6.3em,xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label3) {\footnotesize{\textbf{短语翻译}}};
}
\node [anchor=north west] (wtranslabel) at ([yshift=-4em]t15.south west) {\scriptsize{翻译路径(仅含有单词):}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1em]wtranslabel.east);
\visible<3->{
\node [anchor=north west] (ptranslabel) at ([yshift=-5.5em]t15.south west) {\scriptsize{翻译路径(含有短语):}};
\draw [->,ultra thick,ublue,line width=1.5pt,opacity=0.7] ([xshift=0.65em]ptranslabel.east) -- ([xshift=1.65em]ptranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{flushright}
\end{frame}
\end{CJK}
\end{document}
% !Mode:: "TeX:GBK"
\def\CTeXPreproc{Created by ctex v0.2.13, don't edit!}
\documentclass[cjk,t,compress,12pt]{beamer}
%\documentclass[cjk,t,compress,handout,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}
\usepackage{ulem}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usetikzlibrary{shadows} % LATEX and plain TEX when using Tik Z
\usepgflibrary{arrows} % LATEX and plain TEX and pure pgf
\usetikzlibrary{arrows} % LATEX and plain TEX when using Tik Z
\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} % 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{基于短语和句法的翻译模型}}
\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{翻译中为什么要使用短语}
%%%------------------------------------------------------------------------------------------------------------
%%% 基于单词的模型的问题
\begin{frame}{基于单词有哪些问题}
\begin{itemize}
\item 基于单词的翻译模型有哪些\alert{优点}
\begin{itemize}
\item 比较符合人的思维、简单直接、易于实现
\end{itemize}
\vspace{0.3em}
\begin{minipage}[t]{0.40\linewidth}
\begin{center}
{\scriptsize
\begin{tabular}{l | l}
单词翻译表 & P \\ \hline
$\to$ I & 0.6 \\
喜欢 $\to$ like & 0.3 \\
绿 $\to$ green & 0.9 \\
$\to$ tea & 0.8 \\
\end{tabular}
}
\end{center}
\end{minipage}
\begin{minipage}[c]{0.58\linewidth}
\begin{tikzpicture}
\begin{scope}
{\footnotesize
\node [anchor=west] (s1) at (0,0) {};
\node [anchor=west] (s2) at ([xshift=1.0em]s1.east) {喜欢};
\node [anchor=west] (s3) at ([xshift=1.0em]s2.east) {{\color{ugreen} 绿}};
\node [anchor=west] (s4) at ([xshift=1.0em]s3.east) {};
\node [anchor=east] (s) at (s1.west) {$s=$};
}
\end{scope}
\visible<2->{
\begin{scope}[yshift=-2.0em]
{\footnotesize
\node [anchor=west] (t1) at (0.35em,0) {I};
\node [anchor=west] (t2) at ([xshift=0.8em,yshift=-0.0em]t1.east) {like};
\node [anchor=west] (t3) at ([xshift=1.0em,yshift=-0.2em]t2.east) {green};
\node [anchor=west] (t4) at ([xshift=0.8em,yshift=0.1em]t3.east) {tea};
\node [anchor=east] (t) at ([xshift=-0.3em]t1.west) {$t=$};
}
\end{scope}
\draw [-] (s1.south) -- (t1.north);
\draw [-] (s2.south) ..controls +(south:0.5em) and +(north:0.5em).. (t2.north);
\draw [-] (s3.south) ..controls +(south:0.5em) and +(north:0.5em).. (t3.north);
\draw [-] (s4.south) -- (t4.north);
}%visible<2->
\end{tikzpicture}
\end{minipage}
\vspace{0.5em}
\item<3-> 基于单词的翻译模型有哪些\alert{缺点}
\begin{itemize}
\item 很多 - 这符合中国人的思维,缺点总是很多 :)
\item 独立性假设:单词之间相对独立,没有考虑搭配
\item 调序:较弱的调序建模
\item ...
\end{itemize}
\vspace{-0.5em}
\begin{minipage}[t]{0.40\linewidth}
\begin{center}
{\scriptsize
\begin{tabular}{l | l}
单词翻译表 & P \\ \hline
$\to$ I & 0.6 \\
喜欢 $\to$ like & 0.3 \\
$\to$ red & 0.8 \\
$\to$ black & 0.1 \\
$\to$ tea & 0.8\\
\end{tabular}
}
\end{center}
\end{minipage}
\begin{minipage}[c]{0.58\linewidth}
\vspace{1em}
\begin{tikzpicture}
\begin{scope}
{\footnotesize
\node [anchor=west] (s1) at (0,0) {};
\node [anchor=west] (s2) at ([xshift=1.0em]s1.east) {喜欢};
\node [anchor=west] (s3) at ([xshift=1.0em]s2.east) {\alert{}};
\node [anchor=west] (s4) at ([xshift=1.0em]s3.east) {};
\node [anchor=east] (s) at (s1.west) {$s=$};
}
\end{scope}
\visible<4->{
\begin{scope}[yshift=-2.0em]
{\footnotesize
\node [anchor=west] (t1) at (0.35em,0) {I};
\node [anchor=west] (t2) at ([xshift=0.8em,yshift=-0.0em]t1.east) {like};
\node [anchor=west] (t3) at ([xshift=1.0em,yshift=-0.0em]t2.east) {red};
\node [anchor=west] (t4) at ([xshift=1.0em,yshift=-0.1em]t3.east) {tea};
\node [anchor=east] (t) at ([xshift=-0.3em]t1.west) {$t=$};
}
\end{scope}
\draw [-] (s1.south) -- (t1.north);
\draw [-] (s2.south) ..controls +(south:0.5em) and +(north:0.5em).. (t2.north);
\draw [-] (s3.south) ..controls +(south:0.5em) and +(north:0.5em).. (t3.north);
\draw [-] (s4.south) ..controls +(south:0.5em) and +(north:0.5em).. (t4.north);
}%visible<4->
\begin{pgfonlayer}{background}
\visible<5->{
\node [rectangle,draw=red,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (t3) (t4)] (problemphrase) {};
\node [anchor=north,red,text width=8em,align=left] (problemlabel) at (problemphrase.south) {\begin{spacing}{0.8}\scriptsize{"红 茶"为一种搭配,应该翻译为"black tea"}\end{spacing}};
}%\visible<5->
\end{pgfonlayer}
\end{tikzpicture}
\end{minipage}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 引入短语翻译
\begin{frame}{引入更大的翻译单元}
\begin{itemize}
\item 简单的单词翻译似乎不行,咋办?\visible<2->{\alert{- 引入更大的翻译单元}}
\begin{minipage}[t]{0.40\linewidth}
\begin{center}
{\scriptsize
\begin{tabular}{l | l}
\only<1>{单词翻译表}\only<2->{\alert{\sout{单词}}词串翻译表} & P \\ \hline
$\to$ I & 0.6 \\
喜欢 $\to$ like & 0.3 \\
$\to$ red & 0.8 \\
$\to$ black & 0.1 \\
$\to$ tea & 0.8\\
\visible<2->{我 喜欢 $\to$ I like & 0.3\\
我 喜欢 $\to$ I liked & 0.2\\
绿 茶 $\to$ green tea & 0.5\\
绿 茶 $\to$ the green tea & 0.1\\
红 茶 $\to$ black tea & 0.6\\
... & }
\end{tabular}
}
\end{center}
\end{minipage}
\begin{minipage}[c]{0.55\linewidth}
\vspace{1em}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\begin{scope}
{\footnotesize
\node [anchor=west] (s1) at (0,0) {};
\node [anchor=west] (s2) at ([xshift=1.0em]s1.east) {喜欢};
\node [anchor=west] (s3) at ([xshift=1.0em]s2.east) {\alert{}};
\node [anchor=west] (s4) at ([xshift=1.0em]s3.east) {};
\node [anchor=east] (s) at (s1.west) {$s=$};
}
\end{scope}
\begin{scope}[yshift=-3.0em]
{\small
\node [anchor=west] (t1) at (0.30em,0) {I};
\node [anchor=west] (t2) at ([xshift=0.8em,yshift=-0.0em]t1.east) {like};
\node [anchor=west] (t3) at ([xshift=0.6em,yshift=-0.0em]t2.east) {red};
\node [anchor=west] (t4) at ([xshift=1.0em,yshift=-0.1em]t3.east) {tea};
\node [anchor=east] (t) at ([xshift=-0.3em]t1.west) {$t=$};
}
\end{scope}
\draw [-] (s1.south) -- (t1.north);
\draw [-] (s2.south) ..controls +(south:1.0em) and +(north:1.0em).. (t2.north);
\draw [-] (s3.south) ..controls +(south:1.0em) and +(north:1.0em).. (t3.north);
\draw [-] (s4.south) -- (t4.north);
\node [anchor=center,draw=ublue,circle,thick,fill=white,inner sep=2pt,circular drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] (head1) at ([xshift=2.5em,yshift=-0.5em]s4.south east) {{\color{red} \small{\textbf{No}}}};
\end{scope}
\visible<3->{
\begin{scope}[yshift=-6em]
\begin{scope}
{\footnotesize
\node [anchor=west] (s1) at (0,0) {};
\node [anchor=west] (s2) at ([xshift=1.0em]s1.east) {喜欢};
\node [anchor=west] (s3) at ([xshift=1.0em]s2.east) {\alert{}};
\node [anchor=west] (s4) at ([xshift=1.0em]s3.east) {};
\node [anchor=east] (s) at (s1.west) {$s=$};
}
\end{scope}
\begin{scope}[yshift=-3.0em]
{\small
\node [anchor=west] (t1) at (0.30em,0) {I};
\node [anchor=west] (t2) at ([xshift=0.8em,yshift=-0.0em]t1.east) {like};
\node [anchor=west] (t3) at ([xshift=0.6em,yshift=-0.0em]t2.east) {black};
\node [anchor=west] (t4) at ([xshift=1.0em,yshift=-0.1em]t3.east) {tea};
\node [anchor=east] (t) at ([xshift=-0.3em]t1.west) {$t=$};
}
\end{scope}
\begin{pgfonlayer}{background}
\visible<3->{
\node [rectangle,draw=red,thick,inner sep=0.0em,fill=white] [fit = (s3) (s4)] (sphrase1) {};
\node [rectangle,draw=black,thick,inner sep=0.0em,fill=white] [fit = (t3) (t4)] (tphrase1) {};
}
\end{pgfonlayer}
\draw [-] (s1.south) -- (t1.north);
\draw [-] (s2.south) ..controls +(south:1.0em) and +(north:1.0em).. (t2.north);
\draw [-] (sphrase1.south) ..controls +(south:1.0em) and +(north:1.0em).. ([xshift=-1em]tphrase1.north);
\node [anchor=center,draw=ublue,circle,thick,fill=white,inner sep=1pt,circular drop shadow={shadow xshift=0.1em,shadow yshift=-0.1em}] (head1) at ([xshift=2.5em,yshift=-0.5em]s4.south east) {{\color{ugreen} \small{\textbf{Yes}}}};
\end{scope}
}
\end{tikzpicture}
\end{center}
\end{minipage}
\item<4-> \alert{优点}很多
\begin{itemize}
\item 翻译时候可以考虑更大范围的上下文信息\\
比如:"红茶"中的"红"如果和"茶"搭配 ...
\item 更好的局部调序,比如:短语中有"的"字 $\to$ ... of ... 结构
\item 更大范围的目标语连续词串的使用,有利于$n$-gram语言模型选择译文
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\section{翻译中为什么要使用短语}
%%%------------------------------------------------------------------------------------------------------------
%%% 回顾基于词的翻译模型
\begin{frame}{回顾 - 基于词的机器翻译}
\begin{itemize}
\item 对每个\alert{单词}的翻译进行(任意)组合
\end{itemize}
\vspace{-2em}
\begin{flushright}
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (s1) at (0,0) {\textbf{}};
\node [anchor=west] (s2) at ([xshift=2em]s1.east) {\textbf{}};
\node [anchor=west] (s3) at ([xshift=2em]s2.east) {\textbf{}};
\node [anchor=west] (s4) at ([xshift=2em]s3.east) {\textbf{表示}};
\node [anchor=west] (s5) at ([xshift=2em]s4.east) {\textbf{满意}};
\node [anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west) {\scriptsize{\textbf{\alert{待翻译句子(已经分词):}}}};
\draw [->,very thick,ublue] (s1.south) -- ([yshift=-0.7em]s1.south);
\draw [->,very thick,ublue] (s2.south) -- ([yshift=-0.7em]s2.south);
\draw [->,very thick,ublue] (s3.south) -- ([yshift=-0.7em]s3.south);
\draw [->,very thick,ublue] (s4.south) -- ([yshift=-0.7em]s4.south);
\draw [->,very thick,ublue] (s5.south) -- ([yshift=-0.7em]s5.south);
{\small
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south) {I};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.2em]t11.south) {me};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.2em]t12.south) {I'm};
\node [anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west) {\tiny{{\color{white} \textbf{1}}}};
\invisible{
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t14) at ([yshift=-0.2em]t13.south west) {I'm};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t15) at ([yshift=-0.2em]t14.south west) {I};
\node [anchor=north west,inner sep=1pt,fill=black] (tl14) at (t14.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl15) at (t15.north west) {\tiny{{\color{white} \textbf{1-2}}}};
}
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south) {to};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.2em]t21.south) {with};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.2em]t22.south) {for};
\node [anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west) {\tiny{{\color{white} \textbf{2}}}};
\invisible{
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t24) at ([yshift=-0.2em,xshift=-2.6em]t15.south east) {for you};
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t25) at ([yshift=-0.2em]t24.south west) {with you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl24) at (t24.north west) {\tiny{{\color{white} \textbf{2-3}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl25) at (t25.north west) {\tiny{{\color{white} \textbf{2-3}}}};
}
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=2.5em] (t31) at ([yshift=-1em]s3.south) {you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west) {\tiny{{\color{white} \textbf{3}}}};
\invisible{
\node [anchor=west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=13.35em] (t32) at ([xshift=1.4em]t14.east) {you are satisfied};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=7.45em] (t33) at ([yshift=-0.2em]t32.south west) {$\phi$};
\node [anchor=north west,inner sep=1pt,fill=black] (tl32) at (t32.north west) {\tiny{{\color{white} \textbf{3-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl33) at (t33.north west) {\tiny{{\color{white} \textbf{3-4}}}};
}
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south) {$\phi$};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south) {show};
\node [anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west) {\tiny{{\color{white} \textbf{4}}}};
\invisible{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t43) at ([xshift=1.75em]t24.east) {satisfied};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t44) at ([yshift=-0.2em]t43.south west) {satisfactory};
\node [anchor=north west,inner sep=1pt,fill=black] (tl43) at (t43.north west) {\tiny{{\color{white} \textbf{4-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl44) at (t44.north west) {\tiny{{\color{white} \textbf{4-5}}}};
}
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south) {satisfy};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.2em]t51.south) {satisfied};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.2em]t52.south) {satisfies};
\node [anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west) {\tiny{{\color{white} \textbf{5}}}};
}
{\tiny
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt11) at (t11.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt12) at (t12.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt13) at (t13.east) {{\color{white} \textbf{P=.4}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt14) at (t14.east) {{\color{white} \textbf{P=.1}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt15) at (t15.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt21) at (t21.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt22) at (t22.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt23) at (t23.east) {{\color{white} \textbf{P=.3}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt24) at (t24.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt25) at (t25.east) {{\color{white} \textbf{P=.1}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt31) at (t31.east) {{\color{white} \textbf{P=1}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t32.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t33.east) {{\color{white} \textbf{P=.3}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt41) at (t41.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt42) at (t42.east) {{\color{white} \textbf{P=.5}}};
\invisible{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt43) at (t43.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt44) at (t44.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt51) at (t51.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt52) at (t52.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt53) at (t53.east) {{\color{white} \textbf{P=.1}}};
}
\end{scope}
\begin{scope}
{\small
}
\end{scope}
\begin{scope}
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=0em,xshift=-0.5em]t11.north west) -- ([xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label2) {\footnotesize{\textbf{单词翻译}}};
\visible<2->{
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em]t13.west) -- ([xshift=0.8em]t13.east) -- ([xshift=-0.2em]t22.west) -- ([xshift=0.8em]t22.east) -- ([xshift=-0.2em]t31.west) -- ([xshift=0.8em]t31.east) -- ([xshift=-0.2em]t41.west) -- ([xshift=0.8em]t41.east) -- ([xshift=-0.2em]t52.west) -- ([xshift=1.2em]t52.east);
}
\invisible{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em]t15.west) -- ([xshift=0.8em]t15.east) -- ([xshift=-0.2em]t32.west) -- ([xshift=1.2em]t32.east);
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=0.1em]t13.west) -- ([xshift=0.8em,yshift=0.1em]t13.east) -- ([xshift=-0.2em]t25.west) -- ([xshift=0.8em]t25.east) -- ([xshift=-0.2em,yshift=0.1em]t41.west) -- ([xshift=0.8em,yshift=0.1em]t41.east) -- ([xshift=-0.2em,yshift=0.1em]t52.west) -- ([xshift=1.2em,yshift=0.1em]t52.east);
}
\invisible{
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=-0.2em,xshift=-0.5em]t13.south west) -- ([yshift=-6.3em,xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label3) {\footnotesize{\textbf{短语翻译}}};
}
\visible<2->{
\node [anchor=north west] (wtranslabel) at ([yshift=-4em]t15.south west) {\scriptsize{翻译路径(仅含有单词):}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1em]wtranslabel.east);
}
\invisible{
\node [anchor=north west] (ptranslabel) at ([yshift=-5.5em]t15.south west) {\scriptsize{翻译路径(含有短语):}};
\draw [->,ultra thick,ublue,line width=1.5pt,opacity=0.7] ([xshift=0.65em]ptranslabel.east) -- ([xshift=1.65em]ptranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{flushright}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 基于短语的翻译模型
\begin{frame}{基于"短语"的机器翻译}
\begin{itemize}
\item 对每个\alert{单词}\alert{连续词串}的翻译进行(任意)组合
\end{itemize}
\vspace{-2em}
\begin{flushright}
\begin{tikzpicture}
\begin{scope}
\node [anchor=west] (s1) at (0,0) {\textbf{}};
\node [anchor=west] (s2) at ([xshift=2em]s1.east) {\textbf{}};
\node [anchor=west] (s3) at ([xshift=2em]s2.east) {\textbf{}};
\node [anchor=west] (s4) at ([xshift=2em]s3.east) {\textbf{表示}};
\node [anchor=west] (s5) at ([xshift=2em]s4.east) {\textbf{满意}};
\node [anchor=south west] (sentlabel) at ([yshift=-0.5em]s1.north west) {\scriptsize{\textbf{\alert{待翻译句子(已经分词):}}}};
\draw [->,very thick,ublue] (s1.south) -- ([yshift=-0.7em]s1.south);
\draw [->,very thick,ublue] (s2.south) -- ([yshift=-0.7em]s2.south);
\draw [->,very thick,ublue] (s3.south) -- ([yshift=-0.7em]s3.south);
\draw [->,very thick,ublue] (s4.south) -- ([yshift=-0.7em]s4.south);
\draw [->,very thick,ublue] (s5.south) -- ([yshift=-0.7em]s5.south);
{\small
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t11) at ([yshift=-1em]s1.south) {I};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t12) at ([yshift=-0.2em]t11.south) {me};
\node [anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.5em] (t13) at ([yshift=-0.2em]t12.south) {I'm};
\node [anchor=north west,inner sep=1pt,fill=black] (tl11) at (t11.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl12) at (t12.north west) {\tiny{{\color{white} \textbf{1}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl13) at (t13.north west) {\tiny{{\color{white} \textbf{1}}}};
\visible<2->{
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t14) at ([yshift=-0.2em]t13.south west) {I'm};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=6.55em] (t15) at ([yshift=-0.2em]t14.south west) {I};
\node [anchor=north west,inner sep=1pt,fill=black] (tl14) at (t14.north west) {\tiny{{\color{white} \textbf{1-2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl15) at (t15.north west) {\tiny{{\color{white} \textbf{1-2}}}};
}
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t21) at ([yshift=-1em]s2.south) {to};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t22) at ([yshift=-0.2em]t21.south) {with};
\node [anchor=north,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=2.5em] (t23) at ([yshift=-0.2em]t22.south) {for};
\node [anchor=north west,inner sep=1pt,fill=black] (tl21) at (t21.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl22) at (t22.north west) {\tiny{{\color{white} \textbf{2}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl23) at (t23.north west) {\tiny{{\color{white} \textbf{2}}}};
\visible<2->{
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t24) at ([yshift=-0.2em,xshift=-2.6em]t15.south east) {for you};
\node [anchor=north west,inner sep=2pt,fill=green!20,minimum height=1.5em,minimum width=6.55em] (t25) at ([yshift=-0.2em]t24.south west) {with you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl24) at (t24.north west) {\tiny{{\color{white} \textbf{2-3}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl25) at (t25.north west) {\tiny{{\color{white} \textbf{2-3}}}};
}
\node [anchor=north,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=2.5em] (t31) at ([yshift=-1em]s3.south) {you};
\node [anchor=north west,inner sep=1pt,fill=black] (tl31) at (t31.north west) {\tiny{{\color{white} \textbf{3}}}};
\visible<2->{
\node [anchor=west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=13.35em] (t32) at ([xshift=1.4em]t14.east) {you are satisfied};
\node [anchor=north west,inner sep=2pt,fill=blue!20,minimum height=1.5em,minimum width=7.45em] (t33) at ([yshift=-0.2em]t32.south west) {$\phi$};
\node [anchor=north west,inner sep=1pt,fill=black] (tl32) at (t32.north west) {\tiny{{\color{white} \textbf{3-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl33) at (t33.north west) {\tiny{{\color{white} \textbf{3-4}}}};
}
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t41) at ([yshift=-1em]s4.south) {$\phi$};
\node [anchor=north,inner sep=2pt,fill=orange!20,minimum height=1.5em,minimum width=3em] (t42) at ([yshift=-0.2em]t41.south) {show};
\node [anchor=north west,inner sep=1pt,fill=black] (tl41) at (t41.north west) {\tiny{{\color{white} \textbf{4}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl42) at (t42.north west) {\tiny{{\color{white} \textbf{4}}}};
\visible<2->{
\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t43) at ([xshift=1.75em]t24.east) {satisfied};
\node [anchor=north west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=9.00em] (t44) at ([yshift=-0.2em]t43.south west) {satisfactory};
\node [anchor=north west,inner sep=1pt,fill=black] (tl43) at (t43.north west) {\tiny{{\color{white} \textbf{4-5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl44) at (t44.north west) {\tiny{{\color{white} \textbf{4-5}}}};
}
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t51) at ([yshift=-1em]s5.south) {satisfy};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t52) at ([yshift=-0.2em]t51.south) {satisfied};
\node [anchor=north,inner sep=2pt,fill=purple!20,minimum height=1.5em,minimum width=4.5em] (t53) at ([yshift=-0.2em]t52.south) {satisfies};
\node [anchor=north west,inner sep=1pt,fill=black] (tl51) at (t51.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl52) at (t52.north west) {\tiny{{\color{white} \textbf{5}}}};
\node [anchor=north west,inner sep=1pt,fill=black] (tl53) at (t53.north west) {\tiny{{\color{white} \textbf{5}}}};
}
{\tiny
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt11) at (t11.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt12) at (t12.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt13) at (t13.east) {{\color{white} \textbf{P=.4}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt14) at (t14.east) {{\color{white} \textbf{P=.1}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt15) at (t15.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt21) at (t21.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt22) at (t22.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt23) at (t23.east) {{\color{white} \textbf{P=.3}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt24) at (t24.east) {{\color{white} \textbf{P=.2}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt25) at (t25.east) {{\color{white} \textbf{P=.1}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt31) at (t31.east) {{\color{white} \textbf{P=1}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t32.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt33) at (t33.east) {{\color{white} \textbf{P=.3}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt41) at (t41.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt42) at (t42.east) {{\color{white} \textbf{P=.5}}};
\visible<2->{
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt43) at (t43.east) {{\color{white} \textbf{P=.3}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt44) at (t44.east) {{\color{white} \textbf{P=.2}}};
}
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt51) at (t51.east) {{\color{white} \textbf{P=.5}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt52) at (t52.east) {{\color{white} \textbf{P=.4}}};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.55em,fill=black] (pt53) at (t53.east) {{\color{white} \textbf{P=.1}}};
}
\end{scope}
\begin{scope}
{\small
}
\end{scope}
\begin{scope}
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=0em,xshift=-0.5em]t11.north west) -- ([xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label2) {\footnotesize{\textbf{单词翻译}}};
\draw [->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.5em]t13.west) -- ([xshift=0.8em]t13.east) -- ([xshift=-0.2em]t22.west) -- ([xshift=0.8em]t22.east) -- ([xshift=-0.2em]t31.west) -- ([xshift=0.8em]t31.east) -- ([xshift=-0.2em]t41.west) -- ([xshift=0.8em]t41.east) -- ([xshift=-0.2em]t52.west) -- ([xshift=1.2em]t52.east);
\visible<3->{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em]t15.west) -- ([xshift=0.8em]t15.east) -- ([xshift=-0.2em]t32.west) -- ([xshift=1.2em]t32.east);
}
\visible<4->{
\draw [->,ultra thick,ublue,line width=2pt,opacity=0.7] ([xshift=-0.5em,yshift=0.1em]t13.west) -- ([xshift=0.8em,yshift=0.1em]t13.east) -- ([xshift=-0.2em]t25.west) -- ([xshift=0.8em]t25.east) -- ([xshift=-0.2em,yshift=0.1em]t41.west) -- ([xshift=0.8em,yshift=0.1em]t41.east) -- ([xshift=-0.2em,yshift=0.1em]t52.west) -- ([xshift=1.2em,yshift=0.1em]t52.east);
}
\visible<2->{
\draw[decorate,thick,decoration={brace,amplitude=5pt,mirror}] ([yshift=-0.2em,xshift=-0.5em]t13.south west) -- ([yshift=-6.3em,xshift=-0.5em]t13.south west) node [pos=0.5,left,xshift=1.0em,yshift=0.0em,text width=5em,align=left] (label3) {\footnotesize{\textbf{短语翻译}}};
}
\node [anchor=north west] (wtranslabel) at ([yshift=-4em]t15.south west) {\scriptsize{翻译路径(仅含有单词):}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1em]wtranslabel.east);
\visible<3->{
\node [anchor=north west] (ptranslabel) at ([yshift=-5.5em]t15.south west) {\scriptsize{翻译路径(含有短语):}};
\draw [->,ultra thick,ublue,line width=1.5pt,opacity=0.7] ([xshift=0.65em]ptranslabel.east) -- ([xshift=1.65em]ptranslabel.east);
}
\end{scope}
\end{tikzpicture}
\end{flushright}
\end{frame}
\end{CJK}
\end{document}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论