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
5480aa61
Commit
5480aa61
authored
Apr 25, 2020
by
单韦乔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
与master同步
parent
818b8c31
全部展开
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
36 行增加
和
34 行删除
+36
-34
Book/Chapter4/Figures/example-of-vocabulary-translation-probability.tex
+4
-4
Book/Chapter4/Figures/get-word-alignment.tex
+3
-3
Book/Chapter4/Figures/phrase-extraction-consistent-with-word-alignment-1.tex
+4
-4
Book/Chapter4/Figures/reorder-base-phrase-translation.tex
+4
-4
Book/Chapter4/Figures/structure-of-chart.tex
+21
-19
Book/Chapter4/chapter4.tex
+0
-0
没有找到文件。
Book/Chapter4/Figures/example-of-vocabulary-translation-probability.tex
查看文件 @
5480aa61
...
...
@@ -39,10 +39,10 @@
\node
[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50]
(la4) at (a41)
{}
;
\node
[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50]
(la5) at (a30)
{}
;
\node
[anchor=west]
(f1) at ([xshift=3em,yshift=0.8em]a43.east)
{
\
footnotesize
{$
\textrm
{
P
}_{
\textrm
{
lex
}}
(
\bar
{
t
}
|
\bar
{
s
}
)=
w
(
t
_
1
|s
_
1
)
\times
$}}
;
\node
[anchor=north]
(f2) at ([xshift=5.2em]f1.south)
{
\
footnotesize
{$
\frac
{
1
}{
2
}
(
w
(
t
_
2
|s
_
2
)+
w
(
t
_
4
|s
_
2
))
\times
$}}
;
\node
[anchor=north west]
(f3) at (f2.south west)
{
\
footnotesize
{$
w
(
N|s
_
3
)
\times
$}}
;
\node
[anchor=north west]
(f4) at (f3.south west)
{
\
footnotesize
{$
w
(
t
_
4
|s
_
4
)
\times
$}}
;
\node
[anchor=west]
(f1) at ([xshift=3em,yshift=0.8em]a43.east)
{
\
small
{$
\textrm
{
P
}_{
\textrm
{
lex
}}
(
\bar
{
t
}
|
\bar
{
s
}
)=
w
(
t
_
1
|s
_
1
)
\times
$}}
;
\node
[anchor=north]
(f2) at ([xshift=5.2em]f1.south)
{
\
small
{$
\frac
{
1
}{
2
}
(
w
(
t
_
2
|s
_
2
)+
w
(
t
_
4
|s
_
2
))
\times
$}}
;
\node
[anchor=north west]
(f3) at (f2.south west)
{
\
small
{$
w
(
N|s
_
3
)
\times
$}}
;
\node
[anchor=north west]
(f4) at (f3.south west)
{
\
small
{$
w
(
t
_
4
|s
_
4
)
\times
$}}
;
\end{scope}
...
...
Book/Chapter4/Figures/get-word-alignment.tex
查看文件 @
5480aa61
...
...
@@ -88,9 +88,9 @@
\node
[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=red!50]
(lc4) at (c22)
{}
;
\node
[align=center,elementnode,minimum size=0.3cm,inner sep=0.1pt,fill=blue!50]
(lc5) at (c30)
{}
;
\node
[anchor=north]
(l1) at ([xshift=0.5em,yshift=-0.5em]a10.south)
{
\
script
size
{
S - T
}}
;
\node
[anchor=north]
(l2) at ([xshift=0.5em,yshift=-0.5em]b10.south)
{
\
script
size
{
T - S
}}
;
\node
[anchor=north]
(l3) at ([xshift=0.5em,yshift=-0.5em]c10.south)
{
\
script
size
{
交集/并集
}}
;
\node
[anchor=north]
(l1) at ([xshift=0.5em,yshift=-0.5em]a10.south)
{
\
footnote
size
{
S - T
}}
;
\node
[anchor=north]
(l2) at ([xshift=0.5em,yshift=-0.5em]b10.south)
{
\
footnote
size
{
T - S
}}
;
\node
[anchor=north]
(l3) at ([xshift=0.5em,yshift=-0.5em]c10.south)
{
\
footnote
size
{
交集/并集
}}
;
\end{scope}
...
...
Book/Chapter4/Figures/phrase-extraction-consistent-with-word-alignment-1.tex
查看文件 @
5480aa61
...
...
@@ -66,19 +66,19 @@
\draw
[-]
(rules.south west)--([xshift=2.0in]rules.south west);
{
\node
[anchor=north west]
(r1) at ([yshift=-0.3em]rules.south west)
{
天气
--
The weather
}
;
\node
[anchor=north west]
(r1) at ([yshift=-0.3em]rules.south west)
{
天气
\
$
\leftrightarrow
$
\
The weather
}
;
}
{
\node
[anchor=north west]
(r2) at ([yshift=-0.4em]r1.south west)
{
天气
--
The weather is
}
;
\node
[anchor=north west]
(r2) at ([yshift=-0.4em]r1.south west)
{
天气
\
$
\leftrightarrow
$
\
The weather is
}
;
}
{
\node
[anchor=north west]
(r3) at ([yshift=-0.4em]r2.south west)
{
天气
真 --
The weather is very
}
;
\node
[anchor=north west]
(r3) at ([yshift=-0.4em]r2.south west)
{
天气
\
真
\
$
\leftrightarrow
$
\
The weather is very
}
;
}
{
\node
[anchor=north west]
(r4) at ([yshift=-0.4em]r3.south west)
{
天气
真好 --
The weather is very good
}
;
\node
[anchor=north west]
(r4) at ([yshift=-0.4em]r3.south west)
{
天气
\
真
\
好
\
$
\leftrightarrow
$
\
The weather is very good
}
;
}
{
...
...
Book/Chapter4/Figures/reorder-base-phrase-translation.tex
查看文件 @
5480aa61
...
...
@@ -6,12 +6,12 @@
\begin{scope}
[minimum height = 20pt]
\node
[anchor=east]
(s0) at (-0.5em, 0)
{$
\textbf
{
s
}$
:
}
;
\node
[anchor=west,fill=green!20]
(s1) at (0, 0)
{
\
small
{
在 桌子 上 的
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\
small
{
苹果
}}
;
\node
[anchor=west,fill=green!20]
(s1) at (0, 0)
{
\
footnotesize
{
在 桌子 上 的
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\
footnotesize
{
苹果
}}
;
\node
[anchor=east]
(t0) at (-0.5em, -1.5)
{$
\textbf
{
t
}$
:
}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\
small
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\
small
{
on the table
}}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\
footnotesize
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\
footnotesize
{
on the table
}}
;
\path
[<->, thick]
(s1.south) edge (t2.north);
\path
[<->, thick]
(s2.south) edge (t1.north);
...
...
Book/Chapter4/Figures/structure-of-chart.tex
查看文件 @
5480aa61
%------------------------------------------------------------------------------------------------------------
%%% 基于树的解码方法 - chart-based decoding
\begin{center}
\begin{tikzpicture}
\scriptsize
\begin{tikzpicture}
\begin{scope}
%[scale=0.2]
\node
[anchor=north] (ch) at (0,0)
{
\
small
{
\textbf
{
Chart
}}}
;
\node
[anchor=north] (ch) at (0,0)
{
\
large
{
\textbf
{
Chart
}}}
;
\draw
[->] ([xshift=-1em,yshift=-1em]ch.south) -- ([xshift=-1em,yshift=-9em]ch.south);
\draw
[->] ([xshift=-1em,yshift=-1em]ch.south) -- ([xshift=10em,yshift=-1em]ch.south);
\draw
[->
,ublue
] ([xshift=-1em,yshift=-1em]ch.south) -- ([xshift=-1em,yshift=-9em]ch.south);
\draw
[->
,ublue
] ([xshift=-1em,yshift=-1em]ch.south) -- ([xshift=10em,yshift=-1em]ch.south);
{
\small
\node
[anchor=north] (l11) at ([xshift=-1.7em,yshift=-2.5em]ch.south)
{{
起
}}
;
\node
[anchor=north] (l12) at ([xshift=0em,yshift=0.5em]l11.south)
{{
始
}}
;
\node
[anchor=north] (l13) at ([xshift=0em,yshift=0.5em]l12.south)
{{
位
}}
;
\node
[anchor=north] (l14) at ([xshift=0em,yshift=0.5em]l13.south)
{{
置
}}
;
\node
[anchor=north] (l2) at ([xshift=4.5em,yshift=0.4em]ch.south)
{{
跨度大小
}}
;
}
\draw
[-] ([xshift=1em,yshift=-2em]ch.south) -- ([xshift=1em,yshift=-8em]ch.south);
\draw
[-] ([xshift=5em,yshift=-2em]ch.south) -- ([xshift=5em,yshift=-8em]ch.south);
\draw
[-] ([xshift=9em,yshift=-2em]ch.south) -- ([xshift=9em,yshift=-8em]ch.south);
\draw
[-] ([xshift=1em,yshift=-2em]ch.south) -- ([xshift=9em,yshift=-2em]ch.south);
\draw
[-] ([xshift=1em,yshift=-5em]ch.south) -- ([xshift=9em,yshift=-5em]ch.south);
\draw
[-] ([xshift=1em,yshift=-8em]ch.south) -- ([xshift=9em,yshift=-8em]ch.south);
\draw
[-
,ublue
] ([xshift=1em,yshift=-2em]ch.south) -- ([xshift=1em,yshift=-8em]ch.south);
\draw
[-
,ublue
] ([xshift=5em,yshift=-2em]ch.south) -- ([xshift=5em,yshift=-8em]ch.south);
\draw
[-
,ublue
] ([xshift=9em,yshift=-2em]ch.south) -- ([xshift=9em,yshift=-8em]ch.south);
\draw
[-
,ublue
] ([xshift=1em,yshift=-2em]ch.south) -- ([xshift=9em,yshift=-2em]ch.south);
\draw
[-
,ublue
] ([xshift=1em,yshift=-5em]ch.south) -- ([xshift=9em,yshift=-5em]ch.south);
\draw
[-
,ublue
] ([xshift=1em,yshift=-8em]ch.south) -- ([xshift=9em,yshift=-8em]ch.south);
\node
[anchor=north,rectangle,draw=
ublue, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt] (n1) at ([xshift=16
em,yshift=2em]ch.south)
{}
;
\node
[anchor=north,rectangle,draw=
ublue, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt
] (n2) at ([xshift=0em,yshift=-0.5em]n1.south)
{}
;
\node
[anchor=north,rectangle,draw=
ublue, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt
] (n3) at ([xshift=0em,yshift=-0.5em]n2.south)
{}
;
\node
[anchor=north,rectangle,draw=
red!40, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt,very thick] (n1) at ([xshift=18
em,yshift=2em]ch.south)
{}
;
\node
[anchor=north,rectangle,draw=
red!40, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt,very thick
] (n2) at ([xshift=0em,yshift=-0.5em]n1.south)
{}
;
\node
[anchor=north,rectangle,draw=
red!40, inner sep=0mm,minimum height=4em,minimum width=9em,rounded corners=2pt,very thick
] (n3) at ([xshift=0em,yshift=-0.5em]n2.south)
{}
;
\node
[anchor=north] (n11) at ([xshift=0em,yshift=-0.5em]n1.north)
{
Cell[0,1]:
}
;
\node
[anchor=north] (n12) at ([xshift=1em,yshift=-1.
4
em]n11.north)
{
VV[0,1]
}
;
\node
[anchor=north] (n12) at ([xshift=1em,yshift=-1.
2
em]n11.north)
{
VV[0,1]
}
;
\node
[anchor=north] (n21) at ([xshift=0em,yshift=-0.1em]n2.north)
{
Cell[1,2]:
}
;
\node
[anchor=north] (n22) at ([xshift=1em,yshift=-1.
4
em]n21.north)
{
NN[1,2]
}
;
\node
[anchor=north] (n23) at ([xshift=0em,yshift=-1.
1
em]n22.north)
{
NP[1,2]
}
;
\node
[anchor=north] (n22) at ([xshift=1em,yshift=-1.
2
em]n21.north)
{
NN[1,2]
}
;
\node
[anchor=north] (n23) at ([xshift=0em,yshift=-1.
3
em]n22.north)
{
NP[1,2]
}
;
\node
[anchor=north] (n31) at ([xshift=0em,yshift=-0.1em]n3.north)
{
Cell[0,2]:
}
;
\node
[anchor=north] (n32) at ([xshift=1em,yshift=-1.2em]n31.north)
{
VP[0,2]
}
;
\node
[anchor=north] (n33) at ([xshift=0em,yshift=-1.3em]n32.north)
{
NP[0,2]
}
;
\draw
[->,
ublue,thick] ([xshift=0em,yshift=0.5em]n1.west) .. controls +(west:7em) and +(north:4em) .. ([xshift=-13em,yshift=-1.6
em]n1.south);
\draw
[->,
ublue,thick] ([xshift=0em,yshift=0.5em]n2.west) .. controls +(west:3em) and +(north:2em) .. ([xshift=-12.5em,yshift=1
em]n2.south);
\draw
[->,
ublue,thick] ([xshift=0em,yshift=-0.5em]n3.west) .. controls +(west:5em) and +(south:0.5em) .. ([xshift=-9
em,yshift=5em]n3.south);
\draw
[->,
blue!40,very thick] ([xshift=0em,yshift=-0.5em]n1.west) .. controls +(west:6em) and +(north:3em) .. ([xshift=-15em,yshift=-2
em]n1.south);
\draw
[->,
blue!40,very thick] ([xshift=0em,yshift=1em]n2.west) .. controls +(west:2em) and +(north:2em) .. ([xshift=-14.5em,yshift=0
em]n2.south);
\draw
[->,
blue!40,very thick] ([xshift=0em,yshift=-0.5em]n3.west) .. controls +(west:5em) and +(south:0.5em) .. ([xshift=-12
em,yshift=5em]n3.south);
\end{scope}
\end{tikzpicture}
\end{center}
Book/Chapter4/chapter4.tex
查看文件 @
5480aa61
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论