Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
Toy-MT-Introduction
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
单韦乔
Toy-MT-Introduction
Commits
0e110162
Commit
0e110162
authored
Jan 29, 2020
by
姜雨帆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update decoding
parent
22f02f67
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
44 行增加
和
38 行删除
+44
-38
Section04-Phrasal-and-Syntactic-Models/section04.tex
+44
-38
没有找到文件。
Section04-Phrasal-and-Syntactic-Models/section04.tex
查看文件 @
0e110162
...
...
@@ -2940,81 +2940,87 @@ t_{i}^{*} = \argmin_{t_{ij}} \sum_{k=1}^{M} \lambda_k \cdot h_k(t_{ij})
\item
堆栈按照已翻译的词数进行分类
\item
如果栈过大,则删掉栈里面最差的那些假设
\end{itemize}
\vspace
{
0.2em
}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\visible
<2->
{
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h0) at (0,0)
{
\tiny
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt0) at (h0.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=1
}}}}
;
}
\visible
<3->
{
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h13) at ([xshift=2.1em,yshift=5em]h0.east)
{
\tiny
{
there is
}}
;
%\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.1em,yshift=2.5em]h0.east) {\tiny{on}};
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.1em,yshift=3em]h0.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h1) at ([xshift=2.1em]h0.east)
{
\tiny
{
tabel
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h13) at ([xshift=2.3em,yshift=5em]h0.east)
{
\tiny
{
on
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.3em,yshift=2.5em]h0.east)
{
\tiny
{
tabel
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h1) at ([xshift=2.3em]h0.east)
{
\tiny
{
there is
}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h12.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
%\node [anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h12.north west) {\tiny{{\color{white} \textbf{2}}}};
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt1) at (h1.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h12.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.3
}}}}
;
%
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h12.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h13.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h2) at ([xshift=2.3em]h1.east)
{
\tiny
{
have
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h22) at ([xshift=2.3em]h12.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h23) at ([xshift=2.3em]h13.east)
{
\tiny
{
an
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h3) at ([xshift=2.3em]h2.east)
{
\tiny
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h32) at ([xshift=2.3em]h22.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h33) at ([xshift=2.3em]h23.east)
{
\tiny
{
apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h4) at ([xshift=2.3em]h3.east)
{
\tiny
{
one
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h42) at ([xshift=2.3em]h32.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h43) at ([xshift=2.3em]h33.east)
{
\tiny
{
apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h5) at ([xshift=2.3em]h4.east)
{
\tiny
{
apples
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h52) at ([xshift=2.3em]h42.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h53) at ([xshift=2.3em]h43.east)
{
\tiny
{
on tabel
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h2) at ([xshift=2.1em]h1.east)
{
\tiny
{
have
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h22) at ([xshift=2.1em]h12.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h23) at ([xshift=2.1em]h13.east)
{
\tiny
{
an
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h3) at ([xshift=2.1em]h2.east)
{
\tiny
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h32) at ([xshift=2.1em]h22.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h33) at ([xshift=2.1em]h23.east)
{
\tiny
{
an apple
}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h2.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl23) at (h23.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl4) at (h4.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl43) at (h43.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl5) at (h5.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl53) at (h53.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1-2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h2.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt23) at (h23.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h3.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt33) at (h33.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt4) at (h4.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt43) at (h43.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt5) at (h5.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt53) at (h53.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
}
\node
[anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south)
{
\scriptsize
{
\textbf
{
未译词
}}}
;
\node
[anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south)
{
\scriptsize
{
\textbf
{
已译1词
}}}
;
\node
[anchor=north] (l2) at ([xshift=0.3em,yshift=-0.7em]h2.south)
{
\scriptsize
{
\textbf
{
已译2词
}}}
;
\node
[anchor=north] (l3) at ([xshift=0.3em,yshift=-0.7em]h3.south)
{
\scriptsize
{
\textbf
{
已译3词
}}}
;
\node
[anchor=north] (l4) at ([xshift=0.3em,yshift=-0.7em]h4.south)
{
\scriptsize
{
\textbf
{
已译4词
}}}
;
\node
[anchor=north] (l5) at ([xshift=0.3em,yshift=-0.7em]h5.south)
{
\scriptsize
{
\textbf
{
已译5词
}}}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h0) (pt0)] (box0)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h1) (pt1) (h13)] (box1)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h2) (pt2) (h23)] (box2)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h3) (pt3) (h33)] (box3)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h4) (pt4) (h43)] (box4)
{}
;
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h5) (pt5) (h53)] (box5)
{}
;
\end{pgfonlayer}
\draw
[->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=0.2em,yshift=-0.5em]h0.west) -- ([xshift=1em,yshift=-0.5em]h1.east) -- ([xshift=-0.2em,yshift=-0.5em]h23.west) -- ([xshift=1em,yshift=-0.5em]h33.east) -- ([xshift=2.5em,yshift=1.5em]h33.east) -- ([xshift=4.8em,yshift=1.5em]h33.east) -- ([xshift=-0.2em,yshift=-0.5em]h53.west) -- ([xshift=0.1em,yshift=-0.5em]h53.east);
\visible
<3->
{
\draw
[->,thick,red] (h13.north).. controls +(60:0.5) and +(120:0.5) .. (h23.north);
\draw
[->,thick,red] (h13.north).. controls +(58:0.8) and +(122:0.8) .. (h33.north);
\draw
[->,thick,red] (h1.north).. controls +(60:0.5) and +(120:0.5) .. (h2.north);
\draw
[->,thick,red] (h1.north).. controls +(58:0.8) and +(122:0.8) .. (h3.north);
}
\node
[anchor=south east] (wtranslabel) at ([xshift=-2em,yshift=-2em]h0.south west)
{
\scriptsize
{
\textbf
{
:假设堆栈
}}}
;
\node
[anchor=east,inner sep=2pt,fill=blue!10,minimum height=1em,minimum width=2em] (stacklabel) at ([xshift=-0.1em]wtranslabel.west)
{}
;
\visible
<2->
{
\node
[anchor=east] (line1) at ([xshift=-1.0em,yshift=0em]h0.west)
{
\footnotesize
{
0号栈包含空假设
}}
;
}
\visible
<3->
{
\node
[anchor=east] (line2) at ([xshift=-1.5em,yshift=0em]h13.west)
{
\footnotesize
{
通过假设扩展产生新的假设
}}
;
\node
[anchor=north west] (line3) at ([yshift=0.1em]line2.south west)
{
\footnotesize
{
并不断的被存入假设堆栈中
}}
;
}
\begin{pgfonlayer}
{
background
}
\visible
<2->
{
\node
[rectangle,inner sep=0.1em,fill=ugreen!10] [fit = (line1)] (box1)
{}
;
}
\visible
<3->
{
\node
[rectangle,inner sep=0.1em,fill=red!10] [fit = (line2) (line3)] (box2)
{}
;
}
\end{pgfonlayer}
\end{scope}
\end{tikzpicture}
\end{center}
\item
使用栈解码可以很大程度上提高解码效率
\item
<3->
使用栈解码可以很大程度上提高解码效率
\end{itemize}
\end{frame}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论