\begin{tikzpicture} \tikzstyle{unit} = [inner sep=1pt,align=center,minimum width=3.5em,minimum height=2em,font=\large] \node[fill=red!40,inner sep=2pt,minimum width=5em](vocab)at(0,0){\color{white}{\small\bfnew{词表}}}; \node[fill=red!20,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){$<$sos$>$\\[-0.5ex]$<$eos$>$}; % \node[anchor=north,minimum width=1.8em,minimum height=1em,fill=blue!10] (l1) at ([yshift=-1em]eos.south){}; % \node[anchor=north,minimum width=1.8em,minimum height=1em,fill=red!10] (l2) at ([yshift=-0.5em]l1.south){}; \node[anchor=north,unit] (w1) at ([xshift=0em,yshift=-1.8em]eos.south){$w_1$}; \node[anchor=north,unit,fill=blue!10] (n11) at ([yshift=-0.5em]w1.south){$<$sos$>$}; \node[anchor=west,unit,fill=red!20,opacity=0.3] (n24) at ([xshift=6.5em,yshift=4.3em]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!20] (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!20] (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!20] (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!20,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!20,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=blue!10,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] (w2) at ([yshift=0.5em]n21.north){$w_2$}; \node[anchor=west,unit,fill=red!20] (n31) at ([yshift=4.7em,xshift=8em]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=blue!10] (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!20,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!20,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!20,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!20,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!20,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!20] (n41) at ([yshift=-0.1em]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!20,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] (w3) at ([yshift=0.5em]n31.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!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] at ([yshift=-2em,xshift=2em]pt25.east){剪枝}; \draw[decorate,decoration={brace},red,very thick] (pt33.south east) -- (pt37.south west); \node[inner sep=0pt] at ([xshift=2em,yshift=-1em]pt35.east){剪枝}; \node[inner sep=0pt] 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}