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
6342f26c
Commit
6342f26c
authored
Jan 07, 2020
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
54fa983b
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
39 行删除
+22
-39
Section04-Phrasal-and-Syntactic-Models/section04-test.tex
+21
-38
Section06-Neural-Machine-Translation/section06.tex
+1
-1
没有找到文件。
Section04-Phrasal-and-Syntactic-Models/section04-test.tex
查看文件 @
6342f26c
...
...
@@ -152,60 +152,43 @@
\subsection
{
规则匹配
}
%%%------------------------------------------------------------------------------------------------------------
%%% 基于树的解码方法 -
超图
\begin{frame}
{
基于树的解码 -
超图
}
%%% 基于树的解码方法 -
chart
\begin{frame}
{
基于树的解码 -
chart
}
\begin{itemize}
\item
如果源语言输入的是句法树,基于树的解码会找到一个推导覆盖整个句法树,之后输出所对应的目标语词串作为译文
\item
比如,可以从树的叶子结点开始,找到所有能匹配到这个节点的规则,当所有节点匹配完之后,本质上获得了一个超图
\item
规则匹配后形成的超图,每个节点可以由两部分信息决定:节点的句法标记 + 跨度
\begin{itemize}
\item
<2-> 图的节点对应一个句法树句法节点
\item
<2-> 图的边(或者叫超边)对应规则,边的头指向规则左部(源语言端)所对应图节点,边可以有多个尾,每个尾对应规则右部(源语言端)中的一个变量
\item
这本质上和单语句法分析中的表示方法是一致的
\item
存储形式有很多中,这里采用常用的chart结构,即,用一个二维表存储,其中每一个单元对应一个跨度(span)。同一个跨度的节点都可以放到同一个表单元中,统一表单元的节点用句法标记区分
\end{itemize}
\end{itemize}
\visible
<2->
{
\begin{center}
\begin{tikzpicture}
{
\scriptsize
\begin{scope}
[sibling distance=5pt, level distance=20pt]
\Tree
[.\node(cn1){VP$^{[1]
}$}
;
[
.
\node
(
cn
2
)
{
AD
$^{
[2]
}$}
; 大幅度
]
[
.
\node
(
cn
3
)
{
VP
$^{
[3]
}$}
;
[
.
\node
(
cn
4
)
{
VV
$^{
[4]
}$}
; 下降
]
[
.
\node
(
cn
5
)
{
AS
$^{
[5]
}$}
; 了
]
]
]
\node
[
anchor
=
south
]
(
treelabel
)
at
(
cn
1
.north
)
{
\scriptsize
{
源语句法树
}}
;
\end
{
scope
}
\begin
{
scope
}
[
xshift
=
1
.
3
in,sibling distance
=
5
pt, level distance
=
20
pt
]
\
Tree
[
.
\node
(
sn
1
)
{
VP
}
;
[
.
\node
(
sn
2
)
{
AD
}
;
\node
(
sw
1
)
{
大幅度
}
;
]
[
.
\node
(
sn
3
)
{
VP
}
;
]
]
\node
[
anchor
=
south
]
(
rulelabel
)
at
([
yshift
=
0
.
2
em,xshift
=
4
em
]
sn
1
.north
)
{
\scriptsize
{
匹配的翻译规则
}}
;
\
end
{
scope
}
\begin{scope}
\
node
[anchor=west,circle,inner sep=2pt,draw,fill=red!20] (node1) at (0,0)
{
\tiny
{
[1,1]
}}
;
\node
[anchor=
west,circle,inner sep=2pt,draw,fill=blue!20] (node2) at ([xshift=3.3em]node1.east)
{
\tiny
{
[3,3]
}}
;
\
node
[anchor=north,circle,inner sep=2pt,draw,fill=green!20] (node3) at ([xshift=2.5em,yshift=5em]node1.north)
{
\tiny
{
[1,3]
}}
;
\draw
[-
>,thick
]
(
sn
3
.east
)
--
([
xshift
=
1
em
]
sn
3
.east
)
;
\
node
[
anchor
=
west
]
(
rr
)
at
([
xshift
=
1
em
]
sn
3
.east
)
{
drastically VP
}
;
\draw
[-
latex] (node1.90) ..controls +(north:3em) and +(south:3em).. (node3.-90
);
\
draw
[-latex] (node2.90) ..controls +(north:3em) and +(south:3em).. (node3.-90)
;
\node
[
anchor
=
west,circle,draw,inner sep
=
2
pt
]
(
tail
)
at
([
yshift
=-
3
em,xshift
=
3
em
]
rr.south east
)
{
\tiny
{
[
3
]
}}
;
\node
[
anchor
=
west,circle,draw,inner sep
=
2
pt
]
(
head
)
at
([
yshift
=
2
.
5
em,xshift
=
5
em
]
rr.south east
)
{
\tiny
{
[
1
]
}}
;
\draw
[-
latex,thick
]
([
yshift
=
0
.
1
em
]
tail.
60
)
--
([
yshift
=-
0
.
1
em
]
head.
260
)
;
\node
[
anchor
=
north
]
(
headlabel
)
at
([
xshift
=
0
.
5
em
]
head.south
)
{
\tiny
{
头
}}
;
\node
[
anchor
=
west
]
(
taillabel
)
at
([
yshift
=
1
.
2
em,xshift
=-
0
.
3
em
]
tail.east
)
{
\tiny
{
尾
}}
;
\node
[
anchor
=
south
]
(
graphlabel
)
at
([
yshift
=
0
.
6
em
]
head.north
)
{
\scriptsize
{
超图
}}
;
\node
[anchor=west] (rule1) at ([xshift=2em]node3.east)
{
\footnotesize
{
VP(AD
$_
1
$
VP(VV(下降)) AS
$_
2
$
)
}}
;
\node
[anchor=north west] (rule2) at (rule1.south west)
{
\footnotesize
{$
\to
$
AS
$_
2
$
AD
$_
1
$
fallen
}}
;
\begin{pgfonlayer}
{
background
}
\node
[
fill
=
green
!
20
,inner sep
=
2
pt,drop shadow
]
(
rulebox
)
[
fit
=
(
sn
1
)
(
sn
2
)
(
sn
3
)
(
sw
1
)
(
rr
)]
{}
;
\draw
[-
>,dotted,thick
]
([
yshift
=
2
em
]
rulebox.east
)
..controls
+(
east:
3
.
5
em
)
and
+(
west:
1
.
5
em
)
..
([
yshift
=
1
em,xshift
=
0
.
3
em
]
tail.north
)
;
\node
[
fill
=
red
!
20
,inner sep
=
0
pt
]
(
nodebox
1
)
[
fit
=
(
cn
1
)]
{}
;
\node
[
fill
=
red
!
20
,inner sep
=
0
pt
]
(
nodebox
2
)
[
fit
=
(
sn
1
)]
{}
;
\draw
[
<
-
>,red
]
(
nodebox
1
)
edge
[
out
=
15
, in
=
160
]
(
nodebox
2
)
;
\node
[anchor=north west,fill=green!20,inner sep=2pt,minimum height=1.5em,minimum width=1.3em] (nodebox1) at ([xshift=0.2em]rule1.north west)
{}
;
\node
[anchor=north west,fill=red!20,inner sep=2pt,minimum height=1.5em,minimum width=1.8em] (nodebox2) at ([xshift=0.2em]nodebox1.north east)
{}
;
\node
[anchor=north east,fill=blue!20,inner sep=2pt,minimum height=1.5em,minimum width=1.6em] (nodebox1) at ([xshift=-0.6em]rule1.north east)
{}
;
\end{pgfonlayer}
}
\end{scope}
\begin{scope}
\end{scope}
\end{tikzpicture}
\end{center}
}
\end{frame}
...
...
Section06-Neural-Machine-Translation/section06.tex
查看文件 @
6342f26c
...
...
@@ -3987,7 +3987,7 @@ $\textrm{``you''} = \argmax_{y} \textrm{P}(y|\textbf{s}_1, \alert{\textbf{C}})$
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\subsection
{
Transformer模型
}
\subsection
{
模型架构
}
%%%------------------------------------------------------------------------------------------------------------
\begin{frame}
{
Transformer 介绍
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论