-
Notifications
You must be signed in to change notification settings - Fork 0
/
tree-crf.tex
50 lines (43 loc) · 2.06 KB
/
tree-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
{\scriptsize
\begin{tikzpicture}
\tikzstyle{xnode}=[rectangle,draw,fill=gray76,minimum size=2em] %
\tikzstyle{ynode}=[circle,draw,fill=gray76,inner sep=1pt,%
minimum width=width("MMM"),minimum height=height("MMM")] %
\tikzstyle{factor}=[rectangle,fill=black,midway,inner sep=0pt,%
minimum size=0.4em] %
\node[ynode] (SNT1) at (1, 4) {SNT};
\node[ynode] (TRG1) [right=0.4em of SNT1] {TRG};
\node[ynode] (SRC1) [right=0.4em of TRG1] {SRC};
\node[ynode] (NON1) [right=0.4em of SRC1] {NON};
\hyperNodeTreeCRF{SNT1}{TRG1}{SRC1}{NON1}{w$_2$};
\node[ynode] (SNT0) [below left=8em and 4em of SNT1] {SNT};
\node[ynode] (TRG0) [right=0.4em of SNT0] {TRG};
\node[ynode] (SRC0) [right=0.4em of TRG0] {SRC};
\node[ynode] (NON0) [right=0.4em of SRC0] {NON};
\hyperNodeTreeCRF{SNT0}{TRG0}{SRC0}{NON0}{w$_1$};
\node[ynode] (SNT2) [right=1.2em of NON0] {SNT};
\node[ynode] (TRG2) [right=0.4em of SNT2] {TRG};
\node[ynode] (SRC2) [right=0.4em of TRG2] {SRC};
\node[ynode] (NON2) [right=0.4em of SRC2] {NON};
\hyperNodeTreeCRF{SNT2}{TRG2}{SRC2}{NON2}{w$_3$};
\crfFeaturesX{0/1.5, 1/2.4, 2/3.3}{1}{2.85};
%% \node[xnode] (FEAT1) [below right=3em and 0.6em of SNT1] {};
%% \node[xnode] (FEAT2) [right=0.4em of FEAT1] {};
%% \node[xnode] (FEAT3) [right=0.4em of FEAT2] {};
%% \path [-] (FEAT1) edge node [factor] {} (SNT1);
%% \path [-] (FEAT2) edge node [factor] {} (SNT1);
%% \path [-] (FEAT3) edge node [factor] {} (SNT1);
\crfEdgesX{1}{0};
\crfEdgesX{1}{2};
%% \begin{pgfonlayer}{background}
%% \path [-] (SNT0) edge[] node [factor] {} (SNT1);
%% \path [-] (TRG0) edge[] node [factor] {} (SNT1);
%% \path [-] (SRC0) edge[] node [factor] {} (SNT1);
%% \path [-] (NON0) edge[] node [factor] {} (SNT1);
%% \path [-] (SNT2) edge[] node [factor] {} (SNT1);
%% \path [-] (TRG2) edge[] node [factor] {} (SNT1);
%% \path [-] (SRC2) edge[] node [factor] {} (SNT1);
%% \path [-] (NON2) edge[] node [factor] {} (SNT1);
%% \end{pgfonlayer}
\end{tikzpicture}
}