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
NiuTrans
Toy-MT-Introduction
Commits
6b043d25
Commit
6b043d25
authored
Dec 25, 2019
by
Lee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.105.50.196/NiuTrans/Toy-MT-Introduction
parents
60746946
502d6fe2
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
165 行增加
和
37 行删除
+165
-37
Section04-Phrasal-and-Syntactic-Models/section04-test.tex
+71
-37
Section04-Phrasal-and-Syntactic-Models/section04.tex
+94
-0
没有找到文件。
Section04-Phrasal-and-Syntactic-Models/section04-test.tex
查看文件 @
6b043d25
...
...
@@ -141,15 +141,21 @@
%%%------------------------------------------------------------------------------------------------------------
%%% 句法树(层次短语)
\begin{frame}
{
层次短语
句法树
}
\begin{frame}
{
层次短语
规则推导的句法树表示
}
\begin{itemize}
\item
层次短语规则的使用本质上在对(源语)句子构建树结构,它反应了文法对于字符串分析得到的推导
\item
层次短语规则的使用本质上是对(源语)句子建立树状结构,这反应了文法对于字符串分析得到的推导
\\
\vspace
{
-0.4em
}
\begin{displaymath}
\visible
<2->
{
d = r
_
3
}
\visible
<3->
{
\circ
r
_
1
}
\visible
<4->
{
\circ
r
_
4
}
\visible
<5->
{
\circ
r
_
2
}
\visible
<6->
{
\circ
r
_
5
}
\visible
<7->
{
\circ
r
_
2
}
\visible
<8->
{
\circ
r
_
7
}
\visible
<9->
{
\circ
r
_
6
}
\visible
<10->
{
\circ
r
_
2
}
\end{displaymath}
\end{itemize}
\vspace
{
-1em
}
\begin{center}
\begin{tikzpicture}
\begin{scope}
[xshift = -0.5in, yshift = -3.2in, sibling distance=2pt, level distance = 27pt]
{
\scriptsize
\begin{scope}
[sibling distance=0pt, level distance = 27pt]
{
\scriptsize
\Tree
[.
\node
(n1)
{
\textbf
{
S
}}
;
[.
\node
(n2)
{
\textbf
{
S
}}
;
[.
\node
(n3)
{
\textbf
{
S
}}
;
...
...
@@ -173,53 +179,54 @@
]
]
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = west]
(l1) at ([xshift=-0.3em]n1.north east)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n2.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n3.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n4.north west)
{{
\color
{
white
}
\tiny
{$
r
_
1
$}}}
;
\
node
[circle, inner sep = 1pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n5.north west)
{{
\color
{
white
}
\tiny
{$
r
_
3
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = west]
(l1) at ([xshift=-0.3em]n6.south east)
{{
\color
{
white
}
\tiny
{$
r
_
4
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = west]
(l1) at ([xshift=-0.3em]n7.north east)
{{
\color
{
white
}
\tiny
{$
r
_
5
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = west]
(l1) at ([xshift=-0.3em]n8.north east)
{{
\color
{
white
}
\tiny
{$
r
_
6
$}}}
;
\node
[circle, inner sep = 1
pt, fill=blue!90!white, anchor = west]
(l1) at ([xshift=-0.3em]n9.north east)
{{
\color
{
white
}
\tiny
{$
r
_
7
$}}}
;
\node
<10->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n1.north east)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<7->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n2.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<5->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n3.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<3->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n4.north west)
{{
\color
{
white
}
\tiny
{$
r
_
1
$}}}
;
\
visible
<2->
{
\node
[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n5.north west)
{{
\color
{
white
}
\tiny
{$
r
_
3
$}}}
;
}
\node
<4->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n6.south east)
{{
\color
{
white
}
\tiny
{$
r
_
4
$}}}
;
\node
<6->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n7.north east)
{{
\color
{
white
}
\tiny
{$
r
_
5
$}}}
;
\node
<9->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n8.north east)
{{
\color
{
white
}
\tiny
{$
r
_
6
$}}}
;
\node
<8->[circle, inner sep = 0.5
pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n9.north east)
{{
\color
{
white
}
\tiny
{$
r
_
7
$}}}
;
}
\end{scope}
\begin{scope}
[xshift = 1.8in, yshift =
-3.0
in]
\node
(rules)
{
\textbf
{
Rules used
:
}}
;
\draw
[-]
(rules.south west)--([xshift=
2.7
in]rules.south west);
\begin{scope}
[xshift = 1.8in, yshift =
0.1
in]
\node
(rules)
{
\textbf
{
层次短语翻译规则
:
}}
;
\draw
[-]
(rules.south west)--([xshift=
1.8
in]rules.south west);
\node
[anchor=north west]
(r1) at ([yshift=-0.2em]rules.south west)
{$
r
_
1
$}
;
\node
[anchor=west]
(rc1) at ([xshift=
1em]r1.east)
{$
S
\;
\to
\;
X,
\;
\;
X
$}
;
\node
[anchor=west]
(rc1) at ([xshift=
0.0em]r1.east)
{$
\textrm
{
S
}
\;
\to
\;
\langle\ \textrm
{
X
}_
1
,
\;
\;
\textrm
{
X
}_
1
\ \rangle
$}
;
\node
[anchor=north west]
(r2) at ([yshift=-0.
2
em]r1.south west)
{$
r
_
2
$}
;
\node
[anchor=west]
(rc2) at ([xshift=
1em]r2.east)
{$
S
\;
\to
\;
S
\;
X,
\;
\;
S
\;
X
$}
;
\node
[anchor=north west]
(r2) at ([yshift=-0.
4
em]r1.south west)
{$
r
_
2
$}
;
\node
[anchor=west]
(rc2) at ([xshift=
0em]r2.east)
{$
\textrm
{
S
}
\;
\to
\;
\langle\ \textrm
{
S
}_
1
\;
\textrm
{
X
}_
2
,
\;
\;
\textrm
{
S
}_
1
\;
\textrm
{
X
}_
2
\ \rangle
$}
;
\node
[anchor=north west]
(r3) at ([yshift=-0.
2
em]r2.south west)
{$
r
_
3
$}
;
\node
[anchor=west]
(rc3) at ([xshift=
1em]r3.east)
{$
X
\;
\to
\;
\text
{
但
}
,
\;
\;
\text
{
but
}
$}
;
\node
[anchor=north west]
(r3) at ([yshift=-0.
4
em]r2.south west)
{$
r
_
3
$}
;
\node
[anchor=west]
(rc3) at ([xshift=
0em]r3.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
但
}
,
\;
\;
\text
{
but
}
\ \rangle
$}
;
\node
[anchor=north west]
(r4) at ([yshift=-0.
2
em]r3.south west)
{$
r
_
4
$}
;
\node
[anchor=west]
(rc4) at ([xshift=
1em]r4.east)
{$
X
\;
\to
\;
\text
{
美国
}
,
\;
\;
\text
{
the U.S.
}
$}
;
\node
[anchor=north west]
(r4) at ([yshift=-0.
4
em]r3.south west)
{$
r
_
4
$}
;
\node
[anchor=west]
(rc4) at ([xshift=
0em]r4.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
美国
}
,
\;
\;
\text
{
the U.S.
}
\ \rangle
$}
;
\node
[anchor=north west]
(r5) at ([yshift=-0.
2
em]r4.south west)
{$
r
_
5
$}
;
\node
[anchor=west]
(rc5) at ([xshift=
1em]r5.east)
{$
X
\;
\to
\;
\text
{
并没有
}
\;
\text
{
执行
}
,
\;
\;
\text
{}$}
;
\node
[anchor=north west]
(r5) at ([yshift=-0.
4
em]r4.south west)
{$
r
_
5
$}
;
\node
[anchor=west]
(rc5) at ([xshift=
0em]r5.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\
\text
{
并没有
}
\;
\text
{
执行
}
,
\;
\;
\text
{}$}
;
\node
[anchor=north west]
(r52) at ([yshift=-0.
2
em]r5.south west)
{{
\color
{
white
}
$
r
_
5
$}}
;
\node
[anchor=west]
(rc52) at ([xshift=
3.9em]r52.east)
{$
\text
{
has not implemented
}
$}
;
\node
[anchor=north west]
(r52) at ([yshift=-0.
4
em]r5.south west)
{{
\color
{
white
}
$
r
_
5
$}}
;
\node
[anchor=west]
(rc52) at ([xshift=
2.9em]r52.east)
{$
\text
{
has not implemented
}
\ \rangle
$}
;
\node
[anchor=north west]
(r6) at ([yshift=-0.
2
em]r52.south west)
{$
r
_
6
$}
;
\node
[anchor=west]
(rc6) at ([xshift=
1em]r6.east)
{$
X
\;
\to
\;
\text
{
世贸
}
\;
X
\;
\text
{
裁决
}
,
$}
;
\node
[anchor=north west]
(r6) at ([yshift=-0.
4
em]r52.south west)
{$
r
_
6
$}
;
\node
[anchor=west]
(rc6) at ([xshift=
0em]r6.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
世贸
}
\;
\textrm
{
X
}_
1
\;
\text
{
裁决
}
,
$}
;
\node
[anchor=north west]
(r61) at ([yshift=-0.
2
em]r6.south west)
{{
\color
{
white
}
$
r
_
6
$}}
;
\node
[anchor=west]
(rc61) at ([xshift=
3.9em]r61.east)
{$
\text
{
the decision
}
\;
X
\;
\text
{
the WTO
}
$}
;
\node
[anchor=north west]
(r61) at ([yshift=-0.
4
em]r6.south west)
{{
\color
{
white
}
$
r
_
6
$}}
;
\node
[anchor=west]
(rc61) at ([xshift=
2.9em]r61.east)
{$
\text
{
the decision
}
\;
\textrm
{
X
}_
1
\;
\text
{
the WTO
}
\ \rangle
$}
;
\node
[anchor=north west]
(r7) at ([yshift=-0.
2
em]r61.south west)
{$
r
_
7
$}
;
\node
[anchor=west]
(rc7) at ([xshift=
1em]r7.east)
{$
X
\;
\to
\;
\text
{
组织 的
}
,
\;
\;
\text
{
of
}
$}
;
\node
[anchor=north west]
(r7) at ([yshift=-0.
4
em]r61.south west)
{$
r
_
7
$}
;
\node
[anchor=west]
(rc7) at ([xshift=
0em]r7.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
组织 的
}
,
\;
\;
\text
{
of
}
\ \rangle
$}
;
\node
(labela) at (-1in,-2.4in)
{
(b) Source-language projection of the derivation and the rules used
}
;
\end{scope}
}
\end{tikzpicture}
\end{center}
...
...
@@ -302,13 +309,13 @@
%%% 句法树中的一些基本概念
\begin{frame}
{
基本概念
}
\begin{itemize}
\item
基于句法系统的
一些基本概念
\item
一些基本概念
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 句法模型分类
\begin{frame}
{
句法模型分类
}
%%% 句法模型
的
分类
\begin{frame}
{
句法模型
的
分类
}
\begin{itemize}
\item
句法模型分类
\item
各种变形
...
...
@@ -316,6 +323,33 @@
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 对比
\begin{frame}
{
句法模型对比
}
\begin{tabular}
{
l | l | l | l | l
}
&
形式句法
&
\multicolumn
{
3
}{
c
}{
语言学句法
}
\\
\cline
{
3-5
}
&
&
树到串
&
串到树
&
树到树
\\
\hline
源语句法
&
No
&
Yes
&
No
&
Yes
\\
目标语句法
&
No
&
No
&
Yes
&
Yes
\\
基于串的解码
&
Yes
&
No
&
Yes
&
Yes
\\
基于树的解码
&
No
&
Yes
&
No
&
Yes
\\
健壮性
&
High
&
Mid
&
Mid
&
Low
\end{tabular}
\begin{itemize}
\item
下面,以树到串/串到树为例进行介绍,一些代表性论文
\\
\begin{itemize}
\item
\textbf
{
What's in a translation rule?
}
\\
\textbf
{
Galley et al., 2004, In Proc. of HLT-NAACL
}
\item
\textbf
{
Scalable Inference and Training of Context-Rich Syntactic Translation Models
}
\\
\textbf
{
Galley et al., 2006, In Proc. of ACL
}
\item
\textbf
{
Tree-to-String Alignment Template for Statistical Machine Translation
}
\\
\textbf
{
Liu et al., 2006, In Proc. of ACL
}
\end{itemize}
\end{itemize}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\subsection
{
基于树结构的文法
}
%%%------------------------------------------------------------------------------------------------------------
...
...
Section04-Phrasal-and-Syntactic-Models/section04.tex
查看文件 @
6b043d25
...
...
@@ -1892,6 +1892,100 @@ d = r_1 \circ r_2 \circ r_3 \circ r_4
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
%%% 句法树(层次短语)
\begin{frame}
{
层次短语规则推导的句法树表示
}
\begin{itemize}
\item
层次短语规则的使用本质上是对(源语)句子建立树状结构,这反应了文法对于字符串分析得到的推导
\\
\vspace
{
-0.4em
}
\begin{displaymath}
\visible
<2->
{
d = r
_
3
}
\visible
<3->
{
\circ
r
_
1
}
\visible
<4->
{
\circ
r
_
4
}
\visible
<5->
{
\circ
r
_
2
}
\visible
<6->
{
\circ
r
_
5
}
\visible
<7->
{
\circ
r
_
2
}
\visible
<8->
{
\circ
r
_
7
}
\visible
<9->
{
\circ
r
_
6
}
\visible
<10->
{
\circ
r
_
2
}
\end{displaymath}
\end{itemize}
\vspace
{
-1em
}
\begin{center}
\begin{tikzpicture}
{
\scriptsize
\begin{scope}
[sibling distance=0pt, level distance = 27pt]
{
\scriptsize
\Tree
[.
\node
(n1)
{
\textbf
{
S
}}
;
[.
\node
(n2)
{
\textbf
{
S
}}
;
[.
\node
(n3)
{
\textbf
{
S
}}
;
[.
\node
(n4)
{
\textbf
{
S
}}
;
[.
\node
(n5)
{
\textbf
{
X
}}
;
\node
(cw1)
{
但
}
; ]
]
[.
\node
(n6)
{
\textbf
{
X
}}
;
\node
(cw2)
{
美国
}
; ]
]
[.
\node
(n7)
{
\textbf
{
X
}}
;
[.
\node
(cw3)
{
并没有
}
; ]
[.
\node
(cw4)
{
执行
}
; ]
]
]
[.
\node
(n8)
{
\textbf
{
X
}}
;
[.
\node
(cw5)
{
世贸
}
; ]
[.
\node
(n9)
{
\textbf
{
X
}}
;
[.
\node
(cw6)
{
组织
}
; ]
[.
\node
(cw7)
{
的
}
; ]
]
[.
\node
(cw8)
{
裁决
}
; ]
]
]
\node
<10->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n1.north east)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<7->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n2.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<5->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n3.north west)
{{
\color
{
white
}
\tiny
{$
r
_
2
$}}}
;
\node
<3->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east] (l2) at ([xshift=0.3em]n4.north west)
{{
\color
{
white
}
\tiny
{$
r
_
1
$}}}
;
\visible
<2->
{
\node
[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = east]
(l2) at ([xshift=0.3em]n5.north west)
{{
\color
{
white
}
\tiny
{$
r
_
3
$}}}
;
}
\node
<4->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n6.south east)
{{
\color
{
white
}
\tiny
{$
r
_
4
$}}}
;
\node
<6->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n7.north east)
{{
\color
{
white
}
\tiny
{$
r
_
5
$}}}
;
\node
<9->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n8.north east)
{{
\color
{
white
}
\tiny
{$
r
_
6
$}}}
;
\node
<8->[circle, inner sep = 0.5pt, fill=blue!90!white, anchor = west] (l1) at ([xshift=-0.3em]n9.north east)
{{
\color
{
white
}
\tiny
{$
r
_
7
$}}}
;
}
\end{scope}
\begin{scope}
[xshift = 1.8in, yshift = 0.1in]
\node
(rules)
{
\textbf
{
层次短语翻译规则:
}}
;
\draw
[-]
(rules.south west)--([xshift=1.8in]rules.south west);
\node
[anchor=north west]
(r1) at ([yshift=-0.2em]rules.south west)
{$
r
_
1
$}
;
\node
[anchor=west]
(rc1) at ([xshift=0.0em]r1.east)
{$
\textrm
{
S
}
\;
\to
\;
\langle\ \textrm
{
X
}_
1
,
\;
\;
\textrm
{
X
}_
1
\ \rangle
$}
;
\node
[anchor=north west]
(r2) at ([yshift=-0.4em]r1.south west)
{$
r
_
2
$}
;
\node
[anchor=west]
(rc2) at ([xshift=0em]r2.east)
{$
\textrm
{
S
}
\;
\to
\;
\langle\ \textrm
{
S
}_
1
\;
\textrm
{
X
}_
2
,
\;
\;
\textrm
{
S
}_
1
\;
\textrm
{
X
}_
2
\ \rangle
$}
;
\node
[anchor=north west]
(r3) at ([yshift=-0.4em]r2.south west)
{$
r
_
3
$}
;
\node
[anchor=west]
(rc3) at ([xshift=0em]r3.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
但
}
,
\;
\;
\text
{
but
}
\ \rangle
$}
;
\node
[anchor=north west]
(r4) at ([yshift=-0.4em]r3.south west)
{$
r
_
4
$}
;
\node
[anchor=west]
(rc4) at ([xshift=0em]r4.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
美国
}
,
\;
\;
\text
{
the U.S.
}
\ \rangle
$}
;
\node
[anchor=north west]
(r5) at ([yshift=-0.4em]r4.south west)
{$
r
_
5
$}
;
\node
[anchor=west]
(rc5) at ([xshift=0em]r5.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
并没有
}
\;
\text
{
执行
}
,
\;
\;
\text
{}$}
;
\node
[anchor=north west]
(r52) at ([yshift=-0.4em]r5.south west)
{{
\color
{
white
}
$
r
_
5
$}}
;
\node
[anchor=west]
(rc52) at ([xshift=2.9em]r52.east)
{$
\text
{
has not implemented
}
\ \rangle
$}
;
\node
[anchor=north west]
(r6) at ([yshift=-0.4em]r52.south west)
{$
r
_
6
$}
;
\node
[anchor=west]
(rc6) at ([xshift=0em]r6.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
世贸
}
\;
\textrm
{
X
}_
1
\;
\text
{
裁决
}
,
$}
;
\node
[anchor=north west]
(r61) at ([yshift=-0.4em]r6.south west)
{{
\color
{
white
}
$
r
_
6
$}}
;
\node
[anchor=west]
(rc61) at ([xshift=2.9em]r61.east)
{$
\text
{
the decision
}
\;
\textrm
{
X
}_
1
\;
\text
{
the WTO
}
\ \rangle
$}
;
\node
[anchor=north west]
(r7) at ([yshift=-0.4em]r61.south west)
{$
r
_
7
$}
;
\node
[anchor=west]
(rc7) at ([xshift=0em]r7.east)
{$
\textrm
{
X
}
\;
\to
\;
\langle\ \text
{
组织 的
}
,
\;
\;
\text
{
of
}
\ \rangle
$}
;
\end{scope}
}
\end{tikzpicture}
\end{center}
\end{frame}
%%%------------------------------------------------------------------------------------------------------------
\subsection
{
基于树结构的文法
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论