Commit 11979fdb by zengxin

合并分支 'caorunzhe' 到 'zengxin'

Caorunzhe

查看合并请求 !901
parents a4ef3cd3 b6151b33
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}
\tikzstyle{datanode} = [minimum width=5em,minimum height=1.7em,fill=red!20,rounded corners=0.3em]; \tikzstyle{datanode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=red!20,rounded corners=0.3em];
\tikzstyle{modelnode} = [minimum width=5em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em]; \tikzstyle{modelnode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=blue!20,rounded corners=0.3em];
\tikzstyle{decodingnode} = [minimum width=5em,minimum height=1.7em,fill=green!20,rounded corners=0.3em]; \tikzstyle{decodingnode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=green!20,rounded corners=0.3em];
\node [datanode,anchor=north west] (s1) at (0,0) {{ \small{语言1}}}; \node [datanode,anchor=north west] (s1) at (0,0) {{ \small{语言1}}};
\node [datanode,anchor=north] (s2) at ([yshift=-4.5em]s1.south) {{ \small{语言3}}}; \node [datanode,anchor=north] (s2) at ([yshift=-4.5em]s1.south) {{ \small{语言3}}};
\node [datanode,anchor=west] (s3) at ([xshift=4.5em]s1.east) {{ \small{语言2}}}; \node [datanode,anchor=west] (s3) at ([xshift=4.5em]s1.east) {{ \small{语言2}}};
\node [datanode,anchor=north] (s4) at ([yshift=-4.5em]s3.south) {{ \small{语言4}}}; \node [datanode,anchor=north] (s4) at ([yshift=-4.5em]s3.south) {{ \small{语言4}}};
\node [circle,anchor=north west,inner sep=2pt,fill=blue!20] (m1) at ([xshift=0.8em,yshift=-0.5em]s1.south east) {{ \small{中间语言}}}; \node [circle,draw,thick,anchor=north west,inner sep=2pt,fill=blue!30] (m1) at ([xshift=0.8em,yshift=-0.5em]s1.south east) {{ \small{中间语言}}};
\draw [<->,very thick] (s1.south) -- (m1.170); \draw [<->,very thick] (s1.south) -- (m1.170);
\draw [<->,very thick] (s2.north) -- (m1.190); \draw [<->,very thick] (s2.north) -- (m1.190);
...@@ -24,11 +24,11 @@ ...@@ -24,11 +24,11 @@
\end{scope} \end{scope}
\begin{scope}[xshift=16em] \begin{scope}[xshift=21em]
\tikzstyle{datanode} = [minimum width=5em,minimum height=1.7em,fill=red!20,rounded corners=0.3em]; \tikzstyle{datanode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=red!20,rounded corners=0.3em];
\tikzstyle{modelnode} = [minimum width=5em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em]; \tikzstyle{modelnode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=blue!20,rounded corners=0.3em];
\tikzstyle{decodingnode} = [minimum width=5em,minimum height=1.7em,fill=green!20,rounded corners=0.3em]; \tikzstyle{decodingnode} = [minimum width=5em,minimum height=1.7em,draw,thick,fill=green!20,rounded corners=0.3em];
\node [datanode,anchor=north west] (s1) at (0,0) {{ \small{语言1}}}; \node [datanode,anchor=north west] (s1) at (0,0) {{ \small{语言1}}};
\node [datanode,anchor=north] (s2) at ([yshift=-4.5em]s1.south) {{ \small{语言3}}}; \node [datanode,anchor=north] (s2) at ([yshift=-4.5em]s1.south) {{ \small{语言3}}};
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
\end{scope} \end{scope}
\begin{scope}[xshift=16.8em,yshift=6em] \begin{scope}[xshift=18.8em,yshift=6em]
{ {
\tikzstyle{numbernode} = [fill=blue!30,minimum height=0.8em,minimum width=0.8em,circle,draw,inner sep=1pt] \tikzstyle{numbernode} = [fill=blue!30,minimum height=0.8em,minimum width=0.8em,circle,draw,inner sep=1pt]
...@@ -94,14 +94,14 @@ ...@@ -94,14 +94,14 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[draw,thin,minimum width=11em,align=left,rounded corners=1pt,fill=red!5,drop shadow] [fit = (outputnode) (word01) (word02) ] (netbox) {}; \node[draw,minimum width=11em,align=left,rounded corners=1pt,fill=red!5,drop shadow] [fit = (outputnode) (word01) (word02) ] (netbox) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron01) (neuron02) (neuron03) (neuron04)] (layer1) {}; \node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron01) (neuron02) (neuron03) (neuron04)] (layer1) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron11) (neuron12) (neuron13) (neuron14)] (layer2) {}; \node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron11) (neuron12) (neuron13) (neuron14)] (layer2) {};
\node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron21) (neuron22) (neuron23) (neuron24) (neuron25)] (layer3) {}; \node[rectangle,draw,thin,inner sep=3pt,rounded corners=1pt] [fit = (neuron21) (neuron22) (neuron23) (neuron24) (neuron25)] (layer3) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
\draw [->,very thick,dotted] (enclabel.east) ..controls + (east:2em) and +(west:2em).. ([yshift=-1em]netbox.west); \draw [->,very thick,dotted] (enclabel.east) ..controls + (east:4em) and +(west:4em).. ([yshift=1em]netbox.west);
\node [anchor=north] (netlabel) at (netbox.south) {\footnotesize{编码器网络示例}}; \node [anchor=north] (netlabel) at (netbox.south) {\footnotesize{编码器网络示例}};
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%%% 句法树(层次短语) %%% 句法树(层次短语)
\begin{tikzpicture} \begin{tikzpicture}
{\small {\small
\begin{scope}[sibling distance=25pt, level distance = 20pt] \begin{scope}[sibling distance=25pt, level distance = 25pt]
{\scriptsize {\scriptsize
\Tree[.\node(r){IP}; \Tree[.\node(r){IP};
[.\node(n11){NP}; [.\node(n21){PN}; [.\node(l1){};]]] [.\node(n11){NP}; [.\node(n21){PN}; [.\node(l1){};]]]
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (rule1) (rule2) (rule3) (rule3part2) (rule4) (rule4part2) (rule5) (rule5part2) (rule6) (rule6part2) (rulebaselabel)] {}; \node[rectangle,draw=ublue, thick,inner sep=0mm] [fit = (rule1) (rule2) (rule3) (rule3part2) (rule4) (rule4part2) (rule5) (rule5part2) (rule6) (rule6part2) (rulebaselabel)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (example3part2) (example4) (bidatalabel)(example6)] (bidata) {}; \node[rectangle,draw=ublue, thick, inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (example3part2) (example4) (bidatalabel)(example6)] (bidata) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (entry5)(entry6)(monodatalabel)] (monodata) {}; \node[rectangle,draw=ublue, thick, inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (entry5)(entry6)(monodatalabel)] (monodata) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (phrase1) (phrase2) (phrase3) (phrase4) (phrase4part2) (phrase5) (phrase5part2) (phrase6)(phrase7) (phrasetablelabel)] (phrasetable) {}; \node[rectangle,draw=ublue, thick, inner sep=0mm] [fit = (phrase1) (phrase2) (phrase3) (phrase4) (phrase4part2) (phrase5) (phrase5part2) (phrase6)(phrase7) (phrasetablelabel)] (phrasetable) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (ngram1) (ngram2) (ngram3) (ngram4) (lmlabel) (ngrame)] (langaugemodel) {}; \node[rectangle,draw=ublue, thick, inner sep=0mm] [fit = (ngram1) (ngram2) (ngram3) (ngram4) (lmlabel) (ngrame)] (langaugemodel) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}
\tikzstyle{node1} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em]; \tikzstyle{node1} = [minimum width=7em,minimum height=1.7em,draw,thick,fill=red!20,rounded corners=0.3em];
\tikzstyle{node2} = [minimum width=7em,minimum height=2.5em,fill=blue!20,rounded corners=0.3em]; \tikzstyle{node2} = [minimum width=7em,minimum height=2.5em,draw,thick,fill=blue!20,rounded corners=0.3em];
\tikzstyle{node3} = [minimum width=7em,minimum height=2.5em,fill=green!20,rounded corners=0.3em]; \tikzstyle{node3} = [minimum width=7em,minimum height=2.5em,draw,thick,fill=green!20,rounded corners=0.3em];
\tikzstyle{node4} = [minimum width=7em,minimum height=1.7em,fill=orange!20,rounded corners=0.3em]; \tikzstyle{node4} = [minimum width=7em,minimum height=1.7em,draw,thick,fill=orange!20,rounded corners=0.3em];
\tikzstyle{node5} = [minimum width=4.5em,minimum height=1.7em,dashed]; \tikzstyle{node5} = [minimum width=4.5em,minimum height=1.7em,thick,dashed];
\node [node1,anchor=south west] (s1) at (0,0) {{ \small{源语言词串}}}; \node [node1,anchor=south west] (s1) at (0,0) {{ \small{源语言词串}}};
\node [node2,anchor=south] (s2) at ([xshift=2.5em,yshift=2em]s1.north) {}; \node [node2,anchor=south] (s2) at ([xshift=2.5em,yshift=2em]s1.north) {};
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}
\tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,fill=red!20,rounded corners=0.3em]; \tikzstyle{datanode} = [minimum width=7em,minimum height=1.7em,thick,draw,fill=red!20,rounded corners=0.3em];
\tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,fill=blue!20,rounded corners=0.3em]; \tikzstyle{modelnode} = [minimum width=7em,minimum height=1.7em,thick,draw,fill=blue!20,rounded corners=0.3em];
\tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,fill=green!20,rounded corners=0.3em]; \tikzstyle{decodingnode} = [minimum width=7em,minimum height=1.7em,thick,draw,fill=green!20,rounded corners=0.3em];
\node [datanode,anchor=north west,minimum height=1.7em,minimum width=8em] (s1) at (0,0) {{ \small{源文句子}}}; \node [datanode,anchor=north west,minimum height=1.7em,minimum width=8em] (s1) at (0,0) {{ \small{源文句子}}};
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (s2) at ([yshift=-1.5em]s1.south) {{ \small{源语词法分析}}}; \node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (s2) at ([yshift=-1.5em]s1.south) {{ \small{源语词法分析}}};
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (s4) at ([yshift=-1.5em]s3.south) {{ \small{源语句法分析}}}; \node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (s4) at ([yshift=-1.5em]s3.south) {{ \small{源语句法分析}}};
\node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (s5) at ([yshift=-1.5em]s4.south) {{ \small{源文结构}}}; \node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (s5) at ([yshift=-1.5em]s4.south) {{ \small{源文结构}}};
\node [datanode,anchor=west,minimum height=1.7em,minimum width=8em] (t1) at ([xshift=14em]s1.east) {{ \small{译文句子}}}; \node [datanode,anchor=west,minimum height=1.7em,minimum width=8em] (t1) at ([xshift=20em]s1.east) {{ \small{译文句子}}};
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t2) at ([yshift=-1.5em]t1.south) {{ \small{目标语词法生成}}}; \node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t2) at ([yshift=-1.5em]t1.south) {{ \small{目标语词法生成}}};
\node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t3) at ([yshift=-1.5em]t2.south) {{ \small{译文词串}}}; \node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t3) at ([yshift=-1.5em]t2.south) {{ \small{译文词串}}};
\node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t4) at ([yshift=-1.5em]t3.south) {{ \small{目标语句法生成}}}; \node [modelnode,anchor=north,minimum height=1.7em,minimum width=8em] (t4) at ([yshift=-1.5em]t3.south) {{ \small{目标语句法生成}}};
\node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t5) at ([yshift=-1.5em]t4.south) {{ \small{译文结构}}}; \node [datanode,anchor=north,minimum height=1.7em,minimum width=8em] (t5) at ([yshift=-1.5em]t4.south) {{ \small{译文结构}}};
\node [decodingnode,anchor=west,minimum height=1.7em,minimum width=8em] (st1) at ([xshift=2.5em,yshift=0.85em]s5.east) {{ \small{源语-目标语词汇转换}}}; \node [decodingnode,anchor=west,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st1) at ([xshift=3.5em,yshift=0.85em]s5.east) {{ \small{源语-目标语词汇转换}}};
\node [decodingnode,anchor=north,minimum height=1.7em,minimum width=8em] (st2) at ([yshift=0.05em]st1.south) {{ \small{源语-目标语结构转换}}}; \node [decodingnode,anchor=north,minimum height=1.7em,minimum width=13em,inner sep=3pt] (st2) at ([yshift=0.05em]st1.south) {{ \small{源语-目标语结构转换}}};
\draw [->,very thick] (s1.south) -- (s2.north); \draw [->,very thick] (s1.south) -- (s2.north);
\draw [->,very thick] (s2.south) -- (s3.north); \draw [->,very thick] (s2.south) -- (s3.north);
......
...@@ -8,22 +8,22 @@ ...@@ -8,22 +8,22 @@
{ {
\begin{tikzpicture} \begin{tikzpicture}
\node [anchor=south west, fill=blue!50, minimum width=1.1cm, minimum height=2.3cm] (mt) at (1,0) {{\color{white} {\small\sffamily\bfseries{机器}}}}; \node [anchor=south west, fill=blue!70, minimum width=1.1cm, minimum height=2.3cm] (mt) at (1,0) {{\color{white} {\small\sffamily\bfseries{机器}}}};
\node [anchor=south west, fill=red!50, minimum width=1.1cm, minimum height=2.7cm] (human) at ([xshift=0.5cm]mt.south east) {{\color{white} {\small\sffamily\bfseries{}}}}; \node [anchor=south west, fill=red!70, minimum width=1.1cm, minimum height=2.7cm] (human) at ([xshift=0.5cm]mt.south east) {{\color{white} {\small\sffamily\bfseries{}}}};
\node [anchor=south] (mtscore) at (mt.north) {3.9}; \node [anchor=south] (mtscore) at (mt.north) {3.9};
\node [anchor=south] (humanscore) at (human.north) {4.7}; \node [anchor=south] (humanscore) at (human.north) {4.7};
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=0.5cm]human.south east); \draw [->,very thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=0.5cm]human.south east);
\draw [->,thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt.south west); \draw [->,very thick] ([xshift=-0.5cm]mt.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt.south west);
\node [anchor=north west] (x1) at ([xshift=0.0cm]human.south east) {\footnotesize{评价对象}}; \node [anchor=north west] (x1) at ([xshift=0.0cm]human.south east) {\footnotesize{评价对象}};
\node [anchor=north east] (y1) at ([xshift=-0.5cm,yshift=3.2cm]mt.south west) {\footnotesize{打分}}; \node [anchor=north east] (y1) at ([xshift=-0.5cm,yshift=3.2cm]mt.south west) {\footnotesize{打分}};
\node [anchor=north] (y2) at ([yshift=-0cm]y1.south) {\footnotesize{(分)}}; \node [anchor=north] (y2) at ([yshift=-0cm]y1.south) {\footnotesize{(分)}};
\node [anchor=south west, fill=blue!50, minimum width=1.1cm, minimum height=1.5cm] (mt1) at ([xshift=13.0em,yshift=-3.0em]mt.east) {{\color{white} {\small\sffamily\bfseries{机器}}}}; \node [anchor=south west, fill=blue!70, minimum width=1.1cm, minimum height=1.5cm] (mt1) at ([xshift=16.0em,yshift=-3.0em]mt.east) {{\color{white} {\small\sffamily\bfseries{机器}}}};
\node [anchor=south west, fill=red!50, minimum width=1.1cm, minimum height=2.7cm] (human1) at ([xshift=0.5cm]mt1.south east) {{\color{white} {\small\sffamily\bfseries{}}}}; \node [anchor=south west, fill=red!70, minimum width=1.1cm, minimum height=2.7cm] (human1) at ([xshift=0.5cm]mt1.south east) {{\color{white} {\small\sffamily\bfseries{}}}};
\node [anchor=south] (mtscore1) at (mt1.north) {47}; \node [anchor=south] (mtscore1) at (mt1.north) {47};
\node [anchor=south] (humanscore1) at (human1.north) {100}; \node [anchor=south] (humanscore1) at (human1.north) {100};
\draw [->,thick] ([xshift=-0.5cm]mt1.south west) -- ([xshift=0.5cm]human1.south east); \draw [->,very thick] ([xshift=-0.5cm]mt1.south west) -- ([xshift=0.5cm]human1.south east);
\draw [->,thick] ([xshift=-0.5cm]mt1.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt1.south west); \draw [->,very thick] ([xshift=-0.5cm]mt1.south west) -- ([xshift=-0.5cm,yshift=3.2cm]mt1.south west);
\node [anchor=north west] (x1) at ([xshift=0.0cm]human1.south east) {\footnotesize{评价对象}}; \node [anchor=north west] (x1) at ([xshift=0.0cm]human1.south east) {\footnotesize{评价对象}};
\node [anchor=north east] (y1) at ([xshift=-0.5cm,yshift=3.2cm]mt1.south west) {\footnotesize{打分}}; \node [anchor=north east] (y1) at ([xshift=-0.5cm,yshift=3.2cm]mt1.south west) {\footnotesize{打分}};
\node [anchor=north] (y2) at ([yshift=-0cm]y1.south) {\footnotesize{(分)}}; \node [anchor=north] (y2) at ([yshift=-0cm]y1.south) {\footnotesize{(分)}};
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (examplebaselabel)] {}; \node[rectangle,draw=ublue, thick,inner sep=0mm] [fit = (example1) (example1part2) (example2) (example2part2) (example3) (examplebaselabel)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (dictionarylabel)] {}; \node[rectangle,draw=ublue, thick,inner sep=0mm] [fit = (entry1) (entry2) (entry3) (entry4) (dictionarylabel)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
%---------------------------------------------- %----------------------------------------------
\begin{figure}[htp] \begin{figure}[htp]
\centering \centering
\includegraphics[scale=0.2]{./Chapter1/Figures/figure-zh_en-example.png} \includegraphics[scale=0.25]{./Chapter1/Figures/figure-zh_en-example.png}
\caption{通过计算机将汉语翻译为英语} \caption{通过计算机将汉语翻译为英语}
\label{fig:1-1} \label{fig:1-1}
\end{figure} \end{figure}
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
\multicolumn{1}{l|}{GNMT+RL} & 24.6 & 39.92 & 1.4$\times 10^{20}$ \\ \multicolumn{1}{l|}{GNMT+RL} & 24.6 & 39.92 & 1.4$\times 10^{20}$ \\
\multicolumn{1}{l|}{ConvS2S} & 25.16 & 40.46 & 1.5$\times 10^{20}$ \\ \multicolumn{1}{l|}{ConvS2S} & 25.16 & 40.46 & 1.5$\times 10^{20}$ \\
\multicolumn{1}{l|}{MoE} & 26.03 & 40.56 & 1.2$\times 10^{20}$ \\ \multicolumn{1}{l|}{MoE} & 26.03 & 40.56 & 1.2$\times 10^{20}$ \\
\multicolumn{1}{l|}{Transformer(Base Model)} & 27.3 &38.1 & 3.3$\times 10^{18}$ \\ \multicolumn{1}{l|}{Transformer (Base Model) } & 27.3 &38.1 & 3.3$\times 10^{18}$ \\
\multicolumn{1}{l|}{Transformer (Big)} & {\small\sffamily\bfseries{28.4}} & {\small\sffamily\bfseries{41.8}} & 2.3$\times 10^{19}$ \\ \multicolumn{1}{l|}{Transformer (Big Model)} & {\small\sffamily\bfseries{28.4}} & {\small\sffamily\bfseries{41.8}} & 2.3$\times 10^{19}$ \\
\end{tabular} \end{tabular}
\end{table} \end{table}
%---------------------------------------------- %----------------------------------------------
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{node1}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=ugreen!10!blue!10] \tikzstyle{node1}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=blue!10]
\tikzstyle{node2}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=ugreen!20!blue!20] \tikzstyle{node2}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=blue!25]
\tikzstyle{node3}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=ugreen!30!blue!30] \tikzstyle{node3}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=blue!40]
\tikzstyle{node4}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=ugreen!40!blue!40] \tikzstyle{node4}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=blue!55]
\tikzstyle{node5}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=ugreen!50!blue!50] \tikzstyle{node5}=[inner sep=0mm,minimum height=1.5em,minimum width=3em,fill=blue!70]
\begin{scope} \begin{scope}
\foreach \i / \j / \z in \foreach \i / \j / \z in
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
\node[anchor=north west] (y1) at ([xshift=14.5em,yshift=-1.3em]n00.south west) {训练时长}; \node[anchor=north west] (y1) at ([xshift=14.5em,yshift=-1.3em]n00.south west) {训练时长};
\node[anchor=west,font=\small] (t1) at ([xshift=0.5em,yshift=0em]n52.east) {$\cdots$}; \node[anchor=west,font=\small] (t1) at ([xshift=0.5em,yshift=0em]n52.east) {$\cdots$};
\node[anchor=west,node1,minimum width=0.5em] (c1) at ([xshift=3em,yshift=-2.5em]t1.east) {}; \node[anchor=west,node1,minimum width=0.5em] (c1) at ([xshift=5em,yshift=0em]n50.east) {};
\node[anchor=south,node2,minimum width=0.5em] (c2) at ([xshift=0em,yshift=0em]c1.north) {}; \node[anchor=south,node2,minimum width=0.5em] (c2) at ([xshift=0em,yshift=0em]c1.north) {};
\node[anchor=south,node3,minimum width=0.5em] (c3) at ([xshift=0em,yshift=0em]c2.north) {}; \node[anchor=south,node3,minimum width=0.5em] (c3) at ([xshift=0em,yshift=0em]c2.north) {};
\node[anchor=south,node4,minimum width=0.5em] (c4) at ([xshift=0em,yshift=0em]c3.north) {}; \node[anchor=south,node4,minimum width=0.5em] (c4) at ([xshift=0em,yshift=0em]c3.north) {};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{tnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=green!20] \tikzstyle{tnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=green!15,drop shadow]
\tikzstyle{pnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=yellow!30] \tikzstyle{pnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=yellow!15,drop shadow]
\tikzstyle{mnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=red!20] \tikzstyle{mnode} = [rectangle,inner sep=0em,minimum width=8em,minimum height=6.6em,rounded corners=5pt,fill=red!15,drop shadow]
\tikzstyle{wnode} = [inner sep=0em,minimum height=1.5em] \tikzstyle{wnode} = [inner sep=0em,minimum height=1.5em]
%第一排 %第一排
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.7em,draw,ugreen!60,dashed,very thick,rounded corners=7pt] [fit = (n1) (n4)] (box1) {}; \node [rectangle,inner sep=0.7em,draw,ugreen!60,dashed,thick,rounded corners=7pt] [fit = (n1) (n4)] (box1) {};
\end{pgfonlayer} \end{pgfonlayer}
\node [anchor=west,align=left,font=\footnotesize] (nt1) at ([xshift=0.1em,yshift=0em]n2.east) {统计词表和\\[0.5ex]词频}; \node [anchor=west,align=left,font=\footnotesize] (nt1) at ([xshift=0.1em,yshift=0em]n2.east) {统计词表和\\[0.5ex]词频};
\node [anchor=west,align=left,font=\footnotesize] (nt2) at ([xshift=0.1em,yshift=1em]n3.east) {按字符切分}; \node [anchor=west,align=left,font=\footnotesize] (nt2) at ([xshift=0.1em,yshift=1em]n3.east) {按字符切分};
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n2.east)--([xshift=0em,yshift=0em]n3.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n2.east)--([xshift=0em,yshift=0em]n3.west);
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n3.east)--([xshift=0em,yshift=0em]n4.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n3.east)--([xshift=0em,yshift=0em]n4.west);
%第二排 %第二排
\node [anchor=north west,wnode,font=\large] (n5) at ([xshift=0em,yshift=-2em]n2.south west) {BPE学习}; \node [anchor=north west,wnode,font=\large] (n5) at ([xshift=0em,yshift=-2em]n2.south west) {BPE学习};
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
\node [anchor=north west,align=left,font=\footnotesize] (n61) at ([xshift=0.2em,yshift=-0.2em]n6.north west) {{\small 词表}\\l/o/w\\l/o/w/e/r\\n/e/w/e/s/t\\w/i/d/e/s/t\\$\ldots$}; \node [anchor=north west,align=left,font=\footnotesize] (n61) at ([xshift=0.2em,yshift=-0.2em]n6.north west) {{\small 词表}\\l/o/w\\l/o/w/e/r\\n/e/w/e/s/t\\w/i/d/e/s/t\\$\ldots$};
\node [anchor=north east,align=center,font=\footnotesize] (n62) at ([xshift=-0.2em,yshift=-0.2em]n6.north east) {{\small 频率}\\6\\2\\6\\3\\$\ldots$}; \node [anchor=north east,align=center,font=\footnotesize] (n62) at ([xshift=-0.2em,yshift=-0.2em]n6.north east) {{\small 频率}\\6\\2\\6\\3\\$\ldots$};
\draw [->,very thick,ublue] ([xshift=-0em,yshift=-0em]n4.south) .. controls +(south:4em) and +(north:4em) .. ([xshift=-0em,yshift=-0em]n6.north); \draw [->,thick,ublue] ([xshift=-0em,yshift=-0em]n4.south) .. controls +(south:4em) and +(north:4em) .. ([xshift=1em,yshift=-0em]n6.north);
\node [anchor=west,pnode] (n7) at ([xshift=5em,yshift=0em]n6.east) {}; \node [anchor=west,pnode] (n7) at ([xshift=5em,yshift=0em]n6.east) {};
\node [anchor=north west,align=left,font=\footnotesize] (n71) at ([xshift=0.2em,yshift=-0.2em]n7.north west) {{\small 二元组}\\(e,s)\\(s,t)\\(l,o)\\(o,w)\\$\ldots$}; \node [anchor=north west,align=left,font=\footnotesize] (n71) at ([xshift=0.2em,yshift=-0.2em]n7.north west) {{\small 二元组}\\(e,s)\\(s,t)\\(l,o)\\(o,w)\\$\ldots$};
...@@ -45,15 +45,15 @@ ...@@ -45,15 +45,15 @@
\node [anchor=west,align=left,font=\footnotesize] (nt3) at ([xshift=0.1em,yshift=0em]n6.east) {统计二元组\\[0.5ex]的频次}; \node [anchor=west,align=left,font=\footnotesize] (nt3) at ([xshift=0.1em,yshift=0em]n6.east) {统计二元组\\[0.5ex]的频次};
\node [anchor=west,align=left,font=\footnotesize] (nt4) at ([xshift=0em,yshift=-0.4em]n7.east) {频次最高的\\[0.5ex](e,s)加入表\\}; \node [anchor=west,align=left,font=\footnotesize] (nt4) at ([xshift=0em,yshift=-0.4em]n7.east) {频次最高的\\[0.5ex](e,s)加入表\\};
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n6.east)--([xshift=0em,yshift=0em]n7.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n6.east)--([xshift=0em,yshift=0em]n7.west);
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n7.east)--([xshift=0em,yshift=0em]n8.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n7.east)--([xshift=0em,yshift=0em]n8.west);
%第三排 %第三排
\node [anchor=north,tnode] (n9) at ([xshift=0em,yshift=-2.5em]n6.south) {}; \node [anchor=north,tnode] (n9) at ([xshift=0em,yshift=-2.5em]n6.south) {};
\node [anchor=north west,align=left,font=\footnotesize] (n91) at ([xshift=0.2em,yshift=-0.2em]n9.north west) {{\small 词表}\\l/o/w\\l/o/w/e/r\\n/e/w/{\red es}/t\\w/i/d/{\red es}/t\\$\ldots$}; \node [anchor=north west,align=left,font=\footnotesize] (n91) at ([xshift=0.2em,yshift=-0.2em]n9.north west) {{\small 词表}\\l/o/w\\l/o/w/e/r\\n/e/w/{\red es}/t\\w/i/d/{\red es}/t\\$\ldots$};
\node [anchor=north east,align=center,font=\footnotesize] (n92) at ([xshift=-0.2em,yshift=-0.2em]n9.north east) {{\small 频率}\\6\\2\\6\\3\\$\ldots$}; \node [anchor=north east,align=center,font=\footnotesize] (n92) at ([xshift=-0.2em,yshift=-0.2em]n9.north east) {{\small 频率}\\6\\2\\6\\3\\$\ldots$};
\draw [->,very thick,ublue] ([xshift=-0em,yshift=-0em]n8.south) .. controls +(south:3em) and +(north:3em) .. ([xshift=-0em,yshift=-0em]n9.north); \draw [->,thick,ublue] ([xshift=-0em,yshift=-0em]n8.south) .. controls +(south:3em) and +(north:3em) .. ([xshift=1em,yshift=-0em]n9.north);
\node [anchor=north west,ublue,font=\footnotesize,align=left] (l1) at ([xshift=1em,yshift=-0em]n7.south east) {在词表中\\[0.8ex]合并(e,s)}; \node [anchor=north west,ublue,font=\footnotesize,align=left] (l1) at ([xshift=1em,yshift=-0em]n7.south east) {在词表中\\[0.8ex]合并(e,s)};
\node [anchor=west,pnode] (n10) at ([xshift=5em,yshift=0em]n9.east) {}; \node [anchor=west,pnode] (n10) at ([xshift=5em,yshift=0em]n9.east) {};
...@@ -65,17 +65,17 @@ ...@@ -65,17 +65,17 @@
\node [anchor=west,align=left,font=\footnotesize] (nt5) at ([xshift=0.1em,yshift=0em]n9.east) {统计二元组\\[0.5ex]的频次}; \node [anchor=west,align=left,font=\footnotesize] (nt5) at ([xshift=0.1em,yshift=0em]n9.east) {统计二元组\\[0.5ex]的频次};
\node [anchor=west,align=left,font=\footnotesize] (nt6) at ([xshift=0em,yshift=-0.4em]n10.east) {频次最高的\\[0.5ex](es,t)加入表\\}; \node [anchor=west,align=left,font=\footnotesize] (nt6) at ([xshift=0em,yshift=-0.4em]n10.east) {频次最高的\\[0.5ex](es,t)加入表\\};
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n9.east)--([xshift=0em,yshift=0em]n10.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n9.east)--([xshift=0em,yshift=0em]n10.west);
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]n10.east)--([xshift=0em,yshift=0em]n11.west); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]n10.east)--([xshift=0em,yshift=0em]n11.west);
%第四排 %第四排
\node [anchor=north,ublue] (cd) at ([xshift=0em,yshift=-1.5em]n10.south) {$\cdots$}; \node [anchor=north,ublue] (cd) at ([xshift=0em,yshift=-2.0em]n10.south) {$\cdots$};
\draw [->,very thick,ublue] ([xshift=-0em,yshift=-0em]n11.south) .. controls +(south:2em) and +(north:2em) .. ([xshift=-0em,yshift=-0em]cd.north); \draw [->,thick,ublue] ([xshift=-0em,yshift=-0em]n11.south) .. controls +(south:2em) and +(north:2em) .. ([xshift=-0em,yshift=-0em]cd.north);
\node [anchor=north west,ublue,font=\footnotesize,align=left] (l2) at ([xshift=1em,yshift=0.6em]n10.south east) {在词表中\\[0.8ex]合并(es,t)}; \node [anchor=north west,ublue,font=\footnotesize,align=left] (l2) at ([xshift=1em,yshift=-1.0em]n10.south east) {在词表中\\[0.8ex]合并(es,t)};
\node [anchor=east,ublue,align=left,font=\footnotesize] (l3) at ([xshift=-0.5em,yshift=0em]cd.west) {直至达到设定的符号合\\并表大小或无法合并}; \node [anchor=east,ublue,align=left,font=\footnotesize] (l3) at ([xshift=-0.5em,yshift=0em]cd.west) {直至达到设定的符号合\\并表大小或无法合并};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.7em,draw,orange!40,dashed,very thick,rounded corners=7pt] [fit = (n5) (n8) (l3) (cd)] (box2) {}; \node [rectangle,inner sep=0.7em,draw,orange!40,dashed,thick,rounded corners=7pt] [fit = (n5) (n8) (l3) (cd)] (box2) {};
\end{pgfonlayer} \end{pgfonlayer}
%第五排 %第五排
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
\node [anchor=south west,wnode,font=\large] (n13) at ([xshift=0em,yshift=0.5em]n12.north west) {输出符号合并表}; \node [anchor=south west,wnode,font=\large] (n13) at ([xshift=0em,yshift=0.5em]n12.north west) {输出符号合并表};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.7em,draw,red!40,dashed,very thick,rounded corners=7pt] [fit = (n12) (n13)] (box3) {}; \node [rectangle,inner sep=0.7em,draw,red!40,dashed,thick,rounded corners=7pt] [fit = (n12) (n13)] (box3) {};
\end{pgfonlayer} \end{pgfonlayer}
\draw [->,very thick,ublue] ([xshift=0em,yshift=0em]cd.south)--([xshift=0em,yshift=0em]n12.north); \draw [->,thick,ublue] ([xshift=0em,yshift=0em]cd.south)--([xshift=0em,yshift=0em]n12.north);
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
\node [] (standard) at ([xshift=-1em]neuron_z.west) {\scriptsize{$\mathbf{w}_{i}^{l}$}}; \node [] (standard) at ([xshift=-1em]neuron_z.west) {\scriptsize{$\mathbf{w}_{i}^{l}$}};
\node [] (standard) at ([xshift=0.6em,yshift=0.3em]neuron_z.east) {\scriptsize{$f$}}; \node [] (standard) at ([xshift=0.6em,yshift=0.3em]neuron_z.east) {\scriptsize{$f$}};
\draw [->,line width=0.3mm] (neuron_b.east) -- (neuron_z.west); \draw [->,line width=0.3mm] (neuron_b.east) -- (neuron_z.130);
\draw [->,line width=0.3mm] (neuron_y3.east) -- (neuron_z.west); \draw [->,line width=0.3mm] (neuron_y3.east) -- (neuron_z.170);
\draw [->,line width=0.3mm] (neuron_y2.east) -- (neuron_z.west); \draw [->,line width=0.3mm] (neuron_y2.east) -- (neuron_z.190);
\draw [->,line width=0.3mm] (neuron_y1.east) -- (neuron_z.west); \draw [->,line width=0.3mm] (neuron_y1.east) -- (neuron_z.230);
\draw [->,line width=0.3mm] (neuron_z.east) -- (neuron_y'.west); \draw [->,line width=0.3mm] (neuron_z.east) -- (neuron_y'.west);
%dropout %dropout
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
\node [] (standard) at ([xshift=-1em]drop_neuron_z.west) {\scriptsize{$\mathbf{w}_{i}^{l}$}}; \node [] (standard) at ([xshift=-1em]drop_neuron_z.west) {\scriptsize{$\mathbf{w}_{i}^{l}$}};
\node [] (standard) at ([xshift=0.6em,yshift=0.3em]drop_neuron_z.east) {\scriptsize{$f$}}; \node [] (standard) at ([xshift=0.6em,yshift=0.3em]drop_neuron_z.east) {\scriptsize{$f$}};
%structure %structure
\draw [->,line width=0.3mm] (drop_neuron_b.east) -- (drop_neuron_z.west); \draw [->,line width=0.3mm] (drop_neuron_b.east) -- (drop_neuron_z.130);
\draw [->,line width=0.3mm] (drop_neuron_y3'.east) -- (drop_neuron_z.west); \draw [->,line width=0.3mm] (drop_neuron_y3'.east) -- (drop_neuron_z.170);
\draw [->,line width=0.3mm] (drop_neuron_y2'.east) -- (drop_neuron_z.west); \draw [->,line width=0.3mm] (drop_neuron_y2'.east) -- (drop_neuron_z.190);
\draw [->,line width=0.3mm] (drop_neuron_y1'.east) -- (drop_neuron_z.west); \draw [->,line width=0.3mm] (drop_neuron_y1'.east) -- (drop_neuron_z.230);
\draw [->,line width=0.3mm] (drop_neuron_z.east) -- (drop_neuron_y'.west); \draw [->,line width=0.3mm] (drop_neuron_z.east) -- (drop_neuron_y'.west);
%r %r
\draw [->,line width=0.3mm] (drop_neuron_y3.east) -- (drop_neuron_y3'.west); \draw [->,line width=0.3mm] (drop_neuron_y3.east) -- (drop_neuron_y3'.west);
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{node}=[inner sep=0mm,minimum height=3em,minimum width=6em,rounded corners=5pt] \tikzstyle{node}=[inner sep=0mm, draw,thick,minimum height=3em,minimum width=6em,rounded corners=5pt]
\node[anchor=west,node,fill=ugreen!15] (n1) at (0,0) {训练集}; \node[anchor=west,node,fill=ugreen!15] (n1) at (0,0) {训练集};
\node[anchor=west,node,fill=yellow!15] (n2) at ([xshift=2em,yshift=0em]n1.east) {难度评估器}; \node[anchor=west,node,fill=yellow!15] (n2) at ([xshift=4em,yshift=0em]n1.east) {难度评估器};
\node[anchor=west,node,fill=red!15] (n3) at ([xshift=4em,yshift=0em]n2.east) {训练调度器}; \node[anchor=west,node,fill=red!15] (n3) at ([xshift=4em,yshift=0em]n2.east) {训练调度器};
\node[anchor=west,node,fill=blue!15] (n4) at ([xshift=4em,yshift=0em]n3.east) {模型训练器}; \node[anchor=west,node,fill=blue!15] (n4) at ([xshift=4em,yshift=0em]n3.east) {模型训练器};
......
...@@ -6,30 +6,30 @@ ...@@ -6,30 +6,30 @@
\setlength{\YShift}{0.8\base} \setlength{\YShift}{0.8\base}
\setlength{\XShift}{0.8\base} \setlength{\XShift}{0.8\base}
\tikzstyle{modelnode} = [rectangle,draw,rounded corners=2pt,inner sep=0pt,minimum height=4.5em,minimum width=2em,font=\small,anchor=north] \tikzstyle{modelnode} = [rectangle,draw,thick,rounded corners=2pt,inner sep=2pt,minimum height=4.5em,minimum width=2em,font=\small,anchor=north]
\coordinate (stu01) at (0,0); \coordinate (stu01) at (0,0);
\coordinate (stu02) at ([xshift=3em]stu01); \coordinate (stu02) at ([xshift=4em]stu01);
\coordinate (stu03) at ([xshift=3em]stu02); \coordinate (stu03) at ([xshift=4em]stu02);
\coordinate (stu04) at ([xshift=3em]stu03); \coordinate (stu04) at ([xshift=4em]stu03);
\coordinate (stu05) at ([xshift=3em]stu04); \coordinate (stu05) at ([xshift=4em]stu04);
\coordinate (tea01) at ([xshift=8em]stu05); \coordinate (tea01) at ([xshift=10em]stu05);
\coordinate (tea02) at ([xshift=3em]tea01); \coordinate (tea02) at ([xshift=4em]tea01);
% iterations % iterations
\foreach \curr / \prev in {1/0,2/1,3/2} \foreach \curr / \prev in {1/0,2/1,3/2}
{ {
% models % models
\node[modelnode,fill=yellow!20] (stu\curr1) at ([yshift=-2em]stu\prev1.south) {\rotatebox{90}{学生模型 $1$}}; \node[modelnode,fill=yellow!20] (stu\curr1) at ([yshift=-3em]stu\prev1.south) {\rotatebox{90}{学生模型 $1$}};
\node[modelnode,fill=yellow!20] (stu\curr2) at ([yshift=-2em]stu\prev2.south) {\rotatebox{90}{学生模型 $2$}}; \node[modelnode,fill=yellow!20] (stu\curr2) at ([yshift=-3em]stu\prev2.south) {\rotatebox{90}{学生模型 $2$}};
\node[modelnode,fill=yellow!20] (stu\curr3) at ([yshift=-2em]stu\prev3.south) {\rotatebox{90}{学生模型 $3$}}; \node[modelnode,fill=yellow!20] (stu\curr3) at ([yshift=-3em]stu\prev3.south) {\rotatebox{90}{学生模型 $3$}};
\node[modelnode,fill=yellow!20] (stu\curr4) at ([yshift=-2em]stu\prev4.south) {\rotatebox{90}{学生模型 $4$}}; \node[modelnode,fill=yellow!20] (stu\curr4) at ([yshift=-3em]stu\prev4.south) {\rotatebox{90}{学生模型 $4$}};
\node[modelnode,fill=yellow!20] (stu\curr5) at ([yshift=-2em]stu\prev5.south) {\rotatebox{90}{学生模型 $5$}}; \node[modelnode,fill=yellow!20] (stu\curr5) at ([yshift=-3em]stu\prev5.south) {\rotatebox{90}{学生模型 $5$}};
\node[modelnode] (tea\curr1) at ([yshift=-2em]tea\prev1.south) {\rotatebox{90}{\color{red!60} 教师模型 $1$}}; \node[modelnode] (tea\curr1) at ([yshift=-3em]tea\prev1.south) {\rotatebox{90}{\color{red!60} 教师模型 $1$}};
\node[modelnode] (tea\curr2) at ([yshift=-2em]tea\prev2.south) {\rotatebox{90}{\color{blue!60} 教师模型 $2$}}; \node[modelnode] (tea\curr2) at ([yshift=-3em]tea\prev2.south) {\rotatebox{90}{\color{blue!60} 教师模型 $2$}};
% 集成 labels % 集成 labels
\draw[-latex'] ([xshift=2pt]stu\curr5.east) to node [auto] {\small 集成} ([xshift=-2pt]tea\curr1.west); \draw[->,very thick] ([xshift=2pt]stu\curr5.east) to node [auto] {\small 集成} ([xshift=-2pt]tea\curr1.west);
} }
% iteration labels % iteration labels
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
\node[font=\small,anchor=east,purple!80] (iterate2) at ([xshift=-1em]stu31.west) {\rotatebox{90}{轮数 $2$}}; \node[font=\small,anchor=east,purple!80] (iterate2) at ([xshift=-1em]stu31.west) {\rotatebox{90}{轮数 $2$}};
% distillation labels % distillation labels
\node[font=\small,anchor=south west] (distill1) at ([yshift=0.8em]iterate1.north west) {知识蒸馏}; \node[font=\small,anchor=south west] (distill1) at ([yshift=1.2em]iterate1.north west) {知识蒸馏};
\node[font=\small,anchor=south west] (distill2) at ([yshift=0.8em]iterate2.north west) {知识蒸馏}; \node[font=\small,anchor=south west] (distill2) at ([yshift=1.2em]iterate2.north west) {知识蒸馏};
% 学生模型 groups % 学生模型 groups
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
...@@ -50,10 +50,10 @@ ...@@ -50,10 +50,10 @@
\end{pgfonlayer} \end{pgfonlayer}
% distillation % distillation
\draw[-latex',red!60,very thick] (tea11.south) .. controls +(south:1.5em) and +(north:2em) .. (group21.north); \draw[-latex',red!60,very thick] (tea11.south) .. controls +(south:1.5em) and +(north:3em) .. (group21.north);
\draw[-latex',blue!60,very thick] (tea12.south) .. controls +(south:2em) and +(north:1.5em) .. (group22.north); \draw[-latex',blue!60,very thick] (tea12.south) .. controls +(south:2em) and +(north:2em) .. (group22.north);
\draw[-latex',red!60,very thick] (tea21.south) .. controls +(south:2em) and +(north:2.5em) .. (group32.north); \draw[-latex',red!60,very thick] (tea21.south) .. controls +(south:2em) and +(north:2.5em) .. (group32.north);
\draw[-latex',blue!60,very thick] (tea22.south) .. controls +(south:2em) and +(north:1.5em) .. (group31.north); \draw[-latex',blue!60,very thick] (tea22.south) .. controls +(south:2em) and +(north:3em) .. (group31.north);
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
\begin{scope}[] \begin{scope}[]
\tikzstyle{rnnnode} = [draw,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=red!15] \tikzstyle{rnnnode} = [draw,thick,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=red!15]
\tikzstyle{snode} = [draw,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=blue!15] \tikzstyle{snode} = [draw,thick,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=blue!15]
\tikzstyle{ynode} = [inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt] \tikzstyle{ynode} = [inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt]
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
\node [anchor=west,rnnnode] (n3) at ([xshift=2em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$}; \node [anchor=west,rnnnode] (n3) at ([xshift=2em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$};
\node [anchor=west,rnnnode] (n4) at ([xshift=2em,yshift=0em]n3.east) {$\mathbi{h}_{j}$}; \node [anchor=west,rnnnode] (n4) at ([xshift=2em,yshift=0em]n3.east) {$\mathbi{h}_{j}$};
\node [anchor=south,snode,font=\footnotesize] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax};
\node [anchor=south,ynode] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\tilde{{y}}_{j-1}$}; \node [anchor=south,ynode] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\hat{{y}}_{j-1}$};
\node [anchor=south,snode,font=\footnotesize] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax};
\node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\tilde{{y}}_{j}$}; \node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\hat{{y}}_{j}$};
\node [anchor=south,snode,font=\footnotesize] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax};
\node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\tilde{{y}}_{1}$}; \node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\hat{{y}}_{1}$};
\node [anchor=north] (n11) at ([xshift=0em,yshift=-1em]n3.south) {${{y}}_{j-2}$}; \node [anchor=north] (n11) at ([xshift=0em,yshift=-1em]n3.south) {${{y}}_{j-2}$};
\node [anchor=north] (n12) at ([xshift=0em,yshift=-1em]n4.south) {${{y}}_{j-1}$}; \node [anchor=north] (n12) at ([xshift=0em,yshift=-1em]n4.south) {${{y}}_{j-1}$};
...@@ -122,8 +122,8 @@ ...@@ -122,8 +122,8 @@
\begin{scope}[yshift=-2in] \begin{scope}[yshift=-2in]
\tikzstyle{rnnnode} = [draw,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=red!15] \tikzstyle{rnnnode} = [draw,thick,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=red!15]
\tikzstyle{snode} = [draw,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=blue!15] \tikzstyle{snode} = [draw,thick,inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt,fill=blue!15]
\tikzstyle{ynode} = [inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt] \tikzstyle{ynode} = [inner sep=2pt,minimum width=3em,minimum height=1.5em,rounded corners=1pt]
...@@ -132,16 +132,16 @@ ...@@ -132,16 +132,16 @@
\node [anchor=west,rnnnode] (n3) at ([xshift=2em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$}; \node [anchor=west,rnnnode] (n3) at ([xshift=2em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$};
\node [anchor=west,rnnnode] (n4) at ([xshift=2em,yshift=0em]n3.east) {$\mathbi{h}_{j}$}; \node [anchor=west,rnnnode] (n4) at ([xshift=2em,yshift=0em]n3.east) {$\mathbi{h}_{j}$};
\node [anchor=south,snode,font=\footnotesize] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax};
\node [anchor=south,ynode] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\tilde{{y}}_{j-1}$}; \node [anchor=south,ynode] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\hat{{y}}_{j-1}$};
\node [anchor=south,snode,font=\footnotesize] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax};
\node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\tilde{{y}}_{j}$}; \node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\hat{{y}}_{j}$};
\node [anchor=south,snode,font=\footnotesize] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax}; \node [anchor=south,snode,font=\footnotesize] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax};
\node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\tilde{{y}}_{1}$}; \node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\hat{{y}}_{1}$};
\node [anchor=north] (n9) at ([xshift=0em,yshift=-3em]n4.south) {\small{(b) 推断阶段}}; \node [anchor=north] (n9) at ([xshift=0em,yshift=-3em]n4.south) {\small{(b) 推断阶段}};
\node [anchor=north] (n11) at ([xshift=0em,yshift=-1em]n3.south) {$\tilde{{y}}_{j-2}$}; \node [anchor=north] (n11) at ([xshift=0em,yshift=-1em]n3.south) {$\hat{{y}}_{j-2}$};
\node [anchor=north] (n12) at ([xshift=0em,yshift=-1em]n4.south) {$\tilde{{y}}_{j-1}$}; \node [anchor=north] (n12) at ([xshift=0em,yshift=-1em]n4.south) {$\hat{{y}}_{j-1}$};
\node [anchor=north] (x1) at ([xshift=0em,yshift=-1em]n1.south) {$\langle$sos$\rangle$}; \node [anchor=north] (x1) at ([xshift=0em,yshift=-1em]n1.south) {$\langle$sos$\rangle$};
...@@ -166,19 +166,19 @@ ...@@ -166,19 +166,19 @@
\draw [->,thick,dotted] ([xshift=-2.5em,yshift=1em]n11.north) .. controls +(south:2em) and +(west:0.1em) .. ([xshift=0.2em,yshift=0em]n11.west); \draw [->,thick,dotted] ([xshift=-2.5em,yshift=1em]n11.north) .. controls +(south:2em) and +(west:0.1em) .. ([xshift=0.2em,yshift=0em]n11.west);
\draw [->,thick,dotted] ([xshift=0em,yshift=0em]n14.east) .. controls +(east:0.3em) and +(north:2em) .. ([xshift=2.5em,yshift=-0.5em]n14.south); \draw [->,thick,dotted] ([xshift=0em,yshift=0em]n14.east) .. controls +(east:0.3em) and +(north:1.5em) .. ([xshift=2.5em,yshift=-0.5em]n14.south);
\draw [->,thick,dotted] ([xshift=0em,yshift=0em]n6.east) .. controls ([xshift=2em,yshift=1em]n6.east) and ([xshift=-2em,yshift=-2em]n4.south west) .. ([xshift=0.2em,yshift=-0em]n12.west); \draw [->,thick,dotted] ([xshift=0em,yshift=0em]n6.east) .. controls +(east:2em) and +(west:2em) .. ([xshift=0.2em,yshift=-0em]n12.west);
\draw [->,thick] ([xshift=-0em,yshift=0em]n11.north)--([xshift=-0em,yshift=0em]n3.south); \draw [->,thick] ([xshift=-0em,yshift=0em]n11.north)--([xshift=-0em,yshift=0em]n3.south);
\draw [->,thick] ([xshift=0em,yshift=0em]n12.north)--([xshift=-0em,yshift=-0em]n4.south); \draw [->,thick] ([xshift=0em,yshift=0em]n12.north)--([xshift=-0em,yshift=-0em]n4.south);
\node [anchor=west] (n10) at ([xshift=4em,yshift=0em]n8.east) {模型输出$\tilde{{y}}$}; \node [anchor=west] (n10) at ([xshift=4em,yshift=0em]n8.east) {模型输出$\hat{{y}}$};
\node [anchor=north west] (y1) at ([xshift=0.5em,yshift=-7em]n10.south west) {$\tilde{y}_{1}$}; \node [anchor=north west] (y1) at ([xshift=0.5em,yshift=-7em]n10.south west) {$\hat{y}_{1}$};
\node [anchor=west] (y2) at ([xshift=1em,yshift=0em]y1.east) {$\tilde{y}_{2}$}; \node [anchor=west] (y2) at ([xshift=1em,yshift=0em]y1.east) {$\hat{y}_{2}$};
\node [anchor=west] (y3) at ([xshift=1em,yshift=0em]y2.east) {$\tilde{y}_{3}$}; \node [anchor=west] (y3) at ([xshift=1em,yshift=0em]y2.east) {$\hat{y}_{3}$};
\node [anchor=west] (y4) at ([xshift=0.5em,yshift=0em]y3.east) {$\ldots$}; \node [anchor=west] (y4) at ([xshift=0.5em,yshift=0em]y3.east) {$\ldots$};
\node [anchor=west] (y5) at ([xshift=0.5em,yshift=0em]y4.east) {$\tilde{y}_{n}$}; \node [anchor=west] (y5) at ([xshift=0.5em,yshift=0em]y4.east) {$\hat{y}_{n}$};
\node [anchor=center,prob,minimum size=0.3em] (label11) at ([xshift=-0.1em,yshift=1em]y1.north) {}; \node [anchor=center,prob,minimum size=0.3em] (label11) at ([xshift=-0.1em,yshift=1em]y1.north) {};
......
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{rnnnode} = [draw,inner sep=4pt,minimum width=2em,minimum height=2em,rounded corners=1pt,fill=green!20] \tikzstyle{rnnnode} = [draw,inner sep=4pt,minimum width=2em,minimum height=2em,rounded corners=1pt,fill=green!15]
\tikzstyle{snode} = [draw,inner sep=4pt,minimum width=2em,minimum height=2em,rounded corners=1pt,fill=red!20] \tikzstyle{snode} = [draw,inner sep=4pt,minimum width=2em,minimum height=2em,rounded corners=1pt,fill=red!15]
\tikzstyle{wode} = [inner sep=0pt,minimum width=2em,minimum height=2em,rounded corners=0pt] \tikzstyle{wode} = [inner sep=0pt,minimum width=2em,minimum height=2em,rounded corners=0pt]
\node [anchor=west,wode] (n1) at (0,0) {$y$}; \node [anchor=west,wode] (n1) at (0,0) {$y$};
\node [anchor=north west,wode] (n2) at ([xshift=3em,yshift=-2.5em]n1.south east) {$x$}; \node [anchor=north west,wode] (n2) at ([xshift=3em,yshift=-2.5em]n1.south east) {$x$};
\node [anchor=south west,rnnnode] (n3) at ([xshift=8em,yshift=0.5em]n2.north east) {生成模型$G$}; \node [anchor=south west,rnnnode,thick] (n3) at ([xshift=8em,yshift=0.5em]n2.north east) {生成模型$G$};
\node [anchor=south east,wode] (n4) at ([xshift=-2em,yshift=0em]n3.north west) {$\tilde{y}$}; \node [anchor=south east,wode] (n4) at ([xshift=-2em,yshift=0em]n3.north west) {$\hat{y}$};
\node [anchor=south,snode] (n5) at ([xshift=0em,yshift=6em]n2.north) {判别网络$D$}; \node [anchor=south,snode,thick] (n5) at ([xshift=0em,yshift=6em]n2.north) {判别网络$D$};
\node [anchor=west,align=left,font=\small] (n6) at ([xshift=15em,yshift=-3em]n5.east) {根据$(\seq{x},\seq{\tilde{y}})$\\成奖励信号}; \node [anchor=west,align=left,font=\small] (n6) at ([xshift=15em,yshift=-3em]n5.east) {根据$(\seq{x},\seq{\hat{y}})$\\成奖励信号};
\draw [->,thick] ([xshift=0em,yshift=-0.3em]n1.north)--([xshift=-0.3em,yshift=-0.1em]n5.south); \draw [->,thick] ([xshift=0em,yshift=-0.3em]n1.north)--([xshift=-0.3em,yshift=-0.1em]n5.south);
......
...@@ -38,35 +38,35 @@ ...@@ -38,35 +38,35 @@
\node [anchor=south,font=\scriptsize] (one_hot_w7) at (one_hot_label7.north) {$0$}; \node [anchor=south,font=\scriptsize] (one_hot_w7) at (one_hot_label7.north) {$0$};
%label smoothing %label smoothing
\node [anchor=west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label1) at ([xshift=1.5em,yshift=-4.4em]model.east) {}; \node [anchor=west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label1) at ([xshift=1.5em,yshift=-4.4em]model.east) {};
\node [anchor=south,font=\scriptsize] (w1) at (label1.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w1) at (label1.north) {$0.1$};
\node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label2) at (label1.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label2) at (label1.south east) {};
\node [anchor=south,font=\scriptsize] (w2) at (label2.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w2) at (label2.north) {$0.1$};
\node [anchor=south west,minimum width=1.2em,minimum height=0.8em,fill=red!50,inner sep=0pt] (label3) at (label2.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.8em,fill=orange!50,inner sep=0pt] (label3) at (label2.south east) {};
\node [anchor=south,font=\scriptsize] (w3) at (label3.north) {{\color{red} $0.4$}}; \node [anchor=south,font=\scriptsize] (w3) at (label3.north) {{\color{red} $0.4$}};
\node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label4) at (label3.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label4) at (label3.south east) {};
\node [anchor=south,font=\scriptsize] (w5) at (label4.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w5) at (label4.north) {$0.1$};
\node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label5) at (label4.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label5) at (label4.south east) {};
\node [anchor=south,font=\scriptsize] (w6) at (label5.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w6) at (label5.north) {$0.1$};
\node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label6) at (label5.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label6) at (label5.south east) {};
\node [anchor=south,font=\scriptsize] (w7) at (label6.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w7) at (label6.north) {$0.1$};
\node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=red!50,inner sep=0pt] (label7) at (label6.south east) {}; \node [anchor=south west,minimum width=1.2em,minimum height=0.2em,fill=orange!50,inner sep=0pt] (label7) at (label6.south east) {};
\node [anchor=south,font=\scriptsize] (w8) at (label7.north) {$0.1$}; \node [anchor=south,font=\scriptsize] (w8) at (label7.north) {$0.1$};
\node[font=\scriptsize] (line1) at ([xshift=9em,yshift=-1.5em]model_label7.east) {$Loss =-0.3 \log p_{3}-\sum_{i=1}^{7} 0.1 \log p_{i}$}; \node[font=\scriptsize] (line1) at ([xshift=13em,yshift=-1.5em]model_label7.east) {$Loss =-0.3 \log p_{3}-\sum_{i=1}^{7} 0.1 \log p_{i}$};
\node[font=\scriptsize] (line2) at ([xshift=5.9em,yshift=3em]model_label7.east) {$Loss =-\log p_{3}$}; \node[font=\scriptsize] (line2) at ([xshift=9.5em,yshift=3em]model_label7.east) {$Loss =-\log p_{3}$};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.5em,rounded corners=1pt,very thick,dotted,draw=red] [fit =(model_w3) (model_label1) (model_label7) (one_hot_w3)] (box1) {}; \node [rectangle,inner sep=0.5em,rounded corners=1pt,very thick,dotted,draw=red] [fit =(model_w3) (model_label1) (model_label7) (one_hot_w3)] (box1) {};
\node [rectangle,inner sep=0.2em,rounded corners=1pt,fill=purple!10,drop shadow,draw=purple] [fit = (line2)] (box3) {}; \node [rectangle,thick,inner sep=0.2em,rounded corners=1pt,fill=purple!10,drop shadow,draw=purple] [fit = (line2)] (box3) {};
\draw [->,dotted,very thick,red] ([yshift=1em]box1.east) .. controls +(east:1) and +(west:1) .. (box3.west); \draw [->,dotted,very thick,red] ([yshift=2em]box1.east) .. controls +(east:1.7) and +(west:1.5) .. (box3.west);
\node [rectangle,inner sep=0.7em,rounded corners=1pt,very thick,dotted,draw=ugreen] [fit =(w3) (label1) (label7) (model_w3)] (box2) {}; \node [rectangle,inner sep=0.7em,rounded corners=1pt,very thick,dotted,draw=ugreen] [fit =(w3) (label1) (label7) (model_w3)] (box2) {};
\node [rectangle,inner sep=0.2em,rounded corners=1pt,fill=green!10,drop shadow,draw=ugreen] [fit = (line1)] (box4) {}; \node [rectangle,thick,inner sep=0.2em,rounded corners=1pt,fill=green!10,drop shadow,draw=ugreen] [fit = (line1)] (box4) {};
\draw [->,dotted,very thick,ugreen] ([yshift=-1.5em]box2.east) .. controls +(east:1) and +(west:1) .. (box4.west); \draw [->,dotted,very thick,ugreen] ([yshift=-2.5em]box2.east) .. controls +(east:1.7) and +(west:1.5) .. (box4.west);
\end{pgfonlayer} \end{pgfonlayer}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
\begin{tikzpicture} \begin{tikzpicture}
\def\neuronsep{1} \def\neuronsep{1}
\tikzstyle{neuronnode} = [minimum size=1.0em,circle,draw,thick,ublue,inner sep=1pt, fill=white,align=center] \tikzstyle{neuronnode} = [minimum size=1.5em,circle,draw=ublue,very thick,inner sep=0pt, fill=white,align=center]
%standard %standard
...@@ -11,67 +11,115 @@ ...@@ -11,67 +11,115 @@
} }
\foreach \n in {1,...,4}{ \foreach \n in {1,...,4}{
\node [neuronnode] (neuron1\n) at (1.2\neuronsep ,\n * \neuronsep) {}; \node [neuronnode] (neuron1\n) at (1.5\neuronsep ,\n * \neuronsep) {};
} }
\foreach \n in {1,...,4}{ \foreach \n in {1,...,4}{
\node [neuronnode] (neuron2\n) at (2.4*\neuronsep ,\n * \neuronsep) {}; \node [neuronnode] (neuron2\n) at (3*\neuronsep ,\n * \neuronsep) {};
} }
\node [neuronnode] (neuron3) at (3.6*\neuronsep ,2.5 * \neuronsep) {}; \node [neuronnode] (neuron3) at (4.5*\neuronsep ,2.5 * \neuronsep) {};
\foreach \n in {1,...,4}{ \foreach \n / \o in {1/180,2/165,3/150,4/135}{
\foreach \m in {1,...,4}{ \draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron11.\o);
\draw [->] (neuron0\n.east) -- (neuron1\m.west); }
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\foreach \m in {2,3}{
\draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron1\m.\o);
} }
} }
\foreach \n in {1,...,4}{ \foreach \n / \o in {1/225,2/210,3/195,4/180}{
\foreach \m in {1,...,4}{ \draw [->,line width=0.2mm] (neuron0\n.east) -- (neuron14.\o);
\draw [->] (neuron1\n.east) -- (neuron2\m.west); }
%\foreach \n in {1,...,4}{
% \foreach \m in {1,...,4}{
% \draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron2\m.west);
% }
%}
\foreach \n / \o in {1/180,2/165,3/150,4/135}{
\draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron21.\o);
}
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\foreach \m in {2,3}{
\draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron2\m.\o);
} }
} }
\foreach \n in {1,...,4}{ \foreach \n / \o in {1/225,2/210,3/195,4/180}{
\draw [->] (neuron2\n.east) -- (neuron3.west); \draw [->,line width=0.2mm] (neuron1\n.east) -- (neuron24.\o);
}
\foreach \n / \o in {1/220,2/190,3/170,4/140}{
\draw [->,line width=0.2mm] (neuron2\n.east) -- (neuron3.\o);
} }
%drop %drop
%layer1 %layer1
\foreach \n in {1,3,4}{ \foreach \n in {1,3,4}{
\node [neuronnode] (neuron4\n) at (5*\neuronsep,\n * \neuronsep) {}; \node [neuronnode] (neuron4\n) at (7*\neuronsep,\n * \neuronsep) {};
} }
\node [neuronnode,dashed] (neuron42) at (5*\neuronsep,2 * \neuronsep) {}; \node [neuronnode,dashed] (neuron42) at (7*\neuronsep,2 * \neuronsep) {};
%layer1 %layer1
\foreach \n in {1,2,4}{ \foreach \n in {1,2,4}{
\node [neuronnode] (neuron5\n) at (6.2*\neuronsep ,\n * \neuronsep) {}; \node [neuronnode] (neuron5\n) at (8.5*\neuronsep ,\n * \neuronsep) {};
} }
\node [neuronnode,dashed] (neuron53) at (6.2*\neuronsep,3 * \neuronsep) {}; \node [neuronnode,dashed] (neuron53) at (8.5*\neuronsep,3 * \neuronsep) {};
%layer3 %layer3
\foreach \n in {1,4}{ \foreach \n in {1,4}{
\node [neuronnode] (neuron6\n) at (7.4*\neuronsep ,\n * \neuronsep) {}; \node [neuronnode] (neuron6\n) at (10*\neuronsep ,\n * \neuronsep) {};
} }
\node [neuronnode,dashed] (neuron62) at (7.4*\neuronsep ,2 * \neuronsep) {}; \node [neuronnode,dashed] (neuron62) at (10*\neuronsep ,2 * \neuronsep) {};
\node [neuronnode,dashed] (neuron63) at (7.4*\neuronsep ,3 * \neuronsep) {}; \node [neuronnode,dashed] (neuron63) at (10*\neuronsep ,3 * \neuronsep) {};
%layer4 %layer4
\node [neuronnode] (neuron7) at (8.6*\neuronsep ,2.5 * \neuronsep) {}; \node [neuronnode] (neuron7) at (11.5*\neuronsep ,2.5 * \neuronsep) {};
\foreach \n in {1,3,4}{ %\foreach \n in {1,3,4}{
\foreach \m in {1,2,4}{ % \foreach \m in {1,2,4}{
\draw [->] (neuron4\n.east) -- (neuron5\m.west); % \draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron5\m.west);
} % }
%}
\foreach \n / \o in {1/180,3/150,4/135}{
\draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron51.\o);
} }
\foreach \n in {1,2,4}{ \foreach \n / \o in {1/220,3/170,4/140}{
\foreach \m in {1,4}{ \foreach \m in {2}{
\draw [->] (neuron5\n.east) -- (neuron6\m.west); \draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron5\m.\o);
} }
} }
\foreach \n in {1,4}{ \foreach \n / \o in {1/225,3/195,4/180}{
\draw [->] (neuron6\n.east) -- (neuron7.west); \draw [->,line width=0.2mm] (neuron4\n.east) -- (neuron54.\o);
}
%\foreach \n in {1,2,4}{
% \foreach \m in {1,4}{
% \draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron6\m.west);
% }
%}
\foreach \n / \o in {1/180,2/165,4/135}{
\draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron61.\o);
}
\foreach \n / \o in {1/225,2/210,4/180}{
\draw [->,line width=0.2mm] (neuron5\n.east) -- (neuron64.\o);
}
%\foreach \n in {1,4}{
% \draw [->,line width=0.2mm] (neuron6\n.east) -- (neuron7.west);
%}
\foreach \n / \o in {1/220,4/140}{
\draw [->,line width=0.2mm] (neuron6\n.east) -- (neuron7.\o);
} }
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{rnnnode} = [draw,inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt,fill=red!15] \tikzstyle{rnnnode} = [draw,thick,inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt,fill=red!15]
\tikzstyle{snode} = [draw,inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt,fill=blue!15] \tikzstyle{snode} = [draw,thick,inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt,fill=blue!15]
\tikzstyle{ynode} = [inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt] \tikzstyle{ynode} = [inner sep=2pt,minimum width=4em,minimum height=2em,rounded corners=1pt]
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
\node [anchor=west,rnnnode] (n3) at ([xshift=3em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$}; \node [anchor=west,rnnnode] (n3) at ([xshift=3em,yshift=0em]n2.east) {$\mathbi{h}_{j-1}$};
\node [anchor=west,rnnnode] (n4) at ([xshift=3em,yshift=0em]n3.east) {$\mathbi{h}_{j}$}; \node [anchor=west,rnnnode] (n4) at ([xshift=3em,yshift=0em]n3.east) {$\mathbi{h}_{j}$};
\node [anchor=south,snode] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax}; \node [anchor=south,snode] (n5) at ([xshift=0em,yshift=1em]n3.north) {Softmax};
\node [anchor=south,ynode] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\tilde{{y}}_{j-1}$}; \node [anchor=south,ynode,fill=green!20] (n6) at ([xshift=0em,yshift=1em]n5.north) {$\hat{{y}}_{j-1}$};
\node [anchor=south,snode] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax}; \node [anchor=south,snode] (n7) at ([xshift=0em,yshift=1em]n4.north) {Softmax};
\node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\tilde{{y}}_{j}$}; \node [anchor=south,ynode] (n8) at ([xshift=0em,yshift=1em]n7.north) {$\hat{{y}}_{j}$};
\node [anchor=south,snode,font=\footnotesize] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax}; \node [anchor=south,snode] (n13) at ([xshift=0em,yshift=1em]n1.north) {Softmax};
\node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\tilde{{y}}_{1}$}; \node [anchor=south,ynode] (n14) at ([xshift=0em,yshift=1em]n13.north) {$\hat{{y}}_{1}$};
\node [anchor=north] (x1) at ([xshift=0em,yshift=-1em]n1.south) {$\langle$sos$\rangle$}; \node [anchor=north] (x1) at ([xshift=0em,yshift=-1em]n1.south) {$\langle$sos$\rangle$};
\node [anchor=north,font=\small] (x2) at ([xshift=-1.3em,yshift=-2.3em]n3.south) {$\tilde{{y}}_{j-2}$}; \node [anchor=north,font=\small] (x2) at ([xshift=-1.3em,yshift=-2.3em]n3.south) {$\hat{{y}}_{j-2}$};
\node [anchor=north,font=\small] (x3) at ([xshift=1.3em,yshift=-2.5em]n3.south) {${y}_{j-2}$}; \node [anchor=north,font=\small] (x3) at ([xshift=1.3em,yshift=-2.5em]n3.south) {${y}_{j-2}$};
\node [anchor=north,font=\small] (x4) at ([xshift=1.3em,yshift=-2.5em]n4.south) {${y}_{j-1}$}; \node [anchor=north,font=\small] (x4) at ([xshift=1.3em,yshift=-2.5em]n4.south) {${y}_{j-1}$};
\node [anchor=north,font=\small] (x5) at ([xshift=-1.3em,yshift=-2.3em]n4.south) {$\tilde{{y}}_{j-1}$}; \node [anchor=north,font=\small,fill=green!20] (x5) at ([xshift=-1.3em,yshift=-2.3em]n4.south) {$\hat{{y}}_{j-1}$};
\node [anchor=south,inner sep=2pt] (st1) at (n6.north) {\scriptsize{\textbf{[step $j-1$]}}}; \node [anchor=south,inner sep=2pt] (st1) at (n6.north) {\scriptsize{\textbf{[step $j-1$]}}};
\node [anchor=south,inner sep=2pt] (st2) at (n8.north) {\scriptsize{\textbf{[step $j$]}}}; \node [anchor=south,inner sep=2pt] (st2) at (n8.north) {\scriptsize{\textbf{[step $j$]}}};
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
\draw [-,thick] ([xshift=0em,yshift=0.2em]x4.north)-- ([xshift=1.3em,yshift=0em]n4.south); \draw [-,thick] ([xshift=0em,yshift=0.2em]x4.north)-- ([xshift=1.3em,yshift=0em]n4.south);
\draw [->,thick,dotted] ([xshift=-2.5em,yshift=1em]x2.north) .. controls +(south:2em) and +(west:0.1em) .. ([xshift=0.2em,yshift=0em]x2.west); \draw [->,thick,dotted] ([xshift=-2.5em,yshift=1em]x2.north) .. controls +(south:2em) and +(west:0.1em) .. ([xshift=0.2em,yshift=0em]x2.west);
\draw [->,thick,dotted] ([xshift=0em,yshift=0em]n6.east) .. controls ([xshift=2em,yshift=1em]n6.east) and ([xshift=-2.5em,yshift=-4em]n4.south west) .. ([xshift=-0em,yshift=-0em]x5.west); \draw [->,thick,dotted,ugreen] ([xshift=0em,yshift=0em]n6.east) .. controls +(east:2.5em) and +(west:2.5em) .. ([xshift=-0em,yshift=-0em]x5.west);
\draw [->,thick,dotted] ([xshift=0em,yshift=0em]n14.east) .. controls +(east:0.3em) and +(north:2em) .. ([xshift=3em,yshift=-0.5em]n14.south); \draw [->,thick,dotted] ([xshift=0em,yshift=0em]n14.east) .. controls +(east:0.3em) and +(north:1.5em) .. ([xshift=3em,yshift=-0.5em]n14.south);
\end{tikzpicture} \end{tikzpicture}
\begin{tikzpicture} \begin{tikzpicture}
\node[anchor=west,inner sep=0mm,minimum height=4em,minimum width=5.5em,rounded corners=15pt,align=left,draw,fill=red!15] (n1) at (0,0) {Decoder\\Encoder}; \node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=8em,rounded corners=15pt,align=left,draw,fill=red!15] (n1) at (0,0) {Decoder\\Encoder};
\node[anchor=west,inner sep=0mm,minimum height=4em,minimum width=5.5em,rounded corners=15pt,align=left,draw,fill=green!15] (n2) at ([xshift=10em,yshift=0em]n1.east) {Decoder\\Encoder}; \node[anchor=west,thick,inner sep=0mm,minimum height=4em,minimum width=8em,rounded corners=15pt,align=left,draw,fill=green!15] (n2) at ([xshift=14em,yshift=0em]n1.east) {Decoder\\Encoder};
\node[anchor=south,inner sep=0mm,font=\small] (a1) at ([xshift=0em,yshift=1em]n1.north) {演员$p$}; \node[anchor=south,inner sep=0mm,font=\small] (a1) at ([xshift=0em,yshift=1em]n1.north) {演员$p$};
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
%\draw [->,dotted,very thick] ([xshift=0em,yshift=0em]n1.east) .. controls ([xshift=3em,yshift=-1em]n1.-90) and ([xshift=-3em,yshift=-1em]n2.-90) .. (n2.west); %\draw [->,dotted,very thick] ([xshift=0em,yshift=0em]n1.east) .. controls ([xshift=3em,yshift=-1em]n1.-90) and ([xshift=-3em,yshift=-1em]n2.-90) .. (n2.west);
\node[anchor=west,inner sep=0mm] (n3) at ([xshift=2.1em,yshift=1em]n1.east) {$Q_1,Q_2,\ldots,Q_J$}; \node[anchor=west,inner sep=0mm] (n3) at ([xshift=4.1em,yshift=1em]n1.east) {$Q_1,Q_2,\ldots,Q_J$};
\node[anchor=west,inner sep=0mm] (n4) at ([xshift=2.9em,yshift=-1em]n1.east) {$\tilde{{y}}_1,\tilde{{y}}_2,\ldots,\tilde{{y}}_J$}; \node[anchor=west,inner sep=0mm] (n4) at ([xshift=4.9em,yshift=-1em]n1.east) {$\tilde{{y}}_1,\tilde{{y}}_2,\ldots,\tilde{{y}}_J$};
\draw [->,thick] ([xshift=-0.1em,yshift=0.6em]n2.west) -- ([xshift=0.1em,yshift=0.6em]n1.east); \draw [->,thick] ([xshift=-0.1em,yshift=0.6em]n2.west) -- ([xshift=0.1em,yshift=0.6em]n1.east);
\draw [->,thick] ([xshift=0.1em,yshift=-0.6em]n1.east) -- ([xshift=-0.1em,yshift=-0.6em]n2.west); \draw [->,thick] ([xshift=0.1em,yshift=-0.6em]n1.east) -- ([xshift=-0.1em,yshift=-0.6em]n2.west);
......
\begin{tabular}{l l l} \begin{tabular}{l l l l l}
\begin{tikzpicture} \begin{tikzpicture}
\draw[->, thick] (0,0) to (3,0); \draw[->, thick] (0,0) to (3,0);
\draw[->, thick] (0,-0) to (0,2); \draw[->, thick] (0,-0) to (0,2);
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
\node [font=\footnotesize] at (1.5,-0.5) {欠拟合}; \node [font=\footnotesize] at (1.5,-0.5) {欠拟合};
\end{tikzpicture} \end{tikzpicture}
&
\hspace{3em}
&\begin{tikzpicture} &\begin{tikzpicture}
\draw[->, thick] (0,0) to (3,0); \draw[->, thick] (0,0) to (3,0);
\draw[->, thick] (0,-0) to (0,2); \draw[->, thick] (0,-0) to (0,2);
...@@ -52,6 +56,10 @@ ...@@ -52,6 +56,10 @@
\node [font=\footnotesize] at (1.5,-0.5) {拟合合适}; \node [font=\footnotesize] at (1.5,-0.5) {拟合合适};
\end{tikzpicture} \end{tikzpicture}
&
\hspace{3em}
&\begin{tikzpicture} &\begin{tikzpicture}
\draw[->, thick] (0,0) to (3,0); \draw[->, thick] (0,0) to (3,0);
\draw[->, thick] (0,-0) to (0,2); \draw[->, thick] (0,-0) to (0,2);
......
\begin{tikzpicture} \begin{tikzpicture}
\node[rounded corners=3pt,minimum width=1.0em,minimum height=2.0em,font=\scriptsize,fill=green!5,drop shadow,thick](top) at (0,0) { \node[rounded corners=3pt,minimum width=1.0em,minimum height=2.0em,font=\scriptsize,fill=red!10,drop shadow,thick](top) at (0,0) {
\begin{tabular}{lllllll} \begin{tabular}{lllllll}
\multicolumn{7}{c}{符号合并表} \\ \multicolumn{7}{c}{符号合并表} \\
r\ $<$e$>$, & e\ s, & l\ o, & es\ t, & lo\ w, & est\ $<$e$>$, & e\ r$<$e$>$, (r,$<$e$>$), & (e,s), & (l,o), & (es,t), & (lo,w), & (est,$<$e$>$), & (e,r$<$e$>$),
\end{tabular} \end{tabular}
}; };
\node[font=\footnotesize,anchor=north] (l1) at ([xshift=0em,yshift=-1em]top.south) {(a) 符号合并表}; \node[font=\footnotesize,anchor=north] (l1) at ([xshift=0em,yshift=-1em]top.south) {(a) 符号合并表};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=5cm,minimum height=0.6cm,text centered,draw=black,fill=blue!15,drop shadow] \tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=5cm,minimum height=0.6cm,text centered,draw=black,fill=blue!25,drop shadow]
\begin{scope} \begin{scope}
\node (encoder) at (0,0) {来自编码器的信息}; \node (encoder) at (0,0) {来自编码器的信息};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{snode} = [draw,inner sep=1pt,minimum width=3em,minimum height=0.5em,rounded corners=1pt,fill=green!20!white] \tikzstyle{snode} = [draw,inner sep=1pt,minimum width=3em,minimum height=0.5em,rounded corners=1pt,fill=green!30!white]
\tikzstyle{pnode} = [draw,inner sep=1pt,minimum width=1em,minimum height=0.5em,rounded corners=1pt] \tikzstyle{pnode} = [draw,inner sep=1pt,minimum width=1em,minimum height=0.5em,rounded corners=1pt]
\node [anchor=west,snode] (s1) at (0,0) {\tiny{}}; \node [anchor=west,snode] (s1) at (0,0) {\tiny{}};
\node [anchor=north west,snode,minimum width=6.3em] (s2) at ([yshift=-0.3em]s1.south west) {\tiny{}}; \node [anchor=north west,snode,minimum width=6.3em] (s2) at ([yshift=-0.3em]s1.south west) {\tiny{}};
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
\node [anchor=north west,snode,minimum width=3em] (s6) at ([yshift=-0.3em]s5.south west) {\tiny{}}; \node [anchor=north west,snode,minimum width=3em] (s6) at ([yshift=-0.3em]s5.south west) {\tiny{}};
\node [anchor=east] (label1) at ([xshift=-0.8em,yshift=-2em]s1.west) {{句子:}}; \node [anchor=east] (label1) at ([xshift=-0.8em,yshift=-2em]s1.west) {{句子:}};
\node [anchor=east,draw,dashed,minimum height=7.5cm,minimum width=7.3cm,thick] (box) at ([xshift=10.9cm]label1.east) {}; \node [anchor=east,draw,dashed,minimum height=7.5cm,minimum width=7.3cm,very thick] (box) at ([xshift=10.9cm]label1.east) {};
%\node [anchor=north] (label6) at ([xshift=3em,yshift=7em]label1.north) {{$m$:显存}}; %\node [anchor=north] (label6) at ([xshift=3em,yshift=7em]label1.north) {{$m$:显存}};
%\node [anchor=north] (label7) at ([xshift=3.3em,yshift=5.5em]label1.north) {{$t$:延迟}}; %\node [anchor=north] (label7) at ([xshift=3.3em,yshift=5.5em]label1.north) {{$t$:延迟}};
\node [anchor=west,pnode,minimum width=3em] (p1) at ([xshift=0.3em]s1.east) {\tiny{}}; \node [anchor=west,pnode,minimum width=3em] (p1) at ([xshift=0.3em]s1.east) {\tiny{}};
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
\draw [->,thick] (model.east) .. controls +(east:0.5) and +(west:0.5) .. ([xshift=-1.8em]box1.west); \draw [->,thick] (model.east) .. controls +(east:0.5) and +(west:0.5) .. ([xshift=-1.8em]box1.west);
\draw [->,thick] (model.east) .. controls +(east:0.5) and +(west:0.5) .. ([xshift=-1.8em]box2.west); \draw [->,thick] (model.east) .. controls +(east:0.5) and +(west:0.5) .. ([xshift=-1.8em]box2.west);
\draw [-,very thick] ([xshift=0.3em]box2.east) -- ([xshift=-0.3em]box3.west); \draw [-,very thick] ([xshift=0.3em]box2.east) -- ([xshift=-0.3em]box3.west);
\draw [-,very thick] ([xshift=0.782em,yshift=0.5em]box2.east) -- ([xshift=0.782em,yshift=-0.5em]box2.east); \draw [-,very thick] ([xshift=0.782em,yshift=0.48em]box2.east) -- ([xshift=0.782em,yshift=-0.48em]box2.east);
%%%%% %%%%%
\node [] (t10) at ([yshift=1.5em]box1.north) {$t_1$}; \node [] (t10) at ([yshift=1.5em]box1.north) {$t_1$};
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
\begin{tikzpicture} \begin{tikzpicture}
\scriptsize{ \scriptsize{
\begin{axis}[ \begin{axis}[
width=8cm, width=12cm,
height=5cm, height=5cm,
yticklabel style={/pgf/number format/.cd,fixed,precision=2}, yticklabel style={/pgf/number format/.cd,fixed,precision=2},
xticklabel style={color=white},, xticklabel style={color=white},,
xlabel={\footnotesize{搜索束大小(取$\log$}},ylabel={\footnotesize{BLEU\ \%}}, xlabel={\footnotesize{搜索束大小(取$\log$}},ylabel={\footnotesize{BLEU\;[\%]}},
ymin=28.8,ymax=30.4, ymin=28.8,ymax=30.4,
xmin=0,xmax=7, xmin=0,xmax=7,
xtick={0,1,2.32,3.32,4.91,6.64}, xtick={0,1,2.32,3.32,4.91,6.64},
...@@ -19,12 +19,12 @@ legend style={yshift=-5em,xshift=0em,legend cell align=left,legend plot pos=righ ...@@ -19,12 +19,12 @@ legend style={yshift=-5em,xshift=0em,legend cell align=left,legend plot pos=righ
\addplot[purple,mark=square,mark=star,very thick] coordinates {(0,29.3) (1,29.7) (1.58,30.05) (2.32,30.1) (3,30.2) (3.32,30.3) (3.9,30.2) (4.32,30.08) (4.91,29.98) (5.91,29.6)(6.64,28.8) }; \addplot[purple,mark=square,mark=star,very thick] coordinates {(0,29.3) (1,29.7) (1.58,30.05) (2.32,30.1) (3,30.2) (3.32,30.3) (3.9,30.2) (4.32,30.08) (4.91,29.98) (5.91,29.6)(6.64,28.8) };
\end{axis} \end{axis}
\node[inner sep=0pt] at (0,-1em) {$\log$1}; \node[inner sep=0pt] at (0,-1em) {$\log$1};
\node[inner sep=0pt] at (1,-1em) {$\log$2}; \node[inner sep=0pt] at (1.5,-1em) {$\log$2};
%\node[inner sep=0pt] at (1.58,-1em) {$\log$3}; %\node[inner sep=0pt] at (1.58,-1em) {$\log$3};
\node[inner sep=0pt] at (2.15,-1em) {$\log$5}; \node[inner sep=0pt] at (3.5,-1em) {$\log$5};
\node[inner sep=0pt] at (3.05,-1em) {$\log$10}; \node[inner sep=0pt] at (5.05,-1em) {$\log$10};
\node[inner sep=0pt] at (4.45,-1em) {$\log$30}; \node[inner sep=0pt] at (7.4,-1em) {$\log$30};
\node[inner sep=0pt] at (6,-1em) {$\log$100}; \node[inner sep=0pt] at (10.05,-1em) {$\log$100};
} }
\end{tikzpicture} \end{tikzpicture}
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{layer} = [rectangle,draw,rounded corners=3pt,minimum width=1cm,minimum height=0.5cm,line width=1pt]; \tikzstyle{layer} = [rectangle,draw,rounded corners=3pt,minimum width=1cm,minimum height=0.5cm,line width=1pt];
\tikzstyle{prob} = [minimum width=0.3cm,rectangle,fill=ugreen!20!white,inner sep=0pt]; \tikzstyle{prob} = [minimum width=0.3cm,rectangle,fill=ugreen!30!white,inner sep=0pt];
\begin{scope}[local bounding box=STANDARD] \begin{scope}[local bounding box=STANDARD]
\node [] (input1) at (0,0) {$\cdots$}; \node [] (input1) at (0,0) {$\cdots$};
\node [anchor=south,layer,fill=orange!15!white] (net1) at ([yshift=0.5cm]input1.north) {}; \node [anchor=south,layer,fill=orange!25!white] (net1) at ([yshift=0.5cm]input1.north) {};
\node [anchor=south,layer,fill=orange!15!white] (out1) at ([yshift=0.5cm]net1.north) {}; \node [anchor=south,layer,fill=orange!25!white] (out1) at ([yshift=0.5cm]net1.north) {};
\node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out1.north) {}; \node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out1.north) {};
\node [anchor=south east,prob,minimum height=0.1cm] (prob4) at ([xshift=-1pt]prob5.south west) {}; \node [anchor=south east,prob,minimum height=0.1cm] (prob4) at ([xshift=-1pt]prob5.south west) {};
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
\node [anchor=south west,prob,minimum height=0.2cm] (prob8) at ([xshift=1pt]prob7.south east) {}; \node [anchor=south west,prob,minimum height=0.2cm] (prob8) at ([xshift=1pt]prob7.south east) {};
\node [anchor=south west,prob,minimum height=0.1cm] (prob9) at ([xshift=1pt]prob8.south east) {}; \node [anchor=south west,prob,minimum height=0.1cm] (prob9) at ([xshift=1pt]prob8.south east) {};
\path [fill=blue!20!white,draw=white] (out1.north west) -- (prob1.south west) -- (prob9.south east) -- (out1.north east) -- (out1.north west); \path [fill=blue!30!white,draw=white] (out1.north west) -- (prob1.south west) -- (prob9.south east) -- (out1.north east) -- (out1.north west);
\draw [->,line width=1pt] (input1) to (net1); \draw [->,line width=1pt] (input1) to (net1);
\draw [->,line width=1pt] (net1) to (out1); \draw [->,line width=1pt] (net1) to (out1);
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
\end{scope} \end{scope}
\begin{scope}[local bounding box=SELECTION] \begin{scope}[local bounding box=SELECTION]
\node [] (input2) at (4.5cm,0) {$\cdots$}; \node [] (input2) at (6cm,0) {$\cdots$};
\node [anchor=south,layer,fill=orange!15!white] (net2) at ([yshift=0.5cm]input2.north) {}; \node [anchor=south,layer,fill=orange!25!white] (net2) at ([yshift=0.5cm]input2.north) {};
\node [anchor=south,layer,fill=orange!15!white] (out2) at ([yshift=0.5cm]net2.north) {}; \node [anchor=south,layer,fill=orange!25!white] (out2) at ([yshift=0.5cm]net2.north) {};
\node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out2.north) {}; \node [anchor=south,prob,minimum height=0.9cm] (prob5) at ([yshift=1.2cm]out2.north) {};
\node [anchor=south east,prob,minimum height=0.1cm,opacity=0] (prob4) at ([xshift=-1pt]prob5.south west) {}; \node [anchor=south east,prob,minimum height=0.1cm,opacity=0] (prob4) at ([xshift=-1pt]prob5.south west) {};
...@@ -49,16 +49,16 @@ ...@@ -49,16 +49,16 @@
\node [anchor=south west,prob,minimum height=0.1cm,opacity=0] (prob9) at ([xshift=1pt]prob8.south east) {}; \node [anchor=south west,prob,minimum height=0.1cm,opacity=0] (prob9) at ([xshift=1pt]prob8.south east) {};
\node [text=red,anchor=south,inner sep=1pt] (plabel9) at (prob9.south) {$\times$}; \node [text=red,anchor=south,inner sep=1pt] (plabel9) at (prob9.south) {$\times$};
\path [fill=blue!20!white,draw=white] (out2.north west) -- (prob1.south west) -- (prob9.south east) -- (out2.north east) -- (out2.north west); \path [fill=blue!30!white,draw=white] (out2.north west) -- (prob1.south west) -- (prob9.south east) -- (out2.north east) -- (out2.north west);
\draw [->,line width=1pt] (input2) to (net2); \draw [->,line width=1pt] (input2) to (net2);
\draw [->,line width=1pt] (net2) to (out2); \draw [->,line width=1pt] (net2) to (out2);
\node [font=\small] (label2) at ([yshift=0.6cm]out2.north) {Softmax}; \node [font=\small] (label2) at ([yshift=0.6cm]out2.north) {Softmax};
\node [anchor=west,layer,fill=orange!15!white] (net3) at ([xshift=2cm]net2.east) {}; \node [anchor=west,layer,fill=orange!25!white] (net3) at ([xshift=2cm]net2.east) {};
\node [anchor=north,font=\scriptsize] (input3) at ([yshift=-0.5cm]net3.south) {源语言}; \node [anchor=north,font=\scriptsize] (input3) at ([yshift=-0.5cm]net3.south) {源语言};
\node [anchor=south,layer,align=center,font=\scriptsize,fill=yellow!10!white] (out3) at ([yshift=0.9cm]net3.north) {候选\\列表}; \node [anchor=south,layer,align=center,font=\scriptsize,fill=yellow!25!white] (out3) at ([yshift=0.9cm]net3.north) {候选\\列表};
\draw [->,line width=1pt] (input3) to (net3); \draw [->,line width=1pt] (input3) to (net3);
\draw [->,line width=1pt] (net3) to (out3); \draw [->,line width=1pt] (net3) to (out3);
......
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
\node [anchor=north west] (part1) at (0,0) {\small{$\begin{bmatrix} \textrm{Have} \; 0.5 \\ \textrm{Has} \ \ \; 0.1 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}}; \node [anchor=north west] (part1) at (0,0) {\small{$\begin{bmatrix} \textrm{Have} \; 0.5 \\ \textrm{Has} \ \ \; 0.1 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p1) at ([yshift=-0.3em]part1.south) {$P_1$}; \node [anchor=north](p1) at ([yshift=-0.3em]part1.south) {$P_1$};
\node [anchor=west](part2) at ([xshift=0.5em]part1.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.2 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}}; \node [anchor=west](part2) at ([xshift=0.8em]part1.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.2 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p2) at ([yshift=-0.3em]part2.south) {$P_2$}; \node [anchor=north](p2) at ([yshift=-0.3em]part2.south) {$P_2$};
\node [anchor=west](part3) at ([xshift=0.5em]part2.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.4 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}}; \node [anchor=west](part3) at ([xshift=0.8em]part2.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.4 \\ \textrm{Has} \ \ \; 0.3 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p3) at ([yshift=-0.3em]part3.south) {$P_3$}; \node [anchor=north](p3) at ([yshift=-0.3em]part3.south) {$P_3$};
\node [anchor=west](part4) at ([xshift=0.5em]part3.east){\huge{$\Rightarrow$}}; \node [anchor=west](part4) at ([xshift=0.8em]part3.east){\huge{$\Rightarrow$}};
\node [anchor=west](part5) at ([xshift=0.5em]part4.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.37 \\ \textrm{Has} \ \ \; 0.23 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}}; \node [anchor=west](part5) at ([xshift=0.8em]part4.east){\small{$\begin{bmatrix} \textrm{Have} \; 0.37 \\ \textrm{Has} \ \ \; 0.23 \\ . \\ . \\ . \\ . \\ . \end{bmatrix}$}};
\node [anchor=north](p5) at (part5.south) {$P=\sum\limits_{i=1}^{3}{\frac{1}{3}P_{i}}$}; \node [anchor=north](p5) at (part5.south) {$P=\sum\limits_{i=1}^{3}{\frac{1}{3}P_{i}}$};
\end{tikzpicture} \end{tikzpicture}
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
\end{scope} \end{scope}
\begin{scope}[local bounding box=SINGLE] \begin{scope}[local bounding box=SINGLE]
\node [output,fill=green!20,draw,anchor=west] (output3) at ([xshift=4cm]output3.east) {输出 $n$}; \node [output,fill=green!20,draw,anchor=west] (output3) at ([xshift=5.5cm]output3.east) {输出 $n$};
\node [output,fill=green!20,draw,anchor=west] (output2) at ([xshift=4cm]output2.east) {输出 $2$}; \node [output,fill=green!20,draw,anchor=west] (output2) at ([xshift=5.5cm]output2.east) {输出 $2$};
\node [output,fill=green!20,draw,anchor=west] (output1) at ([xshift=4cm]output1.east) {输出 $1$}; \node [output,fill=green!20,draw,anchor=west] (output1) at ([xshift=5.5cm]output1.east) {输出 $1$};
\node [system,fill=green!20,draw,anchor=east,align=center,inner sep=1.9pt] (engine) at ([xshift=-0.5cm]output2.west) {单系统}; \node [system,fill=green!20,draw,anchor=east,align=center,inner sep=1.9pt] (engine) at ([xshift=-0.5cm]output2.west) {单系统};
......
...@@ -5,44 +5,44 @@ ...@@ -5,44 +5,44 @@
\tikzstyle{er} = [rectangle,minimum width=2.5cm,minimum height=1.5cm,rounded corners,text centered,draw,drop shadow] \tikzstyle{er} = [rectangle,minimum width=2.5cm,minimum height=1.5cm,rounded corners,text centered,draw,drop shadow]
\begin{tikzpicture}[node distance = 0,scale = 0.75] \begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75] \tikzstyle{every node}=[scale=0.75]
\node (encoder)[er,thick,draw,fill=red!20,minimum width=2.8cm]{\Large{编码器}}; \node (encoder)[er,thick,draw,fill=red!25,minimum width=2.8cm]{\Large{编码器}};
\node (lenpre)[er,anchor=north,thick,draw,fill=yellow!20,minimum height=0.8cm] at ([yshift=1.5cm]encoder.north){\Large{长度预测器}}; \node (lenpre)[er,anchor=north,thick,draw,fill=yellow!30,minimum height=0.8cm] at ([yshift=1.5cm]encoder.north){\Large{长度预测器}};
\node (decoder_1)[er,thick,draw,right of=encoder,xshift=5cm,fill=blue!20]{\Large{解码器}}; \node (decoder_1)[er,thick,draw,right of=encoder,xshift=5cm,fill=blue!25]{\Large{解码器}};
\node (decoder_2)[er,thick,draw,right of=decoder_1,xshift=3.7cm,fill=blue!20]{\Large{解码器}}; \node (decoder_2)[er,thick,draw,right of=decoder_1,xshift=3.7cm,fill=blue!25]{\Large{解码器}};
\node (point)[right of=decoder_2,xshift=3cm,]{\LARGE{...}}; \node (point)[right of=decoder_2,xshift=3cm,]{\LARGE{...}};
\node (decoder_3)[er,thick,draw,right of=point,xshift=3cm,fill=blue!20]{\Large{解码器}}; \node (decoder_3)[er,thick,draw,right of=point,xshift=3cm,fill=blue!20]{\Large{解码器}};
\draw [->,very thick,draw=black!70]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder_1.west); \draw [->,very thick,draw=black]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder_1.west);
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]encoder.south) -- ([xshift=0]encoder.south); \draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]encoder.south) -- ([xshift=0]encoder.south);
\draw [->,very thick,draw=black!70](encoder.north) -- (lenpre.south); \draw [->,very thick,draw=black](encoder.north) -- (lenpre.south);
\node [below of = encoder,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x}$}; \node [below of = encoder,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x}$};
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]decoder_1.south) -- ([xshift=0]decoder_1.south); \draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]decoder_1.south) -- ([xshift=0]decoder_1.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_1.north) -- ([xshift=0,yshift=1cm]decoder_1.north); \draw [->,very thick,draw=black]([xshift=0]decoder_1.north) -- ([xshift=0,yshift=1cm]decoder_1.north);
\node (d1x) [below of = decoder_1,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x'}$}; \node (d1x) [below of = decoder_1,xshift=0cm,yshift=-2.2cm]{\Large$\seq{x'}$};
\draw [-,very thick,draw=black!70] (lenpre.east) --([xshift=1.26cm]lenpre.east); \draw [-,very thick,draw=black] (lenpre.east) --([xshift=1.26cm]lenpre.east);
\draw [-,very thick,draw=black!70,dashed] ([xshift=1.26cm]lenpre.east) -- ([xshift=-2cm]d1x.west); \draw [-,very thick,draw=black,dashed] ([xshift=1.26cm]lenpre.east) -- ([xshift=-2cm]d1x.west);
\draw [->,very thick,draw=black!70] ([xshift=-2cm]d1x.west) -- ([xshift=0cm]d1x.west); \draw [->,very thick,draw=black] ([xshift=-2cm]d1x.west) -- ([xshift=0cm]d1x.west);
\node (line1_1)[below of = decoder_1,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[1]}$}; \node (line1_1)[below of = decoder_1,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[1]}$};
\draw [->,thick,]([xshift=0,yshift=-1cm]decoder_2.south) -- ([xshift=0]decoder_2.south); \draw [->,thick,]([xshift=0,yshift=-1cm]decoder_2.south) -- ([xshift=0]decoder_2.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_2.north) -- ([xshift=0,yshift=1cm]decoder_2.north); \draw [->,very thick,draw=black]([xshift=0]decoder_2.north) -- ([xshift=0,yshift=1cm]decoder_2.north);
\node (line1_2)[below of = decoder_2,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[1]}$}; \node (line1_2)[below of = decoder_2,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[1]}$};
\node (line2_1)[below of = decoder_2,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[2]}$}; \node (line2_1)[below of = decoder_2,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[2]}$};
\node (line2_2)[below of = point,xshift=0cm,yshift=-2.2cm]{}; \node (line2_2)[below of = point,xshift=0cm,yshift=-2.2cm]{};
\node (line3_1)[below of = point,xshift=0cm,yshift=2.2cm]{}; \node (line3_1)[below of = point,xshift=0cm,yshift=2.2cm]{};
\draw [->,very thick,draw=black!70]([xshift=0,yshift=-1cm]decoder_3.south) -- ([xshift=0]decoder_3.south); \draw [->,very thick,draw=black]([xshift=0,yshift=-1cm]decoder_3.south) -- ([xshift=0]decoder_3.south);
\draw [->,very thick,draw=black!70]([xshift=0]decoder_3.north) -- ([xshift=0,yshift=1cm]decoder_3.north); \draw [->,very thick,draw=black]([xshift=0]decoder_3.north) -- ([xshift=0,yshift=1cm]decoder_3.north);
\node (line3_2)[below of = decoder_3,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[N-1]}$}; \node (line3_2)[below of = decoder_3,xshift=0cm,yshift=-2.2cm]{\Large$\seq{y}^{[N-1]}$};
\node [below of = decoder_3,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[N]}$}; \node [below of = decoder_3,xshift=0cm,yshift=2.2cm]{\Large$\seq{y}^{[N]}$};
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line1_1.east) to (line1_2.west); \draw[->,very thick,draw=black, out=0, in=180,dotted] (line1_1.east) to (line1_2.west);
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line2_1.east) to (line2_2.west); \draw[->,very thick,draw=black, out=0, in=180,dotted] (line2_1.east) to (line2_2.west);
\draw[->,very thick,draw=black!70, out=0, in=180,dotted] (line3_1.east) to (line3_2.west); \draw[->,very thick,draw=black, out=0, in=180,dotted] (line3_1.east) to (line3_2.west);
\draw [->,very thick,draw=black!70] ([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-2.8cm]encoder.east) --([xshift=5.55cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]decoder_2.west) -- (decoder_2.west); \draw [->,very thick,draw=black] ([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-2.8cm]encoder.east) --([xshift=5.55cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]decoder_2.west) -- (decoder_2.west);
\draw [->,very thick,draw=black!70] ([xshift=5.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=9.45cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]point.west) -- (point.west); \draw [->,very thick,draw=black] ([xshift=5.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=9.45cm,yshift=-2.8cm]encoder.east) --([xshift=-0.5cm]point.west) -- (point.west);
\draw [->,very thick,draw=black!70] ([xshift=9.45cm,yshift=-2.8cm]encoder.east) -- ([xshift=11.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=-0.5cm]decoder_3.west) -- (decoder_3.west); \draw [->,very thick,draw=black] ([xshift=9.45cm,yshift=-2.8cm]encoder.east) -- ([xshift=11.55cm,yshift=-2.8cm]encoder.east) -- ([xshift=-0.5cm]decoder_3.west) -- (decoder_3.west);
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture} \begin{tikzpicture}
%左 %左
\node [anchor=west,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=red!15,align=center,text=black] (part1) at (0,0) {\small{预测模块}}; \node [anchor=west,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=red!30,align=center,text=black] (part1) at (0,0) {\small{预测模块}};
\node [anchor=south] (text) at ([xshift=0.5em,yshift=-3.5em]part1.south) {\scriptsize{源语言句子(编码器输出)}}; \node [anchor=south] (text) at ([xshift=0.5em,yshift=-3.5em]part1.south) {\scriptsize{源语言句子(编码器输出)}};
\node [anchor=east,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=green!15,align=center,text=black] (part2) at ([xshift=10em]part1.east) {\small{搜索模块}}; \node [anchor=east,draw=black!70,rounded corners,drop shadow,very thick,minimum width=6em,minimum height=3.5em,fill=green!30,align=center,text=black] (part2) at ([xshift=10em]part1.east) {\small{搜索模块}};
\node [anchor=south] (text1) at ([xshift=0.1em,yshift=2.2em]part1.north) {\scriptsize{译文中已经生成的单词}}; \node [anchor=south] (text1) at ([xshift=0.1em,yshift=2.2em]part1.north) {\scriptsize{译文中已经生成的单词}};
\node [anchor=south] (text2) at ([xshift=0.5em,yshift=2.2em]part2.north) {\scriptsize{预测当前位置的单词概率分布}}; \node [anchor=south] (text2) at ([xshift=0.5em,yshift=2.2em]part2.north) {\scriptsize{预测当前位置的单词概率分布}};
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
\tikzstyle{er} = [rectangle,minimum width=7cm,minimum height=2.5cm,text centered,draw,drop shadow,rounded corners] \tikzstyle{er} = [rectangle,minimum width=7cm,minimum height=2.5cm,text centered,draw,drop shadow,rounded corners]
\begin{tikzpicture}[node distance = 0,scale = 0.55] \begin{tikzpicture}[node distance = 0,scale = 0.55]
\tikzstyle{every node}=[scale=0.55] \tikzstyle{every node}=[scale=0.55]
\node (encoder)[er,thick,minimum width=5.5cm,fill=red!20]{\huge{编码器}}; \node (encoder)[er,thick,minimum width=5.5cm,fill=red!25]{\huge{编码器}};
\node (decoder)[er,thick,right of=encoder,xshift=8.75cm,fill=blue!20]{\huge{解码器}}; \node (decoder)[er,thick,right of=encoder,xshift=8.75cm,fill=blue!25]{\huge{解码器}};
\node (decoder_1)[er,thick,right of=decoder,xshift=8.75cm,fill=blue!20]{\huge{解码器}}; \node (decoder_1)[er,thick,right of=decoder,xshift=8.75cm,fill=blue!25]{\huge{解码器}};
\draw [->,very thick,draw=black!70]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder.west); \draw [->,very thick,draw=black]([xshift=0cm]encoder.east) -- ([xshift=-0cm]decoder.west);
\foreach \x in {-2.2cm,-1.1cm,...,2.2cm} \foreach \x in {-2.2cm,-1.1cm,...,2.2cm}
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]encoder.south) -- ([xshift=\x,yshift=-0.2cm]encoder.south); \draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]encoder.south) -- ([xshift=\x,yshift=-0.2cm]encoder.south);
\node [below of = encoder,xshift=-2.3cm,yshift=-2.92cm,scale=1.2]{\small{<LEN>}}; \node [below of = encoder,xshift=-2.3cm,yshift=-2.92cm,scale=1.2]{\small{<LEN>}};
\node [below of = encoder,xshift=-1cm,yshift=-2.9cm,scale=1.2]{\large{Hello}}; \node [below of = encoder,xshift=-1cm,yshift=-2.9cm,scale=1.2]{\large{Hello}};
\node [below of = encoder,xshift=0cm,yshift=-3.05cm,scale=1.2]{,}; \node [below of = encoder,xshift=0cm,yshift=-3.05cm,scale=1.2]{,};
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
\foreach \x in {-2.7cm,-0.9cm,...,2.8cm} \foreach \x in {-2.7cm,-0.9cm,...,2.8cm}
{\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]decoder.south) -- ([xshift=\x,yshift=-0.2cm]decoder.south); {\draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]decoder.south) -- ([xshift=\x,yshift=-0.2cm]decoder.south);
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=0.2cm]decoder.north) -- ([xshift=\x,yshift=1cm]decoder.north);} \draw [->,very thick,draw=black]([xshift=\x,yshift=0.2cm]decoder.north) -- ([xshift=\x,yshift=1cm]decoder.north);}
\node (mask_1) [below of = decoder,xshift=-3cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}}; \node (mask_1) [below of = decoder,xshift=-3cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder,xshift=-1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}}; \node [below of = decoder,xshift=-1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder,xshift=1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}}; \node [below of = decoder,xshift=1cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
\foreach \x in {-2.7cm,-0.9cm,...,2.8cm} \foreach \x in {-2.7cm,-0.9cm,...,2.8cm}
{\draw [->,very thick,draw=black!70]([xshift=\x,yshift=-1cm]decoder_1.south) -- ([xshift=\x,yshift=-0.2cm]decoder_1.south); {\draw [->,very thick,draw=black]([xshift=\x,yshift=-1cm]decoder_1.south) -- ([xshift=\x,yshift=-0.2cm]decoder_1.south);
\draw [->,very thick,draw=black!70]([xshift=\x,yshift=0.2cm]decoder_1.north) -- ([xshift=\x,yshift=1cm]decoder_1.north);} \draw [->,very thick,draw=black]([xshift=\x,yshift=0.2cm]decoder_1.north) -- ([xshift=\x,yshift=1cm]decoder_1.north);}
\node [below of = decoder_1,xshift=-2.7cm,yshift=2.9cm,scale=1.6]{你好}; \node [below of = decoder_1,xshift=-2.7cm,yshift=2.9cm,scale=1.6]{你好};
\node [below of = decoder_1,xshift=-0.9cm,yshift=2.7cm,scale=1.6]{}; \node [below of = decoder_1,xshift=-0.9cm,yshift=2.7cm,scale=1.6]{};
\node [below of = decoder_1,xshift=0.9cm,yshift=2.9cm,scale=1.6]{世界}; \node [below of = decoder_1,xshift=0.9cm,yshift=2.9cm,scale=1.6]{世界};
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
\node [below of = decoder_1,xshift=0.9cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}}; \node [below of = decoder_1,xshift=0.9cm,yshift=-2.9cm,scale=1.6]{\small{<Mask>}};
\node [below of = decoder_1,xshift=2.6cm,yshift=-2.8cm,scale=1.6]{}; \node [below of = decoder_1,xshift=2.6cm,yshift=-2.8cm,scale=1.6]{};
\draw [-,very thick,draw=black!70]([xshift=-2.2cm]encoder.north) -- ([xshift=-2.2cm,yshift=0.5cm]encoder.north)-- ([xshift=4.1cm,yshift=0.5cm]encoder.north); \draw [-,very thick,draw=black]([xshift=-2.2cm]encoder.north) -- ([xshift=-2.2cm,yshift=0.5cm]encoder.north)-- ([xshift=4.1cm,yshift=0.5cm]encoder.north);
\draw [-,very thick,draw=black!70,dashed]([xshift=4.1cm,yshift=0.5cm]encoder.north) -- ([xshift=-0.5cm]mask_1.west); \draw [-,very thick,draw=black,dashed]([xshift=4.1cm,yshift=0.5cm]encoder.north) -- ([xshift=-0.5cm]mask_1.west);
\draw [->,very thick,draw=black!70]([xshift=-0.5cm]mask_1.west) -- (mask_1.west); \draw [->,very thick,draw=black]([xshift=-0.5cm]mask_1.west) -- (mask_1.west);
\draw [->,very thick,draw=black!70]([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=10.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=-0.72cm]decoder_1.west) -- (decoder_1.west); \draw [->,very thick,draw=black]([xshift=0.5cm]encoder.east) -- ([xshift=0.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=10.5cm,yshift=-3.5cm]encoder.east) -- ([xshift=-0.72cm]decoder_1.west) -- (decoder_1.west);
\draw [->,very thick,dotted] (line1.east) .. controls +(east:1.2) and +(west:1.2) ..(line2.west); \draw [->,very thick,dotted] (line1.east) .. controls +(east:1.2) and +(west:1.2) ..(line2.west);
\node [below of = encoder,xshift=1.2cm,yshift=2.4cm,scale=1.7]{译文长度:4}; \node [below of = encoder,xshift=1.2cm,yshift=2.4cm,scale=1.7]{译文长度:4};
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
%%% outline %%% outline
%------------------------------------------------------------------------- %-------------------------------------------------------------------------
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!20, minimum width=1.8em,minimum height=1.5em,draw] \tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!25, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw] \tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{tgt} = [minimum height=1.6em,minimum width=5.2em,fill=black!10!yellow!30,font=\footnotesize,drop shadow={shadow xshift=0.15em,shadow yshift=-0.15em,}] \tikzstyle{tgt} = [minimum height=1.6em,minimum width=5.2em,fill=black!10!yellow!40,font=\footnotesize,drop shadow={shadow xshift=0.15em,shadow yshift=-0.15em,}]
\tikzstyle{p} = [fill=ugreen!15,minimum width=0.4em,inner sep=0pt] \tikzstyle{p} = [fill=ugreen!25,minimum width=0.4em,inner sep=0pt]
\node[ rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=12em,minimum height=4em,draw] (encoder) at (0,0) {编码器}; \node[ rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=12em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!20, drop shadow, minimum width=12em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器}; \node[anchor=north,rounded corners=3pt, thick,fill=yellow!30, drop shadow, minimum width=12em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:3}; \node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:3};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=13em,minimum height=4em,draw] (decoder) at ([xshift=1cm]encoder.east) {解码器}; \node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=13em,minimum height=4em,draw] (decoder) at ([xshift=1cm]encoder.east) {解码器};
\node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-4.5em]encoder.south) {${\mathbi e}$(干)}; \node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-4.5em]encoder.south) {${\mathbi e}$(干)};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em,xshift=-1.5em]encoder.south) {${\mathbi e}$(得)}; \node[anchor=north,emb] (en2) at ([yshift=-1.3em,xshift=-1.5em]encoder.south) {${\mathbi e}$(得)};
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
%%% outline %%% outline
%------------------------------------------------------------------------- %-------------------------------------------------------------------------
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!20, minimum width=1.8em,minimum height=1.5em,draw] \tikzstyle{emb} = [font=\scriptsize,rounded corners=1pt, fill=orange!25, minimum width=1.8em,minimum height=1.5em,draw]
\tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw] \tikzstyle{po} = [font=\scriptsize,rounded corners=1pt, fill=gray!20, minimum width=1.8em,minimum height=1.5em,draw]
\begin{scope} \begin{scope}
\node[rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器}; \node[rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=north,rounded corners=3pt, thick,fill=yellow!20, drop shadow, minimum width=10em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器}; \node[anchor=north,rounded corners=3pt, thick,fill=yellow!30, drop shadow, minimum width=10em,minimum height=2em,draw] (lenpre) at([yshift=3em]encoder.north){长度预测器};
\node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:4}; \node[anchor=north] (lable) at([xshift=3.5em,yshift=2.5em]lenpre.north){译文长度:4};
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder) at ([xshift=1.8cm]encoder.east) {解码器}; \node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder) at ([xshift=1.8cm]encoder.east) {解码器};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$}; \node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$};
\node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-3em]encoder.south) {${\mathbi e}(x_1)$}; \node[anchor=north,emb] (en1) at ([yshift=-1.3em,xshift=-3em]encoder.south) {${\mathbi e}(x_1)$};
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
\end{scope} \end{scope}
\begin{scope}[yshift=2.8in] \begin{scope}[yshift=2.8in]
\node[rounded corners=3pt, thick,fill=red!20, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器}; \node[rounded corners=3pt, thick,fill=red!25, drop shadow, minimum width=10em,minimum height=4em,draw] (encoder) at (0,0) {编码器};
\node[anchor=west,minimum width=16em,minimum height=4em] (decoder) at ([xshift=1.8cm]encoder.east) {}; \node[anchor=west,minimum width=16em,minimum height=4em] (decoder) at ([xshift=1.8cm]encoder.east) {};
\node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$}; \node[anchor=north,emb] (en2) at ([yshift=-1.3em]encoder.south) {${\mathbi e}(x_2)$};
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
\draw [->,very thick,dotted] ([xshift=-0.3em]out2.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de3.west); \draw [->,very thick,dotted] ([xshift=-0.3em]out2.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de3.west);
\draw [->,very thick,dotted] ([xshift=-0.3em]out3.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de4.west); \draw [->,very thick,dotted] ([xshift=-0.3em]out3.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de4.west);
\draw [->,very thick,dotted] ([xshift=-0.3em]out4.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de5.west); \draw [->,very thick,dotted] ([xshift=-0.3em]out4.east) .. controls +(east:0.5) and +(west:0.5) ..([xshift=0em]de5.west);
\node[anchor=west, rounded corners=3pt, thick,fill=blue!20, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder2) at ([xshift=1.8cm]encoder.east) {解码器}; \node[anchor=west, rounded corners=3pt, thick,fill=blue!25, drop shadow, minimum width=16em,minimum height=4em,draw] (decoder2) at ([xshift=1.8cm]encoder.east) {解码器};
\draw[->,line width=1pt] (encoder.east) -- (decoder.west); \draw[->,line width=1pt] (encoder.east) -- (decoder.west);
\end{scope} \end{scope}
......
\definecolor{taupegray}{rgb}{0.55, 0.52, 0.54} \definecolor{taupegray}{rgb}{0.55, 0.52, 0.54}
\definecolor{bananamania}{rgb}{0.98, 0.91, 0.71} \definecolor{bananamania}{rgb}{0.98, 0.91, 0.71}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
%%% outline %%% outline
%------------------------------------------------------------------------- %-------------------------------------------------------------------------
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{layer} = [draw=black!70,thick, minimum width=7.5em,rounded corners=2pt,inner ysep=6pt,font=\footnotesize,align=center] \tikzstyle{layer} = [draw,thick, minimum width=7.5em,rounded corners=2pt,inner ysep=6pt,font=\footnotesize,align=center]
\tikzstyle{line} = [line width=1pt,->] \tikzstyle{line} = [line width=1pt,->]
\tikzstyle{cir} = [draw,circle,minimum size=1em, thick,inner sep=0pt] \tikzstyle{cir} = [draw,circle,minimum size=1em, thick,inner sep=0pt]
%encoder %encoder
\node[layer,fill=red!15] (src_emb) at (0,0){\scriptsize\textbf{Embedding}}; \node[layer,fill=red!20] (src_emb) at (0,0){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!20] (src_sa) at ([yshift=3.7em]src_emb.north){\scriptsize\textbf{Self-attention}}; \node[anchor=south,layer,fill=yellow!25] (src_sa) at ([yshift=3.7em]src_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=orange!20] (src_ff) at ([yshift=1em]src_sa.north){\scriptsize\textbf{Feed Forward}}; \node[anchor=south,layer,fill=orange!25] (src_ff) at ([yshift=1em]src_sa.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=blue!20] (src_sf) at ([yshift=2.6em]src_ff.north){\scriptsize\textbf{Softmax}}; \node[anchor=south,layer,fill=blue!25] (src_sf) at ([yshift=2.6em]src_ff.north){\scriptsize\textbf{Softmax}};
%decoder %decoder
\node[anchor=west,layer,fill=red!15] (tgt_emb) at ([xshift=4.4em]src_emb.east){\scriptsize\textbf{Embedding}}; \node[anchor=west,layer,fill=red!20] (tgt_emb) at ([xshift=4.4em]src_emb.east){\scriptsize\textbf{Embedding}};
\node[anchor=south,layer,fill=yellow!20] (tgt_sa) at ([yshift=3.7em]tgt_emb.north){\scriptsize\textbf{Self-attention}}; \node[anchor=south,layer,fill=yellow!25] (tgt_sa) at ([yshift=3.7em]tgt_emb.north){\scriptsize\textbf{Self-attention}};
\node[anchor=south,layer,fill=yellow!20] (tgt_pa) at ([yshift=1.5em]tgt_sa.north){\scriptsize\textbf{Positional Attention}}; \node[anchor=south,layer,fill=yellow!25] (tgt_pa) at ([yshift=1.5em]tgt_sa.north){\scriptsize\textbf{Positional Attention}};
\node[anchor=south,layer,draw=red,dashed,line width=2pt,minimum height=1.55em] (tgt_paa) at ([yshift=1.5em]tgt_sa.north){}; \node[anchor=south,layer,draw=red,dashed,line width=2pt,minimum height=1.55em] (tgt_paa) at ([yshift=1.5em]tgt_sa.north){};
\node[anchor=south,layer,fill=yellow!20] (tgt_eda) at ([yshift=1.5em]tgt_pa.north){\scriptsize\textbf{Encoder-Decoder} \\ \scriptsize\textbf{Attention}}; \node[anchor=south,layer,fill=yellow!25] (tgt_eda) at ([yshift=1.5em]tgt_pa.north){\scriptsize\textbf{Encoder-Decoder} \\ \scriptsize\textbf{Attention}};
\node[anchor=south,layer,fill=orange!20] (tgt_ff) at ([yshift=1em]tgt_eda.north){\scriptsize\textbf{Feed Forward}}; \node[anchor=south,layer,fill=orange!25] (tgt_ff) at ([yshift=1em]tgt_eda.north){\scriptsize\textbf{Feed Forward}};
\node[anchor=south,layer,fill=green!20] (tgt_linear) at ([yshift=1.4em]tgt_ff.north){\scriptsize\textbf{Linear}}; \node[anchor=south,layer,fill=green!25] (tgt_linear) at ([yshift=1.4em]tgt_ff.north){\scriptsize\textbf{Linear}};
\node[anchor=south,layer,fill=blue!20] (tgt_sf) at ([yshift=1em]tgt_linear.north){\scriptsize\textbf{Softmax}}; \node[anchor=south,layer,fill=blue!25] (tgt_sf) at ([yshift=1em]tgt_linear.north){\scriptsize\textbf{Softmax}};
\node[font=\footnotesize,anchor=south] (w3) at ([yshift=0.8em]src_sf.north){\scriptsize\textbf{2}}; \node[font=\footnotesize,anchor=south] (w3) at ([yshift=0.8em]src_sf.north){\scriptsize\textbf{2}};
\node[font=\footnotesize,anchor=east] (w2) at ([xshift=-0.5em]w3.west){\scriptsize\textbf{1}}; \node[font=\footnotesize,anchor=east] (w2) at ([xshift=-0.5em]w3.west){\scriptsize\textbf{1}};
\node[font=\footnotesize,anchor=east] (w1) at ([xshift=-0.5em]w2.west){\scriptsize\textbf{1}}; \node[font=\footnotesize,anchor=east] (w1) at ([xshift=-0.5em]w2.west){\scriptsize\textbf{1}};
\node[font=\footnotesize,anchor=west] (w4) at ([xshift=0.5em]w3.east){\scriptsize\textbf{0}}; \node[font=\footnotesize,anchor=west] (w4) at ([xshift=0.5em]w3.east){\scriptsize\textbf{0}};
\node[font=\footnotesize,anchor=west] (w5) at ([xshift=0.5em]w4.east){\scriptsize\textbf{1}}; \node[font=\footnotesize,anchor=west] (w5) at ([xshift=0.5em]w4.east){\scriptsize\textbf{1}};
\node[font=\footnotesize,anchor=south] (output) at ([yshift=1em]tgt_sf.north){\scriptsize\sffamily\bfseries{我们\quad 完全\quad 接受\quad\quad}}; \node[font=\footnotesize,anchor=south] (output) at ([yshift=1em]tgt_sf.north){\scriptsize\sffamily\bfseries{我们/完全/接受/ 它/}};
\node[font=\footnotesize,anchor=north] (src) at ([yshift=-1em]src_emb.south){\scriptsize\textbf{We totally accept it .}}; \node[font=\footnotesize,anchor=north] (src) at ([yshift=-1em]src_emb.south){\scriptsize\textbf{We totally accept it .}};
\node[font=\footnotesize,anchor=north] (tgt) at ([yshift=-1em]tgt_emb.south){\scriptsize\textbf{We totally accept accept .}}; \node[font=\footnotesize,anchor=north] (tgt) at ([yshift=-1em]tgt_emb.south){\scriptsize\textbf{We totally accept accept .}};
\node[cir] (src_add) at (0,2.5em) {}; \node[cir] (src_add) at (0,2.5em) {};
\node[cir,fill=orange!7] (src_pos) at (-2.5em,2.5em) {}; \node[cir,fill=orange!12] (src_pos) at (-2.5em,2.5em) {};
\node[cir] (tgt_add) at (12em,2.5em) {}; \node[cir] (tgt_add) at (12em,2.5em) {};
\node[cir,fill=orange!7] (tgt_pos) at (14.5em,2.5em) {}; \node[cir,fill=orange!12] (tgt_pos) at (14.5em,2.5em) {};
\node[cir,fill=orange!7] (tgt_pos2) at ([xshift=4.5em,yshift=-2.45em]tgt_pa.north) {}; \node[cir,fill=orange!12] (tgt_pos2) at ([xshift=4.5em,yshift=-2.45em]tgt_pa.north) {};
\draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([yshift=-0.8em]tgt_pa.south) -- (tgt_pa.south); \draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([yshift=-0.8em]tgt_pa.south) -- (tgt_pa.south);
\draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([xshift=1.8em,yshift=-0.8em]tgt_pa.south) -- ([xshift=1.8em]tgt_pa.south); \draw[line,rounded corners=2pt] (tgt_pos2.180) -- ([xshift=1.8em,yshift=-0.8em]tgt_pa.south) -- ([xshift=1.8em]tgt_pa.south);
\draw[-,thick,] (tgt_pos2.180) .. controls ([xshift=0.8em,yshift=0.8em]tgt_pos2.180) and ([xshift=-0.8em,yshift=-0.8em]tgt_pos2.0) ..(tgt_pos2.0); \draw[-,thick,] (tgt_pos2.180) .. controls ([xshift=0.8em,yshift=0.8em]tgt_pos2.180) and ([xshift=-0.8em,yshift=-0.8em]tgt_pos2.0) ..(tgt_pos2.0);
...@@ -73,9 +74,9 @@ ...@@ -73,9 +74,9 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[draw=taupegray,thick,fill=ugreen!10,inner sep=0pt,minimum height=7em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box1) at (0em,6.9em){}; \node[draw=taupegray,thick,fill=ugreen!15,inner sep=0pt,minimum height=7em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box1) at (0em,6.9em){};
\node[draw=taupegray,thick,fill=yellow!10,inner sep=0pt,minimum height=4.5em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box2) at (0em,13.2em){}; \node[draw=taupegray,thick,fill=aliceblue,inner sep=0pt,minimum height=4.5em,minimum width=9.5em,rounded corners=4pt,drop shadow] (box2) at (0em,13.2em){};
\node[draw=taupegray,thick,fill=blue!7,inner sep=0pt,minimum height=13.3em,minimum width=10.5em,rounded corners=4pt,drop shadow] (box3) at (12em,10.1em){}; \node[draw=taupegray,thick,fill=blue!12,inner sep=0pt,minimum height=13.3em,minimum width=10.5em,rounded corners=4pt,drop shadow] (box3) at (12em,10.1em){};
} }
\end{pgfonlayer} \end{pgfonlayer}
\node[] at ([yshift=1.8em]box2.north){\normalsize{译文长度:5}}; \node[] at ([yshift=1.8em]box2.north){\normalsize{译文长度:5}};
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
%%% outline %%% outline
%------------------------------------------------------------------------- %-------------------------------------------------------------------------
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{module} = [draw=taupegray,very thick,rounded corners=2pt,inner ysep=8pt,font=\footnotesize,align=center,fill=yellow!15] \tikzstyle{module} = [draw,very thick,rounded corners=2pt,inner ysep=8pt,font=\footnotesize,align=center,fill=yellow!25]
\tikzstyle{box} = [draw=taupegray,very thick,rounded corners=4pt,inner ysep=4pt,inner xsep=8pt,fill=ugreen!10,drop shadow]; \tikzstyle{box} = [draw=taupegray,very thick,rounded corners=4pt,inner ysep=4pt,inner xsep=8pt,fill=ugreen!25,drop shadow];
\tikzstyle{line} = [very thick,-latex]; \tikzstyle{line} = [very thick,->];
\node[module, minimum width=8em] (encoder) at (0,0) {编码器组件}; \node[module, minimum width=8em] (encoder) at (0,0) {编码器组件};
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
\node[anchor=north,font=\scriptsize,align=center] (w2) at ([yshift=-2em]decoder.south){\scriptsize\bfnew{There exist different} \\ \scriptsize\bfnew{opinions on this question .}}; \node[anchor=north,font=\scriptsize,align=center] (w2) at ([yshift=-2em]decoder.south){\scriptsize\bfnew{There exist different} \\ \scriptsize\bfnew{opinions on this question .}};
\node[anchor=north,font=\scriptsize,text=gray] (w3) at ([yshift=0.6em]w2.south){\scriptsize\bfnew{(复制源语言句子)}}; \node[anchor=north,font=\scriptsize,text=gray] (w3) at ([yshift=0.6em]w2.south){\scriptsize\bfnew{(复制源语言句子)}};
\node[anchor=south,font=\scriptsize,align=center] (w4) at ([yshift=1.6em]box2.north){\scriptsize\bfnew{on this question} \\ \scriptsize\bfnew{There exist different opinions .}}; \node[anchor=south,font=\scriptsize,align=center] (w4) at ([yshift=1.6em]box2.north){\scriptsize\bfnew{on this question} \\ \scriptsize\bfnew{There exist different opinions .}};
\node[anchor=south,font=\scriptsize,align=center] (w5) at ([yshift=1.6em]box3.north){\tiny\bfnew{ \ 这个 \ 问题 \ 存在 \ 不同的 \ 看法 \ }}; \node[anchor=south,font=\scriptsize,align=center] (w5) at ([yshift=1.6em]box3.north){\tiny\bfnew{/这个/问题/存在/不同/的/看法/}};
\node[font=\tiny] at ([xshift=-0.8em,yshift=-0.6em]encoder.east) {$N\times$}; \node[font=\tiny] at ([xshift=-0.8em,yshift=-0.6em]encoder.east) {$N\times$};
\node[font=\tiny] at ([xshift=-0.8em,yshift=-0.6em]decoder.east) {$1\times$}; \node[font=\tiny] at ([xshift=-0.8em,yshift=-0.6em]decoder.east) {$1\times$};
\node[font=\tiny] at ([xshift=-1.2em,yshift=-0.6em]decoder2.east) {$N-1\times$}; \node[font=\tiny] at ([xshift=-1.2em,yshift=-0.6em]decoder2.east) {$N-1\times$};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=1.9cm,minimum height=1.2cm,text centered,draw=black,fill=red!25,drop shadow] \tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=1.9cm,minimum height=1.2cm,text centered,draw=black,fill=red!25,drop shadow]
\tikzstyle{autodecoder} = [rectangle,thick,rounded corners,minimum width=3cm,minimum height=1.2cm,text centered,draw=black,fill=blue!15,drop shadow] \tikzstyle{autodecoder} = [rectangle,thick,rounded corners,minimum width=3cm,minimum height=1.2cm,text centered,draw=black,fill=blue!25,drop shadow]
\tikzstyle{nonautodecoder} = [rectangle,thick,rounded corners,minimum width=4cm,minimum height=1.2cm,text centered,draw=black!70,fill=blue!15,drop shadow] \tikzstyle{nonautodecoder} = [rectangle,thick,rounded corners,minimum width=4cm,minimum height=1.2cm,text centered,draw=black!70,fill=blue!25,drop shadow]
\node (encoder)[encoder] at (0,0) {编码器}; \node (encoder)[encoder] at (0,0) {编码器};
%\node (des)[anchor=north] at ([yshift=2cm]encoder.north) {<Mask>:<Mask>}; %\node (des)[anchor=north] at ([yshift=2cm]encoder.north) {<Mask>:<Mask>};
\node (text_left)[anchor=south] at ([yshift=-3em]encoder.south) {\footnotesize{\ \ 熟睡\ }}; \node (text_left)[anchor=south] at ([yshift=-3em]encoder.south) {\footnotesize{/在/熟睡/}};
\node (autodecoder)[autodecoder,right of=encoder,xshift=6em ] {自回归解码器}; \node (autodecoder)[autodecoder,right of=encoder,xshift=6em ] {自回归解码器};
\node (text_mid1)[anchor=north] at ([yshift=3em]autodecoder.north) {\scriptsize{NP1\ VP3\ PU1\ <eos>}}; \node (text_mid1)[anchor=north] at ([yshift=3em]autodecoder.north) {\scriptsize{NP1\ VP3\ PU1\ <eos>}};
\node (text_mid2)[anchor=south] at ([yshift=-3em]autodecoder.south) {\scriptsize{<sos>\ NP1\ VP3\ PU1}}; \node (text_mid2)[anchor=south] at ([yshift=-3em]autodecoder.south) {\scriptsize{<sos>\ NP1\ VP3\ PU1}};
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
\renewcommand{\arraystretch}{0} \renewcommand{\arraystretch}{0}
\setlength{\tabcolsep}{5mm} \setlength{\tabcolsep}{5mm}
\setlength{\fboxsep}{2.2mm} % box size \setlength{\fboxsep}{2.2mm} % box size
\begin{tabular}{C{.20\textwidth}C{.20\textwidth}C{.20\textwidth}C{.20\textwidth}} \begin{tabular}{C{.40\textwidth}C{.40\textwidth}C{.40\textwidth}C{.40\textwidth}}
\setlength{\tabcolsep}{0pt} \setlength{\tabcolsep}{0pt}
\subfigure [\small{自注意力}] { \subfigure [\small{自注意力}] {
\begin{tabular}{ccC{1em}} \begin{tabular}{ccC{1em}}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=0em,yshift=-3em]n4.south) {层正则化}; \node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=0em,yshift=-3em]n4.south) {层正则化};
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!17,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south) {$\mathbi{X}\ \quad \mathbi{h}_1\ \quad \mathbi{h}_2\quad \ldots \quad\ \mathbi{h}_l$}; \node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=purple!17,rounded corners=5pt,thick] (n9) at ([xshift=0em,yshift=-1em]n8.south) {$\mathbi{X}\ \quad \mathbi{h}^1\ \quad \mathbi{h}^2\quad \ldots \quad\ \mathbi{h}^l$};
\node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n10) at ([xshift=0em,yshift=-2em]n9.south) {权重累加}; \node [anchor=north,rectangle,draw, inner sep=0mm,minimum height=1.2em,minimum width=15em,fill=teal!17,rounded corners=5pt,thick] (n10) at ([xshift=0em,yshift=-2em]n9.south) {权重累加};
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
\tikzstyle{vlnode}=[rectangle,inner sep=0mm,minimum height=1em,minimum width=5em,rounded corners=2pt,draw] \tikzstyle{vlnode}=[rectangle,inner sep=0mm,minimum height=1em,minimum width=5em,rounded corners=2pt,draw]
\node [anchor=west,lnode] (n1) at (0, 0) {$\mathbi{h}_3$}; \node [anchor=west,lnode] (n1) at (0, 0) {$\mathbi{h}^3$};
\node [anchor=north west,lnode] (n2) at ([xshift=0em,yshift=-0.5em]n1.south west) {$\mathbi{h}_2$}; \node [anchor=north west,lnode] (n2) at ([xshift=0em,yshift=-0.5em]n1.south west) {$\mathbi{h}^2$};
\node [anchor=north west,lnode] (n3) at ([xshift=0em,yshift=-0.5em]n2.south west) {$\mathbi{h}_1$}; \node [anchor=north west,lnode] (n3) at ([xshift=0em,yshift=-0.5em]n2.south west) {$\mathbi{h}^1$};
\node [anchor=south] (d1) at ([xshift=0em,yshift=0.2em]n1.north) {1D}; \node [anchor=south] (d1) at ([xshift=0em,yshift=0.2em]n1.north) {1D};
...@@ -96,16 +96,16 @@ ...@@ -96,16 +96,16 @@
\draw [->,thick] ([xshift=0em,yshift=0em]ffn.north) -- ([xshift=0em,yshift=0em]fn.west); \draw [->,thick] ([xshift=0em,yshift=0em]ffn.north) -- ([xshift=0em,yshift=0em]fn.west);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n3.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d$} ([xshift=0em]n3.south east); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]n3.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\textrm{model}}$} ([xshift=0em]n3.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n6.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_a$} ([xshift=0em]n6.south east); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]n6.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\rm a}$} ([xshift=0em]n6.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=-0.7em,yshift=-0em] {$d$} ([xshift=0em]n7.south west); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=-1.4em,yshift=-0em] {$d_{\textrm{model}}$} ([xshift=0em]n7.south west);
\draw [decorate,decoration={brace}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.7em] {$d$} ([xshift=0em]n7.north east); \draw [decorate,decoration={brace}] ([xshift=0em]n7.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.7em] {$d_{\textrm{model}}$} ([xshift=0em]n7.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=-0.8em,yshift=-0em] {$d_a$} ([xshift=0em]n8.south west); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=-0.8em,yshift=-0em] {$d_{\rm a}$} ([xshift=0em]n8.south west);
\draw [decorate,decoration={brace}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.8em] {$n_{hop}$} ([xshift=0em]n8.north east); \draw [decorate,decoration={brace}] ([xshift=0em]n8.north west) to node [midway,font=\small,align=center,xshift=0em,yshift=0.8em] {$n_{\rm hop}$} ([xshift=0em]n8.north east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]nc31.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$n_{hop}$} ([xshift=0em]nc35.south east); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]nc31.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$n_{\rm hop}$} ([xshift=0em]nc35.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]ln5.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d$} ([xshift=0em]ln5.south east); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]ln5.south west) to node [midway,font=\small,align=center,xshift=0em,yshift=-0.8em] {$d_{\textrm{model}}$} ([xshift=0em]ln5.south east);
\draw [decorate] ([xshift=0em]ln5.south east) to node [midway,font=\footnotesize,align=center,xshift=1em,yshift=-0.5em] {$n_{hop}$} ([xshift=0em]ln1.south east); \draw [decorate] ([xshift=0em]ln5.south east) to node [midway,font=\footnotesize,align=center,xshift=1em,yshift=-0.5em] {$n_{\rm hop}$} ([xshift=0em]ln1.south east);
\draw [decorate,decoration={brace,mirror}] ([xshift=0em]fn.south east) to node [midway,font=\small,align=center,xshift=0.7em,yshift=-0em] {$d$} ([xshift=0em]fn.north east); \draw [decorate,decoration={brace,mirror}] ([xshift=0em]fn.south east) to node [midway,font=\small,align=center,xshift=1.4em,yshift=-0em] {$d_{\textrm{model}}$} ([xshift=0em]fn.north east);
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
\node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n2) at ([xshift=0em,yshift=-0.2em]n1.south) {$\mathbi{X}$}; \node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n2) at ([xshift=0em,yshift=-0.2em]n1.south) {$\mathbi{X}$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n3) at ([xshift=1.5em,yshift=0em]n2.east) {$\mathbi{h}_0$}; \node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n3) at ([xshift=1.5em,yshift=0em]n2.east) {$\mathbi{h}^0$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n4) at ([xshift=1.5em,yshift=0em]n3.east) {$\mathbi{h}_1$}; \node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n4) at ([xshift=1.5em,yshift=0em]n3.east) {$\mathbi{h}^1$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n5) at ([xshift=1.5em,yshift=0em]n4.east) {$\mathbi{h}_2$}; \node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n5) at ([xshift=1.5em,yshift=0em]n4.east) {$\mathbi{h}^2$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n6) at ([xshift=1em,yshift=0em]n5.east) {$\ldots$}; \node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n6) at ([xshift=1em,yshift=0em]n5.east) {$\ldots$};
\node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n7) at ([xshift=1em,yshift=0em]n6.east) {$\mathbi{h}_{L-1}$}; \node [anchor=west,encnode,draw=red!60!black!80,fill=red!20] (n7) at ([xshift=1em,yshift=0em]n6.east) {$\mathbi{h}^{L-1}$};
\node [anchor=north,rectangle,draw=teal!80, inner sep=0mm,minimum height=2em,minimum width=8em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=3em,yshift=-1.5em]n4.south) {权重聚合$\mathbi{g}$}; \node [anchor=north,rectangle,draw=teal!80, inner sep=0mm,minimum height=2em,minimum width=8em,fill=teal!17,rounded corners=5pt,thick] (n8) at ([xshift=3em,yshift=-1.5em]n4.south) {权重聚合$\mathbi{g}$};
...@@ -27,15 +27,15 @@ ...@@ -27,15 +27,15 @@
\node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n10) at ([xshift=0em,yshift=-0.2em]n9.south) {$\mathbi{y}_{<j}$}; \node [anchor=north,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n10) at ([xshift=0em,yshift=-0.2em]n9.south) {$\mathbi{y}_{<j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n11) at ([xshift=1.5em,yshift=0em]n10.east) {$\mathbi{s}_{0,j}$}; \node [anchor=west,decnode,draw=ublue,fill=blue!10] (n11) at ([xshift=1.5em,yshift=0em]n10.east) {$\mathbi{s}^0_{j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n12) at ([xshift=1.5em,yshift=0em]n11.east) {$\mathbi{s}_{1,j}$}; \node [anchor=west,decnode,draw=ublue,fill=blue!10] (n12) at ([xshift=1.5em,yshift=0em]n11.east) {$\mathbi{s}^1_{j}$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n13) at ([xshift=1.5em,yshift=0em]n12.east) {$\mathbi{s}_{2,j}$}; \node [anchor=west,decnode,draw=ublue,fill=blue!10] (n13) at ([xshift=1.5em,yshift=0em]n12.east) {$\mathbi{s}^2_{j}$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n14) at ([xshift=1em,yshift=0em]n13.east) {$\ldots$}; \node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n14) at ([xshift=1em,yshift=0em]n13.east) {$\ldots$};
\node [anchor=west,decnode,draw=ublue,fill=blue!10] (n15) at ([xshift=1em,yshift=0em]n14.east) {$\mathbi{s}_{M-1,j}$}; \node [anchor=west,decnode,draw=ublue,fill=blue!10] (n15) at ([xshift=1em,yshift=0em]n14.east) {$\mathbi{s}^{M-1}_{j}$};
\node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n16) at ([xshift=1.5em,yshift=0em]n15.east) {$\mathbi{y}_{j}$}; \node [anchor=west,rectangle,minimum height=1.5em,minimum width=2.5em,rounded corners=5pt] (n16) at ([xshift=1.5em,yshift=0em]n15.east) {$\mathbi{y}_{j}$};
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
\begin{axis}[ \begin{axis}[
width=.50\textwidth, width=.50\textwidth,
height=.40\textwidth, height=.40\textwidth,
legend style={at={(0.60,0.08)}, anchor=south west}, legend style={at={(0.45,0.08)}, anchor=south west},
xlabel={\scriptsize{更新次数(10k)}}, xlabel={\scriptsize{更新次数(10k)}},
ylabel={\scriptsize{学习率 ($10^{-3}$}}, ylabel={\scriptsize{学习率 ($10^{-3}$}},
ylabel style={yshift=-1em},xlabel style={yshift=0.0em}, ylabel style={yshift=-1em},xlabel style={yshift=0.0em},
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
] ]
\addplot[red,line width=1.25pt] coordinates {(0,0) (1.6,2) (1.8,1.888) (2,1.787) (2.5,1.606) (3,1.462) (3.5,1.3549) (4,1.266) (4.5,1.193) (5,1.131)}; \addplot[red,line width=1.25pt] coordinates {(0,0) (1.6,2) (1.8,1.888) (2,1.787) (2.5,1.606) (3,1.462) (3.5,1.3549) (4,1.266) (4.5,1.193) (5,1.131)};
\addlegendentry{\scriptsize Base48} \addlegendentry{\scriptsize 原始学习率}
%\addplot[red,line width=1.25pt] coordinates {(0,0) (8000,0.002) (10000,0.00179) (12000,0.00163) (12950,0.001572)}; %\addplot[red,line width=1.25pt] coordinates {(0,0) (8000,0.002) (10000,0.00179) (12000,0.00163) (12950,0.001572)};
\addplot[blue,line width=1.25pt] coordinates {(0,0) (0.8,2) (0.9906,1.7983)}; \addplot[blue,line width=1.25pt] coordinates {(0,0) (0.8,2) (0.9906,1.7983)};
%\addplot[red,line width=1.25pt] coordinates {(0,0) (8000,0.002) (9906,0.0017983)}; %\addplot[red,line width=1.25pt] coordinates {(0,0) (8000,0.002) (9906,0.0017983)};
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
\addplot[blue,line width=1.25pt] coordinates {(2.9706,2) (3.1706,1.79) (3.3706,1.63) (3.4656,1.572) (3.6706,1.4602) (3.7136,1.44)}; \addplot[blue,line width=1.25pt] coordinates {(2.9706,2) (3.1706,1.79) (3.3706,1.63) (3.4656,1.572) (3.6706,1.4602) (3.7136,1.44)};
\addplot[blue,dashed,line width=1.25pt] coordinates {(3.7136,1.44) (3.7136,2)}; \addplot[blue,dashed,line width=1.25pt] coordinates {(3.7136,1.44) (3.7136,2)};
\addplot[blue,line width=1.25pt] coordinates {(3.7136,2) (3.9136,1.79) (4.1136,1.63) (4.2086,1.572) (4.4136,1.4602) (4.4566,1.44) (4.7000,1.3574) (5.0000,1.2531)}; \addplot[blue,line width=1.25pt] coordinates {(3.7136,2) (3.9136,1.79) (4.1136,1.63) (4.2086,1.572) (4.4136,1.4602) (4.4566,1.44) (4.7000,1.3574) (5.0000,1.2531)};
\addlegendentry{\scriptsize SDT48} \addlegendentry{\scriptsize 调整后的学习率}
\end{axis} \end{axis}
} }
......
...@@ -9,22 +9,22 @@ ...@@ -9,22 +9,22 @@
\begin{scope}[] \begin{scope}[]
\node [anchor=west,ffnnode] (f1) at (0, 0){FFN}; \node [anchor=west,inner sep=0mm,minimum height=1.8em] (f1) at (0, 0){input};
\node [anchor=south,ebnode] (e1) at ([xshift=0em,yshift=1em]f1.north){Embedding}; \node [anchor=south,ebnode] (e1) at ([xshift=0em,yshift=1em]f1.north){Embedding};
\node [anchor=south west,manode] (a1) at ([xshift=0em,yshift=1em]e1.north west){Attention}; \node [anchor=south west,manode] (a1) at ([xshift=0em,yshift=1em]e1.north west){Attention};
\node [anchor=south east,manode] (c1) at ([xshift=0em,yshift=1em]e1.north east){Conv}; \node [anchor=south east,manode] (c1) at ([xshift=0em,yshift=1em]e1.north east){Conv};
\node [anchor=south west,ebnode] (e2) at ([xshift=0em,yshift=1em]a1.north west){Embedding}; \node [anchor=south west,ebnode] (e2) at ([xshift=0em,yshift=1em]a1.north west){Embedding};
\node [anchor=south,draw,circle,inner sep=4pt] (add1) at ([xshift=0em,yshift=0.5em]e2.north){}; \node [anchor=south,draw,circle,inner sep=4pt] (add1) at ([xshift=0em,yshift=0.5em]e2.north){};
\node [anchor=south,ffnnode] (f2) at ([xshift=0em,yshift=0.5em]add1.north){FFN}; \node [anchor=south,inner sep=0mm,minimum height=1.8em] (f2) at ([xshift=0em,yshift=0.5em]add1.north){output};
\draw[->,thick] ([xshift=0em,yshift=0em]f1.north)--([xshift=0em,yshift=0em]e1.south); \draw[->,thick] ([xshift=0em,yshift=-0.3em]f1.north)--([xshift=0em,yshift=0em]e1.south);
\draw[->,thick] ([xshift=0em,yshift=-1em]a1.south)--([xshift=0em,yshift=0em]a1.south); \draw[->,thick] ([xshift=0em,yshift=-1em]a1.south)--([xshift=0em,yshift=0em]a1.south);
\draw[->,thick] ([xshift=0em,yshift=-1em]c1.south)--([xshift=0em,yshift=0em]c1.south); \draw[->,thick] ([xshift=0em,yshift=-1em]c1.south)--([xshift=0em,yshift=0em]c1.south);
\draw[->,thick] ([xshift=0em,yshift=0em]a1.north)--([xshift=0em,yshift=1em]a1.north); \draw[->,thick] ([xshift=0em,yshift=0em]a1.north)--([xshift=0em,yshift=1em]a1.north);
\draw[->,thick] ([xshift=0em,yshift=0em]c1.north)--([xshift=0em,yshift=1em]c1.north); \draw[->,thick] ([xshift=0em,yshift=0em]c1.north)--([xshift=0em,yshift=1em]c1.north);
\draw[-,thick] ([xshift=0em,yshift=0em]e2.north)--([xshift=0em,yshift=0em]add1.south); \draw[-,thick] ([xshift=0em,yshift=0em]e2.north)--([xshift=0em,yshift=0em]add1.south);
\draw[->,thick] ([xshift=0em,yshift=0em]add1.north)--([xshift=0em,yshift=0em]f2.south); \draw[->,thick] ([xshift=0em,yshift=0em]add1.north)--([xshift=0em,yshift=0.3em]f2.south);
\draw[-] ([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east); \draw[-] ([xshift=0em,yshift=0em]add1.west)--([xshift=-0em,yshift=0em]add1.east);
\draw[-] ([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north); \draw[-] ([xshift=0em,yshift=0em]add1.south)--([xshift=-0em,yshift=-0em]add1.north);
...@@ -33,11 +33,6 @@ ...@@ -33,11 +33,6 @@
\draw[->,thick,rectangle,rounded corners=5pt] ([xshift=0em,yshift=0.5em]f1.north)--([xshift=-6em,yshift=0.5em]f1.north)--([xshift=-5.45em,yshift=0em]add1.west)--([xshift=0em,yshift=0em]add1.west); \draw[->,thick,rectangle,rounded corners=5pt] ([xshift=0em,yshift=0.5em]f1.north)--([xshift=-6em,yshift=0.5em]f1.north)--([xshift=-5.45em,yshift=0em]add1.west)--([xshift=0em,yshift=0em]add1.west);
\node [anchor=north,inner sep=0mm,minimum height=1.5em] (ip) at ([xshift=0em,yshift=-1em]f1.south){input};
\node [anchor=south,inner sep=0mm,minimum height=1.5em] (op) at ([xshift=0em,yshift=1em]f2.north){output};
\draw[->,thick] ([xshift=0em,yshift=0em]ip.north)--([xshift=0em,yshift=0em]f1.south);
\draw[->,thick] ([xshift=0em,yshift=0em]f2.north)--([xshift=0em,yshift=0em]op.south);
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
\end{center} \end{center}
\ No newline at end of file
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}
\tikzstyle{cirnode}=[circle,minimum size=3em,font=\footnotesize,draw] \tikzstyle{cirnode}=[rectangle,rounded corners=2pt,minimum height=2em,minimum width=3em,font=\footnotesize,draw=blue!50!white!50,fill=blue!20,thick]
\tikzstyle{recnode}=[rectangle,rounded corners=2pt,inner sep=0mm,minimum height=1.8em,minimum width=6em] \tikzstyle{recnode}=[rectangle,rounded corners=2pt,inner sep=0mm,minimum height=1.8em,minimum width=6em]
\node [anchor=west,cirnode] (n1) at (0, 0) {$\mathbi{h}_{i-2}^l$}; \node [anchor=west,cirnode] (n1) at (0, 0) {$\mathbi{h}_{i-2}^l$};
...@@ -11,24 +11,24 @@ ...@@ -11,24 +11,24 @@
\node [anchor=west,cirnode] (n5) at ([xshift=1.2em,yshift=0em]n4.east) {$\mathbi{h}_{i+2}^l$}; \node [anchor=west,cirnode] (n5) at ([xshift=1.2em,yshift=0em]n4.east) {$\mathbi{h}_{i+2}^l$};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [anchor=center,red!30,minimum height=4.5em,minimum width=21em,very thick,draw] (c3) at ([xshift=0em,yshift=0em]n3.center) {}; \node [anchor=center,red!30,minimum height=3.5em,minimum width=21em,very thick,draw] (c3) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,ugreen!30,minimum height=4em,minimum width=12.5em,very thick,draw] (c2) at ([xshift=0em,yshift=0em]n3.center) {}; \node [anchor=center,ugreen!30,minimum height=3em,minimum width=13em,very thick,draw] (c2) at ([xshift=0em,yshift=0em]n3.center) {};
\node [anchor=center,orange!30,minimum height=3.5em,minimum width=3.6em,very thick,draw] (c1) at ([xshift=0em,yshift=0em]n3.center) {}; \node [anchor=center,orange!30,minimum height=2.5em,minimum width=4em,very thick,draw] (c1) at ([xshift=0em,yshift=0em]n3.center) {};
\end{pgfonlayer} \end{pgfonlayer}
\node [anchor=south,recnode,fill=red!20] (r1) at ([xshift=-3.5em,yshift=2.5em]n2.north) {$\textrm{head}_1$}; \node [anchor=south,recnode,fill=red!20] (r1) at ([xshift=-3.5em,yshift=2.5em]n2.north) {$\textrm{head}_1$};
\node [anchor=south,recnode,fill=orange!20] (r2) at ([xshift=0em,yshift=2.5em]n3.north) {$\textrm{head}_2$}; \node [anchor=south,recnode,fill=orange!20] (r2) at ([xshift=0em,yshift=2.5em]n3.north) {$\textrm{head}_2$};
\node [anchor=south,recnode,fill=ugreen!20] (r3) at ([xshift=3.5em,yshift=2.5em]n4.north) {$\textrm{head}_3$}; \node [anchor=south,recnode,fill=ugreen!20] (r3) at ([xshift=3.5em,yshift=2.5em]n4.north) {$\textrm{head}_3$};
\node [anchor=south,cirnode] (n6) at ([xshift=0em,yshift=1em]r2.north) {$\mathbi{h}_{i}^{l+1}$}; \node [anchor=south,cirnode] (n6) at ([xshift=0em,yshift=1.5em]r2.north) {$\mathbi{h}_{i}^{l+1}$};
\draw [->,very thick,orange!30] ([xshift=0em,yshift=0em]c1.north) -- ([xshift=0em,yshift=0em]r2.south); \draw [->,very thick,orange!30] ([xshift=0em,yshift=0em]c1.north) -- ([xshift=0em,yshift=0em]r2.south);
\draw [->,very thick,ugreen!30] ([xshift=3em,yshift=0em]c2.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r3.south); \draw [->,very thick,ugreen!30] ([xshift=3em,yshift=0em]c2.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r3.south);
\draw [->,very thick,red!30] ([xshift=-3em,yshift=0em]c3.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r1.south); \draw [->,very thick,red!30] ([xshift=-3em,yshift=0em]c3.north)..controls +(north:1.5em) and +(south:1.5em)..([xshift=0em,yshift=0em]r1.south);
\draw [->] ([xshift=0em,yshift=0em]r1.north) -- ([xshift=0em,yshift=0em]n6.south west); \draw [->,red!30,very thick] ([xshift=0em,yshift=0em]r1.north) -- ([xshift=-0.1em,yshift=-0.05em]n6.south);
\draw [->] ([xshift=0em,yshift=0em]r2.north) -- ([xshift=0em,yshift=0em]n6.south); \draw [->,orange!30,very thick] ([xshift=0em,yshift=0em]r2.north) -- ([xshift=0em,yshift=0em]n6.south);
\draw [->] ([xshift=0em,yshift=0em]r3.north) -- ([xshift=0em,yshift=0em]n6.south east); \draw [->,ugreen!30,very thick] ([xshift=0em,yshift=0em]r3.north) -- ([xshift=0.1em,yshift=-0.05em]n6.south);
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
\node [anchor=west,enode] (e1) at ([xshift=1.5em,yshift=0em]w1.east) {编码器}; \node [anchor=west,enode] (e1) at ([xshift=1.5em,yshift=0em]w1.east) {编码器};
\node [anchor=west,dnode] (d1) at ([xshift=3em,yshift=6em]e1.east) {翻译任务}; \node [anchor=west,dnode] (d1) at ([xshift=3em,yshift=6em]e1.east) {翻译任务};
\node [anchor=north,dnode] (d2) at ([xshift=0em,yshift=-2em]d1.south) {文本处理任务}; \node [anchor=north,dnode] (d2) at ([xshift=0em,yshift=-2em]d1.south) {句法分析任务};
\node [anchor=north,dnode] (d3) at ([xshift=0em,yshift=-2em]d2.south) {语言理解}; \node [anchor=north,dnode] (d3) at ([xshift=0em,yshift=-2em]d2.south) {语言理解任务};
\node [anchor=north,dnode] (d4) at ([xshift=0em,yshift=-2em]d3.south) {其他任务}; \node [anchor=north,dnode] (d4) at ([xshift=0em,yshift=-2em]d3.south) {其他任务};
\node [anchor=west] (w2) at ([xshift=2em,yshift=0em]d1.east) {英语(目标语言)}; \node [anchor=west] (w2) at ([xshift=2em,yshift=0em]d1.east) {英语(目标语言)};
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
\begin{scope}[minimum height = 20pt] \begin{scope}[minimum height = 20pt]
\node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$}; \node [anchor=east] (x1) at (-0.5em, 0) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (F1) at ([xshift=2em]x1.east){\small{$F$}}; \node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (F1) at ([xshift=4em]x1.east){\small{$F$}};
\node [anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=2em]F1.east) {}; \node [anchor=west,circle,draw,minimum size=1em] (n1) at ([xshift=4em]F1.east) {};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=2em]n1.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (ln1) at ([xshift=4em]n1.east){\small{\textrm{LN}}};
\node [anchor=west] (x2) at ([xshift=2em]ln1.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x2) at ([xshift=4em]ln1.east) {$\mathbi{x}_{l+1}$};
\node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$}; \node [anchor=north] (x3) at ([yshift=-5em]x1.south) {$\mathbi{x}_l$};
\node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (F2) at ([xshift=2em]x3.east){\small{\textrm{LN}}}; \node [anchor=west,draw,fill=green!20,inner xsep=5pt,rounded corners=2pt] (F2) at ([xshift=4em]x3.east){\small{\textrm{LN}}};
\node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=2em]F2.east){\small{$F$}}; \node [anchor=west,draw,fill=red!20,inner xsep=5pt,rounded corners=2pt] (ln2) at ([xshift=4em]F2.east){\small{$F$}};
\node [anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=2em]ln2.east){}; \node [anchor=west,circle,draw,,minimum size=1em] (n2) at ([xshift=4em]ln2.east){};
\node [anchor=west] (x4) at ([xshift=2em]n2.east) {$\mathbi{x}_{l+1}$}; \node [anchor=west] (x4) at ([xshift=4em]n2.east) {$\mathbi{x}_{l+1}$};
\draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(F1.west); \draw[->, line width=1pt] ([xshift=-0.1em]x1.east)--(F1.west);
\draw[->, line width=1pt] ([xshift=-0.1em]F1.east)--(n1.west); \draw[->, line width=1pt] ([xshift=-0.1em]F1.east)--(n1.west);
......
\begin{tikzpicture}
\tikzstyle{node1} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!80]
\tikzstyle{node2} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!40]
\tikzstyle{node3} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=green!20]
\tikzstyle{node4} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt]
\tikzstyle{node5} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!20]
\tikzstyle{node6} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!40]
\tikzstyle{node7} = [anchor=center,draw,minimum height=2em,minimum width=2em,inner sep=0pt,fill=red!80]
\begin{scope}[scale=1.0]
\foreach \i / \j / \k / \z in
{0/6/1/-3, 1/6/1/-3, 2/6/1/-3, 3/6/1/-3, 4/6/2/-2, 5/6/3/-1, 6/6/4/0,
0/5/1/-3, 1/5/1/-3, 2/5/1/-3, 3/5/2/-2, 4/5/3/-1, 5/5/4/0, 6/5/5/1,
0/4/1/-3, 1/4/1/-3, 2/4/2/-2, 3/4/3/-1, 4/4/4/0, 5/4/5/1, 6/4/6/2,
0/3/1/-3, 1/3/2/-2, 2/3/3/-1, 3/3/4/0, 4/3/5/1, 5/3/6/2, 6/3/7/3,
0/2/2/-2, 1/2/3/-1, 2/2/4/0, 3/2/5/1, 4/2/6/2, 5/2/7/3, 6/2/7/3,
0/1/3/-1, 1/1/4/0, 2/1/5/1, 3/1/6/2, 4/1/7/3, 5/1/7/3, 6/1/7/3,
0/0/4/0, 1/0/5/1, 2/0/6/2, 3/0/7/3, 4/0/7/3, 5/0/7/3, 6/0/7/3}
\node[node\k] (a\i\j) at (2*1em*\i + 0*0em,2*1em*\j + 0*0em) {$\mathbi{w}_{\z}$};
\foreach \i / \j / \k in
{0/6/1, 0/5/2, 0/4/3, 0/3/4, 0/2/5, 0/1/6, 0/0/7}
\node[anchor=east] (n\k) at ([xshift=-0.5em,yshift=0em]a\i\j.west) {\j};
\foreach \i / \j / \k in
{0/0/8, 1/0/9, 2/0/10, 3/0/11, 4/0/12, 5/0/13, 6/0/14}
\node[anchor=north] (n\k) at ([xshift=-0em,yshift=-0.5em]a\i\j.south) {\i};
%\node [anchor=north] (n1) at ([xshift=0em,yshift=0em]a00.south west) {};
\end{scope}
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}[node distance = 0,scale = 1]
\tikzstyle{every node}=[scale=1]
\node[draw=white] (input) at (0,0){\includegraphics[width=0.62\textwidth]{./Chapter15/Figures/DLCL-picture.png}};(1.9,-1.4);
\node[scale = 2] at (4.5,3.6){4};
\node[scale = 2] at (4.5,1.8){2};
\node[scale = 2] at (4.5,0){0};
\node[scale = 2] at (4.5,-1.8){-2};
\node[scale = 2] at (4.5,-3.6){-4};
\node[scale = 1.5] at (-4.5,3.75){$\rm x_{1}$};
\node[scale = 1.5] at (-4.5,2.5){$\rm x_{6}$};
\node[scale = 1.5] at (-4.5,1.4){$\rm x_{11}$};
\node[scale = 1.5] at (-4.5,0.1){$\rm x_{16}$};
\node[scale = 1.5] at (-4.5,-1.1){$\rm x_{21}$};
\node[scale = 1.5] at (-4.5,-2.3){$\rm x_{26}$};
\node[scale = 1.5] at (-4.5,-3.4){$\rm x_{31}$};
\node[scale = 1.5] at (-3.8,-4){$\rm y_{0}$};
\node[scale = 1.5] at (-2.7,-4){$\rm y_{5}$};
\node[scale = 1.5] at (-1.5,-4){$\rm y_{10}$};
\node[scale = 1.5] at (-0.3,-4){$\rm y_{15}$};
\node[scale = 1.5] at (0.9,-4){$\rm y_{20}$};
\node[scale = 1.5] at (2.1,-4){$\rm y_{25}$};
\node[scale = 1.5] at (3.3,-4){$\rm y_{30}$};
\end{tikzpicture}
\ No newline at end of file
...@@ -43,17 +43,17 @@ ...@@ -43,17 +43,17 @@
\end{pgfonlayer} \end{pgfonlayer}
\draw [->,thick](node0-1.north)--(node1-1.south); \draw [->,thick](node0-1.north)--(node1-1.south);
\draw [->,thick](node0-1.north)--(node1-2.south); \draw [->,thick](node0-1.north)--([xshift=-0.15em,yshift=-0.05em]node1-2.south);
\draw [->,thick](node0-1.north)--(node1-4.south); \draw [->,thick](node0-1.north)--([xshift=-0.4em,yshift=-0.05em]node1-4.south);
\draw [->,thick](node0-2.north)--(node1-2.south); \draw [->,thick](node0-2.north)--(node1-2.south);
\draw [->,thick](node0-2.north)--(node1-4.south); \draw [->,thick](node0-2.north)--([xshift=-0.15em,yshift=-0.05em]node1-4.south);
\draw [->,thick](node0-4.north)--(node1-4.south); \draw [->,thick](node0-4.north)--(node1-4.south);
\draw [->,thick](node1-1.north)--(node2-1.south); \draw [->,thick](node1-1.north)--(node2-1.south);
\draw [->,thick](node1-1.north)--(node2-2.south); \draw [->,thick](node1-1.north)--([xshift=-0.15em,yshift=-0.05em]node2-2.south);
\draw [->,thick](node1-1.north)--(node2-4.south); \draw [->,thick](node1-1.north)--([xshift=-0.4em,yshift=-0.05em]node2-4.south);
\draw [->,thick](node1-2.north)--(node2-2.south); \draw [->,thick](node1-2.north)--(node2-2.south);
\draw [->,thick](node1-2.north)--(node2-4.south); \draw [->,thick](node1-2.north)--([xshift=-0.15em,yshift=-0.05em]node2-4.south);
\draw [->,thick](node1-4.north)--(node2-4.south); \draw [->,thick](node1-4.north)--(node2-4.south);
\node [anchor=south,embedding,fill=yellow!20](node3-1) at ([yshift=2em]node2-1.north){\footnotesize{$\seq{P}_1$}}; \node [anchor=south,embedding,fill=yellow!20](node3-1) at ([yshift=2em]node2-1.north){\footnotesize{$\seq{P}_1$}};
...@@ -77,23 +77,23 @@ ...@@ -77,23 +77,23 @@
\node [anchor=south,embedding,fill=yellow!20](node3-8) at ([yshift=2em]node2-8.north){\footnotesize{$\seq{P}_n$}}; \node [anchor=south,embedding,fill=yellow!20](node3-8) at ([yshift=2em]node2-8.north){\footnotesize{$\seq{P}_n$}};
\draw [->,thick](node0-5.north)--(node1-5.south); \draw [->,thick](node0-5.north)--(node1-5.south);
\draw [->,thick](node0-5.north)--(node1-6.south); \draw [->,thick](node0-5.north)--([xshift=-0.15em,yshift=-0.05em]node1-6.south);
\draw [->,thick](node0-5.north)--(node1-8.south); \draw [->,thick](node0-5.north)--([xshift=-0.15em,yshift=-0.05em]node1-8.south);
\draw [->,thick](node0-6.north)--(node1-5.south); \draw [->,thick](node0-6.north)--([xshift=0.15em,yshift=-0.05em]node1-5.south);
\draw [->,thick](node0-6.north)--(node1-6.south); \draw [->,thick](node0-6.north)--(node1-6.south);
\draw [->,thick](node0-6.north)--(node1-8.south); \draw [->,thick](node0-6.north)--([xshift=-0.4em,yshift=-0.05em]node1-8.south);
\draw [->,thick](node0-8.north)--(node1-5.south); \draw [->,thick](node0-8.north)--([xshift=0.4em,yshift=-0.05em]node1-5.south);
\draw [->,thick](node0-8.north)--(node1-6.south); \draw [->,thick](node0-8.north)--([xshift=0.15em,yshift=-0.05em]node1-6.south);
\draw [->,thick](node0-8.north)--(node1-8.south); \draw [->,thick](node0-8.north)--(node1-8.south);
\draw [->,thick](node1-5.north)--(node2-5.south); \draw [->,thick](node1-5.north)--(node2-5.south);
\draw [->,thick](node1-5.north)--(node2-6.south); \draw [->,thick](node1-5.north)--([xshift=-0.15em,yshift=-0.05em]node2-6.south);
\draw [->,thick](node1-5.north)--(node2-8.south); \draw [->,thick](node1-5.north)--([xshift=-0.15em,yshift=-0.05em]node2-8.south);
\draw [->,thick](node1-6.north)--(node2-5.south); \draw [->,thick](node1-6.north)--([xshift=0.15em,yshift=-0.05em]node2-5.south);
\draw [->,thick](node1-6.north)--(node2-6.south); \draw [->,thick](node1-6.north)--(node2-6.south);
\draw [->,thick](node1-6.north)--(node2-8.south); \draw [->,thick](node1-6.north)--([xshift=-0.4em,yshift=-0.05em]node2-8.south);
\draw [->,thick](node1-8.north)--(node2-5.south); \draw [->,thick](node1-8.north)--([xshift=0.4em,yshift=-0.05em]node2-5.south);
\draw [->,thick](node1-8.north)--(node2-6.south); \draw [->,thick](node1-8.north)--([xshift=0.15em,yshift=-0.05em]node2-6.south);
\draw [->,thick](node1-8.north)--(node2-8.south); \draw [->,thick](node1-8.north)--(node2-8.south);
\draw [<-,thick](node3-5.south)--(node2-5.north); \draw [<-,thick](node3-5.south)--(node2-5.north);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
\node [anchor=center,model,fill=blue!20] (decoder) at ([xshift=7.5em]ate.east) {\small{解码器}}; \node [anchor=center,model,fill=blue!20] (decoder) at ([xshift=7.5em]ate.east) {\small{解码器}};
\node [anchor=north,word] (w1) at ([yshift=-1.5em,xshift=0em]decoder.south) {\small{$x_3$}}; \node [anchor=north,word] (w1) at ([yshift=-1.5em,xshift=0em]decoder.south) {\small{$x_3$}};
\node [anchor=west,word] (w2) at ([xshift=0em]w1.east) {\small{$x_4$}}; \node [anchor=west,word] (w2) at ([xshift=0em]w1.east) {\small{$x_4$}};
\node [anchor=west,word] (w3) at ([xshift=0em]w2.east) {<M>}; \node [anchor=west,word] (w3) at ([xshift=-0.26em]w2.east) {<M>};
\node [anchor=east,word] (w4) at ([xshift=0em]w1.west) {<M>}; \node [anchor=east,word] (w4) at ([xshift=0em]w1.west) {<M>};
\node [anchor=east,word] (w5) at ([xshift=0em]w4.west) {<M>}; \node [anchor=east,word] (w5) at ([xshift=0em]w4.west) {<M>};
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
...@@ -244,9 +244,9 @@ ...@@ -244,9 +244,9 @@
\end{figure} \end{figure}
%---------------------------------------------- %----------------------------------------------
\parinterval 在神经机器翻译中,应用多任务学习的主要策略是将翻译任务作为主任务,同时设置一些仅使用单语数据的子任务,通过这些子任务来捕捉单语数据中的语言知识\upcite{DBLP:conf/emnlp/DomhanH17,DBLP:conf/emnlp/ZhangZ16,DBLP:journals/corr/LuongLSVK15}。一种多任务学习的方法是利用源语言单语数据,通过单个编码器对源语言数据进行建模,再分别使用两个解码器来学习源语言排序和翻译任务。源语言排序任务是指利用预排序规则对源语言句子中词的顺序进行调整\upcite{DBLP:conf/emnlp/WangCK07},可以通过单语数据来构造训练数据,从而使编码器被训练得更加充分\upcite{DBLP:conf/emnlp/ZhangZ16},如图\ref{fig:16-7}所示,图中$y_{<}$表示当前时刻之前的译文$x_{<}$表示源语言句子中词的顺序调整后的句子。 \parinterval 在神经机器翻译中,应用多任务学习的主要策略是将翻译任务作为主任务,同时设置一些仅使用单语数据的子任务,通过这些子任务来捕捉单语数据中的语言知识\upcite{DBLP:conf/emnlp/DomhanH17,DBLP:conf/emnlp/ZhangZ16,DBLP:journals/corr/LuongLSVK15}。一种多任务学习的方法是利用源语言单语数据,通过单个编码器对源语言数据进行建模,再分别使用两个解码器来学习源语言排序和翻译任务。源语言排序任务是指利用预排序规则对源语言句子中词的顺序进行调整\upcite{DBLP:conf/emnlp/WangCK07},可以通过单语数据来构造训练数据,从而使编码器被训练得更加充分\upcite{DBLP:conf/emnlp/ZhangZ16},如图\ref{fig:16-7}所示,图中$y_{<}$表示当前时刻之前的单词序列$x_{<}$表示源语言句子中词的顺序调整后的句子。
\parinterval 虽然神经机器翻译模型可以看作一种语言生成模型,但生成过程中却依赖于源语言信息,因此无法直接利用目标语言单语数据进行多任务学习。针对这个问题,可以对原有翻译模型结构进行修改,在解码器底层增加一个语言模型子层,这个子层用于学习语言模型任务,与编码器端是完全独立的,如图\ref{fig:16-8}所示\upcite{DBLP:conf/emnlp/DomhanH17},图中$y_{<}$表示当前时刻之前的译文$z_{<}$表示当前时刻之前的单语数据。在训练过程中,分别将双语数据和单语数据送入翻译模型和语言模型进行计算,双语数据训练产生的梯度用于对整个模型进行参数更新,而单语数据产生的梯度只对语言模型子层进行参数更新。 \parinterval 虽然神经机器翻译模型可以看作一种语言生成模型,但生成过程中却依赖于源语言信息,因此无法直接利用目标语言单语数据进行多任务学习。针对这个问题,可以对原有翻译模型结构进行修改,在解码器底层增加一个语言模型子层,这个子层用于学习语言模型任务,与编码器端是完全独立的,如图\ref{fig:16-8}所示\upcite{DBLP:conf/emnlp/DomhanH17},图中$y_{<}$表示当前时刻之前的单词序列$z_{<}$表示当前时刻之前的单语数据。在训练过程中,分别将双语数据和单语数据送入翻译模型和语言模型进行计算,双语数据训练产生的梯度用于对整个模型进行参数更新,而单语数据产生的梯度只对语言模型子层进行参数更新。
%---------------------------------------------- %----------------------------------------------
\begin{figure}[htp] \begin{figure}[htp]
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
\node(figure)[draw=white,above of = decoder_right,yshift=6.5em,scale=0.25] {\includegraphics[width=0.62\textwidth]{./Chapter17/Figures/figure-bank-without-attention.jpg}}; \node(figure)[draw=white,above of = decoder_right,yshift=6.5em,scale=0.25] {\includegraphics[width=0.62\textwidth]{./Chapter17/Figures/figure-bank-without-attention.jpg}};
\node [anchor=south,scale=1.2] (node1) at ([xshift=-2.5em,yshift=4.5em]y.north) {\small{$x$:源语言文本数据}};
\node [anchor=north,scale=1.2] (node2) at ([xshift=0.57em]node1.south){\small{$y$:目标语言文本数据}};
\draw[->,thick](x)to(encoder); \draw[->,thick](x)to(encoder);
\draw[->,thick](encoder)to(decoder_left)node[right,xshift=-0.1cm,yshift=-1.25cm,scale=1.2]{\small{翻译}}; \draw[->,thick](encoder)to(decoder_left)node[right,xshift=-0.1cm,yshift=-1.25cm,scale=1.2]{\small{翻译}};
\draw[->,thick](decoder_left)to(y_hat); \draw[->,thick](decoder_left)to(y_hat);
......
\begin{tikzpicture} \begin{tikzpicture}
%\tikzstyle{every node}=[scale=0.8] %\tikzstyle{every node}=[scale=0.8]
\tikzstyle{prob}=[minimum width=0.4em, fill=blue!15,inner sep=0pt] \tikzstyle{prob}=[minimum width=0.4em, fill=blue!20,inner sep=0pt]
\node[draw,fill=yellow!15,inner sep=0pt,minimum width=3em,minimum height=5em](key) at (0,0){}; \node[draw,fill=yellow!30,inner sep=0pt,minimum width=3em,minimum height=5em](key) at (0,0){};
\draw[] ([yshift=0.5em]key.180) -- ([yshift=0.5em]key.0); \draw[] ([yshift=0.5em]key.180) -- ([yshift=0.5em]key.0);
\draw[] ([yshift=1.5em]key.180) -- ([yshift=1.5em]key.0); \draw[] ([yshift=1.5em]key.180) -- ([yshift=1.5em]key.0);
\draw[] ([yshift=-0.5em]key.180) -- ([yshift=-0.5em]key.0); \draw[] ([yshift=-0.5em]key.180) -- ([yshift=-0.5em]key.0);
\draw[] ([yshift=-1.5em]key.180) -- ([yshift=-1.5em]key.0); \draw[] ([yshift=-1.5em]key.180) -- ([yshift=-1.5em]key.0);
\node[draw,fill=ugreen!15,inner sep=0pt,minimum width=3em,minimum height=5em](value) at (3em,0){}; \node[draw,fill=green!30!white,inner sep=0pt,minimum width=3em,minimum height=5em](value) at (3em,0){};
\draw[] ([yshift=0.5em]value.180) -- ([yshift=0.5em]value.0); \draw[] ([yshift=0.5em]value.180) -- ([yshift=0.5em]value.0);
\draw[] ([yshift=1.5em]value.180) -- ([yshift=1.5em]value.0); \draw[] ([yshift=1.5em]value.180) -- ([yshift=1.5em]value.0);
\draw[] ([yshift=-0.5em]value.180) -- ([yshift=-0.5em]value.0); \draw[] ([yshift=-0.5em]value.180) -- ([yshift=-0.5em]value.0);
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
\node[anchor=south,font=\footnotesize,inner sep=0pt] at ([yshift=0.2em]value.north){value}; \node[anchor=south,font=\footnotesize,inner sep=0pt] at ([yshift=0.2em]value.north){value};
\node[anchor=south,font=\footnotesize,inner sep=0pt] (cache)at ([yshift=2em,xshift=1.5em]key.north){\small\bfnew{缓存}}; \node[anchor=south,font=\footnotesize,inner sep=0pt] (cache)at ([yshift=2em,xshift=1.5em]key.north){\small\bfnew{缓存}};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=orange!15] (dt) at ([yshift=2.1em,xshift=-4em]key.west){${\mathbi{d}}_{t}$}; \node[draw,anchor=east,thick,minimum size=1.8em,fill=orange!30] (dt) at ([yshift=2.1em,xshift=-4em]key.west){${\mathbi{d}}_{t}$};
\node[anchor=north,font=\footnotesize] (readlab) at ([xshift=2.8em,yshift=0.3em]dt.north){\red{读取}}; \node[anchor=north,font=\footnotesize] (readlab) at ([xshift=2.8em,yshift=0.3em]dt.north){\red{读取}};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=ugreen!15] (st) at ([xshift=-3.7em]dt.west){${\mathbi{s}}_{t}$}; \node[draw,anchor=east,thick,minimum size=1.8em,fill=green!30!white] (st) at ([xshift=-3.7em]dt.west){${\mathbi{s}}_{t}$};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=red!15] (st2) at ([xshift=-0.85em,yshift=3.5em]dt.west){$ \widetilde{\mathbi{s}}_{t}$}; \node[draw,anchor=east,thick,minimum size=1.8em,fill=red!30] (st2) at ([xshift=-0.85em,yshift=3.5em]dt.west){$ \widetilde{\mathbi{s}}_{t}$};
%\node[draw,anchor=north,circle,inner sep=0pt, minimum size=1.2em,fill=yellow] (add) at ([yshift=-1em]st2.south){+}; %\node[draw,anchor=north,circle,inner sep=0pt, minimum size=1.2em,fill=yellow] (add) at ([yshift=-1em]st2.south){+};
\node[draw,thick,inner sep=0pt, minimum size=1.1em, circle] (add) at ([yshift=-1.5em]st2.south){}; \node[draw,thick,inner sep=0pt, minimum size=1.1em, circle] (add) at ([yshift=-1.5em]st2.south){};
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
\node[anchor=north,inner sep=0pt,font=\footnotesize,text=red] at ([xshift=-0em,yshift=-0.5em]add.south){融合}; \node[anchor=north,inner sep=0pt,font=\footnotesize,text=red] at ([xshift=-0em,yshift=-0.5em]add.south){融合};
\node[draw,anchor=east,thick,minimum size=1.8em,fill=yellow!15] (ct) at ([xshift=-2em,yshift=-3.5em]st.west){$ {\mathbi{C}}_{t}$}; \node[draw,anchor=east,thick,minimum size=1.8em,fill=yellow!30] (ct) at ([xshift=-2em,yshift=-3.5em]st.west){$ {\mathbi{C}}_{t}$};
\node[anchor=north,font=\footnotesize] (matchlab) at ([xshift=6.7em,yshift=-0.1em]ct.north){\red{匹配}}; \node[anchor=north,font=\footnotesize] (matchlab) at ([xshift=6.7em,yshift=-0.1em]ct.north){\red{匹配}};
\node[anchor=east] (y) at ([xshift=-6em,yshift=1em]st.west){$\mathbi{y}_{t-1}$}; \node[anchor=east] (y) at ([xshift=-6em,yshift=1em]st.west){$\mathbi{y}_{t-1}$};
\node[draw,anchor=east,minimum width=7em,minimum height=1.4em,fill=blue!20] (output) at ([xshift=-2.6em,yshift=2.6em]st2.west){}; \node[draw,anchor=east,minimum width=7em,minimum height=1.4em,fill=blue!30] (output) at ([xshift=-2.6em,yshift=2.6em]st2.west){};
\node[anchor=south] (yt) at ([yshift=4.2em]output.north){$\mathbi{y}_{t}$}; \node[anchor=south] (yt) at ([yshift=4.2em]output.north){$\mathbi{y}_{t}$};
\draw[] ([xshift=-0.7em]output.90) -- ([xshift=-0.7em]output.-90); \draw[] ([xshift=-0.7em]output.90) -- ([xshift=-0.7em]output.-90);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
\node(process_2)[process,fill=blue!20,right of = process_1,xshift=7.0cm,text width=4cm,align=center]{\baselineskip=4pt\LARGE{[[0.2,...,0.3], \qquad ..., \qquad 0.3,...,0.5]]}\par}; \node(process_2)[process,fill=blue!20,right of = process_1,xshift=7.0cm,text width=4cm,align=center]{\baselineskip=4pt\LARGE{[[0.2,...,0.3], \qquad ..., \qquad 0.3,...,0.5]]}\par};
\node(text_2)[below of = process_2,yshift=-2cm,scale=1.5]{语音特征}; \node(text_2)[below of = process_2,yshift=-2cm,scale=1.5]{语音特征};
\node(process_3)[process,fill=orange!20,minimum width=6cm,minimum height=5cm,right of = process_2,xshift=8.2cm,text width=4cm,align=center]{}; \node(process_3)[process,fill=orange!20,minimum width=6cm,minimum height=5cm,right of = process_2,xshift=8.2cm,text width=4cm,align=center]{};
\node(text_3)[below of = process_3,yshift=-3cm,scale=1.5]{源语文本及其词格}; \node(text_3)[below of = process_3,yshift=-3cm,scale=1.5]{源语文本及其词格};
\node(cir_s)[cir,very thick, below of = process_3,xshift=-2.2cm,yshift=1.1cm]{\LARGE S}; \node(cir_s)[cir,very thick, below of = process_3,xshift=-2.2cm,yshift=1.1cm]{\LARGE S};
\node(cir_a)[cir,right of = cir_s,xshift=1cm,yshift=0.8cm]{\LARGE a}; \node(cir_a)[cir,right of = cir_s,xshift=1cm,yshift=0.8cm]{\LARGE a};
\node(cir_c)[cir,right of = cir_a,xshift=1.2cm,yshift=0cm]{\LARGE c}; \node(cir_c)[cir,right of = cir_a,xshift=1.2cm,yshift=0cm]{\LARGE c};
......
...@@ -3,38 +3,38 @@ ...@@ -3,38 +3,38 @@
\tikzstyle{every node}=[scale=0.8] \tikzstyle{every node}=[scale=0.8]
\foreach \x in {1,2,3,4} \foreach \x in {1,2,3,4}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c1_\x) at (0em+2em*\x, 0em){}; \node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c1_\x) at (0em+2em*\x, 0em){};
\node[anchor=north] (hpre) at ([yshift=1.8em]c1_1.north) {${\mathbi{h}}^ {\textrm{pre}k}$}; \node[anchor=north] (hpre) at ([yshift=1.8em]c1_1.north) {${\mathbi{h}}^ {\textrm{pre}k}$};
\foreach \x in {1,2,3} \foreach \x in {1,2,3}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c2_\x) at (11em+2em*\x, 0em){}; \node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c2_\x) at (11em+2em*\x, 0em){};
\node[anchor=north] (hpre) at ([yshift=1.8em]c2_1.north) {${\mathbi{h}}^ {\textrm{pre}1}$}; \node[anchor=north] (hpre) at ([yshift=1.8em]c2_1.north) {${\mathbi{h}}^ {\textrm{pre}1}$};
\foreach \x in {1,2,3,4,5} \foreach \x in {1,2,3,4,5}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!30,rounded corners=1pt] (c3_\x) at (18.4em+2em*\x, 0em){};,minimum width=1em \node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=red!35,rounded corners=1pt] (c3_\x) at (18.4em+2em*\x, 0em){};,minimum width=1em
\foreach \x in {1,2,3,4,5} \foreach \x in {1,2,3,4,5}
\node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=blue!30,rounded corners=1pt] (c4_\x) at (18.4em+2em*\x, 10.4em){}; \node[draw,inner sep=0pt,minimum height=1em,minimum width=1.6em,fill=blue!35,rounded corners=1pt] (c4_\x) at (18.4em+2em*\x, 10.4em){};
%\node[inner sep=0pt,minimum size=1em,fill=ugreen,circle] (c5) at (9em, 7em){}; %\node[inner sep=0pt,minimum size=1em,fill=ugreen,circle,thick] (c5) at (9em, 7em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!20,circle] (qs) at (18.6em, 6.4em){}; \node[draw,inner sep=0pt,minimum size=1.2em,fill=green!30!white,circle,thick] (qs) at (18.6em, 6.4em){};
\node[draw,inner sep=0pt,minimum size=1.2em,fill=green!20,circle] (qw) at (18.6em, 4.4em){}; \node[draw,inner sep=0pt,minimum size=1.2em,fill=green!30!white,circle,thick] (qw) at (18.6em, 4.4em){};
\node[anchor=north] (qslab) at ([xshift=-0.8em,yshift=1em]qs.north) {${\mathbi{q}}^s$}; \node[anchor=north] (qslab) at ([xshift=-0.8em,yshift=1em]qs.north) {${\mathbi{q}}_s$};
\node[anchor=north] (qwlab) at ([xshift=-0.8em,yshift=1em]qw.north) {${\mathbi{q}}^w$}; \node[anchor=north] (qwlab) at ([xshift=-0.8em,yshift=1em]qw.north) {${\mathbi{q}}_w$};
\node[draw,thick,inner sep=0pt, minimum size=1.2em, circle] (sigma) at (24.4em, 8em){}; \node[draw,thick,inner sep=0pt, minimum size=1.2em, circle,thick] (sigma) at (24.4em, 8em){};
\draw[-,thick] (sigma.0) -- (sigma.180); \draw[-,thick] (sigma.0) -- (sigma.180);
\draw[-,thick] (sigma.90) -- (sigma.-90); \draw[-,thick] (sigma.90) -- (sigma.-90);
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add1) at (5em, 3em){}; \node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add1) at (5em, 3em){};
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add2) at (15em, 3em){}; \node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add2) at (15em, 3em){};
\node[draw,fill=orange!30,inner sep=0pt, minimum size=1.2em, circle] (add3) at (10em, 5.2em){}; \node[draw,fill=orange!35,inner sep=0pt, minimum size=1.2em, circle,thick] (add3) at (10em, 5.2em){};
\node[anchor=north] (cond) at ([xshift=-1em,yshift=0.5em]add3.north) {${\mathbi{d}}$}; \node[anchor=north] (cond) at ([xshift=-1.2em,yshift=0.5em]add3.north) {${\mathbi{d}_t}$};
\node[anchor=north] (cons1) at ([xshift=-1em,yshift=0.5em]add2.north) {${\mathbi{s}}^1$}; \node[anchor=north] (cons1) at ([xshift=-1em,yshift=0.5em]add2.north) {${\mathbi{s}}^1$};
\node[anchor=north] (consj) at ([xshift=-1em,yshift=0.5em]add1.north) {${\mathbi{s}}^k$}; \node[anchor=north] (consj) at ([xshift=-1em,yshift=0.5em]add1.north) {${\mathbi{s}}^k$};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node[draw,rounded corners=2pt,drop shadow,fill=white, minimum width=8.3em][fit=(c1_1)(c1_4)](box1){}; \node[draw,rounded corners=2pt,drop shadow,fill=white, minimum width=8.3em,thick][fit=(c1_1)(c1_4)](box1){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=6.4em][fit=(c2_1)(c2_3)](box2){}; \node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=6.4em,thick][fit=(c2_1)(c2_3)](box2){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.5em][fit=(c3_1)(c3_5)](box3){}; \node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.5em,thick][fit=(c3_1)(c3_5)](box3){};
\node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.3em][fit=(c4_1)(c4_5)](box4){}; \node[draw,rounded corners=2pt,drop shadow,fill=white,minimum width=10.3em,thick][fit=(c4_1)(c4_5)](box4){};
%\node[draw,rounded corners=2pt,inner xsep=6pt,drop shadow,fill=white][fit=(c5)](box5){}; %\node[draw,rounded corners=2pt,inner xsep=6pt,drop shadow,fill=white][fit=(c5)](box5){};
\end{pgfonlayer} \end{pgfonlayer}
...@@ -44,15 +44,15 @@ ...@@ -44,15 +44,15 @@
\node[text=ublue] at (10.5em, 0em) {\small\bfnew{...}}; \node[text=ublue] at (10.5em, 0em) {\small\bfnew{...}};
\node[text=ublue] (hh) at (-0.8em, 0em) {\small\bfnew{...}}; \node[text=ublue] (hh) at (-0.8em, 0em) {\small\bfnew{...}};
\draw[->,thick, out=70, in=-120] ([yshift=0.1em]c1_1.90) to ([yshift=-0.1em]add1.-90); \draw[->,thick, out=70, in=-120] ([yshift=0.1em]c1_1.90) to ([yshift=-0.1em]add1.-120);
%node[xshift=-0.4em,yshift=1.2em]{$ \mathbi{h}^ {\textrm j}$} %node[xshift=-0.4em,yshift=1.2em]{$ \mathbi{h}^ {\textrm j}$}
\draw[->,thick, out=80, in=-100] ([yshift=0.1em]c1_2.90) to ([yshift=-0.1em]add1.-90); \draw[->,thick, out=80, in=-100] ([yshift=0.1em]c1_2.90) to ([yshift=-0.1em]add1.-100);
\draw[->,thick, out=100, in=-80] ([yshift=0.1em]c1_3.90) to ([yshift=-0.1em]add1.-90); \draw[->,thick, out=100, in=-80] ([yshift=0.1em]c1_3.90) to ([yshift=-0.1em]add1.-80);
\draw[->,thick, out=110, in=-60] ([yshift=0.1em]c1_4.90) to ([yshift=-0.1em]add1.-90); \draw[->,thick, out=110, in=-60] ([yshift=0.1em]c1_4.90) to ([yshift=-0.1em]add1.-60);
\draw[->,thick, out=70, in=-110] ([yshift=0.1em]c2_1.90) to ([yshift=-0.1em]add2.-90); \draw[->,thick, out=70, in=-110] ([yshift=0.1em]c2_1.90) to ([yshift=-0.1em]add2.-110);
\draw[->,thick, out=90, in=-90] ([yshift=0.1em]c2_2.90) to ([yshift=-0.1em]add2.-90); \draw[->,thick, out=90, in=-90] ([yshift=0.1em]c2_2.90) to ([yshift=-0.1em]add2.-90);
\draw[->,thick, out=110, in=-70] ([yshift=0.1em]c2_3.90) to ([yshift=-0.1em]add2.-90); \draw[->,thick, out=110, in=-70] ([yshift=0.1em]c2_3.90) to ([yshift=-0.1em]add2.-70);
\draw[->,thick, out=30, in=-130] ([yshift=0.1em]add1.90) to ([yshift=-0.1em]add3.-120); \draw[->,thick, out=30, in=-130] ([yshift=0.1em]add1.90) to ([yshift=-0.1em]add3.-120);
...@@ -67,20 +67,20 @@ ...@@ -67,20 +67,20 @@
\draw[->,thick] ([yshift=0.1em]sigma.90) -- ([yshift=-0.1em]n2.-90); \draw[->,thick] ([yshift=0.1em]sigma.90) -- ([yshift=-0.1em]n2.-90);
\draw[->,thick] ([yshift=0.1em]n2.90) -- node[right]{$ \widetilde{\mathbi{h}}_{\textrm{t}}$}([yshift=2em]n2.90); \draw[->,thick] ([yshift=0.1em]n2.90) -- node[right]{$ \widetilde{\mathbi{h}}_{\textrm{t}}$}([yshift=2em]n2.90);
\draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]hh.-180) -- node[font=\scriptsize,text=black,below]{前几个句子}([yshift=-2em]box2.0); \draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]hh.-180) -- node[font=\footnotesize,text=black,below]{前几个句子}([yshift=-2em]box2.0);
\draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]box3.-180) -- node[font=\scriptsize,text=black,below]{当前句子}([yshift=-2em]box3.0); \draw[decorate,decoration={brace, mirror},gray, thick] ([yshift=-2em]box3.-180) -- node[font=\footnotesize,text=black,below]{当前句子}([yshift=-2em]box3.0);
\draw[->, thick, rounded corners=2pt] ([yshift=0.1em]add3.90) -- ([yshift=2.1em]add3.90) -- ([xshift=-0.1em]sigma.180); \draw[->, thick, rounded corners=2pt] ([yshift=0.1em]add3.90) -- ([yshift=2.1em]add3.90) -- ([xshift=-0.1em]sigma.180);
%annotation %annotation
\node[fill=red!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a1) at (2em,-4.5em) {}; %\node[fill=red!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a1) at (2em,-4.5em) {};
\node[anchor=west,font=\footnotesize] (w1) at ([xshift=0.4em]a1.east) {编码表示}; %\node[anchor=west,font=\footnotesize] (w1) at ([xshift=0.4em]a1.east) {编码表示};
\node[anchor=west,fill=orange!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a2) at ([xshift=2em]w1.east) {}; %\node[anchor=west,fill=orange!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a2) at ([xshift=2em]w1.east) {};
\node[anchor=west,font=\footnotesize] (w2)at ([xshift=0.4em]a2.east) {层次注意力}; %\node[anchor=west,font=\footnotesize] (w2)at ([xshift=0.4em]a2.east) {层次注意力};
\node[anchor=west,fill=blue!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a3) at ([xshift=2em]w2.east) {}; %\node[anchor=west,fill=blue!30,rounded corners=1pt,inner sep=0pt,minimum size=1em] (a3) at ([xshift=2em]w2.east) {};
\node[anchor=west,font=\footnotesize] at ([xshift=0.4em]a3.east) {融合上下文信息的编码表示}; %\node[anchor=west,font=\footnotesize] at ([xshift=0.4em]a3.east) {融合上下文信息的编码表示};
\end{tikzpicture} \end{tikzpicture}
......
\definecolor{color1}{rgb}{1,0.725,0.058} \definecolor{color1}{rgb}{1,0.725,0.058}
\tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.8cm,minimum height=1.1cm,text centered,draw=black!70,fill=blue!10,drop shadow] \tikzstyle{coder} = [rectangle,thick,rounded corners,minimum width=2.8cm,minimum height=1.1cm,text centered,draw=black!,fill=blue!30,drop shadow]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=0.9cm,text centered,draw=black!70,fill=green!25,drop shadow] \tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=0.9cm,text centered,draw=black,fill=green!30!white,drop shadow]
\begin{tikzpicture}[node distance = 0,scale = 0.7] \begin{tikzpicture}[node distance = 0,scale = 0.7]
\tikzstyle{every node}=[scale=0.7] \tikzstyle{every node}=[scale=0.7]
\node(encoder_c)[coder]{\large{编码器}}; \node(encoder_c)[coder]{\large{编码器}};
\node(encoder_s)[coder, right of = encoder_c, xshift=3.5cm, fill=red!25]{\large{编码器}}; \node(encoder_s)[coder, right of = encoder_c, xshift=3.5cm, fill=red!30]{\large{编码器}};
\node(h_pre)[above of = encoder_c, yshift=1.3cm,scale=1.3]{${\mathbi{h}}_{\rm pre}$}; \node(h_pre)[above of = encoder_c, yshift=1.3cm,scale=1.3]{${\mathbi{h}}_{\rm pre}$};
\node(h)[above of = encoder_s, yshift=1.3cm,scale=1.3]{$\mathbi{h}$}; \node(h)[above of = encoder_s, yshift=1.3cm,scale=1.3]{$\mathbi{h}$};
\node(cir)[circle,very thick, right of = h, draw=black!90,minimum width=0.5cm,xshift=1.1cm]{}; \node(cir)[circle,very thick, right of = h, draw=black!90,minimum width=0.5cm,xshift=1.1cm]{};
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
\node(current)[below of = encoder_s, yshift=-1.3cm]{\large{当前句子}}; \node(current)[below of = encoder_s, yshift=-1.3cm]{\large{当前句子}};
\node(attention_left)[attention, above of = encoder_c, xshift=2.4cm,yshift=3.1cm]{\large{注意力机制}}; \node(attention_left)[attention, above of = encoder_c, xshift=2.4cm,yshift=3.1cm]{\large{注意力机制}};
\node(d)[above of = attention_left, yshift=1.1cm,scale=1.3]{$\mathbi{d}$}; \node(d)[above of = attention_left, yshift=1.1cm,scale=1.3]{$\mathbi{d}$};
\node(ground)[rectangle, thick, rounded corners, minimum width=5cm, minimum height=5.5cm, right of = encoder_s, xshift=4.4cm,yshift=2.2cm, draw=black!70, fill=gray!10]{}; \node(ground)[rectangle, thick, rounded corners, minimum width=5cm, minimum height=5.5cm, right of = encoder_s, xshift=4.4cm,yshift=2.2cm, draw=black, fill=gray!10]{};
\node(decoder)[above of = encoder_s, xshift=3.1cm]{\large{解码器}}; \node(decoder)[above of = encoder_s, xshift=3.1cm]{\large{解码器}};
\node(attention_right)[attention, right of = attention_left, xshift=5.4cm,yshift=-0.4cm]{\large{注意力机制}}; \node(attention_right)[attention, right of = attention_left, xshift=5.4cm,yshift=-0.4cm]{\large{注意力机制}};
\node(target)[right of = current, xshift=5.3cm]{\large{目标语言句子(位置$j$之前)}}; \node(target)[right of = current, xshift=5.3cm]{\large{目标语言句子(位置$j$之前)}};
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
\draw[->,very thick]([xshift=-1.4em]trans.west) to (trans.west); \draw[->,very thick]([xshift=-1.4em]trans.west) to (trans.west);
\draw[->,very thick](trans.east) to ([xshift=1.4em]trans.east); \draw[->,very thick](trans.east) to ([xshift=1.4em]trans.east);
\node[anchor=east] (de1) at ([xshift=4.8cm,yshift=-0.1em]trans.east) {\begin{tabular}{l}{\normalsize{译文:}}{\normalsize{一个\ \;女孩\ \;\ \;{\red{河床}}}}\end{tabular}}; \node[anchor=east] (de1) at ([xshift=4.5cm,yshift=-0.1em]trans.east) {\begin{tabular}{l}{\normalsize{译文:}}{\normalsize{一个/女孩/从/{\red{河床}}/}}\end{tabular}};
\node[anchor=south] (de2) at ([xshift=-0em,yshift=-1.5em]de1.south) {\begin{tabular}{l}{\normalsize{\ \;跳下来\ \;}} \end{tabular}}; \node[anchor=south] (de2) at ([xshift=-0em,yshift=-1.5em]de1.south) {\begin{tabular}{l}{\normalsize{/跳下来/}} \end{tabular}};
\end {scope} \end {scope}
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\node(river)[word, right of = figure, xshift=5cm, yshift=0.35cm, fill=blue!45]{river}; \node(river)[word, right of = figure, xshift=5cm, yshift=0.35cm, fill=blue!45]{river};
\node(mountain)[word, above of = river, yshift=0.75cm, fill=blue!45]{mountain}; \node(mountain)[word, above of = river, yshift=0.75cm, fill=blue!45]{mountain};
\node(child)[word, above of = mountain, yshift=0.75cm, fill=blue!15]{child}; \node(child)[word, above of = mountain, yshift=0.75cm, fill=blue!15]{child};
\node(man)[word, above of = child, yshift=0.75cm, fill=blue!25]{girl}; \node(woman)[word, above of = child, yshift=0.75cm, fill=blue!25]{girl};
\node(jump)[word, below of = river, yshift=-0.75cm, fill=blue!30]{jump}; \node(jump)[word, below of = river, yshift=-0.75cm, fill=blue!30]{jump};
\node(bank)[word, below of = jump, yshift=-0.75cm, fill=blue!65]{bank}; \node(bank)[word, below of = jump, yshift=-0.75cm, fill=blue!65]{bank};
\node(sky)[word, below of = bank, yshift=-0.75cm, fill=blue!30]{sky}; \node(sky)[word, below of = bank, yshift=-0.75cm, fill=blue!30]{sky};
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
\draw[->, thick](yn_1)to([yshift=-0.1cm]decoder.south); \draw[->, thick](yn_1)to([yshift=-0.1cm]decoder.south);
\draw[->, thick]([yshift=0.1cm]decoder.north)to(yn_2); \draw[->, thick]([yshift=0.1cm]decoder.north)to(yn_2);
\draw[->, thick, color=blue!45]([xshift=0.05cm]river.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!25]([xshift=0.05cm]woman.east)to([xshift=-0.05cm]cir.north);
\draw[->, thick, color=blue!45]([xshift=0.05cm]mountain.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!15]([xshift=0.05cm]child.east)to([yshift=0.7em,xshift=0.4em]cir.west);
\draw[->, thick, color=blue!15]([xshift=0.05cm]child.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!45]([xshift=0.05cm]mountain.east)to([yshift=0.5em,xshift=0.15em]cir.west);
\draw[->, thick, color=blue!25]([xshift=0.05cm]man.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!45]([xshift=0.05cm]river.east)to([yshift=0.15em]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]jump.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!30]([xshift=0.05cm]jump.east)to([yshift=-0.15em]cir.west);
\draw[->, very thick, color=blue!65]([xshift=0.05cm]bank.east)to([xshift=-0.05cm]cir.west); \draw[->, very thick, color=blue!65]([xshift=0.05cm]bank.east)to([yshift=-0.5em,xshift=0.15em]cir.west);
\draw[->, thick, color=blue!30]([xshift=0.05cm]sky.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!30]([xshift=0.05cm]sky.east)to([yshift=-0.7em,xshift=0.4em]cir.west);
\draw[->, thick, color=blue!15]([xshift=0.05cm]tree.east)to([xshift=-0.05cm]cir.west); \draw[->, thick, color=blue!15]([xshift=0.05cm]tree.east)to([xshift=-0.05em]cir.south);
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
\tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black!70,fill=red!25] \tikzstyle{encoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black,fill=red!30]
\tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black!70,fill=blue!15] \tikzstyle{decoder} = [rectangle,thick,rounded corners,minimum width=4.3em,minimum height=2.2em,text centered,draw=black,fill=blue!25]
\tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=2.2em,text centered,draw=black!70,fill=green!25] \tikzstyle{attention} = [rectangle,thick,rounded corners,minimum width=2.6cm,minimum height=2.2em,text centered,draw=black,fill=green!25]
\begin{tikzpicture}[node distance = 0,scale = 0.75] \begin{tikzpicture}[node distance = 0,scale = 0.75]
\tikzstyle{every node}=[scale=0.75] \tikzstyle{every node}=[scale=0.75]
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
\node(attention_below)[attention, right of = decoder_right, xshift=4.8cm]{\normalsize{注意力机制}}; \node(attention_below)[attention, right of = decoder_right, xshift=4.8cm]{\normalsize{注意力机制}};
\node(attention_above)[attention, above of = attention_below, yshift=1.6cm]{\normalsize{注意力机制}}; \node(attention_above)[attention, above of = attention_below, yshift=1.6cm]{\normalsize{注意力机制}};
\node(ffn)[attention, above of = attention_above, yshift=1.6cm, fill=blue!8]{\normalsize{前馈神经网络}}; \node(ffn)[attention, above of = attention_above, yshift=1.6cm, fill=blue!8]{\normalsize{前馈神经网络}};
\node [right of = attention_above, xshift=2.35cm,yshift=2.5cm,scale=1.2]{\footnotesize{解码器}};
\node(n)[right of = attention_above, xshift=2.4cm,scale=1.5]{$\times N$}; \node(n)[right of = attention_above, xshift=2.4cm,scale=1.5]{$\times N$};
\node(text_2)[above of = ffn, yshift=1.9cm]{\normalsize{基于上下文的修正结果}}; \node(text_2)[above of = ffn, yshift=1.9cm]{\normalsize{基于上下文的修正结果}};
\node(title_2)[right of = title_1, xshift=6.3cm]{\large\bfnew{二阶段翻译}}; \node(title_2)[right of = title_1, xshift=6.3cm]{\large\bfnew{二阶段翻译}};
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
......
...@@ -13,32 +13,32 @@ ...@@ -13,32 +13,32 @@
{ {
\begin{scope} \begin{scope}
\node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {{88}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {{88}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {{87}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.7cm]s1.east) {{87}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {{45}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.7cm]s2.east) {{45}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.2cm]s3.east) {{47}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.7cm]s3.east) {{47}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{100}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{15}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{15}};
\end{scope} \end{scope}
\begin{scope}[yshift=-1cm] \begin{scope}[yshift=-1.2cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{5}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{5}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.2cm]s1.east) {{230}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.7cm]s1.east) {{230}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {{7}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.7cm]s2.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {{234}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.7cm]s3.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{500}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{500}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{39}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{39}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.2cm]s6.east) {{100}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.7cm]s6.east) {{100}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.2cm]s7.east) {{15}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.7cm]s7.east) {{15}};
\end{scope} \end{scope}
\begin{scope}[yshift=-2cm] \begin{scope}[yshift=-2.4cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{975}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {{975}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {{7}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.7cm]s1.east) {{7}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.2cm]s2.east) {{234}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.7cm]s2.east) {{234}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {{294}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.7cm]s3.east) {{294}};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {{69}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.7cm]s4.east) {{69}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {{15}}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.7cm]s5.east) {{15}};
\end{scope} \end{scope}
......
...@@ -9,34 +9,34 @@ ...@@ -9,34 +9,34 @@
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}
\node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s1) at (0,0) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.55cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.2cm]s3.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s4) at ([xshift=0.55cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {\small{数据}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {\small{数据}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.2cm]s6.east) {...}; \node[anchor=west] (s7) at ([xshift=0.55cm]s6.east) {...};
\end{scope} \end{scope}
\begin{scope}[yshift=-1cm] \begin{scope}[yshift=-1.2cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {现在}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {现在};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.2cm]s1.east) {已经}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s2) at ([xshift=0.55cm]s1.east) {已经};
\node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.2cm]s2.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {不少}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.55cm]s3.east) {不少};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {\small{}}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {\small{}};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.2cm]s6.east) {数据}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s7) at ([xshift=0.55cm]s6.east) {数据};
\node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.2cm]s7.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s8) at ([xshift=0.55cm]s7.east) {};
\node[anchor=west] (s9) at ([xshift=0.2cm]s8.east) {...}; \node[anchor=west] (s9) at ([xshift=0.55cm]s8.east) {...};
\end{scope} \end{scope}
\begin{scope}[yshift=-2cm] \begin{scope}[yshift=-2.4cm]
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {确实}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s1) at (0,0) {确实};
\node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.2cm]s1.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s2) at ([xshift=0.55cm]s1.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.2cm]s2.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s3) at ([xshift=0.55cm]s2.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.2cm]s3.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s4) at ([xshift=0.55cm]s3.east) {};
\node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.2cm]s4.east) {疑问}; \node[anchor=west,draw,very thick,minimum size=25pt, inner sep=0] (s5) at ([xshift=0.55cm]s4.east) {疑问};
\node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.2cm]s5.east) {}; \node[anchor=west,draw,very thick,minimum size=25pt] (s6) at ([xshift=0.55cm]s5.east) {};
\node[anchor=west] (s7) at ([xshift=0.2cm]s6.east) {...}; \node[anchor=west] (s7) at ([xshift=0.55cm]s6.east) {...};
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545} \definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[ \begin{axis}[
width=10cm, height=4.5cm, width=12cm, height=4.5cm,
symbolic x coords={未抽取词,do,want,what,am,people,look}, symbolic x coords={未抽取词,do,want,what,am,people,look},
xtick=data, xtick=data,
ytick={0,0.05,0.1,0.15,0.2,0.25}, ytick={0,0.05,0.1,0.15,0.2,0.25},
xlabel={低概率词汇}, xlabel={低概率词汇},
ylabel={词汇概率}, ylabel={词汇概率},
legend pos=outer north east, legend pos=outer north east,
xlabel style={align=right,xshift=5.3cm,yshift=0.8cm,font=\footnotesize}, xlabel style={align=right,xshift=6.5cm,yshift=0.8cm,font=\footnotesize},
ylabel style={rotate=-90,yshift=2cm,xshift=1cm,font=\footnotesize}, ylabel style={rotate=-90,yshift=2cm,xshift=1cm,font=\footnotesize},
y tick style={opacity=0}, y tick style={opacity=0},
x tick style={opacity=0}, x tick style={opacity=0},
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
ymin=0, ymin=0,
ymax=0.25] ymax=0.25]
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)}; \addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};
\addplot [ybar,bar shift=2mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)}; \addplot [ybar,bar shift=2.15mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)};
\legend{未平滑,平滑后} \legend{未平滑,平滑后}
\end{axis} \end{axis}
\end{tikzpicture} \end{tikzpicture}
......
\definecolor{ublue}{rgb}{0.152,0.250,0.545} \definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture} \begin{tikzpicture}
\begin{axis}[ \begin{axis}[
width=12cm, width=14cm,
height=4cm, height=4cm,
xlabel={{$\funp{P}(x)$}}, xlabel={{$\funp{P}(x)$}},
ylabel={{$\funp{I}(x)$}}, ylabel={{$\funp{I}(x)$}},
......
...@@ -10,55 +10,55 @@ ...@@ -10,55 +10,55 @@
\begin{scope} \begin{scope}
{\footnotesize {\footnotesize
\foreach \i in {1,...,5}{ \foreach \i in {1,...,5}{
\node [draw,thick,minimum size=10pt] at (\i,0) {1}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {1};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{1}) = 5/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{1}) = 5/30$};
\end{scope} \end{scope}
\begin{scope}[yshift=-2.5em] \begin{scope}[yshift=-2.5em]
{\footnotesize {\footnotesize
\foreach \i in {1,...,4}{ \foreach \i in {1,...,4}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{red} 2}}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{red} 2}};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{2}) = 4/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{2}) = 4/30$};
\end{scope} \end{scope}
\begin{scope}[yshift=-5.0em] \begin{scope}[yshift=-5.0em]
{\footnotesize {\footnotesize
\foreach \i in {1,...,6}{ \foreach \i in {1,...,6}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{ublue} 3}}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{ublue} 3}};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{3}) = 6/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{3}) = 6/30$};
\end{scope} \end{scope}
\begin{scope}[yshift=-7.5em] \begin{scope}[yshift=-7.5em]
{\footnotesize {\footnotesize
\foreach \i in {1,...,12}{ \foreach \i in {1,...,12}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{ugreen} 4}}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{ugreen} 4}};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{4}) = 12/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{4}) = 12/30$};
\end{scope} \end{scope}
\begin{scope}[yshift=-10.0em] \begin{scope}[yshift=-10.0em]
{\footnotesize {\footnotesize
\foreach \i in {1,...,2}{ \foreach \i in {1,...,2}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{purple} 5}}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{purple} 5}};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{5}) = 2/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{5}) = 2/30$};
\end{scope} \end{scope}
\begin{scope}[yshift=-12.5em] \begin{scope}[yshift=-12.5em]
{\footnotesize {\footnotesize
\foreach \i in {1,...,1}{ \foreach \i in {1,...,1}{
\node [draw,thick,minimum size=10pt] at (\i,0) {{\color{orange} 6}}; \node [draw,thick,minimum size=10pt] at (1.2*\i,0) {{\color{orange} 6}};
} }
} }
\node [anchor=west] at (33em,0) {$\funp{P}(\text{6}) = 1/30$}; \node [anchor=west] at (43em,0) {$\funp{P}(\text{6}) = 1/30$};
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
...@@ -13,41 +13,41 @@ ...@@ -13,41 +13,41 @@
{ {
\begin{scope} \begin{scope}
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{2}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{3}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{5}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{4}}};
\end{scope} \end{scope}
\begin{scope}[yshift=-1cm] \begin{scope}[yshift=-1cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{5}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{6}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{6}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{3}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{2}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{5}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{{\color{red}{1}}}};
\end{scope} \end{scope}
\begin{scope}[yshift=-2cm] \begin{scope}[yshift=-2cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{2}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{2}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{2}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{3}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{4}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{5}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{5}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{{\color{red}{1}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{{\color{red}{1}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{3}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{3}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{4}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{4}}};
\end{scope} \end{scope}
} }
\end{tikzpicture} \end{tikzpicture}
......
...@@ -12,41 +12,41 @@ ...@@ -12,41 +12,41 @@
\begin{scope} \begin{scope}
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{red} 2}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{purple} 5}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{1}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{{\color{ublue} 3}}}};
\end{scope} \end{scope}
\begin{scope}[yshift=-1cm] \begin{scope}[yshift=-1cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{red} 2}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{1}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{purple} 5}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{purple} 5}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{1}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\end{scope} \end{scope}
\begin{scope}[yshift=-2cm] \begin{scope}[yshift=-2cm]
\node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s1) at (0,0) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.2cm]s1.east) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s2) at ([xshift=0.5cm]s1.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.2cm]s2.east) {\Large{\textbf{{\color{red} 2}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s3) at ([xshift=0.5cm]s2.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.2cm]s3.east) {\Large{\textbf{{\color{orange} 6}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s4) at ([xshift=0.5cm]s3.east) {\Large{\textbf{{\color{orange} 6}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.2cm]s4.east) {\Large{\textbf{1}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s5) at ([xshift=0.5cm]s4.east) {\Large{\textbf{1}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.2cm]s5.east) {\Large{\textbf{{\color{red} 2}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s6) at ([xshift=0.5cm]s5.east) {\Large{\textbf{{\color{red} 2}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.2cm]s6.east) {\Large{\textbf{{\color{ublue} 3}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s7) at ([xshift=0.5cm]s6.east) {\Large{\textbf{{\color{ublue} 3}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.2cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s8) at ([xshift=0.5cm]s7.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.2cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s9) at ([xshift=0.5cm]s8.east) {\Large{\textbf{{\color{ugreen} 4}}}};
\node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.2cm]s9.east) {\Large{\textbf{1}}}; \node[anchor=west,draw,very thick,minimum size=20pt] (s10) at ([xshift=0.5cm]s9.east) {\Large{\textbf{1}}};
\end{scope} \end{scope}
\end{tikzpicture} \end{tikzpicture}
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
\tikzstyle{hide} = [draw,line width=1pt,inner sep=2pt,fill=green!30,minimum size=2em] \tikzstyle{hide} = [draw,line width=1pt,inner sep=2pt,fill=green!30,minimum size=2em]
\node[hide] (y1) at (0,0){$y_1$}; \node[hide] (y1) at (0,0){$y_1$};
\node[anchor=west,hide](y2)at([xshift=2em]y1.east){$y_2$}; \node[anchor=west,hide](y2)at([xshift=2.4em]y1.east){$y_2$};
\node[anchor=west,hide](y3)at([xshift=2em]y2.east){$y_3$}; \node[anchor=west,hide](y3)at([xshift=2.4em]y2.east){$y_3$};
\node[anchor=west,line width=1pt,inner sep=2pt,minimum size=2em](dots)at([xshift=2em]y3.east){$\cdots$}; \node[anchor=west,line width=1pt,inner sep=2pt,minimum size=2em](dots)at([xshift=2.4em]y3.east){$\cdots$};
\node[anchor=west,hide](yn-1)at([xshift=2em]dots.east){$y_{m-1}$}; \node[anchor=west,hide](yn-1)at([xshift=2.4em]dots.east){$y_{m-1}$};
\node[anchor=west,hide](yn)at([xshift=2em]yn-1.east){$y_m$}; \node[anchor=west,hide](yn)at([xshift=2.4em]yn-1.east){$y_m$};
\node[anchor=north,draw,line width=1pt,inner sep=2pt,fill=red!30,minimum height=2em,minimum width=12em](see)at ([yshift=-3em,xshift=2em]y3.south){${x}=(x_1,x_2,\ldots,x_{m-1},x_m)$}; \node[anchor=north,draw,line width=1pt,inner sep=2pt,fill=red!30,minimum height=2em,minimum width=12em](see)at ([yshift=-3em,xshift=2em]y3.south){${x}=(x_1,x_2,\ldots,x_{m-1},x_m)$};
\node[anchor=south,font=\footnotesize] at ([yshift=1em,xshift=2em]y3.north){待预测的隐含状态序列}; \node[anchor=south,font=\footnotesize] at ([yshift=1em,xshift=2em]y3.north){待预测的隐含状态序列};
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope} \begin{scope}[xshift=-0.3in]
{ {
{\small {\small
\node [anchor=north west] (entry1) at (0,0) {{1:}}; \node [anchor=north west] (entry1) at (0,0) {{1:}};
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {}; \node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
\end{scope} \end{scope}
{ {
\begin{scope}[xshift=1.2in,yshift=1em] \begin{scope}[xshift=1.5in,yshift=1em]
\node [anchor=west] (c1) at (0,0) {}; \node [anchor=west] (c1) at (0,0) {};
\node [anchor=west] (c2) at ([xshift=0em]c1.east) {}; \node [anchor=west] (c2) at ([xshift=0em]c1.east) {};
\node [anchor=west] (c3) at ([xshift=0em]c2.east) {}; \node [anchor=west] (c3) at ([xshift=0em]c2.east) {};
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
\node [anchor=south] (treebanklabel) at (t1n1.north) {{\color{ublue} 数据:树库}}; \node [anchor=south] (treebanklabel) at (t1n1.north) {{\color{ublue} 数据:树库}};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (treebanklabel) (t1n1) (t2w1) (t2wn)] (treebank) {}; \node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (treebanklabel) (t1n1) (t2w1) (t2wn)] (treebank) {};
\end{pgfonlayer} \end{pgfonlayer}
\node [anchor=north west] (math1) at ([xshift=2em]treebank.north east) {$\funp{P}$(VP $\to$ VV NN)}; \node [anchor=north west] (math1) at ([xshift=5em]treebank.north east) {$\funp{P}$(VP $\to$ VV NN)};
\node [anchor=north west] (math1part2) at ([xshift=-1em,yshift=0.2em]math1.south west) {$=\frac{\textrm{VP和VV NN同时出现的次数=1}}{\textrm{VP出现的次数}=4}$}; \node [anchor=north west] (math1part2) at ([xshift=-1em,yshift=0.2em]math1.south west) {$=\frac{\textrm{VP和VV NN同时出现的次数=1}}{\textrm{VP出现的次数}=4}$};
\node [anchor=north west] (math1part3) at ([yshift=0.2em]math1part2.south west){$=\frac{1}{4}$}; \node [anchor=north west] (math1part3) at ([yshift=0.2em]math1part2.south west){$=\frac{1}{4}$};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{hide} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=green!20,font=\footnotesize,minimum height=1.8em,minimum width=1.8em] \tikzstyle{hide} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=green!30,font=\footnotesize,minimum height=1.8em,minimum width=1.8em]
\tikzstyle{see} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.2em,circle] \tikzstyle{see} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.2em,circle]
\node[hide] (h1) at (0,0){C}; \node[hide] (h1) at (0,0){C};
\node[hide,anchor=west] (h2) at ([xshift=2em]h1.east){B}; \node[hide,anchor=west] (h2) at ([xshift=2.4em]h1.east){B};
\node[hide,anchor=west] (h3) at ([xshift=2em]h2.east){A}; \node[hide,anchor=west] (h3) at ([xshift=2.4em]h2.east){A};
\node[hide,anchor=west] (h4) at ([xshift=2em]h3.east){B}; \node[hide,anchor=west] (h4) at ([xshift=2.4em]h3.east){B};
\node[hide,anchor=west] (h5) at ([xshift=2em]h4.east){C}; \node[hide,anchor=west] (h5) at ([xshift=2.4em]h4.east){C};
\node[hide,anchor=west] (h6) at ([xshift=2em]h5.east){A}; \node[hide,anchor=west] (h6) at ([xshift=2.4em]h5.east){A};
\node[see,anchor=north] (s1) at ([yshift=-1.6em]h1.south){}; \node[see,anchor=north] (s1) at ([yshift=-1.6em]h1.south){};
\node[see,anchor=north] (s2) at ([yshift=-1.6em]h2.south){}; \node[see,anchor=north] (s2) at ([yshift=-1.6em]h2.south){};
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
\node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_h.east){一个隐含状态}; \node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_h.east){一个隐含状态};
\node[anchor=north,see] (one_s) at ([yshift=-1.4em]one_h.south){}; \node[anchor=north,see] (one_s) at ([yshift=-1.4em]one_h.south){};
\node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_s.east){一个可见状态}; \node[anchor=west,font=\scriptsize] at ([xshift=0.2em]one_s.east){一个可见状态};
\draw[->,line width=1.4pt] ([xshift=8em]one_h.east) -- ([xshift=9em]one_h.east); \draw[->,line width=1.4pt] ([xshift=8.4em]one_h.east) -- ([xshift=9.4em]one_h.east);
\node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.2em]one_h.east){从一个隐含状态到下一个隐含状态的\\转换,该过程隐含着转移概率}; \node[anchor=west,align=left,font=\scriptsize] at ([xshift=9.6em]one_h.east){从一个隐含状态到下一个隐含状态的\\转换,该过程隐含着转移概率};
\draw[->,line width=1.4pt,blue!60] ([yshift=-2em,xshift=8.5em]one_h.east) --([yshift=-3em,xshift=8.5em]one_h.east) ; \draw[->,line width=1.4pt,blue!60] ([yshift=-2em,xshift=8.9em]one_h.east) --([yshift=-3em,xshift=8.9em]one_h.east) ;
\node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.2em]one_h.east){从一个隐含状态到可见状态的输出,\\该过程隐含着发射概率}; \node[anchor=west,align=left,font=\scriptsize] at ([yshift=-2.5em,xshift=9.6em]one_h.east){从一个隐含状态到可见状态的输出,\\该过程隐含着发射概率};
\end{tikzpicture} \end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,circle,line width=0.8pt,align=center,fill=green!30,minimum size=1em] \tikzstyle{unit} = [draw,circle,thick,align=center,fill=green!30,minimum size=1em]
\node[minimum width=3em,minimum height=1.8em] (o) at (0,0){}; \node[minimum width=3em,minimum height=1.8em] (o) at (0,0){};
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_A) at ([xshift=-0em,yshift=-1em]o.south){隐含状态$A$}; \node[anchor=north,inner sep=1pt,font=\footnotesize] (state_A) at ([xshift=-0em,yshift=-1em]o.south){隐含状态$A$};
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_C) at ([yshift=-1.6em]state_B.south){隐含状态$C$}; \node[anchor=north,inner sep=1pt,font=\footnotesize] (state_C) at ([yshift=-1.6em]state_B.south){隐含状态$C$};
\node[anchor=north,inner sep=1pt,font=\footnotesize] (state_D) at ([yshift=-1.6em]state_C.south){隐含状态$D$}; \node[anchor=north,inner sep=1pt,font=\footnotesize] (state_D) at ([yshift=-1.6em]state_C.south){隐含状态$D$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c1) at ([yshift=0.2em,xshift=2em]o.east){$T$}; \node[anchor=west,inner sep=1pt,font=\footnotesize] (c1) at ([yshift=0.2em,xshift=3em]o.east){$T$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c2) at ([xshift=5em]c1.east){$F$}; \node[anchor=west,inner sep=1pt,font=\footnotesize] (c2) at ([xshift=6em]c1.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c3) at ([xshift=5em]c2.east){$F$}; \node[anchor=west,inner sep=1pt,font=\footnotesize] (c3) at ([xshift=6em]c2.east){$F$};
\node[anchor=west,inner sep=1pt,font=\footnotesize] (c4) at ([xshift=5em]c3.east){$T$}; \node[anchor=west,inner sep=1pt,font=\footnotesize] (c4) at ([xshift=6em]c3.east){$T$};
\node[anchor=south,font=\scriptsize] (cl1) at (c1.north) {时刻1}; \node[anchor=south,font=\scriptsize] (cl1) at (c1.north) {时刻1};
\node[anchor=south,font=\scriptsize] (cl2) at (c2.north) {时刻2}; \node[anchor=south,font=\scriptsize] (cl2) at (c2.north) {时刻2};
\node[anchor=south,font=\scriptsize] (cl3) at (c3.north) {时刻3}; \node[anchor=south,font=\scriptsize] (cl3) at (c3.north) {时刻3};
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,draw=ublue, inner sep=0.2em] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {}; \node[rectangle,draw=ublue, inner sep=0.2em,thick] [fit = (entry1) (entry2) (entry3) (entry4) (entry5) (entry6) (dictionarylabel)] {};
} }
\end{pgfonlayer} \end{pgfonlayer}
\end{scope} \end{scope}
{ {
\begin{scope}[xshift=1.2in,yshift=1em] \begin{scope}[xshift=1.5in,yshift=1em]
\node [anchor=west] (c1) at (0,0) {}; \node [anchor=west] (c1) at (0,0) {};
\node [anchor=west] (c2) at ([xshift=0em]c1.east) {}; \node [anchor=west] (c2) at ([xshift=0em]c1.east) {};
\node [anchor=west] (c3) at ([xshift=0em]c2.east) {}; \node [anchor=west] (c3) at ([xshift=0em]c2.east) {};
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
\end{scope} \end{scope}
} }
\begin{scope}[xshift=1.2in,yshift=-4em] \begin{scope}[xshift=1.5in,yshift=-4em]
{ {
\node [anchor=west] (bc1) at (0,0) {}; \node [anchor=west] (bc1) at (0,0) {};
\node [anchor=west] (bc2) at ([xshift=0em]bc1.east) {}; \node [anchor=west] (bc2) at ([xshift=0em]bc1.east) {};
......
...@@ -19,19 +19,19 @@ ...@@ -19,19 +19,19 @@
\end{pgfonlayer} \end{pgfonlayer}
} }
\node [anchor=west,ugreen] (P) at ([xshift=5.2em,yshift=-0.8em]corpus.east){\large{$\funp{P}(\cdot)$}}; \node [anchor=west,ugreen] (P) at ([xshift=6.5em,yshift=-0.8em]corpus.east){\large{$\funp{P}(\cdot)$}};
\node [anchor=south] (modellabel) at (P.north) {{\color{ublue} {\scriptsize \textbf{统计模型}}}}; \node [anchor=south] (modellabel) at (P.north) {{\color{ublue} {\scriptsize \textbf{统计模型}}}};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (P) (modellabel)] (model) {}; \node[rectangle,draw=ublue,thick,inner sep=0.2em,fill=white,drop shadow] [fit = (P) (modellabel)] (model) {};
\end{pgfonlayer} \end{pgfonlayer}
\draw [->,very thick,ublue] ([xshift=0.2em]corpus.east) -- ([xshift=4.2em]corpus.east) node [pos=0.5, above] {\color{black}{\scriptsize{统计学习}}}; \draw [->,very thick,ublue] ([xshift=0.2em]corpus.east) -- ([xshift=5.6em]corpus.east) node [pos=0.5, above] {\color{black}{\scriptsize{统计学习}}};
\draw [->,very thick,ublue] ([xshift=0.2em]model.east) -- ([xshift=4.2em]model.east) node [pos=0.5, above] {\color{black}{\scriptsize{预测}}}; \draw [->,very thick,ublue] ([xshift=0.2em]model.east) -- ([xshift=5.4em]model.east) node [pos=0.5, above] {\color{black}{\scriptsize{预测}}};
{\scriptsize {\scriptsize
\node [anchor=north west] (sentlabel) at ([xshift=6.2em,yshift=-1em]model.north east) {\color{black}{自动分词系统}}; \node [anchor=north west] (sentlabel) at ([xshift=7.8em,yshift=-1em]model.north east) {\color{black}{自动分词系统}};
\node [anchor=north west] (sent) at (sentlabel.south west) {\textbf{对任意句子进行分词}}; \node [anchor=north west] (sent) at (sentlabel.south west) {\textbf{对任意句子进行分词}};
} }
...@@ -43,19 +43,19 @@ ...@@ -43,19 +43,19 @@
{\footnotesize {\footnotesize
{ {
\node [anchor=west] (label1) at (0,-6.8em) {\textbf{自动分词系统}:对任意的数据句子$S$,找到最佳的分词结果$W^{*}$输出}; \node [anchor=west] (label1) at (0.7em,-7em) {\textbf{自动分词系统}:对任意的数据句子$S$,找到最佳的分词结果$W^{*}$输出};
} }
{ {
\node [anchor=north west] (label2) at (label1.south west) {假设输入$S$=“确实现在数据很多”}; \node [anchor=north west] (label2) at (label1.south west) {假设输入$S$=“确实现在数据很多”};
} }
{ {
\node [anchor=north west,draw,thick,inner sep=2pt] (data11) at (label2.south west) {枚举所有可能的切分}; \node [anchor=north west,draw,thick,inner sep=4pt] (data11) at (label2.south west) {枚举所有可能的切分};
} }
{ {
\node [anchor=west,draw,thick,inner sep=2pt] (data12) at ([xshift=4em]data11.east) {计算每种切分的概率}; \node [anchor=west,draw,thick,inner sep=4pt] (data12) at ([xshift=4em]data11.east) {计算每种切分的概率};
} }
{ {
\node [anchor=west,draw,thick,inner sep=2pt] (data13) at ([xshift=4.0em]data12.east) {选择最佳结果}; \node [anchor=west,draw,thick,inner sep=4pt] (data13) at ([xshift=4.0em]data12.east) {选择最佳结果};
} }
{ {
\draw [->,thick] ([xshift=0.1em]data11.east) -- ([xshift=-0.1em]data12.west); \draw [->,thick] ([xshift=0.1em]data11.east) -- ([xshift=-0.1em]data12.west);
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
{ {
\node[rectangle,fill=blue!10,thick,dotted,inner sep=0.1em] [fit = (label1) (data11) (data13) (data51) (data52) (data53)] (segcontent) {}; \node[rectangle,fill=blue!10,thick,dotted,inner sep=0.3em] [fit = (label1) (data11) (data13) (data51) (data52) (data53)] (segcontent) {};
} }
\end{pgfonlayer} \end{pgfonlayer}
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,inner sep=2pt,line width=0.8pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.8em] \tikzstyle{unit} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize] \tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize]
\node[unit] (n11) at (0,0){北京}; \node[unit] (n11) at (0,0){北京};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n11.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.2em]n11.east){}; \node[unit,anchor=west] (n12) at ([xshift=1.6em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n12.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.2em]n12.east){中华}; \node[unit,anchor=west] (n13) at ([xshift=1.6em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n13.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.2em]n13.east){人民}; \node[unit,anchor=west] (n14) at ([xshift=1.6em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n14.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.2em]n14.east){共和}; \node[unit,anchor=west] (n15) at ([xshift=1.6em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n15.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.2em]n15.east){}; \node[unit,anchor=west] (n16) at ([xshift=1.6em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n16.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.2em]n16.east){}; \node[unit,anchor=west] (n17) at ([xshift=1.6em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n17.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.2em]n17.east){首都}; \node[unit,anchor=west] (n18) at ([xshift=1.6em]n17.east){首都};
\node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){B-CIT}; \node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){B-CIT};
\node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O}; \node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,inner sep=2pt,line width=0.8pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.2em,minimum width=1.8em] \tikzstyle{unit} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.2em,minimum width=1.8em]
\tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize] \tikzstyle{lab} = [inner sep=0pt,align=center,rotate=-90,font=\scriptsize]
\node[unit] (n11) at (0,0){北京}; \node[unit] (n11) at (0,0){北京};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n11.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n11.east){\Large{/}};
\node[unit,anchor=west] (n12) at ([xshift=1.2em]n11.east){}; \node[unit,anchor=west] (n12) at ([xshift=1.6em]n11.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n12.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n12.east){\Large{/}};
\node[unit,anchor=west] (n13) at ([xshift=1.2em]n12.east){中华}; \node[unit,anchor=west] (n13) at ([xshift=1.6em]n12.east){中华};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n13.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n13.east){\Large{/}};
\node[unit,anchor=west] (n14) at ([xshift=1.2em]n13.east){人民}; \node[unit,anchor=west] (n14) at ([xshift=1.6em]n13.east){人民};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n14.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n14.east){\Large{/}};
\node[unit,anchor=west] (n15) at ([xshift=1.2em]n14.east){共和}; \node[unit,anchor=west] (n15) at ([xshift=1.6em]n14.east){共和};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n15.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n15.east){\Large{/}};
\node[unit,anchor=west] (n16) at ([xshift=1.2em]n15.east){}; \node[unit,anchor=west] (n16) at ([xshift=1.6em]n15.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n16.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n16.east){\Large{/}};
\node[unit,anchor=west] (n17) at ([xshift=1.2em]n16.east){}; \node[unit,anchor=west] (n17) at ([xshift=1.6em]n16.east){};
\node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.5em]n17.east){\Large{/}}; \node[anchor=west,inner sep=0pt,font=\footnotesize] at ([xshift=0.6em]n17.east){\Large{/}};
\node[unit,anchor=west] (n18) at ([xshift=1.2em]n17.east){首都}; \node[unit,anchor=west] (n18) at ([xshift=1.6em]n17.east){首都};
\node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){S-CIT}; \node[lab,anchor=north] at ([yshift=-1.4em,xshift=0.2em]n11.south){S-CIT};
\node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O}; \node[lab,anchor=north] at ([yshift=-0.8em,xshift=0.2em]n12.south){O};
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
{ {
\node [anchor=west] (mtinputlabel) at ([xshift=0.35in]inputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输入}}}}; \node [anchor=west] (mtinputlabel) at ([xshift=0.35in]inputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输入}}}};
\node [anchor=west] (mtoutputlabel) at ([xshift=1.0in]mtinputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输出}}}}; \node [anchor=west] (mtoutputlabel) at ([xshift=1.0in]mtinputlabel.east) {{\scriptsize \color{red}{\textbf{实际的输出}}}};
\node[rectangle,draw=ublue, inner sep=2pt] [fit = (mtinputlabel) (mtoutputlabel) (inputmarking) (outputmarking)] {}; \node[rectangle,draw=ublue, inner sep=2pt, thick] [fit = (mtinputlabel) (mtoutputlabel) (inputmarking) (outputmarking)] {};
} }
\end{scope} \end{scope}
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{class} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=green!20,font=\footnotesize,minimum height=1.6em,minimum width=3.4em,rotate=-90] \tikzstyle{class} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=green!30,font=\footnotesize,minimum height=1.6em,minimum width=3.4em,rotate=-90]
\tikzstyle{word} = [draw,inner sep=2pt,line width=1pt,align=center,drop shadow,fill=red!30,font=\footnotesize,minimum height=1.4em,minimum width=1.6em] \tikzstyle{word} = [draw,inner sep=2pt,thick,align=center,drop shadow,fill=red!35,font=\footnotesize,minimum height=1.4em,minimum width=1.6em]
\coordinate (o) at (0,0); \coordinate (o) at (0,0);
\node[anchor=west,class] (c1) at ([xshift=0em]o.east){B-CIT}; \node[anchor=west,class] (c1) at ([xshift=0em]o.east){B-CIT};
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
%------------------------------------------------------------------------- %-------------------------------------------------------------------------
\begin{tikzpicture} \begin{tikzpicture}
\begin{scope}[sibling distance=7pt,level distance=22pt] \begin{scope}[sibling distance=7pt,level distance=28pt]
\Tree[.\node[inner sep=1pt,fill=red!20](sn0){IP\scriptsize{ 句子}}; \Tree[.\node[inner sep=1pt,fill=red!30](sn0){IP\scriptsize{ 句子}};
[.\node[inner sep=1pt,fill=red!20](sn1){NP\scriptsize{}}; [.\node[inner sep=1pt,fill=red!30](sn1){NP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!20](sn2){NN\tiny{ 名词}}; \node(sw1){}; ] [.\node[inner sep=1pt,fill=blue!30](sn2){NN\tiny{ 名词}}; \node(sw1){}; ]
] ]
[.\node[inner sep=1pt,fill=red!20](sn3){VP\scriptsize{}}; [.\node[inner sep=1pt,fill=red!30](sn3){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=blue!20](sn4){VV\tiny{ 动词}}; \node(sw2){喜欢}; ] [.\node[inner sep=1pt,fill=blue!30](sn4){VV\tiny{ 动词}}; \node(sw2){喜欢}; ]
[.\node[inner sep=1pt,fill=green!20](sn5){VP\scriptsize{}}; [.\node[inner sep=1pt,fill=green!30](sn5){VP\scriptsize{}};
[.\node[inner sep=1pt,fill=green!20](sn6){VV\tiny{ 动词}}; \node(sw1){}; ] [.\node[inner sep=1pt,fill=green!30](sn6){VV\tiny{ 动词}}; \node(sw1){}; ]
[.\node[inner sep=1pt,fill=green!20](sn7){NN\tiny{ 名词}}; \node(sw1){}; ] [.\node[inner sep=1pt,fill=green!30](sn7){NN\tiny{ 名词}}; \node(sw1){}; ]
] ]
] ]
] ]
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
\end{scope} \end{scope}
\begin{scope}[xshift=1.7in,yshift=-0.4in] \begin{scope}[xshift=2in,yshift=-0.4in]
\node [,inner sep=2pt] (w1) at (0,0) {}; \node [,inner sep=2pt] (w1) at (0,0) {};
\node [anchor=west,inner sep=2pt] (w2) at ([xshift=0.8em,yshift=3em]w1.east) {喜欢}; \node [anchor=west,inner sep=2pt] (w2) at ([xshift=0.8em,yshift=3em]w1.east) {喜欢};
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
\node [] (sent) at (0,0) {\textbf{猫 喜欢 吃 鱼}}; \node [] (sent) at (0,0) {\textbf{猫 喜欢 吃 鱼}};
\end{scope} \end{scope}
\begin{scope}[xshift=-8em,yshift=-9em,sibling distance=-5pt,level distance=17pt,grow'=up] \begin{scope}[xshift=-10em,yshift=-9em,sibling distance=-5pt,level distance=17pt,grow'=up]
{\footnotesize {\footnotesize
\Tree[.IP \Tree[.IP
[.VP [.VP
...@@ -64,17 +64,17 @@ ...@@ -64,17 +64,17 @@
} }
\end{scope} \end{scope}
\draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-8em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=-2em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-10em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=-1em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=-2.3em,yshift=-2em]sent.south);
\draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.5em,yshift=-2em]sent.south); \draw [->,thick,ublue] ([xshift=0em]sent.south) ..controls + (south:2em) and +(north:2em).. ([xshift=6.3em,yshift=-2em]sent.south);
\draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=12.5em,yshift=-2em]sent.south); \draw [->,thick,ublue,dotted] ([xshift=1em]sent.south) ..controls + (south:1.5em) and +(north:2.5em).. ([xshift=13.5em,yshift=-2em]sent.south);
\node [anchor=north west] (others) at (11.8em,-3em) {...}; \node [anchor=north west] (others) at (12.8em,-3em) {...};
\node [] (d1) at (-9em,-10em) {$d_1$}; \node [] (d1) at (-11.9em,-10em) {$d_1$};
\node [] (d2) at (0em,-10em) {$d_2$}; \node [] (d2) at (-2.9em,-10em) {$d_2$};
\node [] (d3) at (8.5em,-10em) {$d_2$}; \node [] (d3) at (6.2em,-10em) {$d_2$};
\node [anchor=east] (d1p) at ([xshift=0.4em]d1.west) {$\funp{P}($}; \node [anchor=east] (d1p) at ([xshift=0.4em]d1.west) {$\funp{P}($};
\node [anchor=west] (d1p2) at ([xshift=-0.4em]d1.east) {$)=0.0123$}; \node [anchor=west] (d1p2) at ([xshift=-0.4em]d1.east) {$)=0.0123$};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle] \tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){}; \node[unit,fill=green!20] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){}; \node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){}; \node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){}; \node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-4em]g1.south){}; \node[anchor=north,unit,fill=red!30] (r1)at([yshift=-4em]g1.south){};
\node[anchor=north,unit,fill=red!30] (r2)at([yshift=-4em]g2.south){}; \node[anchor=north,unit,fill=red!30] (r2)at([yshift=-4em]g2.south){};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle] \tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){}; \node[unit,fill=green!30] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){}; \node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){}; \node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){}; \node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em,xshift=1.4em]g2.south){}; \node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em,xshift=1.4em]g2.south){};
......
\begin{tikzpicture} \begin{tikzpicture}
\tikzstyle{unit} = [draw,minimum size=1em,circle] \tikzstyle{unit} = [draw,minimum size=1em,circle,thick]
\node[unit,fill=ugreen!20] (g1) at (0,0){}; \node[unit,fill=green!30] (g1) at (0,0){};
\node[anchor=west,unit,fill=ugreen!20] (g2)at([xshift=1.8em]g1.east){}; \node[anchor=west,unit,fill=green!30] (g2)at([xshift=1.8em]g1.east){};
\node[anchor=west,unit,fill=ugreen!20] (g3)at([xshift=1.8em]g2.east){}; \node[anchor=west,unit,fill=green!30] (g3)at([xshift=1.8em]g2.east){};
\node[anchor=west,unit,fill=ugreen!20] (g4)at([xshift=1.8em]g3.east){}; \node[anchor=west,unit,fill=green!30] (g4)at([xshift=1.8em]g3.east){};
\node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em]g1.south){}; \node[anchor=north,unit,fill=red!30] (r1)at([yshift=-1.8em]g1.south){};
\node[anchor=north,unit,fill=red!30] (r2)at([yshift=-1.8em]g2.south){}; \node[anchor=north,unit,fill=red!30] (r2)at([yshift=-1.8em]g2.south){};
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
\begin{tikzpicture} \begin{tikzpicture}
\small \small
\node [anchor=west,inner sep=2pt] (r1) at (0,0) {$r_1$: NN $\to$}; \node [anchor=west,inner sep=2pt] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢}; \node [anchor=west,inner sep=2pt] (r2) at ([xshift=9em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$}; \node [anchor=north west,inner sep=2pt] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$}; \node [anchor=north west,inner sep=2pt] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
...@@ -19,24 +19,24 @@ ...@@ -19,24 +19,24 @@
\node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP}; \node [anchor=north west,inner sep=2pt] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=west,inner sep=2pt,fill=blue!20] (r1) at (0,0) {$r_1$: NN $\to$}; \node [anchor=west,inner sep=2pt,fill=blue!30] (r1) at (0,0) {$r_1$: NN $\to$};
\node [anchor=west,inner sep=2pt,fill=blue!20] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢}; \node [anchor=west,inner sep=2pt,fill=blue!30] (r2) at ([xshift=6em]r1.east) {$r_2$: VV $\to$ 喜欢};
\node [anchor=north west,inner sep=2pt,fill=blue!20] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$}; \node [anchor=north west,inner sep=2pt,fill=blue!30] (r3) at ([yshift=-0.2em]r1.south west) {$r_3$: VV $\to$};
\node [anchor=north west,inner sep=2pt,fill=blue!20] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$}; \node [anchor=north west,inner sep=2pt,fill=blue!30] (r4) at ([yshift=-0.2em]r2.south west) {$r_4$: NN $\to$};
\node [anchor=north west,inner sep=2pt,fill=red!20] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN}; \node [anchor=north west,inner sep=2pt,fill=red!30] (r5) at ([yshift=-0.2em]r3.south west) {$r_5$: NP $\to$ NN};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN}; \node [anchor=north west,inner sep=2pt,fill=green!30] (r6) at ([yshift=-0.2em]r4.south west) {$r_6$: VP $\to$ VV NN};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP}; \node [anchor=north west,inner sep=2pt,fill=green!30] (r7) at ([yshift=-0.2em]r5.south west) {$r_7$: VP $\to$ VV VP};
\node [anchor=north west,inner sep=2pt,fill=green!20] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP}; \node [anchor=north west,inner sep=2pt,fill=green!30] (r8) at ([yshift=-0.2em]r6.south west) {$r_8$: IP $\to$ NP VP};
\node [anchor=north west,fill=blue!20] (sent1) at ([yshift=-0.4em]r7.south west) {$r_1,r_2,r_3,r_4$}; \node [anchor=north west,fill=blue!30] (sent1) at ([yshift=-0.4em]r7.south west) {$r_1,r_2,r_3,r_4$};
\node [anchor=west] (sent1part2) at (sent1.east) {为生成单词词性的规则}; \node [anchor=west] (sent1part2) at (sent1.east) {为生成单词词性的规则};
\node [anchor=north west,fill=red!20] (sent2) at ([yshift=-0.2em]sent1.south west) {$r_5$}; \node [anchor=north west,fill=red!30] (sent2) at ([yshift=-0.2em]sent1.south west) {$r_5$};
\node [anchor=west] (sent2part2) at (sent2.east) {为单变量规则,它将词性NN进一步抽象为名词短语NP}; \node [anchor=west] (sent2part2) at (sent2.east) {为单变量规则,它将词性NN进一步抽象为名词短语NP};
\node [anchor=north west,fill=green!20] (sent3) at ([yshift=-0.2em]sent2.south west){$r_6,r_7,r_8$}; \node [anchor=north west,fill=green!30] (sent3) at ([yshift=-0.2em]sent2.south west){$r_6,r_7,r_8$};
\node [anchor=west] (sent3part2) at (sent3.east) {为句法结构规则,比如$r_8$表示了主(NP)+谓(VP)结构}; \node [anchor=west] (sent3part2) at (sent3.east) {为句法结构规则,比如$r_8$表示了主(NP)+谓(VP)结构};
\end{tikzpicture} \end{tikzpicture}
......
...@@ -7,32 +7,32 @@ ...@@ -7,32 +7,32 @@
\node[anchor=west,inner sep=0pt] (cc) at ([xshift=1.4em]cb.east){\small\sffamily\bfseries{硬币$\boldsymbol C$}}; \node[anchor=west,inner sep=0pt] (cc) at ([xshift=1.4em]cb.east){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\small\sffamily\bfseries{硬币$\boldsymbol A$}}; \node[anchor=north,inner sep=0pt] (ra) at ([yshift=-0.6em,xshift=-0.4em]o.south){\small\sffamily\bfseries{硬币$\boldsymbol A$}};
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.4em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}}; \node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.4em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}}; \node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.6em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-0.9em]ca.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1em]ca.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1em]n11.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1em]n11.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1em]n21.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.2em]n21.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-0.9em]cb.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1em]cb.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1em]n12.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1em]n12.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1em]n22.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1.2em]n22.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n13) at ([yshift=-0.9em]cc.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n13) at ([yshift=-1em]cc.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n23) at ([yshift=-1em]n13.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n23) at ([yshift=-1em]n13.south){\small{$\frac{1}{3}$}};
\node[anchor=north,inner sep=0pt] (n33) at ([yshift=-1em]n23.south){\small{$\frac{1}{3}$}}; \node[anchor=north,inner sep=0pt] (n33) at ([yshift=-1.2em]n23.south){\small{$\frac{1}{3}$}};
\draw[thick] (o.north west) -- (o.south east); \draw[thick] (o.north west) -- (o.south east);
\node[anchor=south west] at ([yshift=-1em,xshift=-1.4em]o.45){\tiny{$i+1$}}; \node[anchor=south west] at ([yshift=-1em,xshift=-1.4em]o.45){\tiny{$i+1$}};
\node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{$i$}}; \node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{$i$}};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!10] [fit = (o)(n33)(cc) ] (box0) {}; \node [rectangle,inner sep=0.8em,rounded corners=2pt,fill=red!25] [fit = (o)(n33)(cc) ] (box0) {};
\end{pgfonlayer} \end{pgfonlayer}
\node[anchor=south] at (box0.north){\scriptsize{转移概率$\funp{P}$(第$i+1$次|第$i$次)}}; \node[anchor=south] at (box0.north){\scriptsize{转移概率$\funp{P}$(第$i+1$次|第$i$次)}};
\end{scope} \end{scope}
\begin{scope}[xshift=8cm] \begin{scope}[xshift=8.5cm]
\node[minimum width=3em,minimum height=1.5em] (o) at (0,0){}; \node[minimum width=3em,minimum height=1.5em] (o) at (0,0){};
\node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\small\sffamily\bfseries{正面}}; \node[anchor=west,inner sep=0pt] (ca) at ([yshift=0.2em,xshift=1.4em]o.east){\small\sffamily\bfseries{正面}};
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
\node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}}; \node[anchor=north,inner sep=0pt] (rb) at ([yshift=-1.5em]ra.south){\small\sffamily\bfseries{硬币$\boldsymbol B$}};
\node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.5em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}}; \node[anchor=north,inner sep=0pt] (rc) at ([yshift=-1.5em]rb.south){\small\sffamily\bfseries{硬币$\boldsymbol C$}};
\node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1.2em]ca.south){\footnotesize{$0.3$}}; \node[anchor=north,inner sep=0pt] (n11) at ([yshift=-1.4em]ca.south){\footnotesize{$0.3$}};
\node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1.7em]n11.south){\footnotesize{$0.5$}}; \node[anchor=north,inner sep=0pt] (n21) at ([yshift=-1.7em]n11.south){\footnotesize{$0.5$}};
\node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.7em]n21.south){\footnotesize{$0.7$}}; \node[anchor=north,inner sep=0pt] (n31) at ([yshift=-1.8em]n21.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1.2em]cb.south){\footnotesize{$0.7$}}; \node[anchor=north,inner sep=0pt] (n12) at ([yshift=-1.4em]cb.south){\footnotesize{$0.7$}};
\node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1.7em]n12.south){\footnotesize{$0.5$}}; \node[anchor=north,inner sep=0pt] (n22) at ([yshift=-1.7em]n12.south){\footnotesize{$0.5$}};
\node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1.7em]n22.south){\footnotesize{$0.3$}}; \node[anchor=north,inner sep=0pt] (n32) at ([yshift=-1.7em]n22.south){\footnotesize{$0.3$}};
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
\node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{隐含}}; \node[anchor=north east] at ([yshift=1em,xshift=1em]o.-135){\tiny{隐含}};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!10] [fit = (o)(n32)(rc)(cb) ] (box1) {}; \node [rectangle,inner sep=0.5em,rounded corners=2pt,fill=red!25] [fit = (o)(n32)(rc)(cb) ] (box1) {};
\end{pgfonlayer} \end{pgfonlayer}
\node[anchor=south] at (box1.north){\scriptsize{发射概率$\funp{P}$(可见状态|隐含状态)}}; \node[anchor=south] at (box1.north){\scriptsize{发射概率$\funp{P}$(可见状态|隐含状态)}};
\end{scope} \end{scope}
......
...@@ -12,23 +12,23 @@ ...@@ -12,23 +12,23 @@
\node [anchor=west,inner sep=2pt] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV}; \node [anchor=west,inner sep=2pt] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV}; \node [anchor=west,inner sep=2pt,fill=orange!40,draw] (u) at ([xshift=-4em,yshift=-4em]arule.west) {VV};
\node [anchor=west] (upart2) at (u.east) {NN}; \node [anchor=west] (upart2) at (u.east) {NN};
\node [anchor=east] (unumber) at (u.west) {$u:$}; \node [anchor=east] (unumber) at (u.west) {$u:$};
\node [anchor=west,inner sep=2pt] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV}; \node [anchor=west,inner sep=2pt] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV};
\node [anchor=west,inner sep=2pt,fill=orange!40] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV}; \node [anchor=west,inner sep=2pt,fill=orange!40,draw] (r) at ([xshift=-3em,yshift=2.5em]u.west) {VV};
\node [anchor=west] (rpart2) at (r.east) {$\to$}; \node [anchor=west] (rpart2) at (r.east) {$\to$};
\node [anchor=west,inner sep=2pt] (rpart3) at (rpart2.east) {}; \node [anchor=west,inner sep=2pt] (rpart3) at (rpart2.east) {};
\node [anchor=east] (rnumber) at (r.west) {$r:$}; \node [anchor=east] (rnumber) at (r.west) {$r:$};
\node [anchor=west,inner sep=2pt,fill=red!20] (rpart3) at (rpart2.east) {}; \node [anchor=west,inner sep=2pt,fill=red!30,draw] (rpart3) at (rpart2.east) {};
\node [anchor=west] (v) at ([xshift=5.5em]u.east) {$v$:}; \node [anchor=west] (v) at ([xshift=5.5em]u.east) {$v$:};
\node [anchor=west,inner sep=2pt,fill=red!20] (vpart2) at (v.east) {}; \node [anchor=west,inner sep=2pt,fill=red!30,draw] (vpart2) at (v.east) {};
\node [anchor=west] (vpart3) at (vpart2.east) {NN}; \node [anchor=west] (vpart3) at (vpart2.east) {NN};
\node [anchor=west] (arrow) at ([xshift=3em]u.east) {$\Rightarrow$}; \node [anchor=west] (arrow) at ([xshift=3em]u.east) {$\Rightarrow$};
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
% !TEX encoding = UTF-8 Unicode % !TEX encoding = UTF-8 Unicode
%---------------------------------------------------------------------------------------- %----------------------------------------------------------------------------------------
% 机器翻译:统计建模与深度学习方法 % 机器翻译:基础与模型
% Machine Translation: Statistical Modeling and Deep Learning Methods % Machine Translation: Foundations and Models
% %
% Copyright 2020 % Copyright 2020
% 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn) % 肖桐(xiaotong@mail.neu.edu.cn) 朱靖波 (zhujingbo@mail.neu.edu.cn)
......
\begin{tikzpicture}[scale=0.5] \begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15] \tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15] \tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}}; \node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can}; \node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
\begin{tikzpicture}[scale=0.5] \begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15] \tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15] \tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}}; \node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can}; \node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
\definecolor{ugreen}{rgb}{0,0.5,0} \definecolor{ugreen}{rgb}{0,0.5,0}
\begin{tikzpicture}[scale=0.5] \begin{tikzpicture}[scale=0.5]
\tikzstyle{cand} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!15] \tikzstyle{cand} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=green!30]
\tikzstyle{ref} = [draw,line width=1pt,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!15] \tikzstyle{ref} = [draw,thick,align=center,minimum width=2.6em,minimum height=1.6em,drop shadow={shadow xshift=0.15em},fill=red!30]
\node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}}; \node[align=center,minimum width=2.4em,minimum height=1.6em,minimum width=6em] (n11) at (0,0){\small{机器译文:}};
\node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can}; \node[cand,anchor=west] (n12) at ([xshift=0.0em]n11.east){Can};
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
\node [anchor=south,align=left] (humanevallabel) at ([yshift=1.0em]base.-90) {{\small\bfnew\footnotesize{人直接}}\\{\small\bfnew\footnotesize{进行评价}}}; \node [anchor=south,align=left] (humanevallabel) at ([yshift=1.0em]base.-90) {{\small\bfnew\footnotesize{人直接}}\\{\small\bfnew\footnotesize{进行评价}}};
% quality estimation % quality estimation
\node [anchor=north east,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=ugreen!20,drop shadow] (qebox) at ([xshift=-8em]base.90) {}; \node [anchor=north east,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=ugreen!30,drop shadow] (qebox) at ([xshift=-8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=ugreen!20,drop shadow] (qelabel) at ([yshift=0.5em]qebox.north) {\small\footnotesize{需要较为复杂的建模,}\\\small\footnotesize{开发难度同机器翻译系统}}; \node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=ugreen!30,drop shadow] (qelabel) at ([yshift=0.5em]qebox.north) {\small\footnotesize{需要较为复杂的建模,}\\\small\footnotesize{开发难度同机器翻译系统}};
\node [anchor=north,minimum width=10em] (qetitle) at ([yshift=-0.2em]qebox.north) {{\small\bfnew\large{无参考答案的评价}}}; \node [anchor=north,minimum width=10em] (qetitle) at ([yshift=-0.2em]qebox.north) {{\small\bfnew\large{无参考答案的评价}}};
\draw [-] ([yshift=-2em]qebox.north west) -- ([yshift=-2em]qebox.north east); \draw [-] ([yshift=-2em]qebox.north west) -- ([yshift=-2em]qebox.north east);
\node [anchor=north] (qemethod1) at ([yshift=-0.3em]qetitle.south) {单词级评价}; \node [anchor=north] (qemethod1) at ([yshift=-0.3em]qetitle.south) {单词级评价};
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
\node [anchor=north] (qemethod4) at ([yshift=-0.3em]qemethod3.south) {篇章级评价}; \node [anchor=north] (qemethod4) at ([yshift=-0.3em]qemethod3.south) {篇章级评价};
% auto evaluation % auto evaluation
\node [anchor=north west,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=red!20,drop shadow] (aebox) at ([xshift=8em]base.90) {}; \node [anchor=north west,minimum width=10em,minimum height=10em,draw=black!60,very thick,fill=red!30,drop shadow] (aebox) at ([xshift=8em]base.90) {};
\node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!20,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式和}\\\small\footnotesize{简单的建模}}; \node [draw,anchor=south,minimum width=10em,align=center,draw=black!60,very thick,fill=red!30,drop shadow] (aelabel) at ([yshift=0.5em]aebox.north) {\small\footnotesize{基于指标性公式和}\\\small\footnotesize{简单的建模}};
\node [anchor=north,minimum width=10em] (aetitle) at ([yshift=-0.2em]aebox.north) {{\small\bfnew\large{有参考答案的评价}}}; \node [anchor=north,minimum width=10em] (aetitle) at ([yshift=-0.2em]aebox.north) {{\small\bfnew\large{有参考答案的评价}}};
\draw [-] ([yshift=-2em]aebox.north west) -- ([yshift=-2em]aebox.north east); \draw [-] ([yshift=-2em]aebox.north west) -- ([yshift=-2em]aebox.north east);
\node [anchor=north] (aemethod1) at ([yshift=-0.5em]aetitle.south) {BLEU、NIST、}; \node [anchor=north] (aemethod1) at ([yshift=-0.5em]aetitle.south) {BLEU、NIST、};
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
\node [anchor=north] (aemethod4) at ([yshift=-0.3em]aemethod3.south) {HTER ...}; \node [anchor=north] (aemethod4) at ([yshift=-0.3em]aemethod3.south) {HTER ...};
% human evaluation % human evaluation
\node [anchor=north,minimum width=10em,minimum height=6em,draw=black!60,very thick,fill=yellow!20,drop shadow] (hebox) at ([yshift=-4em]base.-90) {}; \node [anchor=north,minimum width=10em,minimum height=6em,draw=black!60,very thick,fill=yellow!30,drop shadow] (hebox) at ([yshift=-4em]base.-90) {};
\node [anchor=north,minimum width=10em] (hetitle) at ([yshift=-0.2em]hebox.north) {{\small\bfnew\large{人工评价}}}; \node [anchor=north,minimum width=10em] (hetitle) at ([yshift=-0.2em]hebox.north) {{\small\bfnew\large{人工评价}}};
\draw [-] ([yshift=-2em]hebox.north west) -- ([yshift=-2em]hebox.north east); \draw [-] ([yshift=-2em]hebox.north west) -- ([yshift=-2em]hebox.north east);
\node [anchor=north] (hemethod1) at ([yshift=-0.5em]hetitle.south) {流畅度、忠实度、}; \node [anchor=north] (hemethod1) at ([yshift=-0.5em]hetitle.south) {流畅度、忠实度、};
...@@ -50,18 +50,18 @@ ...@@ -50,18 +50,18 @@
% confidence estimation % confidence estimation
\node [anchor=east,align=left] (conf) at ([xshift=-6em,yshift=0.6em]hebox.west) {\small\bfnew{用于估计同一个}\\\small\bfnew{系统不同输出的}\\\small\bfnew{可信度}}; \node [anchor=east,align=left] (conf) at ([xshift=-6em,yshift=0.6em]hebox.west) {\small\bfnew{用于估计同一个}\\\small\bfnew{系统不同输出的}\\\small\bfnew{可信度}};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow1) at ([yshift=-2.4em]qebox.south) {}; \node [anchor=north,single arrow,minimum height=4.0em,fill=blue!35,rotate=-90] (arrow1) at ([yshift=-2.4em]qebox.south) {};
% comparing different systems % comparing different systems
\node [anchor=west,align=left] (com) at ([xshift=8em,yshift=0.6em]hebox.east) {\small\bfnew{用于对比}\\\small\bfnew{不同系统}\\\small\bfnew{性能差异}}; \node [anchor=west,align=left] (com) at ([xshift=8em,yshift=0.6em]hebox.east) {\small\bfnew{用于对比}\\\small\bfnew{不同系统}\\\small\bfnew{性能差异}};
\node [anchor=west,single arrow,minimum height=7.5em,fill=blue!30] (arrow2) at ([yshift=-1.4em,xshift=0.5em]hebox.north east) {}; \node [anchor=west,single arrow,minimum height=7.5em,fill=blue!35] (arrow2) at ([yshift=-1.4em,xshift=0.5em]hebox.north east) {};
\node [anchor=north,fill=white] (arrow2label) at ([xshift=-0.5em]arrow2.south) {\footnotesize{{\color{blue} 成本高但精度高}}}; \node [anchor=north,fill=white] (arrow2label) at ([xshift=-0.5em]arrow2.south) {\footnotesize{{\color{blue} 成本高但精度高}}};
\node [anchor=north,single arrow,minimum height=4.0em,fill=blue!30,rotate=-90] (arrow3) at ([yshift=-2.4em,xshift=2.2em]aebox.south) {}; \node [anchor=north,single arrow,minimum height=4.0em,fill=blue!35,rotate=-90] (arrow3) at ([yshift=-2.4em,xshift=2.2em]aebox.south) {};
\node [anchor=west,fill=white,font=\footnotesize,align=left,text=blue,inner sep=0pt] (arrow3label) at ([yshift=2.6em,xshift=0.6em]arrow3.east) {成本低\\无人工\\有偏差}; \node [anchor=west,fill=white,font=\footnotesize,align=left,text=blue,inner sep=0pt] (arrow3label) at ([yshift=2.6em,xshift=0.6em]arrow3.east) {成本低\\无人工\\有偏差};
% system optimization % system optimization
\node [anchor=west,align=left] (optimization) at ([xshift=2em]aebox.east) {\small\bfnew{用于机器}\\\small\bfnew{翻译系统}\\\small\bfnew{调优}}; \node [anchor=west,align=left] (optimization) at ([xshift=2em]aebox.east) {\small\bfnew{用于机器}\\\small\bfnew{翻译系统}\\\small\bfnew{调优}};
\node [anchor=west,single arrow,minimum height=1.8em,fill=blue!30] (arrow4) at ([xshift=0.4em]aebox.east) {}; \node [anchor=west,single arrow,minimum height=1.8em,fill=blue!35] (arrow4) at ([xshift=0.4em]aebox.east) {};
\begin{pgfonlayer}{background} \begin{pgfonlayer}{background}
\draw [->,line width=0.3em,dotted,red] ([yshift=1em,xshift=0em]hebox.south east) -- ([yshift=1em,xshift=4em]hebox.south east) -- ([yshift=10em,xshift=4em]hebox.south east) node [pos=0.8,left] {\small{{\color{red} 评价标准}}}; \draw [->,line width=0.3em,dotted,red] ([yshift=1em,xshift=0em]hebox.south east) -- ([yshift=1em,xshift=4em]hebox.south east) -- ([yshift=10em,xshift=4em]hebox.south east) node [pos=0.8,left] {\small{{\color{red} 评价标准}}};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论