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
20d19d47
Commit
20d19d47
authored
Feb 13, 2020
by
曹润柘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update chapter3 and follow master to 3.2
parent
b0a2f83e
全部展开
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
152 行增加
和
8 行删除
+152
-8
Book/Chapter3/Chapter3.tex
+0
-0
Book/Chapter3/Figures/figure313.tex
+22
-0
Book/Chapter3/Figures/figure318-1.tex
+118
-0
Book/Chapter3/Figures/figure318-2.tex
+2
-2
Book/Chapter3/Figures/figure319.tex
+5
-1
Book/mt-book.tex
+3
-3
Book/structure.tex
+2
-2
没有找到文件。
Book/Chapter3/Chapter3.tex
查看文件 @
20d19d47
差异被折叠。
点击展开。
Book/Chapter3/Figures/figure313.tex
0 → 100644
查看文件 @
20d19d47
%%% outline
%-------------------------------------------------------------------------
\begin{tikzpicture}
\begin{scope}
{
\node
[pos=0.5,left,xshift=-0.5em,yshift=2.0em] (label2)
{
\footnotesize
{{$
t
^
1
$
=
$
<
$
s
$
>
$
{
\color
{
red
}
machine
}
\;
{
\color
{
red
}
translation
}
\;
is
\;
just
\;
translation
\;
by
\;
computer
\;
$
<
$
/s
$
>
$
}}}
;
\node
[anchor=north west] (label2part2) at ([yshift=0.3em]label2.south west)
{
\footnotesize
{{$
t
^
2
$
=
$
<
$
s
$
>
$
how
\;
does
\;
this
\;
{
\color
{
red
}
machine
}
\;
work
\;
$
?
$
$
<
$
/s
$
>
$
}}}
;
\node
[anchor=north west] (label2part3) at ([yshift=0.3em]label2part2.south west)
{
\footnotesize
{{$
t
^
3
$
=
$
<
$
s
$
>
$
we
\;
are
\;
replaced
\;
the
\;
old
\;
adding
\;
{
\color
{
red
}
machine
}
\;
with
\;
a
\;
computer
\;
$
<
$
/s
$
>
$
}}}
;
\node
[anchor=north west] (label2part4) at ([yshift=0.3em]label2part3.south west)
{
\footnotesize
{{$
t
^
4
$
=
$
<
$
s
$
>
$
several
\;
approaches
\;
to
\;
{
\color
{
red
}
machine
}
\;
learning
\;
are
\;
used
\;
to
\;
solve
\;
problems
\;
$
?
$
\;
$
<
$
/s
$
>
$
}}}
;
}
\end{scope}
\end{tikzpicture}
%---------------------------------------------------------------------
Book/Chapter3/Figures/figure318-1.tex
0 → 100644
查看文件 @
20d19d47
\begin{tikzpicture}
{
\node
[anchor=north west,inner sep=2pt,align=left] (line1) at (0,0)
{
\textrm
{
\textbf
{
Function
}
\textsc
{
WordDecoding
}
(
$
s
$
)
}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line2) at ([yshift=-1pt]line1.south west)
{
\textrm
{
1:
$
\pi
=
$
\textsc
{
GetTransOptions
}
(
$
s
$
)
}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line3) at ([yshift=-1pt]line2.south west)
{
\textrm
{
2:
$
best
=
\phi
$}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line4) at ([yshift=-1pt]line3.south west)
{
\textrm
{
3:
\textbf
{
for
}
$
i
$
in
$
[
1
,m
]
$
\textbf
{
do
}}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line5) at ([yshift=-1pt]line4.south west)
{
\textrm
{
4:
\hspace
{
1em
}
$
h
=
\phi
$}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line6) at ([yshift=-1pt]line5.south west)
{
\textrm
{
5:
\hspace
{
1em
}
\textbf
{
foreach
}
$
j
$
in
$
[
1
,m
]
$
\textbf
{
do
}}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line7) at ([yshift=-1pt]line6.south west)
{
\textrm
{
6:
\hspace
{
2em
}
\textbf
{
if
}
$
used
[
j
]=
$
\textbf
{
true
}
\textbf
{
then
}}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line8) at ([yshift=-1pt]line7.south west)
{
\textrm
{
7:
\hspace
{
3em
}
$
h
=
h
\cup
\textrm
{
\textsc
{
Join
}}
(
best,
\pi
[
j
])
$}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line9) at ([yshift=-1pt]line8.south west)
{
\textrm
{
8:
\hspace
{
1em
}
$
best
=
\textrm
{
\textsc
{
PruneForTop
1
}}
(
h
)
$}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line10) at ([yshift=-1pt]line9.south west)
{
\textrm
{
9:
\hspace
{
1em
}
$
used
[
best.j
]
=
\textrm
{
\textsc
{
\textbf
{
true
}}}$}}
;
\node
[anchor=north west,inner sep=2pt,align=left] (line11) at ([yshift=-1pt]line10.south west)
{
\textrm
{
10:
\textbf
{
return
}
$
best.translatoin
$}}
;
\node
[anchor=south west,inner sep=2pt,align=left] (head1) at ([yshift=1pt]line1.north west)
{
输出: 找的最佳译文
}
;
\node
[anchor=south west,inner sep=2pt,align=left] (head2) at ([yshift=1pt]head1.north west)
{
输入: 源语句子
$
s
=
s
_
1
...s
_
m
$}
;
}
\begin{pgfonlayer}
{
background
}
\node
[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow,minimum height=1.6cm]
[fit = (head2) (line8) (line11)] (algorithm)
{}
;
%% highlights
%\begin{pgfonlayer}{background}
{
\node
[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=2.21in]
(line2highlight) at (line2.west)
{}
;
}
{
\node
[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=2.21in]
(line3highlight) at (line3.west)
{}
;
\node
[anchor=west,fill=blue!20,minimum height=0.16in,minimum width=2.21in]
(line5highlight) at (line5.west)
{}
;
}
%\end{pgfonlayer}
\end{pgfonlayer}
{
%% remark 1
\begin{scope}
{
\node
[anchor=north west,align=left] (remark1) at ([xshift=0.4in]algorithm.north east)
{
获取每个单词
\\
的翻译候选
}
;
\node
[anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,red] (s1) at ([yshift=-0.7em,xshift=0.5em]remark1.north east)
{
1
}
;
\node
[anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,ugreen] (s2) at ([xshift=0.4em]s1.east)
{
2
}
;
\node
[anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=2.1pt,orange] (s3) at ([xshift=0.4em]s2.east)
{
3
}
;
\node
[anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=3.0pt,ublue] (s4) at ([xshift=0.4em]s3.east)
{
...
}
;
\node
[anchor=west,draw,thick,circle,minimum size=0.3em,inner sep=1.5pt,purple] (s5) at ([xshift=0.4em]s4.east)
{$
m
$}
;
\node
[anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,red,fill=red] (t1) at ([yshift=-1.7em]s1.center)
{{
\color
{
white
}
$
n
$}}
;
\node
[anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ugreen,fill=ugreen] (t2) at ([yshift=-1.7em]s2.center)
{{
\color
{
white
}
$
n
$}}
;
\node
[anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,orange,fill=orange] (t3) at ([yshift=-1.7em]s3.center)
{{
\color
{
white
}
$
n
$}}
;
\node
[anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,ublue,fill=ublue] (t4) at ([yshift=-1.7em]s4.center)
{{
\color
{
white
}
$
n
$}}
;
\node
[anchor=center,draw,thick,circle,minimum size=0.3em,inner sep=2pt,purple,fill=purple] (t5) at ([yshift=-1.7em]s5.center)
{{
\color
{
white
}
$
n
$}}
;
\draw
[->,thick] ([yshift=-0.1em]s1.south) -- ([yshift=0.1em]t1.north);
\draw
[->,thick] ([yshift=-0.1em]s2.south) -- ([yshift=0.1em]t2.north);
\draw
[->,thick] ([yshift=-0.1em]s3.south) -- ([yshift=0.1em]t3.north);
\draw
[->,thick] ([yshift=-0.1em]s4.south) -- ([yshift=0.1em]t4.north);
\draw
[->,thick] ([yshift=-0.1em]s5.south) -- ([yshift=0.1em]t5.north);
\begin{pgfonlayer}
{
background
}
{
\node
[rectangle,draw,inner sep=0.2em,fill=blue!10]
[fit = (remark1) (t5)] (remark1label)
{}
;
}
\end{pgfonlayer}
}
\end{scope}
%% end of remark 1
%% remark 2
\begin{scope}
{
\node
[anchor=north west,draw,inner sep=2pt,fill=blue!10] (remark2) at ([xshift=-0.2em,yshift=-1em]remark1.south west)
{$
best
$
用于保存当前最好的翻译结果
}
;
}
\end{scope}
%% end of remark 2
\node
[anchor=north west] (remark4) at ([xshift=21.8em,yshift=-0.6em]line7.east)
{}
;
%% remark 3
\begin{scope}
{
\node
[anchor=north west,draw,inner sep=2pt,fill=blue!10] (remark3) at ([yshift=-0.5em]remark2.south west)
{$
h
$
用于保存每步生成的所有译文候选
}
;
}
\end{scope}
%% end of remark 3
{
\draw
[->,thick] (line2highlight.east) ..controls +(east:1em) and +(west:1em).. (remark1label.west);
}
{
\draw
[->,thick] (line3highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.3em]remark2.south west);
\draw
[->,thick] (line5highlight.east) ..controls +(east:1em) and +(west:1em).. ([yshift=0.3em]remark3.south west);
}
}
\end{tikzpicture}
Book/Chapter3/Figures/figure318.tex
→
Book/Chapter3/Figures/figure318
-2
.tex
查看文件 @
20d19d47
...
...
@@ -139,7 +139,7 @@
\end{pgfonlayer}
}
\end{scope}
\%
% end of remark 5
% end of remark 5
%% remark 6
\begin{scope}
...
...
@@ -162,7 +162,7 @@
\end{pgfonlayer}
}
\end{scope}
\%
% end of remark 6
% end of remark 6
{
\draw
[->,thick] (line2highlight.east) ..controls +(east:1em) and +(west:1em).. (remark1label.west);
...
...
Book/Chapter3/Figures/figure319.tex
查看文件 @
20d19d47
...
...
@@ -13,7 +13,7 @@
\draw
[->,thick,] (s1.north east) .. controls +(north east:1em) and +(north west:1em).. (t.north west) node[pos=0.5,below]
{
\tiny
{
正确翻译
}}
;
\node
[draw,red,fill=red!10,thick,anchor=center,circle,inner sep=3.5pt] (s) at ([xshift=1
0
em,yshift=0em]s1.east)
{
\black
{$
s
$}}
;
\node
[draw,red,fill=red!10,thick,anchor=center,circle,inner sep=3.5pt] (s) at ([xshift=1
3
em,yshift=0em]s1.east)
{
\black
{$
s
$}}
;
\node
[draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t1) at ([xshift=1in]s.east)
{
\black
{$
t
_
1
$}}
;
\node
[draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t2) at ([xshift=3em,yshift=2em]t1.north east)
{
\black
{$
t
_
2
$}}
;
\node
[draw,ublue,fill=blue!10,thick,anchor=center,circle,inner sep=2pt] (t3) at ([xshift=1em,yshift=4em]t1.north east)
{
\black
{$
t
_
3
$}}
;
...
...
@@ -28,6 +28,10 @@
\draw
[->,thick,] (s.north) .. controls +(70:4em) and +(west:1em).. (t3.west) node[pos=0.5,above,xshift=-1em]
{
\tiny
{
P(
$
t
_
3
|s
$
)=0.3
}}
;
\draw
[->,thick,] (s.south east) .. controls +(300:3em) and +(south west:1em).. (t4.south west) node[pos=0.5,below]
{
\tiny
{
P(
$
t
_
4
|s
$
)=0.1
}}
;
\node
[anchor=center] (foot1) at ([xshift=3.8em,yshift=-3em]s1.south)
{
\footnotesize
{
人的翻译候选空间
}}
;
\node
[anchor=center] (foot2) at ([xshift=7em,yshift=-3em]s.south)
{
\footnotesize
{
机器的翻译候选空间
}}
;
\end{tikzpicture}
...
...
Book/mt-book.tex
查看文件 @
20d19d47
...
...
@@ -99,8 +99,8 @@
% CHAPTERS
%----------------------------------------------------------------------------------------
%\include{Chapter1/chapter1}
\include
{
Chapter2/chapter2
}
%
\include{Chapter3/chapter3}
%
\include{Chapter2/chapter2}
\include
{
Chapter3/chapter3
}
...
...
@@ -111,7 +111,7 @@
%\chapter*{Bibliography}
%\addcontentsline{toc}{chapter}{\textcolor{ocre}{Bibliography}} % 增加一个标题
%\printbibliography[heading=bibempty]
%
\printbibliography
\printbibliography
%------------------------------------------------
...
...
Book/structure.tex
查看文件 @
20d19d47
...
...
@@ -363,7 +363,7 @@ innerbottommargin=5pt]{cBox}
%----------------------------------------------------------------------------------------
% SECTION NUMBERING IN THE MARGIN
%----------------------------------------------------------------------------------------
%调整各级标题的段前段后间距
\makeatletter
\renewcommand
{
\@
seccntformat
}
[1]
{
\llap
{
\textcolor
{
ocre
}{
\csname
the#1
\endcsname
}
\hspace
{
1em
}}}
\renewcommand
{
\section
}{
\@
startsection
{
section
}{
1
}{
\z
@
}
...
...
@@ -376,7 +376,7 @@ innerbottommargin=5pt]{cBox}
{
\normalfont\sffamily\bfseries
}}
\renewcommand
{
\subsubsection
}{
\@
startsection
{
subsubsection
}{
3
}{
\z
@
}
{
-3ex
\@
plus -0.1ex
\@
minus -.4ex
}
{
.
2
ex
\@
plus.2ex
}
{
.
4
ex
\@
plus.2ex
}
{
\normalfont\small\sffamily\bfseries
}}
\renewcommand\paragraph
{
\@
startsection
{
paragraph
}{
4
}{
\z
@
}
{
-2ex
\@
plus-.2ex
\@
minus .2ex
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论