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
3bd2ba36
Commit
3bd2ba36
authored
Mar 28, 2020
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates
parent
66d0974c
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
23 行增加
和
28 行删除
+23
-28
Book/Chapter1/chapter1.tex
+1
-1
Book/Chapter2/Figures/figure-Probability-density-function&Distribution-function.tex
+2
-2
Book/Chapter2/chapter2.tex
+4
-9
Book/Chapter3/Chapter3.tex
+6
-6
Book/mt-book-xelatex.idx
+4
-4
Book/mt-book-xelatex.ptc
+4
-4
Section03-Word-Based-Models/section03.tex
+2
-2
没有找到文件。
Book/Chapter1/chapter1.tex
查看文件 @
3bd2ba36
...
...
@@ -353,7 +353,7 @@ Candidate:the the the the
\textrm
{
BP
}
=
\begin{cases}
1
&
c>r
\\
e
^{
(1-
\frac
{
r
}{
c
}
)
}&
c
<
r
e
^{
(1-
\frac
{
r
}{
c
}
)
}&
c
\le
r
\end{cases}
\label
{
eq:brevity-penalty
}
\end{eqnarray}
...
...
Book/Chapter2/Figures/figure-Probability-density-function&Distribution-function.tex
查看文件 @
3bd2ba36
...
...
@@ -13,7 +13,7 @@
\draw
[-latex,thick] (-0.5,-2.0) -- (-0.5,6);
%纵轴
\draw
[-,dashed] (2,4) -- (2,-1.2);
%%图中纵轴虚线
\draw
[-,dashed] (-0.5,4) -- (2,4);
%%图中横轴虚线
\node
[anchor=north] at (-0.8,-1.2)
{
O
}
;
\node
[anchor=north] at (-0.8,-1.2)
{
0
}
;
\node
[anchor=north] at (2,-1.2)
{$
\mu
$}
;
\node
[anchor=north] at (-1.4,4.75)
{$
\frac
{
1
}{
\sqrt
{
2
\pi
}
\sigma
}$}
;
\node
[anchor=north] at (-1.2,6.2)
{
\scriptsize
{$
f
(
x
)
$}}
;
...
...
@@ -30,7 +30,7 @@
\draw
[-,dashed] (3,1.5) -- (3,-1.2);
%%图中纵轴虚线
\draw
[-,dashed] (-0.5,1.5) -- (3,1.5);
%%图中横轴虚线
\draw
[-,dashed] (-0.5,4.2) -- (8.5,4.2);
%%图中横轴虚线
\node
[anchor=north] at (-0.8,-1.2)
{
O
}
;
\node
[anchor=north] at (-0.8,-1.2)
{
0
}
;
\node
[anchor=north] at (3,-1.2)
{$
\mu
$}
;
\node
[anchor=north] at (-1.1,2.0)
{
0.5
}
;
\node
[anchor=north] at (-0.8,4.7)
{
1
}
;
...
...
Book/Chapter2/chapter2.tex
查看文件 @
3bd2ba36
...
...
@@ -216,13 +216,8 @@
\parinterval
首先介绍一下全概率公式:全概率公式(Law of total probability)是概率论中重要的公式,它可以将一个复杂事件发生的概率分解成不同情况的小事件发生概率的和。这里我们先介绍一个概念——划分。
\parinterval
若集合S的一个划分事件为
$
B
_
1
,…,B
_
n
$
是指它们满足
%---------------------------------------------
\begin{eqnarray}
\bigcup
_{
i=1
}^
n B
_
i=S
\textrm
{
且
}
B
_
iB
_
j=
\varnothing
, i,j=1,...,n,i
\neq
j
\label
{
eq:2.2-8
}
\end{eqnarray}
\parinterval
设
$
B
_
1
,…,B
_
n
$
是S的一个划分,A为事件,则
\parinterval
若集合S的一个划分事件为
$
B
_
1
,…,B
_
n
$
是指它们满足
$
\bigcup
_{
i
=
1
}^
n B
_
i
=
S
\textrm
{
且
}
B
_
iB
_
j
=
\varnothing
, i,j
=
1
,...,n,i
\neq
j
$
。设
$
B
_
1
,…,B
_
n
$
是S的一个划分,A为事件,则
\begin{eqnarray}
\textrm
{
P
}
(A)=
\sum
_{
k=1
}^
n
\textrm
{
P
}
(A
\mid
B
_
k)
\textrm
{
P
}
(B
_
k)
\label
{
eq:2.2-9
}
...
...
@@ -563,7 +558,7 @@
\begin{figure}
[htp]
\centering
\input
{
./Chapter2/Figures/figure-full-probability-word-segmentation-1
}
\caption
{
新投骰子
结果
}
\caption
{
投掷一个很多面骰子的
结果
}
\label
{
fig:2.3-8
}
\end{figure}
%-------------------------------------------
...
...
@@ -586,7 +581,7 @@
\centering
\input
{
./Chapter2/Figures/figure-full-probability-word-segmentation-2
}
\setlength
{
\belowcaptionskip
}{
-0.2cm
}
\caption
{
换成汉字后
结果
}
\caption
{
把数字换成汉字后的
结果
}
\label
{
fig:2.3-9
}
\end{figure}
%-------------------------------------------
...
...
Book/Chapter3/Chapter3.tex
查看文件 @
3bd2ba36
...
...
@@ -173,7 +173,7 @@
\vspace
{
-0.5em
}
\begin{eqnarray}
\textrm
{
P
}
(x
\leftrightarrow
y;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
&
\equiv
&
\textrm
{
P
}
(x,y;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
\nonumber
\\
&
=
&
\frac
{
c(x,y;
s,t
)
}{
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}
&
=
&
\frac
{
c(x,y;
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}{
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}
\label
{
eqC3.1-new
}
\end{eqnarray}
...
...
@@ -220,11 +220,11 @@
\qquad\qquad
\;
$
\mathbf
{
s
}^
1
$
= 机器
\quad
{
\color
{
red
}
翻译
}
\;
就
\;
是
\;
用
\;
计算机
\;
来
\;
进行
\;
{
\color
{
red
}
翻译
}
\qquad\qquad\;
$
\mathbf
{
s
}^
1
$
=
m
achine
\;
{
\color
{
red
}
translation
}
\;
is
\;
just
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
\qquad\qquad\;
$
\mathbf
{
s
}^
1
$
=
M
achine
\;
{
\color
{
red
}
translation
}
\;
is
\;
just
\;
{
\color
{
red
}
translation
}
\;
by
\;
computer
\qquad\qquad\;
$
\mathbf
{
s
}^
2
$
= 那
\quad
人工
\quad
{
\color
{
red
}
翻译
}
\quad
呢
\quad
?
\qquad\qquad\;
$
\mathbf
{
t
}^
2
$
=
so
\;
what
\;
is
\;
human
\;
{
\color
{
red
}
translation
}
\;
?
\qquad\qquad\;
$
\mathbf
{
t
}^
2
$
=
So
\;
,
\;
what
\;
is
\;
human
\;
{
\color
{
red
}
translation
}
\;
?
\label
{
example3-2
}
\end{example}
...
...
@@ -233,8 +233,8 @@
\begin{eqnarray}
{
\textrm
{
P
}
(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
)
}
&
=
&
{
\frac
{
c(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
;
\mathbf
{
s
}^{
1
}
,
\mathbf
{
t
}^{
1
}
)+c(
\textrm
{
``翻译''
}
,
\textrm
{
``translation''
}
;
\mathbf
{
s
}^{
2
}
,
\mathbf
{
t
}^{
2
}
)
}{
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}^{
1
}
,
\mathbf
{
t
}^{
1
}
) +
\sum
_{
x',y'
}
c(x',y';
\mathbf
{
s
}^{
2
}
,
\mathbf
{
t
}^{
2
}
)
}}
\nonumber
\\
&
=
&
\frac
{
4 + 1
}{
|
\mathbf
{
s
}^{
1
}
|
\times
|
\mathbf
{
t
}^{
1
}
| + |
\mathbf
{
s
}^{
2
}
|
\times
|
\mathbf
{
t
}^{
2
}
|
}
\nonumber
\\
&
=
&
\frac
{
4 + 1
}{
9
\times
7 + 5
\times
6
}
\nonumber
\\
&
=
&
\frac
{
5
}{
9
3
}
&
=
&
\frac
{
4 + 1
}{
9
\times
7 + 5
\times
7
}
\nonumber
\\
&
=
&
\frac
{
5
}{
9
8
}
\label
{
eqC3.6-new
}
\end{eqnarray}
}
...
...
@@ -260,7 +260,7 @@
\parinterval
计算句子级翻译概率并不简单。因为自然语言非常灵活,任何数据无法覆盖足够多的句子,因此我们也无法像公式
\ref
{
eqC3.5-new
}
一样直接用简单计数的方式对句子的翻译概率进行估计。这里,我们采用一个退而求其次的方法:找到一个函数
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
\ge
0
$
来模拟翻译概率对译文可能性进行评价这种行为。我们假设:给定
$
\mathbf
{
s
}$
,翻译结果
$
\mathbf
{
t
}$
出现的可能性越大,
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
$
的值越大;
$
\mathbf
{
t
}$
出现的可能性越小,
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
$
的值越小。换句话说,
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
$
的单调性和翻译概率呈正相关。如果存在这样的函数
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
$
,可以利用
$
g
(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
$
近似表示句子级翻译概率,如下:
\begin{eqnarray}
\textrm
{
P
}
(
\mathbf
{
t
}
|
\mathbf
{
s
}
)
\
approx
\frac
{
g(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}{
\sum
_{
\mathbf
{
t
}
'
}
g(
\mathbf
{
s
}
,
\mathbf
{
t
}
')
}
\textrm
{
P
}
(
\mathbf
{
t
}
|
\mathbf
{
s
}
)
\
equiv
\frac
{
g(
\mathbf
{
s
}
,
\mathbf
{
t
}
)
}{
\sum
_{
\mathbf
{
t
}
'
}
g(
\mathbf
{
s
}
,
\mathbf
{
t
}
')
}
\label
{
eqC3.7-new
}
\end{eqnarray}
...
...
Book/mt-book-xelatex.idx
查看文件 @
3bd2ba36
...
...
@@ -41,12 +41,12 @@
\indexentry{Chapter2.4.2|hyperpage}{63}
\indexentry{Chapter2.4.2.1|hyperpage}{64}
\indexentry{Chapter2.4.2.2|hyperpage}{65}
\indexentry{Chapter2.4.2.3|hyperpage}{6
7
}
\indexentry{Chapter2.4.2.3|hyperpage}{6
6
}
\indexentry{Chapter2.5|hyperpage}{68}
\indexentry{Chapter2.5.1|hyperpage}{6
9
}
\indexentry{Chapter2.5.1|hyperpage}{6
8
}
\indexentry{Chapter2.5.2|hyperpage}{70}
\indexentry{Chapter2.5.3|hyperpage}{7
4
}
\indexentry{Chapter2.6|hyperpage}{7
6
}
\indexentry{Chapter2.5.3|hyperpage}{7
5
}
\indexentry{Chapter2.6|hyperpage}{7
7
}
\indexentry{Chapter3.1|hyperpage}{81}
\indexentry{Chapter3.2|hyperpage}{83}
\indexentry{Chapter3.2.1|hyperpage}{83}
...
...
Book/mt-book-xelatex.ptc
查看文件 @
3bd2ba36
...
...
@@ -95,17 +95,17 @@
\defcounter {refsection}{0}\relax
\contentsline {subsubsection}{古德-图灵估计法}{65}{section*.49}
\defcounter {refsection}{0}\relax
\contentsline {subsubsection}{Kneser-Ney平滑方法}{6
7
}{section*.51}
\contentsline {subsubsection}{Kneser-Ney平滑方法}{6
6
}{section*.51}
\defcounter {refsection}{0}\relax
\contentsline {section}{\numberline {2.5}句法分析(短语结构)}{68}{section.2.5}
\defcounter {refsection}{0}\relax
\contentsline {subsection}{\numberline {2.5.1}句子的句法树表示}{6
9
}{subsection.2.5.1}
\contentsline {subsection}{\numberline {2.5.1}句子的句法树表示}{6
8
}{subsection.2.5.1}
\defcounter {refsection}{0}\relax
\contentsline {subsection}{\numberline {2.5.2}上下文无关文法}{70}{subsection.2.5.2}
\defcounter {refsection}{0}\relax
\contentsline {subsection}{\numberline {2.5.3}规则和推导的概率}{7
4
}{subsection.2.5.3}
\contentsline {subsection}{\numberline {2.5.3}规则和推导的概率}{7
5
}{subsection.2.5.3}
\defcounter {refsection}{0}\relax
\contentsline {section}{\numberline {2.6}小结及深入阅读}{7
6
}{section.2.6}
\contentsline {section}{\numberline {2.6}小结及深入阅读}{7
7
}{section.2.6}
\defcounter {refsection}{0}\relax
\contentsline {part}{\@mypartnumtocformat {II}{统计机器翻译}}{79}{part.2}
\ttl@stoptoc {default@1}
...
...
Section03-Word-Based-Models/section03.tex
查看文件 @
3bd2ba36
...
...
@@ -926,7 +926,7 @@
\node
[anchor=north west] (t1) at ([yshift=0.4em]s1.south west)
{$
t
_
1
=
$
Machine translation is just translation by computer
}
;
\node
[anchor=north west] (s2) at (t1.south west)
{$
s
_
2
=
$
那 人工 翻译 呢 ?
}
;
\node
[anchor=north west] (t2) at ([yshift=0.4em]s2.south west)
{$
t
_
2
=
$
s
o , what is human translation ?
}
;
\node
[anchor=north west] (t2) at ([yshift=0.4em]s2.south west)
{$
t
_
2
=
$
S
o , what is human translation ?
}
;
\end{tikzpicture}
\end{flushleft}
...
...
@@ -937,7 +937,7 @@
\begin{eqnarray}
&
&
\textrm
{
P
}
(
\textrm
{
'翻译'
}
,
\textrm
{
'translation'
}
)
\nonumber
\\
&
=
&
\frac
{
c(
\textrm
{
'翻译'
}
,
\textrm
{
'translation'
}
;s
^{
[1]
}
,t
^{
[1]
}
)+c(
\textrm
{
'翻译'
}
,
\textrm
{
'translation'
}
;s
^{
[2]
}
,t
^{
[2]
}
)
}{
\sum
_{
x',y'
}
c(x',y';s
^{
[1]
}
,t
^{
[1]
}
) +
\sum
_{
x',y'
}
c(x',y';s
^{
[2]
}
,t
^{
[2]
}
)
}
\nonumber
\\
\visible
<3->
{&
=
&
\frac
{
4 + 1
}{
|s
^{
[1]
}
|
\times
|t
^{
[1]
}
| + |s
^{
[2]
}
|
\times
|t
^{
[2]
}
|
}
=
\frac
{
4 + 1
}{
9
\times
7 + 5
\times
7
}
=
\frac
{
5
}{
102
}}
\nonumber
\visible
<3->
{&
=
&
\frac
{
4 + 1
}{
|s
^{
[1]
}
|
\times
|t
^{
[1]
}
| + |s
^{
[2]
}
|
\times
|t
^{
[2]
}
|
}
=
\frac
{
4 + 1
}{
9
\times
7 + 5
\times
7
}
=
\frac
{
5
}{
98
}}
\nonumber
\end{eqnarray}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论