figure-schematic-diagram-of-phrase-level-quality-assessment-task.tex 5.11 KB
Newer Older
曹润柘 committed
1 2 3
%\usetikzlibrary{backgrounds} 
%\usetikzlibrary{fit}
\begin{tikzpicture}[scale=0.5]
孟霞 committed
4
	\tikzstyle{unit} = [draw,inner sep=1.2pt,font=\scriptsize,minimum height=1em]
孟霞 committed
5
	\tikzstyle{box} = [draw,rectangle,inner xsep=1.4pt,inner ysep=3pt]
孟霞 committed
6 7
	\tikzstyle{bad_tag} = [inner sep=1pt,align=center,font=\scriptsize,text=red,minimum height=0.8em]
	\tikzstyle{ok_tag} = [inner sep=1pt,align=center,font=\scriptsize,text=ugreen,minimum height=0.8em]
曹润柘 committed
8 9 10
	
	\coordinate (o) at (0, 0);
	
孟霞 committed
11 12 13 14 15 16 17 18 19 20 21 22
	\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n1_1) at ([yshift=8em]o.east){\textbf{Source}};
	\node[unit,anchor=west,fill=green!30](n1_2) at ([xshift=2.2em]n1_1.east){Nach};
	\node[unit,anchor=west,fill=green!30](n1_3) at ([xshift=0.6em]n1_2.east){Zubereitung};
	\node[unit,anchor=west,fill=green!30](n1_4) at ([xshift=1.2em]n1_3.east){im};
	\node[unit,anchor=west,fill=green!30](n1_5) at ([xshift=0.6em]n1_4.east){Kühlschrank};
	\node[unit,anchor=west,fill=green!30](n1_6) at ([xshift=0.6em]n1_5.east){aufbewahren};
	\node[unit,anchor=west,fill=green!30](n1_7) at ([xshift=1.2em]n1_6.east){und};
	\node[unit,anchor=west,fill=green!30](n1_8) at ([xshift=0.6em]n1_7.east){innerhalb};
	\node[unit,anchor=west,fill=green!30](n1_9) at ([xshift=0.6em]n1_8.east){vonf};
	\node[unit,anchor=west,fill=green!30](n1_10) at ([xshift=0.6em]n1_9.east){24};
	\node[unit,anchor=west,fill=green!30](n1_11) at ([xshift=1.2em]n1_10.east){Stunden};
	\node[unit,anchor=west,fill=green!30](n1_12) at ([xshift=0.6em]n1_11.east){aufbrauchen};
孟霞 committed
23

曹润柘 committed
24
	
孟霞 committed
25 26 27 28 29 30 31 32 33 34 35
	\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] (n2_1) at ([yshift=-2em]o.east){\textbf{MT}};
	\node[unit,anchor=west,fill=red!30](n2_2) at ([xshift=5em]n2_1.east){After};
	\node[unit,anchor=west,fill=red!30](n2_3) at ([xshift=0.6em]n2_2.east){reconstitution};
	\node[unit,anchor=west,fill=red!30](n2_4) at ([xshift=1.2em]n2_3.east){in};
	\node[unit,anchor=west,fill=red!30](n2_5) at ([xshift=0.6em]n2_4.east){the};
	\node[unit,anchor=west,fill=red!30](n2_6) at ([xshift=0.6em]n2_5.east){refrigerator};
	\node[unit,anchor=west,fill=red!30](n2_7) at ([xshift=1.2em]n2_6.east){and};
	\node[unit,anchor=west,fill=red!30](n2_8) at ([xshift=0.6em]n2_7.east){used};
	\node[unit,anchor=west,fill=red!30](n2_9) at ([xshift=0.6em]n2_8.east){within};
	\node[unit,anchor=west,fill=red!30](n2_10) at ([xshift=0.6em]n2_9.east){24};
	\node[unit,anchor=west,fill=red!30](n2_11) at ([xshift=1.2em]n2_10.east){hours};
曹润柘 committed
36
	\begin{pgfonlayer}{background}
孟霞 committed
37 38 39 40
        \node [box,fill=green!5] [fit = (n1_2) (n1_3)] (box1_1) {};
        \node [box,fill=green!5] [fit = (n1_4) (n1_5) (n1_6)] (box1_2) {};
        \node [box,fill=green!5] [fit = (n1_7) (n1_8) (n1_9) (n1_10)] (box1_3) {};
        \node [box,fill=green!5] [fit = (n1_11) (n1_12) ] (box1_4) {};
曹润柘 committed
41
        
孟霞 committed
42 43 44 45
        \node [box,fill=red!5] [fit = (n2_2) (n2_3)] (box2_1) {};
        \node [box,fill=red!5] [fit = (n2_4) (n2_5) (n2_6)] (box2_2) {};
        \node [box,fill=red!5] [fit = (n2_7) (n2_8) (n2_9) (n2_10)] (box2_3) {};
        \node [box,fill=red!5] [fit = (n2_11)] (box2_4) {};
曹润柘 committed
46 47 48
    \end{pgfonlayer}
	
	\node[bad_tag,anchor=north] at ([yshift=-2pt]box2_1.south){BAD\_word\_order};
孟霞 committed
49 50 51
	\node[ok_tag,anchor=north] at ([yshift=-2pt]box2_2.south){OK};
	\node[bad_tag,anchor=north] at ([yshift=-2pt]box2_3.south){BAD};
	\node[ok_tag,anchor=north] (tag_1) at ([yshift=-2pt]box2_4.south){OK};
曹润柘 committed
52
	
孟霞 committed
53 54 55 56
	\node[ok_tag,anchor=north] (gap_1) at ([xshift=-7em,yshift=-3em]box2_1.south){OK};
	\node[bad_tag,anchor=north] (gap_2) at ([xshift=7em,yshift=-3em]box2_1.south){BAD\_omission};
	\node[ok_tag,anchor=north] (gap_3) at ([xshift=6.8em,yshift=-3em]box2_2.south){OK};
	\node[ok_tag,anchor=north] (gap_4) at ([xshift=7.5em,yshift=-3em]box2_3.south){OK};
孟霞 committed
57 58
	\node[ok_tag,anchor=north] (tag_2) at ([xshift=2.5em,yshift=-3em]box2_4.south){OK};

曹润柘 committed
59
	
孟霞 committed
60
	\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=5.2em]tag_1.east){\textbf{Phrase-target tags}};
曹润柘 committed
61
	
孟霞 committed
62
	\node[anchor=west,inner sep=0pt,align=center,font=\scriptsize] at ([xshift=8.4em]tag_2.east){\textbf{Gap tags}};
曹润柘 committed
63
	
孟霞 committed
64 65 66 67 68 69 70 71 72 73 74 75 76 77
	\draw[blue!30,line width=1pt] (n1_2.south) -- (n2_2.north);
	\draw[blue!30,line width=1pt] (n1_2.south) -- (n2_3.north);
	\draw[blue!30,line width=1pt] (n1_3.south) -- (n2_3.north);
	\draw[blue!30,line width=1pt] (n1_4.south) -- (n2_4.north);
	\draw[blue!30,line width=1pt] (n1_4.south) -- (n2_5.north);
	\draw[blue!30,line width=1pt] (n1_4.south) -- (n2_6.north);
	\draw[blue!30,line width=1pt] (n1_5.south) -- (n2_6.north);
	\draw[blue!30,line width=1pt] (n1_6.south) -- (n2_6.north);
	\draw[blue!30,line width=1pt] (n1_7.south) -- (n2_7.north);
	\draw[blue!30,line width=1pt] (n1_8.south) -- (n2_9.north);
	\draw[blue!30,line width=1pt] (n1_9.south) -- (n2_9.north);
	\draw[blue!30,line width=1pt] (n1_10.south) -- (n2_10.north);
	\draw[blue!30,line width=1pt] (n1_11.south) -- (n2_11.north);
	\draw[blue!30,line width=1pt] (n1_12.south) -- (n2_11.north);	
曹润柘 committed
78
	
孟霞 committed
79 80 81 82 83
	\draw[dotted,thick](gap_1.north) -- ([yshift=3em]gap_1.north);
	\draw[dotted,thick](gap_2.north) -- ([yshift=3em]gap_2.north);
	\draw[dotted,thick](gap_3.north) -- ([yshift=3em]gap_3.north);
	\draw[dotted,thick](gap_4.north) -- ([yshift=3em]gap_4.north);
	\draw[dotted,thick](tag_2.north) -- ([yshift=3em]tag_2.north);
曹润柘 committed
84 85 86
	
	
\end{tikzpicture}