Commit 3e5fd4f1 by 单韦乔

第一章文字修改、第二章增加搜索部分

parent 1deff313
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){There\\[-0.5ex]Here\\[-0.5ex]is\\[-0.5ex]one\\[-0.5ex]an\\[-0.5ex]appple};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([xshift=2em,yshift=-1em]eos.south){$w_1$};
\node[anchor=north,unit,fill=red!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$};
\node[anchor=west,unit,fill=red!40,opacity=0.3] (n24) at ([xshift=6em]n11.east){an};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt24) at (n24.east) {\small{{\color{white} \textbf{-1.4}}}};
\node[anchor=south,unit,fill=red!40] (n23) at ([yshift=0.1em]n24.north){one};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (n23.east) {\small{{\color{white} \textbf{-0.6}}}};
\node[anchor=south,unit,fill=red!40] (n22) at ([yshift=0.1em]n23.north){Here};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt22) at (n22.east) {\small{{\color{white} \textbf{-0.3}}}};
\node[anchor=south,unit,fill=red!40] (n21) at ([yshift=0.1em]n22.north){There};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt21) at (n21.east) {\small{{\color{white} \textbf{-0.2}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n25) at ([yshift=-0.1em]n24.south){is};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt25) at (n25.east) {\small{{\color{white} \textbf{-2.2}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n26) at ([yshift=-0.1em]n25.south){apple};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt26) at (n26.east) {\small{{\color{white} \textbf{-2.6}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n27) at ([yshift=-0.1em]n26.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt27) at (n27.east) {\small{{\color{white} \textbf{-7.2}}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=red!40] (n31) at ([yshift=6em,xshift=7em]n21.east){is};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt31) at (n31.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=north,unit,fill=red!40] (n32) at ([yshift=-0.1em]n31.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt32) at (n32.east) {\small{{\color{white} \textbf{-0.6}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n33) at ([yshift=-0.1em]n32.south){an};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt33) at (n33.east) {\small{{\color{white} \textbf{-2.4}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n34) at ([yshift=-0.1em]n33.south){one};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt34) at (n34.east) {\small{{\color{white} \textbf{-2.6}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n35) at ([yshift=-0.1em]n34.south){Here};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt35) at (n35.east) {\small{{\color{white} \textbf{-2.9}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n36) at ([yshift=-0.1em]n35.south){apple};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt36) at (n36.east) {\small{{\color{white} \textbf{-3.2}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3] (n37) at ([yshift=-0.1em]n36.south){There};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black,opacity=0.3] (pt37) at (n37.east) {\small{{\color{white} \textbf{-4.1}}}};
\node[anchor=north,unit,fill=red!40] (n41) at ([yshift=-0.5em]n37.south){is};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt41) at (n41.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=north,unit,fill=red!40,opacity=0.3,minimum width=3.5em,minimum height=2.5em] (n51) at ([yshift=-0.1em]n41.south){};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2.5em,fill=black,opacity=0.3] (pt51) at (n51.east) {\small{{\color{white} \textbf{$<$-0.7}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n31.north){$w_2$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue!20,very thick] (n11.east) -- (n24.west);
\draw[->,ublue!20,very thick] (n11.east) -- (n25.west);
\draw[->,ublue!20,very thick] (n11.east) -- (n26.west);
\draw[->,ublue!20,very thick] (n11.east) -- (n27.west);
\draw[->,ublue!20,very thick] (pt21.south) -- (n33.west);
\draw[->,ublue!20,very thick] (pt21.south) -- (n34.west);
\draw[->,ublue!20,very thick] (pt21.south) -- (n35.west);
\draw[->,ublue!20,very thick] (pt21.south) -- (n36.west);
\draw[->,ublue!20,very thick] (pt21.south) -- (n37.west);
\draw[->,ublue,very thick] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue!20,very thick] (pt22.south) -- (n51.west);
\draw[->,ublue,very thick] (pt22.south) -- (n41.west);
\draw[->,ublue!20,very thick] (pt23.south) -- (n51.west);
\draw[decorate,decoration={brace},red,very thick] (pt24.south east) -- (pt27.south west);
\node[inner sep=0pt,text=red] at ([yshift=-2em,xshift=2em]pt25.east){剪枝};
\draw[decorate,decoration={brace},red,very thick] (pt33.south east) -- (pt37.south west);
\node[inner sep=0pt,text=red] at ([xshift=2em,yshift=-1em]pt35.east){剪枝};
\node[inner sep=0pt,text=red] at ([yshift=-1.5em,xshift=2em]pt51.east){剪枝};
\draw[->,ublue,very thick] (pt31.south) -- ([yshift=0.6em,xshift=0.6em]pt31.south);
\draw[->,ublue,very thick] (pt31.south) -- ([xshift=0.7em]pt31.south);
\draw[->,ublue,very thick] (pt31.south) -- ([yshift=-0.6em,xshift=0.6em]pt31.south);
\draw[->,ublue,very thick] (pt41.south) -- ([yshift=0.6em,xshift=0.6em]pt41.south);
\draw[->,ublue,very thick] (pt41.south) -- ([xshift=0.7em]pt41.south);
\draw[->,ublue,very thick] (pt41.south) -- ([yshift=-0.6em,xshift=0.6em]pt41.south);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([xshift=2em,yshift=-3em]eos.south){$w_1$};
\node[anchor=north,unit,fill=red!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$};
\node [anchor=north west] (wtranslabel) at ([xshift=-5em,yshift=-3em]n11.south) {\small{生成顺序:}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=3em]n11.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt22) at (n22.east) {\small{{\color{white} \textbf{-0.4}}}};
\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt21) at (n21.east) {\small{{\color{white} \textbf{-0.5}}}};
\node[anchor=north,unit,fill=red!20] (n23) at ([yshift=-3em]n22.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (n23.east) {\small{{\color{white} \textbf{-2.2}}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=red!20] (n32) at ([xshift=4em]n21.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt32) at (n32.east) {\small{{\color{white} \textbf{-0.2}}}};
\node[anchor=south,unit,fill=red!20] (n31) at ([yshift=0.3em]n32.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt31) at (n31.east) {\small{{\color{white} \textbf{-1.8}}}};
\node[anchor=north,unit,fill=red!20] (n33) at ([yshift=-0.3em]n32.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt33) at (n33.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=4em]n22.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt35) at (n35.east) {\small{{\color{white} \textbf{-1.5}}}};
\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt34) at (n34.east) {\small{{\color{white} \textbf{-2.0}}}};
\node[anchor=north,unit,fill=red!20] (n36) at ([yshift=-0.3em]n35.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n31.north){$w_3$};
\node[anchor=west,unit,fill=red!20] (n41) at ([xshift=4em]n31.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt41) at (n41.east) {\small{{\color{white} \textbf{-0.9}}}};
\node[anchor=west,unit,fill=red!20] (n42) at ([xshift=4em]n32.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt42) at (n42.east) {\small{{\color{white} \textbf{-0.8}}}};
\node[anchor=west,unit,fill=red!20] (n43) at ([xshift=4em]n34.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt43) at (n43.east) {\small{{\color{white} \textbf{-1.4}}}};
\node[anchor=west,unit,fill=red!20] (n44) at ([xshift=4em]n35.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt44) at (n44.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=south,unit,text=red] (w4) at ([yshift=0.5em]n41.north){$w_4$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick] (pt31.south) -- (n41.west);
\draw[->,ublue,very thick] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick] (pt35.south) -- (n44.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-0.5em]n11.west) -- (n11.east) -- (n22.west) -- (pt22.south) -- (n36.west) -- ([xshift=0.5em]pt36.south);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([xshift=2em,yshift=-3em]eos.south){$w_1$};
\node[anchor=north,unit,fill=red!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$};
\node [anchor=north west] (wtranslabel) at ([xshift=-5em,yshift=-3em]n11.south) {\small{生成顺序:}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=5em]n11.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt22) at (n22.east) {\small{{\color{white} \textbf{-0.4}}}};
\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt21) at (n21.east) {\small{{\color{white} \textbf{-0.5}}}};
\node[anchor=north,unit,fill=red!20] (n23) at ([yshift=-3em]n22.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (n23.east) {\small{{\color{white} \textbf{-2.2}}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=6em]n22.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt35) at (n35.east) {\small{{\color{white} \textbf{-1.5}}}};
\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt34) at (n34.east) {\small{{\color{white} \textbf{-2.0}}}};
\node[anchor=north,unit,fill=red!20] (n36) at ([yshift=-0.3em]n35.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n34.north){$w_3$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-0.5em]n11.west) -- (n11.east) -- (n22.west) -- (pt22.south) -- (n36.west) -- ([xshift=0.5em]pt36.south);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([yshift=-2em]eos.south){$w_1$};
\node[anchor=north,unit,fill=red!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$};
\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=2.5em]n11.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt22) at (n22.east) {\small{{\color{white} \textbf{-0.4}}}};
\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt21) at (n21.east) {\small{{\color{white} \textbf{-0.5}}}};
\node[anchor=north,unit,fill=red!20] (n23) at ([yshift=-3em]n22.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (n23.east) {\small{{\color{white} \textbf{-2.2}}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=green!20,minimum width=4.3em] (n32) at ([xshift=3em]n21.east){agree};
\node[anchor=south,unit,fill=green!20,minimum width=4.3em] (n31) at ([yshift=0.3em]n32.north){I};
\node[anchor=north,unit,fill=green!20,minimum width=4.3em] (n33) at ([yshift=-0.3em]n32.south){$<$eos$>$};
\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=3em]n22.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt35) at (n35.east) {\small{{\color{white} \textbf{-1.5}}}};
\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt34) at (n34.east) {\small{{\color{white} \textbf{-2.0}}}};
\node[anchor=north,unit,fill=red!20] (n36) at ([yshift=-0.3em]n35.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n31.north){$w_3$};
\node[anchor=west,unit] (s1) at ([xshift=1em]n32.east){score($<$sos$>$\ I)\ =\ {\red {-0.5}}};
\node[anchor=north west,unit] (s2) at ([yshift=-3em]s1.south west){score($<$sos$>$\ agree\ I)\ =\ -2.4};
\node[anchor=north west,unit] (s3) at ([yshift=-0.3em]s2.south west){score($<$sos$>$\ agree\ agree)\ =\ -1.9};
\node[anchor=north west,unit] (s4) at ([yshift=-0.3em]s3.south west){score($<$sos$>$\ agree\ $<$eos$>$)\ =\ -1.7};
\node[anchor=north west,unit] (s5) at ([yshift=-1em]s4.south west){score($<$sos$>$\ $<$eos$>$)\ =\ -2.2};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick,dashed] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick,dashed] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick,dashed] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([xshift=2em,yshift=-3em]eos.south){$w_1$};
\node[anchor=north,unit,fill=blue!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$};
\node [anchor=north west] (wtranslabel) at ([xshift=-5em,yshift=-3em]n11.south) {\small{生成顺序:}};
\draw [->,ultra thick,red,line width=1.5pt,opacity=0.7] (wtranslabel.east) -- ([xshift=1.5em]wtranslabel.east);
\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=3em]n11.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt22) at (n22.east) {\small{{\color{white} \textbf{-0.4}}}};
\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt21) at (n21.east) {\small{{\color{white} \textbf{-0.5}}}};
\node[anchor=north,unit,fill=blue!10] (n23) at ([yshift=-3em]n22.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt23) at (n23.east) {\small{{\color{white} \textbf{-2.2}}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=red!20] (n32) at ([xshift=4em]n21.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt32) at (n32.east) {\small{{\color{white} \textbf{-0.2}}}};
\node[anchor=south,unit,fill=red!20] (n31) at ([yshift=0.3em]n32.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt31) at (n31.east) {\small{{\color{white} \textbf{-1.8}}}};
\node[anchor=north,unit,fill=blue!10] (n33) at ([yshift=-0.3em]n32.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt33) at (n33.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=4em]n22.east){agree};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt35) at (n35.east) {\small{{\color{white} \textbf{-1.5}}}};
\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){I};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt34) at (n34.east) {\small{{\color{white} \textbf{-2.0}}}};
\node[anchor=north,unit,fill=blue!10] (n36) at ([yshift=-0.3em]n35.south){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n31.north){$w_3$};
\node[anchor=west,unit,fill=blue!10] (n41) at ([xshift=4em]n31.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt41) at (n41.east) {\small{{\color{white} \textbf{-0.9}}}};
\node[anchor=west,unit,fill=blue!10] (n42) at ([xshift=4em]n32.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt42) at (n42.east) {\small{{\color{white} \textbf{-0.8}}}};
\node[anchor=west,unit,fill=blue!10] (n43) at ([xshift=4em]n34.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt43) at (n43.east) {\small{{\color{white} \textbf{-1.4}}}};
\node[anchor=west,unit,fill=blue!10] (n44) at ([xshift=4em]n35.east){$<$eos$>$};
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt44) at (n44.east) {\small{{\color{white} \textbf{-0.1}}}};
\node[anchor=south,unit,text=red] (w4) at ([yshift=0.5em]n41.north){$w_4$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt21.south) -- (n31.west);
\draw[->,ublue,very thick] (pt21.south) -- (n32.west);
\draw[->,ublue,very thick] (pt21.south) -- (n33.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick] (pt22.south) -- (n36.west);
\draw[->,ublue,very thick] (pt31.south) -- (n41.west);
\draw[->,ublue,very thick] (pt32.south) -- (n42.west);
\draw[->,ublue,very thick] (pt34.south) -- (n43.west);
\draw[->,ublue,very thick] (pt35.south) -- (n44.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-0.5em]n11.west) -- (n11.east) -- (n21.west) -- (n21.east) -- ([xshift=0.5em]pt42.south);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em]
\tikzstyle{word} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em]
\node[anchor=west,unit,text=red] (w1) at (0,0){{$w_1$}};
\node[anchor=north,unit,fill=blue!10] (n11) at ([yshift=-0.8em]w1.south){$<$sos$>$};
\node[anchor=north,unit,fill=blue!10] (n12) at ([yshift=-1.5em]n11.south){$<$sos$>$};
\node[anchor=north,unit,fill=blue!10] (n13) at ([yshift=-1.5em]n12.south){$<$sos$>$};
\node[anchor=north,unit,fill=blue!10] (n14) at ([yshift=-1.5em]n13.south){$<$sos$>$};
\node[anchor=east,unit] (step1) at ([xshift=-1em]n11.west){Step1:};
\node[anchor=east,unit] (step2) at ([xshift=-1em]n12.west){Step2:};
\node[anchor=east,unit] (step3) at ([xshift=-1em]n13.west){Step3:};
\node[anchor=east,unit] (step4) at ([xshift=-1em]n14.west){Step4:};
\node[anchor=west,unit,text=red] (w2) at ([xshift=1.5em]w1.east){$w_2$};
\node[anchor=north,unit] (n21) at ([yshift=-0.8em]w2.south){};
\node[anchor=north,word,fill=red!20] (n22) at ([yshift=-1.5em]n21.south){I};
\node[anchor=north,word,fill=red!20] (n23) at ([yshift=-1.5em]n22.south){I};
\node[anchor=north,word,fill=red!20] (n24) at ([yshift=-1.5em]n23.south){I};
\node[anchor=west,unit,text=red] (w3) at ([xshift=1.5em]w2.east){$w_3$};
\node[anchor=north,unit] (n31) at ([yshift=-0.8em]w3.south){};
\node[anchor=north,unit] (n32) at ([yshift=-1.5em]n31.south){};
\node[anchor=north,word,fill=red!20] (n33) at ([yshift=-1.5em]n32.south){agree};
\node[anchor=north,word,fill=red!20] (n34) at ([yshift=-1.5em]n33.south){agree};
\node[anchor=west,unit,text=red] (w4) at ([xshift=1.5em]w3.east){$w_4$};
\node[anchor=north,unit] (n41) at ([yshift=-0.8em]w4.south){};
\node[anchor=north,unit] (n42) at ([yshift=-1.5em]n41.south){};
\node[anchor=north,unit] (n43) at ([yshift=-1.5em]n42.south){};
\node[anchor=north,unit,fill=blue!10] (n44) at ([yshift=-1.5em]n43.south){$<$eos$>$};
\begin{pgfonlayer}{background}
\node [draw=red,very thick,rectangle,inner sep=2.5pt,rounded corners=2pt,dashed] [fit = (n12)] (box1) {};
\node [draw=red,very thick,rectangle,inner sep=2.5pt,rounded corners=2pt,dashed] [fit = (n13)(n23)] (box2) {};
\node [draw=red,very thick,rectangle,inner sep=2.5pt,rounded corners=2pt,dashed] [fit = (n14)(n24)(n34)] (box3) {};
\end{pgfonlayer}
\draw[-latex,red,thick] (box1.south).. controls +(300:0.45) and +(240:0.45) .. (n22.south);
\draw[-latex,red,thick] (box2.south).. controls +(290:0.45) and +(250:0.45) .. (n33.south);
\draw[-latex,red,thick] (box3.south).. controls +(280:0.5) and +(260:0.5) .. (n44.south);
\end{tikzpicture}
\ No newline at end of file
\begin{tikzpicture}
\tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=4em,minimum height=2em]
\node[fill=blue!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](words)at(vocab.south){I\\[-0.5ex]agree};
\node[fill=blue!40,anchor=north,align=left,inner sep=2pt,minimum width=5em](spe)at(words.south){\color{white}{\small\bfnew{特殊符号}}};
\node[fill=blue!10,anchor=north,align=left,inner sep=3pt,minimum width=5em](eos)at(spe.south){$<$eos$>$};
\node[anchor=north,unit,text=red] (w1) at ([yshift=-1em]eos.south){$w_1$};
\node[anchor=north,unit,fill=blue!10] (n11) at ([yshift=-0.5em]w1.south){{\small\bfnew{$<$sos$>$}}};
\node[anchor=west,unit,fill=red!20] (n22) at ([xshift=3em]n11.east){{\small\bfnew{agree}}};
\node[anchor=south,unit,fill=red!20] (n21) at ([yshift=5.5em]n22.north){{\small\bfnew{I}}};
\node[anchor=north,unit,fill=blue!10] (n23) at ([yshift=-3em]n22.south){{\small\bfnew{$<$eos$>$}}};
\node[anchor=south,unit,text=red] (w2) at ([yshift=0.5em]n21.north){$w_2$};
\node[anchor=west,unit,fill=red!20] (n32) at ([xshift=3em]n21.east){{\small\bfnew{agree}}};
\node[anchor=south,unit,fill=red!20] (n31) at ([yshift=0.3em]n32.north){{\small\bfnew{I}}};
\node[anchor=north,unit,fill=blue!10] (n33) at ([yshift=-0.3em]n32.south){{\small\bfnew{$<$eos$>$}}};
\node[anchor=west,unit,fill=red!20] (n35) at ([xshift=3em]n22.east){{\small\bfnew{agree}}};
\node[anchor=south,unit,fill=red!20] (n34) at ([yshift=0.3em]n35.north){{\small\bfnew{I}}};
\node[anchor=north,unit,fill=blue!10] (n36) at ([yshift=-0.3em]n35.south){{\small\bfnew{$<$eos$>$}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n31.north){$w_3$};
\node[anchor=west,unit,fill=blue!10] (n41) at ([xshift=3em]n31.east){{\small\bfnew{$<$eos$>$}}};
\node[anchor=west,unit,fill=blue!10] (n42) at ([xshift=3em]n32.east){{\small\bfnew{$<$eos$>$}}};
\node[anchor=west,unit,fill=blue!10] (n43) at ([xshift=3em]n34.east){{\small\bfnew{$<$eos$>$}}};
\node[anchor=west,unit,fill=blue!10] (n44) at ([xshift=3em]n35.east){{\small\bfnew{$<$eos$>$}}};
\node[anchor=south,unit,text=red] (w4) at ([yshift=0.5em]n41.north){$w_4$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (n21.east) -- (n31.west);
\draw[->,ublue,very thick] (n21.east) -- (n32.west);
\draw[->,ublue,very thick] (n21.east) -- (n33.west);
\draw[->,ublue,very thick] (n22.east) -- (n34.west);
\draw[->,ublue,very thick] (n22.east) -- (n35.west);
\draw[->,ublue,very thick] (n22.east) -- (n36.west);
\draw[->,ublue,very thick] (n31.east) -- (n41.west);
\draw[->,ublue,very thick] (n32.east) -- (n42.west);
\draw[->,ublue,very thick] (n34.east) -- (n43.west);
\draw[->,ublue,very thick] (n35.east) -- (n44.west);
\end{tikzpicture}
...@@ -1137,6 +1137,209 @@ ...@@ -1137,6 +1137,209 @@
year ={2011}, year ={2011},
publisher ={北京: 高等教育出版社} publisher ={北京: 高等教育出版社}
} }
@book{cormen1990introduction,
title="Introduction to Algorithms",
author="Thomas T. {Cormen} and Charles E. {Leiserson} and Ronald L. {Rivest}",
notes="Sourced from Microsoft Academic - https://academic.microsoft.com/paper/2752885492",
year="1990"
}
@book{russell2003artificial,
title="Artificial Intelligence : A Modern Approach",
author="Stuart J. {Russell} and Peter {Norvig}",
notes="Sourced from Microsoft Academic - https://academic.microsoft.com/paper/2122410182",
year="2003"
}
@book{sahni1978fundamentals,
title="Fundamentals of Computer Algorithms",
author="Sartaj {Sahni} and Ellis {Horowitz}",
notes="Sourced from Microsoft Academic - https://academic.microsoft.com/paper/1554451661",
year="1978"
}
@article{DBLP:journals/tssc/HartNR68,
author = {Peter E. Hart and
Nils J. Nilsson and
Bertram Raphael},
title = {A Formal Basis for the Heuristic Determination of Minimum Cost Paths},
journal = {{IEEE} Trans. Syst. Sci. Cybern.},
volume = {4},
number = {2},
pages = {100--107},
year = {1968},
url = {https://doi.org/10.1109/TSSC.1968.300136},
doi = {10.1109/TSSC.1968.300136},
timestamp = {Sat, 25 Apr 2020 13:57:19 +0200},
biburl = {https://dblp.org/rec/journals/tssc/HartNR68.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/nips/HeLXQ0L17,
author = {Di He and
Hanqing Lu and
Yingce Xia and
Tao Qin and
Liwei Wang and
Tie{-}Yan Liu},
editor = {Isabelle Guyon and
Ulrike von Luxburg and
Samy Bengio and
Hanna M. Wallach and
Rob Fergus and
S. V. N. Vishwanathan and
Roman Garnett},
title = {Decoding with Value Networks for Neural Machine Translation},
booktitle = {Advances in Neural Information Processing Systems 30: Annual Conference
on Neural Information Processing Systems 2017, 4-9 December 2017,
Long Beach, CA, {USA}},
pages = {178--187},
year = {2017},
url = {http://papers.nips.cc/paper/6622-decoding-with-value-networks-for-neural-machine-translation},
timestamp = {Fri, 06 Mar 2020 16:58:12 +0100},
biburl = {https://dblp.org/rec/conf/nips/HeLXQ0L17.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{Joshua2001A,
author={Joshua T. Goodman},
title={A bit of progress in language modeling},
journal={Comput. Speech Lang.},
volume={15},
number={4},
pages={403--434},
year={2001},
url={https://doi.org/10.1006/csla.2001.0174},
doi={10.1006/csla.2001.0174},
timestamp={Thu, 20 Feb 2020 11:32:09 +0100},
biburl={https://dblp.org/rec/journals/csl/Goodman01.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{jing2019survey,
title={A survey on neural network language models},
author={Jing, Kun and Xu, Jungang},
journal={arXiv preprint arXiv:1906.03591},
year={2019}
}
@inproceedings{DBLP:conf/acl/OchUN01,
author = {Franz Josef Och and
Nicola Ueffing and
Hermann Ney},
title = {An Efficient A* Search Algorithm for Statistical Machine Translation},
booktitle = {Proceedings of the {ACL} Workshop on Data-Driven Methods in Machine
Translation, Toulouse, France, July 7, 2001},
year = {2001},
url = {https://www.aclweb.org/anthology/W01-1408/},
timestamp = {Wed, 11 Sep 2019 16:27:20 +0200},
biburl = {https://dblp.org/rec/conf/acl/OchUN01.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/acl/WangW97,
author = {Ye{-}Yi Wang and
Alex Waibel},
editor = {Philip R. Cohen and
Wolfgang Wahlster},
title = {Decoding Algorithm in Statistical Machine Translation},
booktitle = {35th Annual Meeting of the Association for Computational Linguistics
and 8th Conference of the European Chapter of the Association for
Computational Linguistics, Proceedings of the Conference, 7-12 July
1997, Universidad Nacional de Educaci{\'{o}}n a Distancia (UNED),
Madrid, Spain},
pages = {366--372},
publisher = {Morgan Kaufmann Publishers / {ACL}},
year = {1997},
url = {https://www.aclweb.org/anthology/P97-1047/},
doi = {10.3115/976909.979664},
timestamp = {Mon, 18 May 2020 15:12:40 +0200},
biburl = {https://dblp.org/rec/conf/acl/WangW97.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{DBLP:journals/corr/LiMJ16,
author = {Jiwei Li and
Will Monroe and
Dan Jurafsky},
title = {A Simple, Fast Diverse Decoding Algorithm for Neural Generation},
journal = {CoRR},
volume = {abs/1611.08562},
year = {2016},
url = {http://arxiv.org/abs/1611.08562},
archivePrefix = {arXiv},
eprint = {1611.08562},
timestamp = {Mon, 13 Aug 2018 16:48:46 +0200},
biburl = {https://dblp.org/rec/journals/corr/LiMJ16.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/iclr/ZophL17,
author = {Barret Zoph and
Quoc V. Le},
title = {Neural Architecture Search with Reinforcement Learning},
booktitle = {5th International Conference on Learning Representations, {ICLR} 2017,
Toulon, France, April 24-26, 2017, Conference Track Proceedings},
publisher = {OpenReview.net},
year = {2017},
url = {https://openreview.net/forum?id=r1Ue8Hcxg},
timestamp = {Thu, 04 Apr 2019 13:20:08 +0200},
biburl = {https://dblp.org/rec/conf/iclr/ZophL17.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/iclr/SchrimpfM0S18,
author = {Martin Schrimpf and
Stephen Merity and
James Bradbury and
Richard Socher},
title = {A Flexible Approach to Automated {RNN} Architecture Generation},
booktitle = {6th International Conference on Learning Representations, {ICLR} 2018,
Vancouver, BC, Canada, April 30 - May 3, 2018, Workshop Track Proceedings},
publisher = {OpenReview.net},
year = {2018},
url = {https://openreview.net/forum?id=BJDCPSJPM},
timestamp = {Thu, 04 Apr 2019 13:20:09 +0200},
biburl = {https://dblp.org/rec/conf/iclr/SchrimpfM0S18.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/acl/OchN02,
author = {Franz Josef Och and
Hermann Ney},
title = {Discriminative Training and Maximum Entropy Models for Statistical
Machine Translation},
booktitle = {Proceedings of the 40th Annual Meeting of the Association for Computational
Linguistics, July 6-12, 2002, Philadelphia, PA, {USA}},
pages = {295--302},
publisher = {{ACL}},
year = {2002},
url = {https://www.aclweb.org/anthology/P02-1038/},
doi = {10.3115/1073083.1073133},
timestamp = {Mon, 18 May 2020 15:12:39 +0200},
biburl = {https://dblp.org/rec/conf/acl/OchN02.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@inproceedings{DBLP:conf/nips/BengioDV00,
author = {Yoshua Bengio and
R{\'{e}}jean Ducharme and
Pascal Vincent},
editor = {Todd K. Leen and
Thomas G. Dietterich and
Volker Tresp},
title = {A Neural Probabilistic Language Model},
booktitle = {Advances in Neural Information Processing Systems 13, Papers from
Neural Information Processing Systems {(NIPS)} 2000, Denver, CO, {USA}},
pages = {932--938},
publisher = {{MIT} Press},
year = {2000},
url = {http://papers.nips.cc/paper/1839-a-neural-probabilistic-language-model},
timestamp = {Fri, 06 Mar 2020 17:00:45 +0100},
biburl = {https://dblp.org/rec/conf/nips/BengioDV00.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
%%%%% chapter 2------------------------------------------------------ %%%%% chapter 2------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论