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
818b8c31
Commit
818b8c31
authored
Apr 25, 2020
by
单韦乔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
按照老师的标准把部分可调整的图调大了
parent
6a57a57f
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
207 行增加
和
205 行删除
+207
-205
Book/Chapter4/Figures/cut-different-positions-of-word-string.tex
+1
-1
Book/Chapter4/Figures/different-representations-of-syntax-tree.tex
+7
-6
Book/Chapter4/Figures/example-of-hypothesis-recombination.tex
+0
-0
Book/Chapter4/Figures/example-of-phrase-table.tex
+7
-7
Book/Chapter4/Figures/example-of-stack-decode.tex
+32
-35
Book/Chapter4/Figures/example-of-tree-to-string-rule-and-word-alignment.tex
+5
-3
Book/Chapter4/Figures/function-image-about-weight-and-Bleu-1.tex
+6
-6
Book/Chapter4/Figures/function-image-about-weight-and-Bleu-2.tex
+8
-8
Book/Chapter4/Figures/hyper-graph-representation-of-machine-translation-derivation.tex
+14
-14
Book/Chapter4/Figures/phrase-structure-tree-and-dependency-tree.tex
+4
-4
Book/Chapter4/Figures/process-of-machine-translation-base-phrase.tex
+9
-9
Book/Chapter4/Figures/processing-of-hierarchical-phrase-system.tex
+11
-11
Book/Chapter4/Figures/reorder-base-distance.tex
+18
-18
Book/Chapter4/Figures/reorder-base-phrase-translation.tex
+4
-4
Book/Chapter4/Figures/role-of-syntax-tree-in-different-decoding-methods.tex
+4
-4
Book/Chapter4/Figures/rule-matching-base-tree.tex
+8
-8
Book/Chapter4/Figures/syntax-tree-in-ctb.tex
+2
-2
Book/Chapter4/Figures/syntax-tree-with-admissible-node.tex
+13
-13
Book/Chapter4/Figures/translation-hypothesis-extension.tex
+28
-28
Book/Chapter4/Figures/translation-rule-based-on-admissible-node.tex
+13
-11
Book/Chapter4/Figures/tree-segment-corresponding-to-phrase.tex
+13
-13
没有找到文件。
Book/Chapter4/Figures/cut-different-positions-of-word-string.tex
查看文件 @
818b8c31
...
...
@@ -4,7 +4,7 @@
\begin{tikzpicture}
\begin{scope}
{
\s
criptsize
{
\s
mall
\node
[anchor=west] (sw11) at (0,0)
{
阿都拉
$_
1
$}
;
\node
[anchor=west] (sw12) at ([xshift=0.1em]sw11.east)
{
对
$_
2
$}
;
...
...
Book/Chapter4/Figures/different-representations-of-syntax-tree.tex
查看文件 @
818b8c31
%%%------------------------------------------------------------------------------------------------------------
%%% 树结构的表示
\begin{tikzpicture}
{
\
footnotesize
{
\
small
\begin{scope}
[sibling distance=3pt, level distance = 22pt]
\Tree
[.S [.NN ]
[.VP [.AD ] [.VP [.VV ] [.AS ] ] ] ]
\end{scope}
\begin{scope}
[xshift=1in,yshift=0.25in]
\begin{scope}
[xshift=1
.25
in,yshift=0.25in]
\node
[anchor=north west,align=left] (string1) at (0,0)
{
[S
\\\hspace
{
1em
}
NN
\\\hspace
{
1em
}
VP[
\\\hspace
{
2.5em
}
AD
\\\hspace
{
2.5em
}
VP[
\\\hspace
{
4em
}
VV
\\\hspace
{
4em
}
AS]]]
}
;
\end{scope}
\begin{scope}
[xshift=2.
5
in,yshift=-0.80in]
\begin{scope}
[xshift=2.
78
in,yshift=-0.80in]
\node
[anchor=west,align=left] (string2) at (0,0)
{
(S NN VP(AD
\\
VP(VV AS)))
}
;
\end{scope}
\node
[anchor=north west] (cap1) at (-1.5em,-1in)
{
\scriptsize
{
(a) 树状表示
}}
;
\node
[anchor=west] (cap2) at ([xshift=0.5in]cap1.east)
{
\scriptsize
{
(b) 序列表示(缩进)
}}
;
\node
[anchor=west] (cap3) at ([xshift=0.5in]cap2.east)
{
\scriptsize
{
(c) 序列表示
}}
;
\node
[anchor=north west] (cap1) at (-1.5em,-1in)
{{
(a) 树状表示
}}
;
\node
[anchor=west] (cap2) at ([xshift=0.5in]cap1.east)
{{
(b) 序列表示(缩进)
}}
;
\node
[anchor=west] (cap3) at ([xshift=0.5in]cap2.east)
{{
(c) 序列表示
}}
;
}
\end{tikzpicture}
\ No newline at end of file
Book/Chapter4/Figures/example-of-hypothesis-recombination.tex
查看文件 @
818b8c31
差异被折叠。
点击展开。
Book/Chapter4/Figures/example-of-phrase-table.tex
查看文件 @
818b8c31
...
...
@@ -2,13 +2,13 @@
%%% 展示短语表的内容
\begin{center}
\begin{tikzpicture}
\node
[anchor=west] (s1) at (0,0)
{
\s
criptsize
{
报告 认为
$
\vert\vert\vert
$
report holds that
$
\vert\vert\vert
$
-2.62 -5.81 -0.91 -2.85 1 0
$
\vert\vert\vert
$
4
$
\vert\vert\vert
$
0-0 1-1 1-2
}}
;
\node
[anchor=west] (s2) at ([yshift=-1.2em]s1.west)
{
\s
criptsize
{
,悲伤
$
\vert\vert\vert
$
, sadness
$
\vert\vert\vert
$
-1.946 -3.659 0 -3.709 1 0
$
\vert\vert\vert
$
1
$
\vert\vert\vert
$
0-0 1-1
}}
;
\node
[anchor=west] (s3) at ([yshift=-1.2em]s2.west)
{
\s
criptsize
{
,北京 等
$
\vert\vert\vert
$
, beijing , and other
$
\vert\vert\vert
$
0 -7.98 0 -3.84 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
0-0 1-1 2-2 2-3 2-4
}}
;
\node
[anchor=west] (s4) at ([yshift=-1.2em]s3.west)
{
\s
criptsize
{
,北京 及
$
\vert\vert\vert
$
, beijing , and
$
\vert\vert\vert
$
-0.69 -1.45 -0.92 -4.80 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
0-0 1-1 2-2
}}
;
\node
[anchor=west] (s5) at ([yshift=-1.2em]s4.west)
{
\s
criptsize
{
一个 中国
$
\vert\vert\vert
$
one china
$
\vert\vert\vert
$
0 -1.725 0 -1.636 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
1-1 2-2
}}
;
\node
[anchor=west] (s7) at ([yshift=-1.1em]s5.west)
{
\s
criptsize
{
...
}}
;
\node
[anchor=west] (s6) at ([yshift=1.0em]s1.west)
{
\s
criptsize
{
...
}}
;
\node
[anchor=west] (s1) at (0,0)
{
\s
mall
{
报告 认为
$
\vert\vert\vert
$
report holds that
$
\vert\vert\vert
$
-2.62 -5.81 -0.91 -2.85 1 0
$
\vert\vert\vert
$
4
$
\vert\vert\vert
$
0-0 1-1 1-2
}}
;
\node
[anchor=west] (s2) at ([yshift=-1.2em]s1.west)
{
\s
mall
{
,悲伤
$
\vert\vert\vert
$
, sadness
$
\vert\vert\vert
$
-1.946 -3.659 0 -3.709 1 0
$
\vert\vert\vert
$
1
$
\vert\vert\vert
$
0-0 1-1
}}
;
\node
[anchor=west] (s3) at ([yshift=-1.2em]s2.west)
{
\s
mall
{
,北京 等
$
\vert\vert\vert
$
, beijing , and other
$
\vert\vert\vert
$
0 -7.98 0 -3.84 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
0-0 1-1 2-2 2-3 2-4
}}
;
\node
[anchor=west] (s4) at ([yshift=-1.2em]s3.west)
{
\s
mall
{
,北京 及
$
\vert\vert\vert
$
, beijing , and
$
\vert\vert\vert
$
-0.69 -1.45 -0.92 -4.80 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
0-0 1-1 2-2
}}
;
\node
[anchor=west] (s5) at ([yshift=-1.2em]s4.west)
{
\s
mall
{
一个 中国
$
\vert\vert\vert
$
one china
$
\vert\vert\vert
$
0 -1.725 0 -1.636 1 0
$
\vert\vert\vert
$
2
$
\vert\vert\vert
$
1-1 2-2
}}
;
\node
[anchor=west] (s7) at ([yshift=-1.1em]s5.west)
{
\s
mall
{
...
}}
;
\node
[anchor=west] (s6) at ([yshift=1.0em]s1.west)
{
\s
mall
{
...
}}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,inner sep=0.3em,fill=red!20] [fit = (s1) (s3) (s4) (s6) (s7)] (box1)
{}
;
\end{pgfonlayer}
...
...
Book/Chapter4/Figures/example-of-stack-decode.tex
查看文件 @
818b8c31
...
...
@@ -4,46 +4,43 @@
\begin{tikzpicture}
\begin{scope}
{
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=
1.5em,minimum width=2.2em] (h0) at (0,0)
{
\tiny
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.5em,fill=black] (pt0) at (h0.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=1
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3em] (h0) at (0,0)
{
\scriptsize
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt0) at (h0.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=1
}}}}
;
}
{
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h13) at ([xshift=2.1em,yshift=5em]h0.east)
{
\tiny
{
there is
}}
;
%\node [anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.1em,yshift=2.5em]h0.east) {\tiny{on}};
\node
[anchor=west,inner sep=2pt,minimum height=1.5em,minimum width=2.2em] (h12) at ([xshift=2.1em,yshift=3em]h0.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=1.5em,minimum width=2.2em] (h1) at ([xshift=2.1em]h0.east)
{
\tiny
{
tabel
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=2em,minimum width=3em] (h13) at ([xshift=2.1em,yshift=6em]h0.east)
{
\scriptsize
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=2em,minimum width=3em] (h12) at ([xshift=2.1em,yshift=3.5em]h0.east)
{
\small
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=2em,minimum width=3em] (h1) at ([xshift=2.1em]h0.east)
{
\scriptsize
{
tabel
}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
%\node [anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h12.north west) {\tiny{{\color{white} \textbf{2}}}};
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl1) at (h1.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h13.north west)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt1) at (h1.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
%\node [anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt2) at (h12.east) {\tiny{{\color{white} \textbf{P=.3}}}};
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=1.5em,fill=black] (pt3) at (h13.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt1) at (h1.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt3) at (h13.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.5em,minimum width=2.2em] (h2) at ([xshift=2.1em]h1.east)
{
\tiny
{
have
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=
1.5em,minimum width=2.2em] (h22) at ([xshift=2.1em]h12.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.5em,minimum width=2.2em] (h23) at ([xshift=2.1em]h13.east)
{
\tiny
{
an
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.5em,minimum width=2.2em] (h3) at ([xshift=2.1em]h2.east)
{
\tiny
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=
1.5em,minimum width=2.2em] (h32) at ([xshift=2.1em]h22.east)
{
\footnotesize
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.5em,minimum width=2.2em] (h33) at ([xshift=2.1em]h23.east)
{
\tiny
{
an apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3em] (h2) at ([xshift=2.1em]h1.east)
{
\scriptsize
{
have
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=
2em,minimum width=3em] (h22) at ([xshift=2.1em]h12.east)
{
\small
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3em] (h23) at ([xshift=2.1em]h13.east)
{
\scriptsize
{
an
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3em] (h3) at ([xshift=2.1em]h2.east)
{
\scriptsize
{
there is
}}
;
\node
[anchor=west,inner sep=2pt,minimum height=
2em,minimum width=3em] (h32) at ([xshift=2.1em]h22.east)
{
\small
{
\textbf
{
...
}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3em] (h33) at ([xshift=2.1em]h23.east)
{
\scriptsize
{
an apple
}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h2.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl23) at (h23.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl2) at (h2.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl23) at (h23.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl3) at (h3.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.0pt,fill=black] (hl33) at (h33.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.5em,fill=black] (pt2) at (h2.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.5em,fill=black] (pt23) at (h23.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.5em,fill=black] (pt3) at (h3.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.5em,fill=black] (pt33) at (h33.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt2) at (h2.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt23) at (h23.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt3) at (h3.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt33) at (h33.east)
{
\scriptsize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
}
\node
[anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south)
{
\s
criptsize
{
\textbf
{
未译词
}}}
;
\node
[anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south)
{
\s
criptsize
{
\textbf
{
已译1词
}}}
;
\node
[anchor=north] (l2) at ([xshift=0.3em,yshift=-0.7em]h2.south)
{
\s
criptsize
{
\textbf
{
已译2词
}}}
;
\node
[anchor=north] (l3) at ([xshift=0.3em,yshift=-0.7em]h3.south)
{
\s
criptsize
{
\textbf
{
已译3词
}}}
;
\node
[anchor=north] (l0) at ([xshift=0.2em,yshift=-0.7em]h0.south)
{
\s
mall
{
\textbf
{
未译词
}}}
;
\node
[anchor=north] (l1) at ([xshift=0.3em,yshift=-0.7em]h1.south)
{
\s
mall
{
\textbf
{
已译1词
}}}
;
\node
[anchor=north] (l2) at ([xshift=0.3em,yshift=-0.7em]h2.south)
{
\s
mall
{
\textbf
{
已译2词
}}}
;
\node
[anchor=north] (l3) at ([xshift=0.3em,yshift=-0.7em]h3.south)
{
\s
mall
{
\textbf
{
已译3词
}}}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,inner sep=0.3em,fill=blue!10] [fit = (h0) (pt0)] (box0)
{}
;
...
...
@@ -58,14 +55,14 @@
\draw
[->,thick,red] (h1.north).. controls +(60:0.5) and +(120:0.5) .. (h2.north);
\draw
[->,thick,red] (h2.north).. controls +(60:0.5) and +(120:0.5) .. (h3.north);
}
\node
[anchor=south east] (wtranslabel) at ([xshift=-1.
7em,yshift=-2em]h0.south west)
{
\scriptsize
{
\textbf
{
:假设堆栈
}}}
;
\node
[anchor=south east] (wtranslabel) at ([xshift=-1.
5em,yshift=-2.2em]h0.south west)
{
\small
{
\textbf
{
:假设堆栈
}}}
;
\node
[anchor=east,inner sep=2pt,fill=blue!10,minimum height=1em,minimum width=2em] (stacklabel) at ([xshift=-0.1em]wtranslabel.west)
{}
;
{
\node
[anchor=east] (line1) at ([xshift=-1.0em,yshift=0
em]h0.west)
{
\footnotesize
{
0号栈包含空假设
}}
;
\node
[anchor=east] (line1) at ([xshift=-1.0em,yshift=0
.4em]h0.west)
{
\small
{
0号栈包含空假设
}}
;
}
{
\node
[anchor=east] (line2) at ([xshift=-
1.8em,yshift=0.3em]h13.west)
{
\footnotesize
{
通过假设扩展产生新的假设
}}
;
\node
[anchor=north west] (line3) at ([yshift=0.1em]line2.south west)
{
\
footnotesize
{
并不断的被存入假设堆栈中
}}
;
\node
[anchor=east] (line2) at ([xshift=-
2.3em,yshift=0.5em]h13.west)
{
\small
{
通过假设扩展产生新的假设
}}
;
\node
[anchor=north west] (line3) at ([yshift=0.1em]line2.south west)
{
\
small
{
并不断的被存入假设堆栈中
}}
;
}
\begin{pgfonlayer}
{
background
}
{
...
...
Book/Chapter4/Figures/example-of-tree-to-string-rule-and-word-alignment.tex
查看文件 @
818b8c31
...
...
@@ -3,7 +3,7 @@
\begin{center}
\begin{tikzpicture}
{
\
footnotesize
{
\
small
\begin{scope}
[sibling distance=25pt, level distance=20pt]
\Tree
[.
\node
(n1)
{
IP
}
;
...
...
@@ -29,6 +29,8 @@
\node
[anchor=west,minimum size=18pt]
(tw5) at ([xshift=1.1em]tw4.east)
{
the
}
;
\node
[anchor=west,minimum size=18pt]
(tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east)
{
answer
}
;
\node
[anchor=north,minimum size=18pt]
(empty) at ([xshift=-2.0em]cw1.south)
{}
;
\draw
[dashed]
(cw1.south) -- ([yshift=-0.4em]tw1.north);
\draw
[dashed]
(cw2.south) .. controls +(south:1.6) and +(north:0.6) .. ([yshift=-0.4em]tw4.north);
\draw
[dashed]
(cw3.south) -- ([yshift=-0.4em]tw5.north);
...
...
@@ -49,10 +51,10 @@
\end{pgfonlayer}
{
\node
[anchor=south] (rule1label) at ([xshift=1em]rule1s.north west)
{
\
script
size\sffamily\bfseries
{
\red
{
正确的规则
}}}
;
\node
[anchor=south] (rule1label) at ([xshift=1em]rule1s.north west)
{
\
footnote
size\sffamily\bfseries
{
\red
{
正确的规则
}}}
;
}
{
\node
[anchor=north west,align=left] (rule2label) at (rule2s.north east)
{
\
scriptsize
{
\sffamily\bfseries
{
\color
{
blue
}
错误的规则
}}
\\\scriptsize
{
因为``satisfied''会
}
\\\scriptsize
{
对齐到规则外,
}
\\\scriptsize
{
也就是这条规则
}
\\\script
size
{
与词对齐不相容
}}
;
\node
[anchor=north west,align=left] (rule2label) at (rule2s.north east)
{
\
footnotesize
{
\sffamily\bfseries
{
\color
{
blue
}
错误的规则
}}
\\\footnotesize
{
因为``satisfied''会
}
\\\footnotesize
{
对齐到规则外,
}
\\\footnotesize
{
也就是这条规则
}
\\\footnote
size
{
与词对齐不相容
}}
;
}
\end{scope}
...
...
Book/Chapter4/Figures/function-image-about-weight-and-Bleu-1.tex
查看文件 @
818b8c31
...
...
@@ -10,18 +10,18 @@
{
\draw
[thick]
([yshift=1em]x0.center) -- ([xshift=8em,yshift=5em]x0.center);
\draw
[thick]
([yshift=2em]x0.center) -- ([xshift=8em,yshift=4em]x0.center);
\node
[anchor=north]
(e1) at ([xshift=6em,yshift=6em]x0.south)
{
\
footnotesize
{$
d
_
1
$}}
;
\node
[anchor=north]
(e2) at ([xshift=7em,yshift=4em]x0.south)
{
\
footnotesize
{$
d
_
2
$}}
;
\node
[anchor=north,rotate=90]
(e2) at ([xshift=-1.3em,yshift=3.6em]x0.south)
{
\
footnotesize
{
model score
}}
;
\node
[anchor=north]
(e1) at ([xshift=6em,yshift=6em]x0.south)
{
\
small
{$
d
_
1
$}}
;
\node
[anchor=north]
(e2) at ([xshift=7em,yshift=4em]x0.south)
{
\
small
{$
d
_
2
$}}
;
\node
[anchor=north,rotate=90]
(e2) at ([xshift=-1.3em,yshift=3.6em]x0.south)
{
\
small
{
model score
}}
;
}
{
\node
[anchor=center,draw=red,circle,inner sep=2pt,thick] (x1) at ([xshift=4em,yshift=3em]x0.center)
{}
;
\draw
[thick,dotted]
([xshift=4em]x0.center) -- ([xshift=4em,yshift=3em]x0.center);
}
\node
[anchor=north]
(zero) at ([yshift=0.1em]x0.south)
{
\
footnotesize
{
0
}}
;
\node
[anchor=north]
(wx) at ([xshift=4em,yshift=0.1em]x0.south)
{
\
footnotesize
{$
w
_
x
$}}
;
\node
[anchor=north]
(wi) at ([xshift=8em,yshift=0.1em]x0.south)
{
\
footnotesize
{$
w
_
i
$}}
;
\node
[anchor=north]
(zero) at ([yshift=0.1em]x0.south)
{
\
small
{
0
}}
;
\node
[anchor=north]
(wx) at ([xshift=4em,yshift=0.1em]x0.south)
{
\
small
{$
w
_
x
$}}
;
\node
[anchor=north]
(wi) at ([xshift=8em,yshift=0.1em]x0.south)
{
\
small
{$
w
_
i
$}}
;
\end{scope}
...
...
Book/Chapter4/Figures/function-image-about-weight-and-Bleu-2.tex
查看文件 @
818b8c31
...
...
@@ -7,9 +7,9 @@
\draw
[->,thick]
(x0.center) -- ([xshift=8.2em]x0.east);
\draw
[->,thick]
(x0.center) -- ([yshift=5.6em]x0.center);
\node
[anchor=north]
(zero) at ([yshift=0.1em]x0.south)
{
\
footnotesize
{
0
}}
;
\node
[anchor=north]
(wx) at ([xshift=4em,yshift=0.1em]x0.south)
{
\
footnotesize
{$
w
_
x
$}}
;
\node
[anchor=north]
(wi) at ([xshift=8em,yshift=0.1em]x0.south)
{
\
footnotesize
{$
w
_
i
$}}
;
\node
[anchor=north]
(zero) at ([yshift=0.1em]x0.south)
{
\
small
{
0
}}
;
\node
[anchor=north]
(wx) at ([xshift=4em,yshift=0.1em]x0.south)
{
\
small
{$
w
_
x
$}}
;
\node
[anchor=north]
(wi) at ([xshift=8em,yshift=0.1em]x0.south)
{
\
small
{$
w
_
i
$}}
;
{
\draw
[thick]
([yshift=2em]x0.center) -- ([xshift=4em,yshift=2em]x0.center);
...
...
@@ -17,12 +17,12 @@
\draw
[thick,dotted]
([xshift=4em]x0.center) -- ([xshift=4em,yshift=5.5em]x0.center);
\node
[anchor=north]
(e1) at ([xshift=2em,yshift=3em]x0.north)
{
\
footnotesize
{$
d
^
*=
d
_
1
$}}
;
\node
[anchor=north]
(e2) at ([xshift=6.2em,yshift=5em]x0.north)
{
\
footnotesize
{$
d
^
*=
d
_
2
$}}
;
\node
[anchor=north]
(e1) at ([xshift=2em,yshift=3em]x0.north)
{
\
small
{$
d
^
*=
d
_
1
$}}
;
\node
[anchor=north]
(e2) at ([xshift=6.2em,yshift=5em]x0.north)
{
\
small
{$
d
^
*=
d
_
2
$}}
;
\node
[anchor=north,rotate=90]
(e2) at ([xshift=-1.3em,yshift=3.6em]x0.south)
{
\
footnotesize
{
BLEU
}}
;
\draw
[decorate,decoration={brace,amplitude=0.4em},red,thick]
([xshift=
3.8
em,yshift=0.5em]x0.south) -- ([xshift=8.2em,yshift=0.5em]x0.south);
\node
[anchor=north]
(wi) at ([xshift=6.1em,yshift=2
em]x0.south)
{
\tiny
{
\red
{
挑选
$
w
_
i
$}}}
;
\node
[anchor=north,rotate=90]
(e2) at ([xshift=-1.3em,yshift=3.6em]x0.south)
{
\
small
{
BLEU
}}
;
\draw
[decorate,decoration={brace,amplitude=0.4em},red,thick]
([xshift=
4
em,yshift=0.5em]x0.south) -- ([xshift=8.2em,yshift=0.5em]x0.south);
\node
[anchor=north]
(wi) at ([xshift=6.1em,yshift=2
.1em]x0.south)
{
\footnotesize
{
\red
{
挑选
$
w
_
i
$}}}
;
}
\end{scope}
\end{tikzpicture}
Book/Chapter4/Figures/hyper-graph-representation-of-machine-translation-derivation.tex
查看文件 @
818b8c31
...
...
@@ -6,18 +6,18 @@
{
\footnotesize
{
\node
[anchor=north,inner sep=0
em,draw,minimum height=1.1em,minimum width=9
em] (n1) at (0,0)
{
X | 0,4 | the answer | a question
}
;
\node
[anchor=west,inner sep=0
em,draw,minimum height=1.1em,minimum width=9
em] (n2) at ([xshift=5em,yshift=0em]n1.east)
{
X | 0,4 | a question | the answer
}
;
\node
[anchor=north,inner sep=0
em,draw,minimum height=1.1em,minimum width=9em] (n3) at ([xshift=0
em,yshift=-12em]n1.south)
{
X | 0,2 | the answer | NA
}
;
\node
[anchor=west,inner sep=0
em,draw,minimum height=1.1em,minimum width=9em] (n4) at ([xshift=8
em,yshift=0em]n3.east)
{
X | 3,4 | a question | NA
}
;
\node
[anchor=north,inner sep=0
.2em,draw,minimum height=1.4em,minimum width=13.5
em] (n1) at (0,0)
{
X | 0,4 | the answer | a question
}
;
\node
[anchor=west,inner sep=0
.2em,draw,minimum height=1.4em,minimum width=13.5
em] (n2) at ([xshift=5em,yshift=0em]n1.east)
{
X | 0,4 | a question | the answer
}
;
\node
[anchor=north,inner sep=0
.2em,draw,minimum height=1.4em,minimum width=10.5em] (n3) at ([xshift=-3
em,yshift=-12em]n1.south)
{
X | 0,2 | the answer | NA
}
;
\node
[anchor=west,inner sep=0
.2em,draw,minimum height=1.4em,minimum width=10.5em] (n4) at ([xshift=14
em,yshift=0em]n3.east)
{
X | 3,4 | a question | NA
}
;
\node
[anchor=south,inner sep=0
em,draw,minimum height=1.2em,minimum width=4em] (s1) at ([xshift=9
em,yshift=4em]n1.north)
{
goal item
}
;
\node
[anchor=south,inner sep=0
.2em,draw,minimum height=1.4em,minimum width=4.3em] (s1) at ([xshift=9.3
em,yshift=4em]n1.north)
{
goal item
}
;
\node
[anchor=north] (n5) at ([xshift=0em,yshift=-3em]n3.south)
{$
\textrm
{
对
}_
0
\textrm
{
回答
}_
1
$}
;
\node
[anchor=north] (n51) at ([xshift=0em,yshift=0em]n5.south)
{
with the answer
}
;
\node
[anchor=west] (n6) at ([xshift=
6
em,yshift=0em]n5.east)
{$
\textrm
{
有
}_
2
$}
;
\node
[anchor=west] (n6) at ([xshift=
9
em,yshift=0em]n5.east)
{$
\textrm
{
有
}_
2
$}
;
\node
[anchor=north] (n61) at ([xshift=0em,yshift=0em]n6.south)
{
have
}
;
\node
[anchor=
west] (n7) at ([xshift=6em,yshift=0em]n6.east
)
{$
\textrm
{
疑问
}_
3
$}
;
\node
[anchor=
north] (n7) at ([xshift=0em,yshift=-3em]n4.south
)
{$
\textrm
{
疑问
}_
3
$}
;
\node
[anchor=north] (n71) at ([xshift=0em,yshift=0em]n7.south)
{
a question
}
;
\draw
[->,thick]
([xshift=-3em,yshift=0em]n1.north) .. controls +(north:3em) and +(south:1em) .. ([xshift=-1em,yshift=0em]s1.south);
...
...
@@ -27,7 +27,7 @@
{
\tiny
\node
[anchor=south] (s1) at ([xshift=0em,yshift=1.5em]n5.north)
{$
\textrm
{
NP
}
\to
\langle\ \textrm
{
NP
}
(
\textrm
{
NN
}
(
\textrm
{
回答
}
))
,
\textrm
{
回答
}
\rangle
$}
;
\node
[anchor=south] (s2) at ([xshift=0em,yshift=1.5em]n7.north)
{$
\textrm
{
NP
}
\to
\langle\ \textrm
{
NP
}
(
\textrm
{
疑问
}
)
,
\textrm
{
疑问
}
\rangle
$}
;
\node
[anchor=south] (s3) at ([xshift=-
8
em,yshift=6em]n3.north)
{$
\textrm
{
NP
}
\to
\langle\ \textrm
{
VP
}
(
\textrm
{
NP
}_
1
\ \textrm
{
VP
}
(
\textrm
{
VV
}
(
\textrm
{
有
}
)
\ \textrm
{
NN
}_
2
))
,
$}
;
\node
[anchor=south] (s3) at ([xshift=-
2
em,yshift=6em]n3.north)
{$
\textrm
{
NP
}
\to
\langle\ \textrm
{
VP
}
(
\textrm
{
NP
}_
1
\ \textrm
{
VP
}
(
\textrm
{
VV
}
(
\textrm
{
有
}
)
\ \textrm
{
NN
}_
2
))
,
$}
;
\node
[anchor=west] (s31) at ([xshift=0em,yshift=-1.5em]s3.west)
{$
\textrm
{
have
}
\ \textrm
{
NP
}_
1
\ \textrm
{
NN
}_
2
\rangle
$}
;
\node
[anchor=south] (s4) at ([xshift=14em,yshift=1em]s3.north)
{$
\textrm
{
NP
}
\to
\langle\ \textrm
{
VP
}
(
\textrm
{
NP
}_
1
\ \textrm
{
VP
}
(
\textrm
{
VV
}
(
\textrm
{
有
}
)
\ \textrm
{
NN
}_
2
))
,
$}
;
\node
[anchor=west] (s41) at ([xshift=8.8em,yshift=-1.3em]s4.west)
{$
\textrm
{
NP
}_
1
\ \textrm
{
possess
}
\ \textrm
{
NN
}_
2
\rangle
$}
;
...
...
@@ -42,7 +42,7 @@
{
\draw
[->, dash dot dot, thick]
([xshift=
0
em,yshift=0em]n3.north) .. controls +(north:1.4em) and +(south:3em) .. ([xshift=2em,yshift=-0em]s3.south);
\draw
[->, dash dot dot, thick]
([xshift=
-1.5
em,yshift=0em]n3.north) .. controls +(north:1.4em) and +(south:3em) .. ([xshift=2em,yshift=-0em]s3.south);
\draw
[->, dash dot dot, thick]
([xshift=0em,yshift=0em]n6.north west) .. controls +(north:8em) and +(south:2.5em) .. ([xshift=2em,yshift=-0em]s3.south);
\draw
[->, dash dot dot, thick]
([xshift=0em,yshift=0em]n4.west) .. controls +(north:3em) and +(south:1em) .. ([xshift=2em,yshift=-0em]s3.south);
...
...
@@ -56,18 +56,18 @@
\draw
[->, dotted, thick]
([xshift=0em,yshift=0em]n3.east) .. controls +(north:3em) and +(south:2em) .. ([xshift=-3em,yshift=0em]s6.south);
\draw
[->, dotted, thick]
([xshift=0.5em,yshift=0em]n6.north) .. controls +(north:7.5em) and +(south:2.5em) .. ([xshift=-3em,yshift=0em]s6.south);
\draw
[->, dotted, thick]
([xshift=
0em,yshift=0em]n4.north) .. controls +(north:4em) and +(south:4
em) .. ([xshift=-3em,yshift=0em]s6.south);
\draw
[->, dotted, thick]
([xshift=
1.5em,yshift=0em]n4.north) .. controls +(north:1.4em) and +(south:3
em) .. ([xshift=-3em,yshift=0em]s6.south);
\draw
[->, dash dot dot, thick]
([xshift=2em,yshift=0em]s3.north) .. controls +(north:
1em) and +(south:3em) .. ([xshift=-2
em,yshift=0em]n1.south);
\draw
[->, dash dot dot, thick]
([xshift=2em,yshift=0em]s3.north) .. controls +(north:
2.5em) and +(south:3em) .. ([xshift=0
em,yshift=0em]n1.south);
\draw
[->, thick]
([xshift=2em,yshift=0em]s4.north) .. controls +(north:1em) and +(south:2em) .. ([xshift=2em,yshift=0em]n1.south);
\draw
[->, dashed, thick]
([xshift=0em,yshift=0em]s5.north) .. controls +(north:0.5em) and +(south:1em) .. ([xshift=-2em,yshift=0em]n2.south);
\draw
[->, dotted, thick]
([xshift=-2.8em,yshift=0em]s6.north) .. controls +(north:
0.5em) and +(south:3em) .. ([xshift=2
em,yshift=0em]n2.south);
\draw
[->, dotted, thick]
([xshift=-2.8em,yshift=0em]s6.north) .. controls +(north:
2.5em) and +(south:3em) .. ([xshift=0
em,yshift=0em]n2.south);
}
\draw
[->] ([xshift=0em,yshift=0em]n5.north) -- ([xshift=0em,yshift=0em]s1.south);
\draw
[->] ([xshift=0em,yshift=0em]s1.north) -- ([xshift=0em,yshift=0em]n3.south);
\draw
[->,dashed] ([xshift=0em,yshift=0em]n7.north) -- ([xshift=0
.05
em,yshift=0em]s2.south);
\draw
[->,dashed] ([xshift=0em,yshift=0em]s2.north) -- ([xshift=0
.45
em,yshift=0em]n4.south);
\draw
[->,dashed] ([xshift=0em,yshift=0em]n7.north) -- ([xshift=0em,yshift=0em]s2.south);
\draw
[->,dashed] ([xshift=0em,yshift=0em]s2.north) -- ([xshift=0em,yshift=0em]n4.south);
}
...
...
Book/Chapter4/Figures/phrase-structure-tree-and-dependency-tree.tex
查看文件 @
818b8c31
%------------------------------------------------------------------------------------------------------------
%%% 使用句法信息的一些思考
\begin{tikzpicture}
{
\
footnotesize
{
\
small
\begin{scope}
[xshift = -0.3in, sibling distance=3pt, level distance = 18pt]
\Tree
[.S
[.NP
...
...
@@ -15,9 +15,9 @@
]
]
]
\node
[anchor=north west] (cap1) at ([yshift=-2.0em,xshift=2.0em]w1.south west)
{
\
footnotesize
{
(a) 短语结构树
}}
;
\node
[anchor=north west] (cap1) at ([yshift=-2.0em,xshift=2.0em]w1.south west)
{
\
small
{
(a) 短语结构树
}}
;
\node
[anchor=west] (t1) at ([xshift=
3
em,]w4.east)
{
Messi
}
;
\node
[anchor=west] (t1) at ([xshift=
4
em,]w4.east)
{
Messi
}
;
\node
[anchor=west] (t2) at ([xshift=0.5em,]t1.east)
{
hit
}
;
\node
[anchor=west] (t3) at ([xshift=0.5em,]t2.east)
{
the
}
;
\node
[anchor=west] (t4) at ([xshift=0.5em,]t3.east)
{
ball
}
;
...
...
@@ -26,7 +26,7 @@
\draw
[->] ([xshift=0.2em]t4.north) .. controls +(north:2.5em) and +(north:2.5em) .. ([xshift=0.2em]t2.north);
\draw
[->] ([xshift=0.0em]t1.north) .. controls +(north:2.5em) and +(north:2.5em) .. ([xshift=-0.2em]t2.north);
\node
[anchor=north west] (cap2) at ([yshift=-0.2em,xshift=-0.5em]t2.south west)
{
\
footnotesize
{
(b) 依存树
}}
;
\node
[anchor=north west] (cap2) at ([yshift=-0.2em,xshift=-0.5em]t2.south west)
{
\
small
{
(b) 依存树
}}
;
\end{scope}
}
\end{tikzpicture}
Book/Chapter4/Figures/process-of-machine-translation-base-phrase.tex
查看文件 @
818b8c31
...
...
@@ -8,17 +8,17 @@
\tikzstyle
{
modelnode
}
= [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em];
\tikzstyle
{
decodingnode
}
= [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em];
\node
[datanode,anchor=north west
] (bitext) at (0,0)
{{
\scriptsize
{
训练用双语数据
}}}
;
\node
[modelnode,anchor=north
] (phrase) at ([yshift=-1.5em]bitext.south)
{{
\scriptsize
{
短语抽取及打分
}}}
;
\node
[modelnode,anchor=west
] (reorder) at ([xshift=1.5em]phrase.east)
{{
\scriptsize
{
调序建模
}}}
;
\node
[modelnode,anchor=west
] (lm) at ([xshift=1.5em]reorder.east)
{{
\scriptsize
{
语言建模
}}}
;
\node
[datanode,anchor=south
] (monotext) at ([yshift=1.5em]lm.north)
{{
\scriptsize
{
目标语单语数据
}}}
;
\node
[datanode,anchor=north west
,minimum height=1.7em,minimum width=8em] (bitext) at (0,0)
{{
\small
{
训练用双语数据
}}}
;
\node
[modelnode,anchor=north
,minimum height=1.7em,minimum width=8em] (phrase) at ([yshift=-1.5em]bitext.south)
{{
\small
{
短语抽取及打分
}}}
;
\node
[modelnode,anchor=west
,minimum height=1.7em,minimum width=8em] (reorder) at ([xshift=1.5em]phrase.east)
{{
\small
{
调序建模
}}}
;
\node
[modelnode,anchor=west
,minimum height=1.7em,minimum width=8em] (lm) at ([xshift=1.5em]reorder.east)
{{
\small
{
语言建模
}}}
;
\node
[datanode,anchor=south
,minimum height=1.7em,minimum width=8em] (monotext) at ([yshift=1.5em]lm.north)
{{
\small
{
目标语单语数据
}}}
;
\node
[datanode,anchor=north
] (phrasetable) at ([yshift=-1.5em]phrase.south)
{{
\scriptsize
{
短语表
}}}
;
\node
[datanode,anchor=north
] (reordertable) at ([yshift=-1.5em]reorder.south)
{{
\scriptsize
{
调序模型
}}}
;
\node
[datanode,anchor=north
] (lmtable) at ([yshift=-1.5em]lm.south)
{{
\scriptsize
{
语言模型
}}}
;
\node
[datanode,anchor=north
,minimum height=1.7em,minimum width=8em] (phrasetable) at ([yshift=-1.5em]phrase.south)
{{
\small
{
短语表
}}}
;
\node
[datanode,anchor=north
,minimum height=1.7em,minimum width=8em] (reordertable) at ([yshift=-1.5em]reorder.south)
{{
\small
{
调序模型
}}}
;
\node
[datanode,anchor=north
,minimum height=1.7em,minimum width=8em] (lmtable) at ([yshift=-1.5em]lm.south)
{{
\small
{
语言模型
}}}
;
\node
[decodingnode,anchor=north
] (decoding) at ([yshift=-2em]reordertable.south)
{{
\scriptsize
{
解码器
}}}
;
\node
[decodingnode,anchor=north
,minimum height=1.7em,minimum width=8em] (decoding) at ([yshift=-2em]reordertable.south)
{{
\small
{
解码器
}}}
;
\draw
[->,very thick] ([yshift=-0.1em]bitext.south) -- ([yshift=0.1em]phrase.north);
\draw
[->,very thick] (bitext.south east) -- ([yshift=0.1em]reorder.north west);
...
...
Book/Chapter4/Figures/processing-of-hierarchical-phrase-system.tex
查看文件 @
818b8c31
...
...
@@ -8,18 +8,18 @@
\tikzstyle
{
modelnode
}
= [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em];
\tikzstyle
{
decodingnode
}
= [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em];
\node
[datanode,anchor=north west
] (bitext) at (0,0)
{{
\scriptsize
{
训练用双语数据
}}}
;
\node
[modelnode, anchor=north west
] (gi) at ([xshift=2em,yshift=-0.2em]bitext.south east)
{{
\scriptsize
{
文法(规则)抽取
}}}
;
\node
[datanode,anchor=north east
] (birules) at ([xshift=-2em,yshift=-0.2em]gi.south west)
{{
\scriptsize
{
同步翻译文法
}}}
;
\node
[modelnode, anchor=north west
] (training) at ([xshift=2em,yshift=-0.2em]birules.south east)
{{
\scriptsize
{
特征值学习
}}}
;
\node
[datanode,anchor=north east
] (model) at ([xshift=-2em,yshift=-0.2em]training.south west)
{{
\scriptsize
{
翻译模型
}}}
;
\node
[decodingnode, anchor=north west
] (tuning) at ([xshift=2em,yshift=-0.2em]model.south east)
{{
\scriptsize
{
特征权重调优
}}}
;
\node
[datanode,anchor=north east
] (tuningdata) at ([xshift=-2em,yshift=-0.2em]tuning.south west)
{{
\scriptsize
{
调优用双语数据
}}}
;
\node
[decodingnode, anchor=north west
] (decoding) at ([xshift=2em,yshift=-0.2em]tuningdata.south east)
{{
\scriptsize
{
解码新句子
}}}
;
\node
[datanode,anchor=north west
,minimum height=1.7em,minimum width=8em] (bitext) at (0,0)
{{
\small
{
训练用双语数据
}}}
;
\node
[modelnode, anchor=north west
,minimum height=1.7em,minimum width=8em] (gi) at ([xshift=2em,yshift=-0.2em]bitext.south east)
{{
\small
{
文法(规则)抽取
}}}
;
\node
[datanode,anchor=north east
,minimum height=1.7em,minimum width=8em] (birules) at ([xshift=-2em,yshift=-0.2em]gi.south west)
{{
\small
{
同步翻译文法
}}}
;
\node
[modelnode, anchor=north west
,minimum height=1.7em,minimum width=8em] (training) at ([xshift=2em,yshift=-0.2em]birules.south east)
{{
\small
{
特征值学习
}}}
;
\node
[datanode,anchor=north east
,minimum height=1.7em,minimum width=8em] (model) at ([xshift=-2em,yshift=-0.2em]training.south west)
{{
\small
{
翻译模型
}}}
;
\node
[decodingnode, anchor=north west
,minimum height=1.7em,minimum width=8em] (tuning) at ([xshift=2em,yshift=-0.2em]model.south east)
{{
\small
{
特征权重调优
}}}
;
\node
[datanode,anchor=north east
,minimum height=1.7em,minimum width=8em] (tuningdata) at ([xshift=-2em,yshift=-0.2em]tuning.south west)
{{
\small
{
调优用双语数据
}}}
;
\node
[decodingnode, anchor=north west
,minimum height=1.7em,minimum width=8em] (decoding) at ([xshift=2em,yshift=-0.2em]tuningdata.south east)
{{
\small
{
解码新句子
}}}
;
\node
[datanode,anchor=south west
] (monotext) at ([xshift=2em,yshift=0.2em]training.north east)
{{
\scriptsize
{
目标语数据
}}}
;
\node
[modelnode,anchor=south west
] (lm) at ([xshift=2em,yshift=0.2em]tuning.north east)
{{
\scriptsize
{$
n
$
-gram语言建模
}}}
;
\node
[datanode,anchor=south west
] (lmmodel) at ([xshift=2em,yshift=0.2em]decoding.north east)
{{
\scriptsize
{
语言模型
}}}
;
\node
[datanode,anchor=south west
,minimum height=1.7em,minimum width=8em] (monotext) at ([xshift=2em,yshift=0.2em]training.north east)
{{
\small
{
目标语数据
}}}
;
\node
[modelnode,anchor=south west
,minimum height=1.7em,minimum width=8em] (lm) at ([xshift=2em,yshift=0.2em]tuning.north east)
{{
\small
{$
n
$
-gram语言建模
}}}
;
\node
[datanode,anchor=south west
,minimum height=1.7em,minimum width=8em] (lmmodel) at ([xshift=2em,yshift=0.2em]decoding.north east)
{{
\small
{
语言模型
}}}
;
\draw
[->,very thick] ([yshift=-0.3em,xshift=0.1em]bitext.east) -- ([yshift=0.1em]gi.north west);
\draw
[->,very thick] ([yshift=-0.1em]gi.south west) -- ([yshift=0.3em,xshift=0.1em]birules.east);
...
...
Book/Chapter4/Figures/reorder-base-distance.tex
查看文件 @
818b8c31
...
...
@@ -6,26 +6,26 @@
\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)
{
\s
criptsize
{
在 桌子 上 的
}}
;
\node
[anchor=south]
(n1) at ([xshift=-
2.5em,yshift=-0.5em]s1.north)
{
\scriptsize
{
1
}}
;
\node
[anchor=south]
(n2) at ([xshift=-0.8em,yshift=-0.5em]s1.north)
{
\s
criptsize
{
2
}}
;
\node
[anchor=south]
(n3) at ([xshift=1.1em,yshift=-0.5em]s1.north)
{
\s
criptsize
{
3
}}
;
\node
[anchor=south]
(n4) at ([xshift=
2.5em,yshift=-0.5em]s1.north)
{
\scriptsize
{
4
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\s
criptsize
{
苹果
}}
;
\node
[anchor=south]
(n5) at ([yshift=-0.5em]s2.north)
{
\s
criptsize
{
5
}}
;
\node
[anchor=west,fill=green!20]
(s1) at (0, 0)
{
\s
mall
{
在 桌子 上 的
}}
;
\node
[anchor=south]
(n1) at ([xshift=-
3em,yshift=-0.5em]s1.north)
{
\small
{
1
}}
;
\node
[anchor=south]
(n2) at ([xshift=-0.8em,yshift=-0.5em]s1.north)
{
\s
mall
{
2
}}
;
\node
[anchor=south]
(n3) at ([xshift=1.1em,yshift=-0.5em]s1.north)
{
\s
mall
{
3
}}
;
\node
[anchor=south]
(n4) at ([xshift=
3em,yshift=-0.5em]s1.north)
{
\small
{
4
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\s
mall
{
苹果
}}
;
\node
[anchor=south]
(n5) at ([yshift=-0.5em]s2.north)
{
\s
mall
{
5
}}
;
\node
[anchor=east]
(t0) at (-0.5em, -1.5)
{$
\textbf
{
t
}$
:
}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\s
criptsize
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\s
criptsize
{
on the table
}}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\s
mall
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\s
mall
{
on the table
}}
;
\path
[<->, thick]
(s1.south) edge (t2.north);
\path
[<->, thick]
(s2.south) edge (t1.north);
\node
[anchor=west]
(target) at ([xshift=3.5em,yshift=2.3em]n5.east)
{
\s
criptsize
{
目标短语
}}
;
\node
[anchor=west]
(source) at ([xshift=0.5em]target.east)
{
\s
criptsize
{
源短语
}}
;
\node
[anchor=west]
(distance) at ([xshift=0.9em]source.east)
{
\s
criptsize
{
距离
}}
;
\node
[anchor=west]
(target) at ([xshift=3.5em,yshift=2.3em]n5.east)
{
\s
mall
{
目标短语
}}
;
\node
[anchor=west]
(source) at ([xshift=0.5em]target.east)
{
\s
mall
{
源短语
}}
;
\node
[anchor=west]
(distance) at ([xshift=0.9em]source.east)
{
\s
mall
{
距离
}}
;
\node
[anchor=north]
(t1) at ([xshift=
-
0em,yshift=-0.1em]target.south)
{
1
}
;
\node
[anchor=north]
(t1) at ([xshift=0em,yshift=-0.1em]target.south)
{
1
}
;
\node
[anchor=north]
(t2) at ([yshift=-1.8em]t1.south)
{
2
}
;
\node
[anchor=north]
(so1) at ([yshift=-0.1em]source.south)
{
5
}
;
...
...
@@ -34,10 +34,10 @@
\node
[anchor=north]
(d1) at ([xshift=-0.1em,yshift=-0.1em]distance.south)
{
+4
}
;
\node
[anchor=north]
(d2) at ([yshift=-1.8em]d1.south)
{
-5
}
;
\node
[anchor=north west,fill=blue!20]
(m1) at ([xshift=-
0.5em,yshift=-0.0em]t1.south west)
{
\scriptsize
{$
\textrm
{
start
}_
1
\
-
\ \textrm
{
end
}_{
0
}
\
-
\
1
$
\
=
\
5
\
-
\
0
\
-
\
1
}}
;
\node
[anchor=north west,fill=blue!20]
(m2) at ([xshift=-
0.5em,yshift=-0.0em]t2.south west)
{
\scriptsize
{$
\textrm
{
start
}_
2
\
-
\ \textrm
{
end
}_{
1
}
\
-
\
1
$
\
=
\
1
\
-
\
5
\
-
\
1
}}
;
\node
[anchor=north west,fill=blue!20]
(m1) at ([xshift=-
1em,yshift=-0.0em]t1.south west)
{
\small
{$
\textrm
{
start
}_
1
\
-
\ \textrm
{
end
}_{
0
}
\
-
\
1
$
\
=
\
5
\
-
\
0
\
-
\
1
}}
;
\node
[anchor=north west,fill=blue!20]
(m2) at ([xshift=-
1em,yshift=-0.0em]t2.south west)
{
\small
{$
\textrm
{
start
}_
2
\
-
\ \textrm
{
end
}_{
1
}
\
-
\
1
$
\
=
\
1
\
-
\
5
\
-
\
1
}}
;
\draw
[-]
([xshift=0.02in]target.south west)--([xshift=
1.6
in]target.south west);
\draw
[-]
([xshift=0.02in]target.south west)--([xshift=
2
in]target.south west);
\draw
[-,thick]
(s1.north west)--([yshift=0.3in]s1.north west);
\draw
[->,densely dotted,thick]
([yshift=0.3in]s1.north west)--([xshift=0.3in,yshift=0.3in]s1.north west);
...
...
@@ -45,8 +45,8 @@
\draw
[-,thick]
(s2.north west)--([yshift=0.3in]s2.north west);
\draw
[->,densely dotted,thick]
([yshift=0.3in]s2.north west)--([xshift=-0.3in,yshift=0.3in]s2.north west);
\node
[anchor=south]
(ld1) at ([xshift=-0.
1em,yshift=0.4em]n1.north)
{
\scriptsize
{$
dr
$
=-5
}}
;
\node
[anchor=south]
(ld2) at ([xshift=6
em,yshift=0.4em]n1.north)
{
\scriptsize
{$
dr
$
=+4
}}
;
\node
[anchor=south]
(ld1) at ([xshift=-0.
5em,yshift=0.4em]n1.north)
{
\small
{$
dr
$
=-5
}}
;
\node
[anchor=south]
(ld2) at ([xshift=6
.5em,yshift=0.4em]n1.north)
{
\small
{$
dr
$
=+4
}}
;
\end{scope}
\end{tikzpicture}
...
...
Book/Chapter4/Figures/reorder-base-phrase-translation.tex
查看文件 @
818b8c31
...
...
@@ -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)
{
\s
criptsize
{
在 桌子 上 的
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\s
criptsize
{
苹果
}}
;
\node
[anchor=west,fill=green!20]
(s1) at (0, 0)
{
\s
mall
{
在 桌子 上 的
}}
;
\node
[anchor=west,fill=red!20]
(s2) at ([xshift=1em]s1.east)
{
\s
mall
{
苹果
}}
;
\node
[anchor=east]
(t0) at (-0.5em, -1.5)
{$
\textbf
{
t
}$
:
}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\s
criptsize
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\s
criptsize
{
on the table
}}
;
\node
[anchor=west,fill=red!20]
(t1) at (0, -1.5)
{
\s
mall
{
the apple
}}
;
\node
[anchor=west,fill=green!20]
(t2) at ([xshift=1em]t1.east)
{
\s
mall
{
on the table
}}
;
\path
[<->, thick]
(s1.south) edge (t2.north);
\path
[<->, thick]
(s2.south) edge (t1.north);
...
...
Book/Chapter4/Figures/role-of-syntax-tree-in-different-decoding-methods.tex
查看文件 @
818b8c31
...
...
@@ -5,7 +5,7 @@
\begin{scope}
[scale=0.9,level distance=30pt,sibling distance=7pt]
{
\s
criptsize
{
\s
mall
\Tree
[.
\node
(bsn0)
{
IP
}
;
[.
\node
(bsn1)
{
NP
}
;
[.
\node
(bsn2)
{
NN
}
;
\node
(bsw1)
{
猫
}
; ]
...
...
@@ -28,11 +28,11 @@
\begin{pgfonlayer}
{
background
}
{
\path
[draw,dashed,rectangle,inner sep=1em,thick,blue,
fill=blue!30,rounded corners=5pt] ([xshift=-3.5em,yshift=1em]bsn0.north west) -- ([xshift=5.5em,yshift=1em]bsn0.north east) -- ([xshift=5.5em,yshift=-13.5em]bsn0.north east) -- ([xshift=-3.5em,yshift=-13.5em]bsn0.north west) -- ([xshift=-3.5em,yshift=1
em]bsn0.north west);
\path
[draw,dashed,rectangle,inner sep=1em,thick,blue,
rounded corners=5pt] ([xshift=-3em,yshift=0.5em]bsn0.north west) -- ([xshift=5.3em,yshift=0.5em]bsn0.north east) -- ([xshift=5.3em,yshift=-10.5em]bsn0.north east) -- ([xshift=-3em,yshift=-10.5em]bsn0.north west) -- ([xshift=-3em,yshift=0.5
em]bsn0.north west);
}
\end{pgfonlayer}
\begin{scope}
[xshift=
2.55in,yshift=-1em,sibling distance=7
pt]
\begin{scope}
[xshift=
3.18in,yshift=-0em,sibling distance=10
pt]
\Tree
[.
\node
(bsn0)
{
IP
}
;
[.
\node
(bsn1)
{
NP
}
;
[.
\node
(bsn2)
{
NN
}
; ]
...
...
@@ -44,7 +44,7 @@
]
\begin{pgfonlayer}
{
background
}
\node
[draw,dashed,rectangle,inner sep=1em,thick,red,
fill=red!30,
rounded corners=5pt] (box) [fit = (bsn0) (bsn1) (bsn2) (bsn3) (bsn4) (bsn5)]
{}
;
\node
[draw,dashed,rectangle,inner sep=1em,thick,red,rounded corners=5pt] (box) [fit = (bsn0) (bsn1) (bsn2) (bsn3) (bsn4) (bsn5)]
{}
;
\node
[anchor=north west] (boxlabel) at ([xshift=2em,yshift=-1em]box.north east)
{
隐含结构
}
;
\end{pgfonlayer}
...
...
Book/Chapter4/Figures/rule-matching-base-tree.tex
查看文件 @
818b8c31
...
...
@@ -4,7 +4,7 @@
\begin{tikzpicture}
\begin{scope}
[scale=0.97]
{
\s
criptsize
{
\s
mall
\begin{scope}
[sibling distance=2pt,level distance=20pt,grow'=up]
\Tree
[.
\node
(treeroot)
{
IP
}
;
...
...
@@ -34,7 +34,7 @@
\end{pgfonlayer}
{
\node
[anchor=south west] at (rulemark.north west)
{
\
tiny
{{
树到串翻译规则
}}}
;
\node
[anchor=south west] at (rulemark.north west)
{
\
small
{{
树到串翻译规则
}}}
;
}
}
...
...
@@ -44,24 +44,24 @@
\node
[anchor=center, minimum size=10pt,draw]
(cell1and1) at (0,0)
{}
;
\node
[anchor=west, minimum size=10pt,draw]
(cell2and1) at ([xshift=-0.04em]cell1and1.east)
{}
;
\node
[anchor=west, minimum size=10pt,draw]
(cell3and1) at ([xshift=-0.04em]cell2and1.east)
{}
;
\node
[anchor=west, minimum size=10pt]
(cell4and1) at ([xshift=0]cell3and1.east)
{
\
tiny
{$
\dots
$}}
;
\node
[anchor=west, minimum size=10pt]
(cell4and1) at ([xshift=0]cell3and1.east)
{
\
scriptsize
{$
\dots
$}}
;
\node
[anchor=west, minimum size=10pt,draw]
(cellnand1) at ([xshift=0]cell4and1.east)
{}
;
\node
[anchor=south, minimum size=10pt,draw]
(cell1and2) at ([yshift=-0.04em]cell1and1.north)
{}
;
\node
[anchor=west, minimum size=10pt,draw]
(cell2and2) at ([xshift=-0.04em]cell1and2.east)
{}
;
\node
[anchor=south, minimum size=10pt,draw]
(cell1and3) at ([yshift=-0.04em]cell1and2.north)
{}
;
\node
[anchor=south, minimum size=10pt]
(cell1and4) at ([yshift=0]cell1and3.north)
{
\
tiny
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt]
(cell1and4) at ([yshift=0]cell1and3.north)
{
\
scriptsize
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt]
(cell2and3) at ([yshift=0pt]cell2and2.north)
{
\
tiny
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt]
(cell3and2) at ([yshift=1pt]cell3and1.north)
{
\
tiny
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt]
(cell2and3) at ([yshift=0pt]cell2and2.north)
{
\
scriptsize
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt]
(cell3and2) at ([yshift=1pt]cell3and1.north)
{
\
scriptsize
{$
\vdots
$}}
;
\node
[anchor=south, minimum size=10pt,draw]
(cell4andn) at ([yshift=11pt,xshift=10pt]cell3and1.north)
{}
;
\node
[anchor=south, minimum size=10pt,draw]
(cell1andn) at ([yshift=-3pt]cell1and4.north)
{}
;
\node
[anchor=south, minimum size=10pt,draw]
(cell2andn) at ([xshift=0pt,yshift=-3pt]cell2and3.north)
{}
;
%\node[anchor=center, minimum size=10pt,draw] (cell3andn) at ([xshift=10pt,yshift=-10pt]cell2andn.center) {};
\node
[anchor=west]
(chartlabel) at ([xshift=-0em,yshift=-0.8em]cell1and1.south east)
{
\s
criptsize
{
Chart
}}
;
\node
[anchor=west]
(chartlabel) at ([xshift=-0em,yshift=-0.8em]cell1and1.south east)
{
\s
mall
{
Chart
}}
;
}
\end{scope}
...
...
@@ -77,7 +77,7 @@
\end{pgfonlayer}
{
\path
[draw,thick,ublue,<->] ([xshift=-2em]rulepart1.south east) .. controls +(south:1.7) and +(north:1.3) .. ([xshift=0em,yshift=0.10em]cw1.north) node[pos=0.5, below,xshift=0.3in]
{
\s
criptsize
{
树片段的匹配
}}
;
\path
[draw,thick,ublue,<->] ([xshift=-2em]rulepart1.south east) .. controls +(south:1.7) and +(north:1.3) .. ([xshift=0em,yshift=0.10em]cw1.north) node[pos=0.5, below,xshift=0.3in]
{
\s
mall
{
树片段的匹配
}}
;
}
\end{scope}
...
...
Book/Chapter4/Figures/syntax-tree-in-ctb.tex
查看文件 @
818b8c31
...
...
@@ -3,8 +3,8 @@
\begin{center}
\begin{tikzpicture}
{
\s
criptsize
\begin{scope}
[scale = 0.9, sibling distance=2
0
pt, level distance=30pt]
{
\s
mall
\begin{scope}
[scale = 0.9, sibling distance=2
5
pt, level distance=30pt]
{
\footnotesize
\Tree
[.IP
...
...
Book/Chapter4/Figures/syntax-tree-with-admissible-node.tex
查看文件 @
818b8c31
...
...
@@ -3,7 +3,7 @@
\begin{center}
\begin{tikzpicture}
{
\
footnotesize
{
\
small
\begin{scope}
[sibling distance=25pt, level distance=20pt]
\Tree
[.
\node
(n1)
{
IP
}
;
...
...
@@ -22,12 +22,12 @@
]
]
\node
[anchor=north,minimum size=18pt,align=center]
(tw1) at ([yshift=-6.0em]cw1.south)
{
he
\\\
script
size
{
1
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw2) at ([yshift=-0.1em,xshift=1.1em]tw1.east)
{
was
\\\
script
size
{
2
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw3) at ([yshift=0.1em,xshift=1.1em]tw2.east)
{
satisfied
\\\
script
size
{
3
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw4) at ([xshift=1.1em]tw3.east)
{
with
\\\
script
size
{
4
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw5) at ([xshift=1.1em]tw4.east)
{
the
\\\
script
size
{
5
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east)
{
answer
\\\
script
size
{
6
}}
;
\node
[anchor=north,minimum size=18pt,align=center]
(tw1) at ([yshift=-6.0em]cw1.south)
{
he
\\\
footnote
size
{
1
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw2) at ([yshift=-0.1em,xshift=1.1em]tw1.east)
{
was
\\\
footnote
size
{
2
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw3) at ([yshift=0.1em,xshift=1.1em]tw2.east)
{
satisfied
\\\
footnote
size
{
3
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw4) at ([xshift=1.1em]tw3.east)
{
with
\\\
footnote
size
{
4
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw5) at ([xshift=1.1em]tw4.east)
{
the
\\\
footnote
size
{
5
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east)
{
answer
\\\
footnote
size
{
6
}}
;
\draw
[dashed]
(cw1.south) -- ([yshift=-0.4em]tw1.north);
\draw
[dashed]
(cw2.south) .. controls +(south:1.6) and +(north:0.6) .. ([yshift=-0.4em]tw4.north);
...
...
@@ -36,8 +36,8 @@
\draw
[dashed]
(cw4.south) .. controls +(south:2.0) and +(north:0.6) .. ([yshift=-0.4em]tw3.north);
\draw
[dashed]
(cw5.south) .. controls +(south:2.0) and +(north:0.6) .. ([yshift=-0.4em]tw3.north);
\node
[anchor=south west,align=left,fill=red!20,drop shadow] (label1) at ([xshift=0.5em]n11.north east)
{
\
scriptsize
{
span=
\{
3
\}
}
\\\script
size
{
c-span=
\{
1,3-6
\}
}}
;
\node
[anchor=south west,align=left,fill=blue!20,drop shadow] (label2) at ([xshift=0.5em,yshift=-0.5em]n4.north east)
{
\
scriptsize
{
span=
\{
3-6
\}
}
\\\script
size
{
c-span=
\{
1
\}
}}
;
\node
[anchor=south west,align=left,fill=red!20,drop shadow] (label1) at ([xshift=0.5em]n11.north east)
{
\
footnotesize
{
span=
\{
3
\}
}
\\\footnote
size
{
c-span=
\{
1,3-6
\}
}}
;
\node
[anchor=south west,align=left,fill=blue!20,drop shadow] (label2) at ([xshift=0.5em,yshift=-0.5em]n4.north east)
{
\
footnotesize
{
span=
\{
3-6
\}
}
\\\footnote
size
{
c-span=
\{
1
\}
}}
;
\begin{pgfonlayer}
{
background
}
\node
[rectangle,fill=red!20,inner sep=0] [fit = (n11)] (n11box)
{}
;
...
...
@@ -57,15 +57,15 @@
\end{pgfonlayer}
{
\node
[anchor=north] (n11boxlabel) at (label1.south)
{
\
tiny
{{
\red
{
不可信
}}}}
;
\node
[anchor=north] (n4boxlabel) at (label2.south)
{
\
tiny
{{
\red
{
可信
}}}}
;
\node
[anchor=north] (n11boxlabel) at (label1.south)
{
\
footnotesize
{{
\red
{
不可信
}}}}
;
\node
[anchor=north] (n4boxlabel) at (label2.south)
{
\
footnotesize
{{
\red
{
可信
}}}}
;
}
{
\node
[anchor=north west, minimum size=1.2em, fill=blue!20] (land1) at ([xshift=1.5em,yshift=-1em]cw5.south east)
{}
;
\node
[anchor=west] (land1label) at (land1.east)
{
\
script
size
{
可信
}}
;
\node
[anchor=west] (land1label) at (land1.east)
{
\
footnote
size
{
可信
}}
;
\node
[anchor=north west, minimum size=1.2em, fill=red!20] (land2) at ([yshift=-0.3em]land1.south west)
{}
;
\node
[anchor=west] (land2label) at (land2.east)
{
\
script
size
{
不可信
}}
;
\node
[anchor=west] (land2label) at (land2.east)
{
\
footnote
size
{
不可信
}}
;
}
\end{scope}
...
...
Book/Chapter4/Figures/translation-hypothesis-extension.tex
查看文件 @
818b8c31
...
...
@@ -4,21 +4,21 @@
\begin{tikzpicture}
\begin{scope}
{
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h0) at (0,0)
{
\scriptsize
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt0) at (h0.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=1
}}}}
;
\node
[anchor=north,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h0) at (0,0)
{
\small
{
null
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl0) at (h0.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
0
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt0) at (h0.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=1
}}}}
;
}
{
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h1) at ([xshift=2.5em]h0.east)
{
\scriptsize
{
on
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h2) at ([xshift=2.5em,yshift=2.5em]h0.east)
{
\scriptsize
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h3) at ([xshift=2.5em,yshift=-2.5em]h0.east)
{
\scriptsize
{
there is
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl1) at (h1.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl2) at (h2.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl3) at (h3.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt1) at (h1.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt2) at (h2.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt3) at (h3.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h1) at ([xshift=3em]h0.east)
{
\small
{
on
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h2) at ([xshift=3em,yshift=3em]h0.east)
{
\small
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h3) at ([xshift=3em,yshift=-3em]h0.east)
{
\small
{
there is
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl1) at (h1.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl2) at (h2.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl3) at (h3.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt1) at (h1.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt2) at (h2.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt3) at (h3.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.5
}}}}
;
\draw
[->,very thick,ublue] ([xshift=0.1em]pt0.south) -- ([xshift=-0.1em]h1.west);
\draw
[->,very thick,ublue] ([xshift=0.1em]pt0.south) -- ([xshift=-0.1em]h2.west);
...
...
@@ -26,23 +26,23 @@
}
{
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h4) at ([xshift=2.5em,yshift=-1.8em]h3.east)
{
\scriptsize
{
one
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h5) at ([xshift=2.5em,yshift=0.7em]h3.east)
{
\scriptsize
{
an apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.2em] (h6) at ([xshift=2.5em,yshift=0.7em]h1.east)
{
\scriptsize
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.5em] (h7) at ([xshift=2.5em,yshift=0.7em]h5.east)
{
\scriptsize
{
on the table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
1.7em,minimum width=3.73em] (h8) at ([xshift=2.5em,yshift=-2em]h5.east)
{
\scriptsize
{
\ \;
apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h4) at ([xshift=3em,yshift=-1.8em]h3.east)
{
\small
{
one
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h5) at ([xshift=3em,yshift=1.2em]h3.east)
{
\small
{
an apple
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=3.5em] (h6) at ([xshift=3em,yshift=1.2em]h1.east)
{
\small
{
table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=4em] (h7) at ([xshift=3em,yshift=1.2em]h5.east)
{
\small
{
on the table
}}
;
\node
[anchor=west,inner sep=2pt,fill=red!20,minimum height=
2em,minimum width=4.6em] (h8) at ([xshift=3em,yshift=-2em]h5.east)
{
\small
{
\ \;
apple
}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl4) at (h4.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl5) at (h5.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl6) at (h6.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl7) at (h7.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
1-2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl8) at (h8.north west)
{
\
tiny
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl4) at (h4.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl5) at (h5.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
4-5
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl6) at (h6.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl7) at (h7.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
1-2
}}}}
;
\node
[anchor=north west,inner sep=1.5pt,fill=black] (hl8) at (h8.north west)
{
\
scriptsize
{{
\color
{
white
}
\textbf
{
5
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt4) at (h4.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.1
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt5) at (h5.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.4
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt6) at (h6.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt7) at (h7.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.4
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
1.7em,fill=black] (pt8) at (h8.east)
{
\tiny
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt4) at (h4.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.1
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt5) at (h5.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.4
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt6) at (h6.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.3
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt7) at (h7.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.4
}}}}
;
\node
[anchor=north,rotate=90,inner sep=1pt,minimum width=
2em,fill=black] (pt8) at (h8.east)
{
\footnotesize
{{
\color
{
white
}
\textbf
{
P=.2
}}}}
;
\draw
[->,very thick,ublue] ([xshift=0.1em]pt1.south) -- ([xshift=1em,yshift=0.7em]pt1.south);
...
...
@@ -65,7 +65,7 @@
{
\draw
[->,ultra thick,red,line width=2pt,opacity=0.7] ([xshift=-0.2em]h0.west) -- ([xshift=0.7em]h0.east) -- ([xshift=-0.2em]h3.west) -- ([xshift=0.8em]h3.east) -- ([xshift=-0.2em]h5.west) -- ([xshift=0.8em]h5.east) -- ([xshift=-0.2em]h7.west) -- ([xshift=0.8em]h7.east);
\node
[anchor=north west] (wtranslabel) at ([yshift=-3em]h0.south west)
{
\s
criptsize
{
翻译路径:
}}
;
\node
[anchor=north west] (wtranslabel) at ([yshift=-3em]h0.south west)
{
\s
mall
{
翻译路径:
}}
;
\draw
[->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
}
\end{scope}
...
...
Book/Chapter4/Figures/translation-rule-based-on-admissible-node.tex
查看文件 @
818b8c31
...
...
@@ -3,7 +3,7 @@
\begin{center}
\begin{tikzpicture}
{
\
footnotesize
{
\
small
\begin{scope}
[sibling distance=25pt, level distance=20pt]
\Tree
[.
\node
(n1)
{
IP
}
;
...
...
@@ -22,12 +22,14 @@
]
]
\node
[anchor=north,minimum size=18pt,align=center]
(tw1) at ([yshift=-6.0em]cw1.south)
{
he
\\\scriptsize
{
1
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw2) at ([yshift=-0.1em,xshift=1.1em]tw1.east)
{
was
\\\scriptsize
{
2
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw3) at ([yshift=0.1em,xshift=1.1em]tw2.east)
{
satisfied
\\\scriptsize
{
3
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw4) at ([xshift=1.1em]tw3.east)
{
with
\\\scriptsize
{
4
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw5) at ([xshift=1.1em]tw4.east)
{
the
\\\scriptsize
{
5
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east)
{
answer
\\\scriptsize
{
6
}}
;
\node
[anchor=north,minimum size=18pt,align=center]
(tw1) at ([yshift=-6.0em]cw1.south)
{
he
\\\footnotesize
{
1
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw2) at ([yshift=-0.1em,xshift=1.1em]tw1.east)
{
was
\\\footnotesize
{
2
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw3) at ([yshift=0.1em,xshift=1.1em]tw2.east)
{
satisfied
\\\footnotesize
{
3
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw4) at ([xshift=1.1em]tw3.east)
{
with
\\\footnotesize
{
4
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw5) at ([xshift=1.1em]tw4.east)
{
the
\\\footnotesize
{
5
}}
;
\node
[anchor=west,minimum size=18pt,align=center]
(tw6) at ([yshift=-0.1em,xshift=1.1em]tw5.east)
{
answer
\\\footnotesize
{
6
}}
;
\node
[anchor=north,minimum size=18pt,align=center]
(empty) at ([xshift=-2.0em]cw1.south)
{}
;
\draw
[dashed]
(cw1.south) -- ([yshift=-0.4em]tw1.north);
\draw
[dashed]
(cw2.south) .. controls +(south:1.6) and +(north:0.6) .. ([yshift=-0.4em]tw4.north);
...
...
@@ -59,15 +61,15 @@
\end{pgfonlayer}
\node
[anchor=north west, minimum size=1.2em, fill=green!20] (land1) at ([xshift=1.5em,yshift=-1em]cw5.south east)
{}
;
\node
[anchor=west] (land1label) at (land1.east)
{
\
script
size
{
可信
}}
;
\node
[anchor=west] (land1label) at (land1.east)
{
\
footnote
size
{
可信
}}
;
\node
[anchor=north west, minimum size=1.2em, fill=orange!20] (land2) at ([yshift=-0.3em]land1.south west)
{}
;
\node
[anchor=west] (land2label) at (land2.east)
{
\
script
size
{
不可信
}}
;
\node
[anchor=west] (land2label) at (land2.east)
{
\
footnote
size
{
不可信
}}
;
{
\node
[draw,thick,red,fill=red!20] [fit = (n9)] (var1)
{{
\color
{
black
}
VP
}}
;
\node
[draw,thick,red,fill=red!20] [fit = (tw3)] (var1v2)
{{
\color
{
black
}
\large
{
VP
}}}
;
\node
[anchor=west] (var1label) at ([yshift=0.5em]var1.east)
{
\
tiny
{
\red
{
变量
}}}
;
\node
[anchor=south] (var1v2label) at ([xshift=-2em]var1v2.north)
{
\
tiny
{
\red
{
变量
}}}
;
\node
[anchor=west] (var1label) at ([yshift=0.5em]var1.east)
{
\
footnotesize
{
\red
{
变量
}}}
;
\node
[anchor=south] (var1v2label) at ([xshift=-2em]var1v2.north)
{
\
footnotesize
{
\red
{
变量
}}}
;
}
\end{scope}
...
...
Book/Chapter4/Figures/tree-segment-corresponding-to-phrase.tex
查看文件 @
818b8c31
...
...
@@ -2,7 +2,7 @@
%%% SPMT规则
\begin{tikzpicture}
{
\s
criptsize
{
\s
mall
\begin{scope}
{
...
...
@@ -26,14 +26,14 @@
([xshift=1.4em]cfrag3.south east)
{
\Tree
[.\node(sn5){VP}; [.\node(sn6){VV}; 表示 ]
[.
\node
(sn7)
{
NN
}
; 担心 ]]
}
;
\end{scope}
\begin{scope}
[sibling distance=
32
pt,level distance=20pt]
\begin{scope}
[sibling distance=
40
pt,level distance=20pt]
\node
[scale=0.8, inner sep=0.1cm,align=center,anchor=south west,draw]
(cfrag6) at
([xshift=0
.3
em,yshift=4em]cfrag2.north west)
{
\Tree
[.\node(sn11){VP}; [.\node(sn9){P}; ]
[.
\node
(sn10)
{
NP
}
; ] [.
\node
(sn13)
{
VP
}
; ]]
}
;
([xshift=0em,yshift=4em]cfrag2.north west)
{
\Tree
[.\node(sn11){VP}; [.\node(sn9){P}; ]
[.
\node
(sn10)
{
NP
}
; ] [.
\node
(sn13)
{
VP
}
; ]]
}
;
\end{scope}
\begin{scope}
[sibling distance=
6
5pt,level distance=18pt]
\begin{scope}
[sibling distance=
7
5pt,level distance=18pt]
\node
[scale=0.8, inner sep=0.1cm,align=center,anchor=south east,draw]
(cfrag7) at
([xshift=-4.
5
em,yshift=0.5em]cfrag6.north east)
{
\Tree
[.\node(sn14){IP}; [.\node(sn15){NP}; ]
[.
\node
(sn16)
{
VP
}
; ]]
}
;
([xshift=-4.
6
em,yshift=0.5em]cfrag6.north east)
{
\Tree
[.\node(sn14){IP}; [.\node(sn15){NP}; ]
[.
\node
(sn16)
{
VP
}
; ]]
}
;
\end{scope}
\node
[scale=0.9,anchor=north,minimum size=18pt]
(tw11) at ([xshift=-0.3em,yshift=-1.2em]cfrag1.south)
{
he
}
;
...
...
@@ -55,16 +55,16 @@
\draw
[dashed,red]
(cfrag3.south) -- ([yshift=-0.4em]tw16.north);
}
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag1.north) -- ([xshift=0.0em,yshift=6.
5
em]cfrag1.north);
\draw
[*-*]
([xshift=-0.1em,yshift=-0.2em]cfrag2.north) -- ([xshift=-0.1em,yshift=4.
4
em]cfrag2.north);
\draw
[*-*]
([xshift=0.1em,yshift=-0.
4em]cfrag3.north) .. controls +(north:2.4em) and +(south:2.4em) .. ([xshift=1.1em,yshift=2.5
em]cfrag3.north);
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag4.north) -- ([xshift=0.0em,yshift=2.
5
em]cfrag4.north);
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag6.north) -- ([xshift=0
.0em,yshift=0.9
em]cfrag6.north);
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag1.north) -- ([xshift=0.0em,yshift=6.
3
em]cfrag1.north);
\draw
[*-*]
([xshift=-0.1em,yshift=-0.2em]cfrag2.north) -- ([xshift=-0.1em,yshift=4.
2
em]cfrag2.north);
\draw
[*-*]
([xshift=0.1em,yshift=-0.
2em]cfrag3.north) .. controls +(north:2.4em) and +(south:2.4em) .. ([xshift=1.1em,yshift=2.6
em]cfrag3.north);
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag4.north) -- ([xshift=0.0em,yshift=2.
6
em]cfrag4.north);
\draw
[*-*]
([xshift=0.0em,yshift=-0.2em]cfrag6.north) -- ([xshift=0
em,yshift=0.8
em]cfrag6.north);
{
\node
[fill=blue,circle,inner sep=2pt] (rlabel2) at (cfrag2.north east)
{{
\color
{
white
}
\
tiny
{
2
}}}
;
\node
[fill=blue,circle,inner sep=2pt] (rlabel3) at (cfrag3.north east)
{{
\color
{
white
}
\
tiny
{
3
}}}
;
\node
[fill=blue,circle,inner sep=2pt] (rlabel6) at (cfrag6.north east)
{{
\color
{
white
}
\
tiny
{
5
}}}
;
\node
[fill=blue,circle,inner sep=2pt] (rlabel2) at (cfrag2.north east)
{{
\color
{
white
}
\
footnotesize
{
2
}}}
;
\node
[fill=blue,circle,inner sep=2pt] (rlabel3) at (cfrag3.north east)
{{
\color
{
white
}
\
footnotesize
{
3
}}}
;
\node
[fill=blue,circle,inner sep=2pt] (rlabel6) at (cfrag6.north east)
{{
\color
{
white
}
\
footnotesize
{
5
}}}
;
}
\begin{pgfonlayer}
{
background
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论