-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemim-crf.tex
77 lines (65 loc) · 3.07 KB
/
semim-crf.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{\scriptsize
\begin{tikzpicture}
\tikzstyle{xnode}=[rectangle,draw,fill=gray76,minimum size=2em] %
\tikzstyle{ynode-el}=[rounded rectangle,draw,fill=gray76,inner sep=1pt,%
minimum size=2.3em,minimum width={13em}] %
\tikzstyle{ynode}=[rounded rectangle,draw,fill=gray76,inner sep=1pt,%
minimum size=2.3em,minimum width=width("MMM")] %
\tikzstyle{znode}=[rounded rectangle,draw=none,inner sep=1pt,minimum size=2.3em] %
\tikzstyle{factor}=[rectangle,fill=black,midway,inner sep=0pt,%
minimum size=0.4em] %
\node[ynode] (NON0) at (1, 4) {NON};
\node[ynode] (SRC0) at (1, 3) {SRC};
\node[ynode] (TRG0) at (1, 2) {TRG};
\node[ynode] (SNT0) at (1, 1) {SNT};
\hyperNodeX{NON0}{SRC0}{TRG0}{SNT0}{w$_1$};
\node[znode] (NON2) at (2.7, 4) {};
\node[znode] (SRC2) at (2.7, 3) {};
\node[znode] (TRG2) at (2.7, 2) {};
\node[znode] (SNT2) at (2.7, 1) {};
\hyperNodeX{NON2}{SRC2}{TRG2}{SNT2}{w$_2$};
\node[znode] (NON4) at (5.3, 4) {};
\node[znode] (SRC4) at (5.3, 3) {};
\node[znode] (TRG4) at (5.3, 2) {};
\node[znode] (SNT4) at (5.3, 1) {};
\hyperNodeX{NON4}{SRC4}{TRG4}{SNT4}{w$_3$};
\node[ynode-el] (NON1) at (4, 4) {NON};
\node[ynode-el] (SRC1) at (4, 3) {SRC};
\node[ynode-el] (TRG1) at (4, 2) {TRG};
\node[ynode-el] (SNT1) at (4, 1) {SNT};
\crfFeaturesSemiMarkov{1/2/1.193, 2/2.7/1.195, 3/3.4/1.197}{%
1/4.6/1.343, 2/5.3/1.345, 3/6/1.347}{0};
%% \begin{scope}
%% \node[xnode] (FEAT1) at (2, 0) {};
%% \node[xnode] (FEAT2) at (2.7, 0) {};
%% \node[xnode] (FEAT3) at (3.4, 0) {};
%% \node[xnode] (FEAT4) at (4.6, 0) {};
%% \node[xnode] (FEAT5) at (5.3, 0) {};
%% \node[xnode] (FEAT6) at (6., 0) {};
%% \end{scope}
%% \path [-] (FEAT1) edge node [factor] {} (SNT1.193);
%% \path [-] (FEAT2) edge node [factor] {} (SNT1.195);
%% \path [-] (FEAT3) edge node [factor] {} (SNT1.197);
%% \path [-] (FEAT4) edge node [factor] {} (SNT1.343);
%% \path [-] (FEAT5) edge node [factor] {} (SNT1.345);
%% \path [-] (FEAT6) edge node [factor] {} (SNT1.347);
\begin{scope}[on background layer]
\path [-] (NON0) edge[] node [factor] {} (NON1);
\path [-] (SRC0) edge[] node [factor] {} (NON1.184);
\path [-] (TRG0) edge[] node [factor] {} (NON1.186);
\path [-] (SNT0) edge[] node [factor] {} (NON1.188);
\path [-] (NON0) edge[] node [factor] {} (SRC1.178);
\path [-] (SRC0) edge[] node [factor] {} (SRC1.180);
\path [-] (TRG0) edge[] node [factor] {} (SRC1.182);
\path [-] (SNT0) edge[] node [factor] {} (SRC1.185);
\path [-] (NON0) edge[] node [factor] {} (TRG1.175);
\path [-] (SRC0) edge[] node [factor] {} (TRG1.178);
\path [-] (TRG0) edge[] node [factor] {} (TRG1.180);
\path [-] (SNT0) edge[] node [factor] {} (TRG1.182);
\path [-] (NON0) edge[] node [factor] {} (SNT1.172);
\path [-] (SRC0) edge[] node [factor] {} (SNT1.174);
\path [-] (TRG0) edge[] node [factor] {} (SNT1.176);
\path [-] (SNT0) edge[] node [factor] {} (SNT1);
\end{scope}
\end{tikzpicture}
}