-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.bak
executable file
·206 lines (185 loc) · 47.8 KB
/
index.html.bak
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Lib includes js -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
<script type="text/javascript" src="src/js/vendor/colorbox/jquery.colorbox-min.js"></script>
<script type="text/javascript" src="src/js/vendor/jquery-contextMenu-master/jquery.contextMenu.js"></script>
<script type="text/javascript" src="src/js/vendor/d3.v2.min.js"></script>
<!-- DepGraph Lib js-->
<script type="text/javascript" src="build/mgwiki.depgraph.js"></script>
<!-- DepGraph Plugins js -->
<!-- <script type="text/javascript" src="plugins/frmg_parser_custom.js"></script> -->
<!-- Lib includes css -->
<link rel="stylesheet" media="screen" type="text/css"
href="src/js/vendor/jquery-contextMenu-master/jquery.contextMenu.css" />
<link rel="stylesheet" media="screen" type="text/css"
href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<!-- DepGraph Lib css -->
<link rel="stylesheet" media="screen" type="text/css"
href="build/style/depgraph.css" />
</head>
<body>
<h1>Dependency Graph Visualisation Library - DepGraph</h1>
<h2>1. Introduction - Simple Use</h2>
<p>This library has 2 components : depgraph.js and viewer.js
<ul>
<li>
viewer.js is the frame in which the graph will be embed. This module handle the creation
of toolbar menus, size of the frame, floating windows, etc.
</li>
<li>
depgraph.js is the module that handle the actual graph layout creation in svg. This part of the
library heavily rely on d3.js svg graphics library.
</li>
</ul>
</p>
<p>
A simple exemple of how to display a graph:
<pre>
<div id="graph-container"></div>
<script>
var json_data = DATA (see <a href="#section2">Graph Data Schema</a>);
var depGraph = new depgraphlib.DepGraph(jQuery("#graph-container"),json_data);
</script>
</pre>
</p>
<div id="graph-container"></div>
<script>
var json_data = {"graph":{"words":[{"sublabel":["cln","cln"],"#data":{"xcat":"","cat":"cln","tree":"lexical","lemma":"cln","lemmaid":"cln","cluster":"E1c_0_1","left":"0","right":"1","token":"je","lex":"E1F1|Je","form":"je"},"id":"E1n1","label":"je","#position":0},{"sublabel":["cla","cla"],"#data":{"xcat":"","cat":"cla","tree":"lexical","lemma":"cla","lemmaid":"cla","cluster":"E1c_1_2","left":"1","right":"2","token":"l'","lex":"E1F2|l'","form":"l'","alternatives":[{"id":"49","ref_ids":["49"],"#data":{"w":"2510","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"object","source":"E1n4","target":"E1n5"}]},"id":"E1n5","label":"l'","#position":1},{"sublabel":["avoir","aux"],"#data":{"wall":"0","deriv":"d17","xcat":"Infl","cat":"aux","tree":"86 V1VMod:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement aux_verbs shallow_auxiliary aux:verb_agreement V1:verb_agreement_ancestor","lemma":"avoir","lemmaid":"avoir","cluster":"E1c_2_3","left":"2","right":"3","token":"ai","lex":"E1F3|ai","form":"ai"},"id":"E1n3","label":"ai","#position":2},{"sublabel":["voir","v"],"#data":{"wall":"18495","deriv":"d82","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"voir","lemmaid":"voir","cluster":"E1c_3_4","left":"3","right":"4","token":"vu","lex":"E1F4|vu","form":"vu"},"id":"E1n4","label":"vu","#position":3},{"sublabel":["partir","v"],"#data":{"wall":"8805","deriv":"d65","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"partir","lemmaid":"partir","cluster":"E1c_4_5","left":"4","right":"5","token":"partir","lex":"E1F5|partir","form":"partir"},"id":"E1n6","label":"partir","#position":4},{"sublabel":["_","VMod"],"#data":{"wall":"1745 1745","deriv":"d15","xcat":"VMod","cat":"VMod","tree":"313 cnoun_as_adv_on_vmod modifier_after_x modifier_at_S_level modifier_post_vmod shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_5_5","left":"5","right":"5","token":"","lex":"","form":"","alternatives":[{"id":"44","ref_ids":["44"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n28"}]},"id":"E1n28","label":"_","#position":5},{"sublabel":["ce","det"],"#data":{"wall":"0","deriv":"d13","xcat":"det","cat":"det","tree":"0 det","lemma":"ce","lemmaid":"ce","cluster":"E1c_5_6","left":"5","right":"6","token":"ce","lex":"E1F6|ce","form":"ce"},"id":"E1n7","label":"ce","#position":6},{"sublabel":["matin","nc"],"#data":{"wall":"1705","deriv":"d14","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"matin","lemmaid":"matin","cluster":"E1c_6_7","left":"6","right":"7","token":"matin","lex":"E1F7|matin","form":"matin"},"id":"E1n8","label":"matin","#position":7},{"sublabel":["_","S"],"#data":{"wall":"7085","deriv":"d59","xcat":"S","cat":"S","tree":"252 modifier_after_S modifier_after_x modifier_at_S_level shallow_auxiliary simple_participiale_after_S","lemma":"","lemmaid":"","cluster":"E1c_7_7","left":"7","right":"7","token":"","lex":"","form":"","alternatives":[{"id":"50","ref_ids":["50"],"#data":{"w":"-25","virtual":true},"#style":{"link-color":"#FF4040"},"label":"S","source":"E1n4","target":"E1n30"},{"id":"43","ref_ids":["43"],"#data":{"w":"-20","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n30"},{"id":"25","ref_ids":["25"],"#data":{"w":"-15","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n30"},{"id":"20","ref_ids":["20"],"#data":{"w":"-5","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n30"}]},"id":"E1n30","label":"_","#position":8},{"sublabel":["en","prep"],"#data":{"xcat":"","cat":"prep","tree":"lexical","lemma":"en","lemmaid":"en","cluster":"E1c_7_8","left":"7","right":"8","token":"en","lex":"E1F8|en","form":"en","alternatives":[{"id":"34","ref_ids":["34"],"#data":{"w":"665","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"clg","source":"E1n14","target":"E1n18"},{"id":"13","ref_ids":["13"],"#data":{"w":"615","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"cll","source":"E1n14","target":"E1n18"},{"id":"27","ref_ids":["27"],"#data":{"w":"2190","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n18"},{"id":"21","ref_ids":["21"],"#data":{"w":"695","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n18"},{"id":"8","ref_ids":["8"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#409AFF"},"label":"PP","source":"E1n30","target":"E1n18"}]},"id":"E1n18","label":"en","#position":9},{"sublabel":["courir","v"],"#data":{"wall":"3900","deriv":"d55","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"courir","lemmaid":"courir","cluster":"E1c_8_9","left":"8","right":"9","token":"courant","lex":"E1F9|courant","form":"courant","alternatives":[{"id":"22","ref_ids":["22"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#409AFF"},"label":"SubS","source":"E1n30","target":"E1n14"},{"id":"17","ref_ids":["17"],"#data":{"w":"705","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n18","target":"E1n14"},{"id":"16","ref_ids":["16"],"#data":{"w":"-495","virtual":true},"#style":{"link-color":"#409AFF"},"label":"adjP","source":"E1n18","target":"E1n14"}]},"id":"E1n14","label":"courant","#position":10},{"sublabel":["_","VMod"],"#data":{"wall":"3500 3500 3500 3500","deriv":"d5","xcat":"VMod","cat":"VMod","tree":"274 modifier_after_x modifier_at_S_level modifier_post_vmod prep_vmod_modifier shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_9_9","left":"9","right":"9","token":"","lex":"","form":"","alternatives":[{"id":"42","ref_ids":["42"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n26"},{"id":"33","ref_ids":["33"],"#data":{"w":"400","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n14","target":"E1n26"},{"id":"40","ref_ids":["40"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n26"}]},"id":"E1n26","label":"_","#position":11},{"sublabel":["\u00c3\u00a0","prep"],"#data":{"wall":"2305","deriv":"d4","xcat":"PP","cat":"prep","tree":"6 prep_argument","lemma":"\u00c3\u00a0","lemmaid":"\u00c3\u00a0","cluster":"E1c_9_10","left":"9","right":"10","token":"au","lex":"E1F10|au","form":"\u00c3\u00a0","alternatives":[{"id":"32","ref_ids":["32"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n14","target":"E1n19"},{"id":"29","ref_ids":["29"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n14","target":"E1n19"},{"id":"38","ref_ids":["38"],"#data":{"w":"1180","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n30","target":"E1n19"},{"id":"39","ref_ids":["39"],"#data":{"w":"2170","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n19"},{"id":"37","ref_ids":["37"],"#data":{"w":"980","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n19"}]},"id":"E1n19","label":"au","#position":12},{"sublabel":["le","det"],"#data":{"wall":"0","deriv":"d2","xcat":"det","cat":"det","tree":"0 det","lemma":"le","lemmaid":"le","cluster":"E1c_10_11","left":"10","right":"11","token":"au","lex":"E1F10|au","form":"le"},"id":"E1n20","label":"_","#position":13},{"sublabel":["supermarch\u00c3\u00a9","nc"],"#data":{"wall":"1705","deriv":"d3","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"supermarch\u00c3\u00a9","lemmaid":"supermarch\u00c3\u00a9","cluster":"E1c_11_12","left":"11","right":"12","token":"supermarch\u00c3\u00a9","lex":"E1F11|supermarch\u00c3\u00a9","form":"supermarch\u00c3\u00a9","alternatives":[{"id":"30","ref_ids":["30"],"#data":{"w":"600","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n19","target":"E1n21"}]},"id":"E1n21","label":"supermarch\u00c3\u00a9","#position":14},{"sublabel":["_","S"],"#data":{"wall":"-5","deriv":"d1","xcat":"S","cat":"S","tree":"31 shallow_auxiliary spunct_others","lemma":"","lemmaid":"","cluster":"E1c_12_12","left":"12","right":"12","token":"","lex":"","form":""},"id":"E1n25","label":"_","#position":15},{"sublabel":[".","_"],"#data":{"xcat":"","cat":"_","tree":"lexical","lemma":".","lemmaid":".","cluster":"E1c_12_13","left":"12","right":"13","token":".","lex":"E1F12|.","form":"."},"id":"E1n24","label":".","#position":16}],"links":[{"id":"E1e1","source":"E1n25","target":"E1n24","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"-5","ws":"[-RANK1 : -5]"},"label":"void"},{"id":"E1e2","source":"E1n21","target":"E1n20","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e3","source":"E1n19","target":"E1n21","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"600","ws":"[-RANK1 : -5,-LONG0 : -5,+SUBST : 10,+PREP->X : 400,+PREP->n : 200]"},"label":"N2"},{"id":"E1e4","source":"E1n26","target":"E1n19","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1195","ws":"[-RANK1 : -5,+CLOSED_conj_or_prep : 1200]"},"label":"PP"},{"id":"E1e9","source":"E1n8","target":"E1n7","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e10","source":"E1n28","target":"E1n8","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"40","ws":"[-RANK1 : -5,-LONG0 : -5,+time_mod : 50]"},"label":"time_mod"},{"id":"E1e11","source":"E1n6","target":"E1n28","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-5","ws":"[-RANK1 : -5,-incise_on_subS : 0]"},"label":"vmod"},{"id":"E1e26","source":"E1n6","target":"E1n30","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-20","ws":"[-RANK2 : -10,-LONG0 : -10]"},"label":"S"},{"id":"E1e35","source":"E1n14","target":"E1n26","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"400","ws":"[-RANK1 : -5,+PP_V_courir_\u00c3\u00a0 : 5,+V->VMOD->PREP : 400]"},"label":"vmod"},{"id":"E1e23","source":"E1n30","target":"E1n14","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"-10","ws":"[-RANK1 : -5,-LONG0 : -5]"},"label":"SubS"},{"id":"E1e24","source":"E1n30","target":"E1n18","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"3195","ws":"[-RANK1 : -5,+en_as_GERUND : 2000,+CLOSED_conj_or_prep : 1200]"},"label":"en"},{"id":"E1e41","source":"E1n4","target":"E1n25","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-210","ws":"[-RANK2 : -10,-LONG6 : -200]"},"label":"S"},{"id":"E1e45","source":"E1n4","target":"E1n6","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1805","ws":"[-RANK1 : -5,+SUBST : 10,+ARG : 1000,+ARG_XCOMP : 800]"},"label":"xcomp"},{"id":"E1e46","source":"E1n4","target":"E1n3","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"2995","ws":"[-RANK1 : -5,+AUX-V : 3000]"},"label":"Infl"},{"id":"E1e47","source":"E1n4","target":"E1n5","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2510","ws":"[-RANK1 : -5,-LONG0 : -5,+LEXICAL : 20,+ARG : 1000,+CLOSED_cl : 1500]"},"label":"object"},{"id":"E1e48","source":"E1n4","target":"E1n1","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2595","ws":"[-RANK2 : -10,-LONG0 : -15,+LEXICAL : 20,+SUBJ : 1100,+CLOSED_cl : 1500]"},"label":"subject"}],"params":""}} ;
var depGraph = new depgraphlib.DepGraph(jQuery("#graph-container"),json_data);
depGraph.viewer.setImageMode(true);
</script>
<h3></h3>
<div id="graph-container-toolbar"></div>
<script>
var json_data = {"graph":{"words":[{"sublabel":["cln","cln"],"#data":{"xcat":"","cat":"cln","tree":"lexical","lemma":"cln","lemmaid":"cln","cluster":"E1c_0_1","left":"0","right":"1","token":"je","lex":"E1F1|Je","form":"je"},"id":"E1n1","label":"je","#position":0},{"sublabel":["cla","cla"],"#data":{"xcat":"","cat":"cla","tree":"lexical","lemma":"cla","lemmaid":"cla","cluster":"E1c_1_2","left":"1","right":"2","token":"l'","lex":"E1F2|l'","form":"l'","alternatives":[{"id":"49","ref_ids":["49"],"#data":{"w":"2510","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"object","source":"E1n4","target":"E1n5"}]},"id":"E1n5","label":"l'","#position":1},{"sublabel":["avoir","aux"],"#data":{"wall":"0","deriv":"d17","xcat":"Infl","cat":"aux","tree":"86 V1VMod:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement aux_verbs shallow_auxiliary aux:verb_agreement V1:verb_agreement_ancestor","lemma":"avoir","lemmaid":"avoir","cluster":"E1c_2_3","left":"2","right":"3","token":"ai","lex":"E1F3|ai","form":"ai"},"id":"E1n3","label":"ai","#position":2},{"sublabel":["voir","v"],"#data":{"wall":"18495","deriv":"d82","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"voir","lemmaid":"voir","cluster":"E1c_3_4","left":"3","right":"4","token":"vu","lex":"E1F4|vu","form":"vu"},"id":"E1n4","label":"vu","#position":3},{"sublabel":["partir","v"],"#data":{"wall":"8805","deriv":"d65","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"partir","lemmaid":"partir","cluster":"E1c_4_5","left":"4","right":"5","token":"partir","lex":"E1F5|partir","form":"partir"},"id":"E1n6","label":"partir","#position":4},{"sublabel":["_","VMod"],"#data":{"wall":"1745 1745","deriv":"d15","xcat":"VMod","cat":"VMod","tree":"313 cnoun_as_adv_on_vmod modifier_after_x modifier_at_S_level modifier_post_vmod shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_5_5","left":"5","right":"5","token":"","lex":"","form":"","alternatives":[{"id":"44","ref_ids":["44"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n28"}]},"id":"E1n28","label":"_","#position":5},{"sublabel":["ce","det"],"#data":{"wall":"0","deriv":"d13","xcat":"det","cat":"det","tree":"0 det","lemma":"ce","lemmaid":"ce","cluster":"E1c_5_6","left":"5","right":"6","token":"ce","lex":"E1F6|ce","form":"ce"},"id":"E1n7","label":"ce","#position":6},{"sublabel":["matin","nc"],"#data":{"wall":"1705","deriv":"d14","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"matin","lemmaid":"matin","cluster":"E1c_6_7","left":"6","right":"7","token":"matin","lex":"E1F7|matin","form":"matin"},"id":"E1n8","label":"matin","#position":7},{"sublabel":["_","S"],"#data":{"wall":"7085","deriv":"d59","xcat":"S","cat":"S","tree":"252 modifier_after_S modifier_after_x modifier_at_S_level shallow_auxiliary simple_participiale_after_S","lemma":"","lemmaid":"","cluster":"E1c_7_7","left":"7","right":"7","token":"","lex":"","form":"","alternatives":[{"id":"50","ref_ids":["50"],"#data":{"w":"-25","virtual":true},"#style":{"link-color":"#FF4040"},"label":"S","source":"E1n4","target":"E1n30"},{"id":"43","ref_ids":["43"],"#data":{"w":"-20","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n30"},{"id":"25","ref_ids":["25"],"#data":{"w":"-15","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n30"},{"id":"20","ref_ids":["20"],"#data":{"w":"-5","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n30"}]},"id":"E1n30","label":"_","#position":8},{"sublabel":["en","prep"],"#data":{"xcat":"","cat":"prep","tree":"lexical","lemma":"en","lemmaid":"en","cluster":"E1c_7_8","left":"7","right":"8","token":"en","lex":"E1F8|en","form":"en","alternatives":[{"id":"34","ref_ids":["34"],"#data":{"w":"665","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"clg","source":"E1n14","target":"E1n18"},{"id":"13","ref_ids":["13"],"#data":{"w":"615","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"cll","source":"E1n14","target":"E1n18"},{"id":"27","ref_ids":["27"],"#data":{"w":"2190","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n18"},{"id":"21","ref_ids":["21"],"#data":{"w":"695","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n18"},{"id":"8","ref_ids":["8"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#409AFF"},"label":"PP","source":"E1n30","target":"E1n18"}]},"id":"E1n18","label":"en","#position":9},{"sublabel":["courir","v"],"#data":{"wall":"3900","deriv":"d55","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"courir","lemmaid":"courir","cluster":"E1c_8_9","left":"8","right":"9","token":"courant","lex":"E1F9|courant","form":"courant","alternatives":[{"id":"22","ref_ids":["22"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#409AFF"},"label":"SubS","source":"E1n30","target":"E1n14"},{"id":"17","ref_ids":["17"],"#data":{"w":"705","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n18","target":"E1n14"},{"id":"16","ref_ids":["16"],"#data":{"w":"-495","virtual":true},"#style":{"link-color":"#409AFF"},"label":"adjP","source":"E1n18","target":"E1n14"}]},"id":"E1n14","label":"courant","#position":10},{"sublabel":["_","VMod"],"#data":{"wall":"3500 3500 3500 3500","deriv":"d5","xcat":"VMod","cat":"VMod","tree":"274 modifier_after_x modifier_at_S_level modifier_post_vmod prep_vmod_modifier shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_9_9","left":"9","right":"9","token":"","lex":"","form":"","alternatives":[{"id":"42","ref_ids":["42"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n26"},{"id":"33","ref_ids":["33"],"#data":{"w":"400","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n14","target":"E1n26"},{"id":"40","ref_ids":["40"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n26"}]},"id":"E1n26","label":"_","#position":11},{"sublabel":["\u00c3\u00a0","prep"],"#data":{"wall":"2305","deriv":"d4","xcat":"PP","cat":"prep","tree":"6 prep_argument","lemma":"\u00c3\u00a0","lemmaid":"\u00c3\u00a0","cluster":"E1c_9_10","left":"9","right":"10","token":"au","lex":"E1F10|au","form":"\u00c3\u00a0","alternatives":[{"id":"32","ref_ids":["32"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n14","target":"E1n19"},{"id":"29","ref_ids":["29"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n14","target":"E1n19"},{"id":"38","ref_ids":["38"],"#data":{"w":"1180","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n30","target":"E1n19"},{"id":"39","ref_ids":["39"],"#data":{"w":"2170","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n19"},{"id":"37","ref_ids":["37"],"#data":{"w":"980","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n19"}]},"id":"E1n19","label":"au","#position":12},{"sublabel":["le","det"],"#data":{"wall":"0","deriv":"d2","xcat":"det","cat":"det","tree":"0 det","lemma":"le","lemmaid":"le","cluster":"E1c_10_11","left":"10","right":"11","token":"au","lex":"E1F10|au","form":"le"},"id":"E1n20","label":"_","#position":13},{"sublabel":["supermarch\u00c3\u00a9","nc"],"#data":{"wall":"1705","deriv":"d3","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"supermarch\u00c3\u00a9","lemmaid":"supermarch\u00c3\u00a9","cluster":"E1c_11_12","left":"11","right":"12","token":"supermarch\u00c3\u00a9","lex":"E1F11|supermarch\u00c3\u00a9","form":"supermarch\u00c3\u00a9","alternatives":[{"id":"30","ref_ids":["30"],"#data":{"w":"600","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n19","target":"E1n21"}]},"id":"E1n21","label":"supermarch\u00c3\u00a9","#position":14},{"sublabel":["_","S"],"#data":{"wall":"-5","deriv":"d1","xcat":"S","cat":"S","tree":"31 shallow_auxiliary spunct_others","lemma":"","lemmaid":"","cluster":"E1c_12_12","left":"12","right":"12","token":"","lex":"","form":""},"id":"E1n25","label":"_","#position":15},{"sublabel":[".","_"],"#data":{"xcat":"","cat":"_","tree":"lexical","lemma":".","lemmaid":".","cluster":"E1c_12_13","left":"12","right":"13","token":".","lex":"E1F12|.","form":"."},"id":"E1n24","label":".","#position":16}],"links":[{"id":"E1e1","source":"E1n25","target":"E1n24","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"-5","ws":"[-RANK1 : -5]"},"label":"void"},{"id":"E1e2","source":"E1n21","target":"E1n20","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e3","source":"E1n19","target":"E1n21","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"600","ws":"[-RANK1 : -5,-LONG0 : -5,+SUBST : 10,+PREP->X : 400,+PREP->n : 200]"},"label":"N2"},{"id":"E1e4","source":"E1n26","target":"E1n19","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1195","ws":"[-RANK1 : -5,+CLOSED_conj_or_prep : 1200]"},"label":"PP"},{"id":"E1e9","source":"E1n8","target":"E1n7","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e10","source":"E1n28","target":"E1n8","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"40","ws":"[-RANK1 : -5,-LONG0 : -5,+time_mod : 50]"},"label":"time_mod"},{"id":"E1e11","source":"E1n6","target":"E1n28","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-5","ws":"[-RANK1 : -5,-incise_on_subS : 0]"},"label":"vmod"},{"id":"E1e26","source":"E1n6","target":"E1n30","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-20","ws":"[-RANK2 : -10,-LONG0 : -10]"},"label":"S"},{"id":"E1e35","source":"E1n14","target":"E1n26","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"400","ws":"[-RANK1 : -5,+PP_V_courir_\u00c3\u00a0 : 5,+V->VMOD->PREP : 400]"},"label":"vmod"},{"id":"E1e23","source":"E1n30","target":"E1n14","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"-10","ws":"[-RANK1 : -5,-LONG0 : -5]"},"label":"SubS"},{"id":"E1e24","source":"E1n30","target":"E1n18","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"3195","ws":"[-RANK1 : -5,+en_as_GERUND : 2000,+CLOSED_conj_or_prep : 1200]"},"label":"en"},{"id":"E1e41","source":"E1n4","target":"E1n25","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-210","ws":"[-RANK2 : -10,-LONG6 : -200]"},"label":"S"},{"id":"E1e45","source":"E1n4","target":"E1n6","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1805","ws":"[-RANK1 : -5,+SUBST : 10,+ARG : 1000,+ARG_XCOMP : 800]"},"label":"xcomp"},{"id":"E1e46","source":"E1n4","target":"E1n3","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"2995","ws":"[-RANK1 : -5,+AUX-V : 3000]"},"label":"Infl"},{"id":"E1e47","source":"E1n4","target":"E1n5","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2510","ws":"[-RANK1 : -5,-LONG0 : -5,+LEXICAL : 20,+ARG : 1000,+CLOSED_cl : 1500]"},"label":"object"},{"id":"E1e48","source":"E1n4","target":"E1n1","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2595","ws":"[-RANK2 : -10,-LONG0 : -15,+LEXICAL : 20,+SUBJ : 1100,+CLOSED_cl : 1500]"},"label":"subject"}],"params":""}} ;
var depGraph = new depgraphlib.DepGraph(jQuery("#graph-container-toolbar"),json_data);
</script>
<h2><a id="section2"></a>2. Graph Data Schema</h2>
For now, DepGraph accept only data in json format. The schema of the format is described below:<br>
<pre>
{
graph:{
words:[
{
id:/*string - REQUIRED id of the word*/,
label:/*string - REQUIRED label of the word*/,
sublabels:[/*array of string - array of sublabels that will be displayed below the label*/, ...]
#data : /*object - other attributes*/,
#style : /*object - style @see def style*/,
},
...
],
links:[
{
target : /*string - REQUIRED word.id or chunk.id*/
source : /*string - REQUIRED word.id or chunk.id*/
label : /*string - REQUIRED visible label name*/,
#data : /*object - other attributes*/,
#style : /*object - style @see def style*/,
},
...
],
chunks:[
{
id:/*string - REQUIRED id of the chunk*/,
elements:[/*array of string - REQUIRED array of words id that compose this chunk*/]
label:/*string - REQUIRED label of the chunk*/,
sublabels:[/*array of string - array of sublabels that will be displayed below the label*/, ...]
#data : /*object - other attributes*/,
#style : /*object - style @see def style*/,
}
],
#style:{
/*
object style define the global style of the graph. object style definition contain css-like style attributes :
- background-color : background-color of the graph
- margin : margin between graph and viewer borders
- font-family : font family of the text
*/
}
#word-style:{
/*
object style define words style of the graph. these values can be overriden in word #style attribute definition.
object style definition contain css-like style attributes :
- margin : margin between words
- sub-margin : margin between sub labels
- font-size : size of font for label
- sub-font-size : size of font of sublabels
- color : color of the label
- sub-color : color of the sublabels
- font-weight : font weight of label
- sub-font-weight : font weight of sublabels
- font-style : font style of label
- sub-font-style : font style of sublabels
- font-family : font family of the text
*/
}
#link-syle:{
/*
object style define links style of the graph. these values can be overriden in link #style attribute definition.
object style definition contain css-like style attributes :
- margin : margin between arcs (roots)
- font-size : font size of label
- color : color of label
- link-color : color of the link (prefer hex color for better highlighting)
- link-size : width size of the links
- font-weight : font weight of label
- font-style : font style of label
- oriented : (default true) true - display arrow at the end of edges, false - don't
- higlighted : (default false) true - hightlight link, false - don't
*/
}
#chunk-style:{
/*
object style define chunks style of the graph. these values can be overriden in chunk #style attribute definition.
object style definition contain css-like style attributes :
- margin : margin between chunks
- sub-margin : margin between label and words contained
- font-size : font size of the label
- sub-font-size : font size of the sublabels
- background-color : background color of the chunk
- color : color of the label
- sub-color : color of the sublabels
- border-color : color of the borders
- font-weight : font weight of the label
- sub-font-weight : font weight of the sublabel
- font-style : font style of the label
- sub-font-style : font style of the sublabel
- border-size : width size of the borders
*/
}
}
}
</pre>
Note that the next version of the format will let you be able to bind values/object together, using referencing
system.
<h2>3. Advanced Options</h2>
Change viewer modes (shrink to content, image mode, borders, ...)
Use toolbar, alt content, tooltip and contextual menu.
<h2>4. Edit Modes</h2>
<h3>Default Mode</h3>
<div id="graph-container2"></div>
<script>
var json_data = {"graph":{"words":[{"sublabel":["cln","cln"],"#data":{"xcat":"","cat":"cln","tree":"lexical","lemma":"cln","lemmaid":"cln","cluster":"E1c_0_1","left":"0","right":"1","token":"je","lex":"E1F1|Je","form":"je"},"id":"E1n1","label":"je","#position":0},{"sublabel":["cla","cla"],"#data":{"xcat":"","cat":"cla","tree":"lexical","lemma":"cla","lemmaid":"cla","cluster":"E1c_1_2","left":"1","right":"2","token":"l'","lex":"E1F2|l'","form":"l'","alternatives":[{"id":"49","ref_ids":["49"],"#data":{"w":"2510","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"object","source":"E1n4","target":"E1n5"}]},"id":"E1n5","label":"l'","#position":1},{"sublabel":["avoir","aux"],"#data":{"wall":"0","deriv":"d17","xcat":"Infl","cat":"aux","tree":"86 V1VMod:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement aux_verbs shallow_auxiliary aux:verb_agreement V1:verb_agreement_ancestor","lemma":"avoir","lemmaid":"avoir","cluster":"E1c_2_3","left":"2","right":"3","token":"ai","lex":"E1F3|ai","form":"ai"},"id":"E1n3","label":"ai","#position":2},{"sublabel":["voir","v"],"#data":{"wall":"18495","deriv":"d82","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"voir","lemmaid":"voir","cluster":"E1c_3_4","left":"3","right":"4","token":"vu","lex":"E1F4|vu","form":"vu"},"id":"E1n4","label":"vu","#position":3},{"sublabel":["partir","v"],"#data":{"wall":"8805","deriv":"d65","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"partir","lemmaid":"partir","cluster":"E1c_4_5","left":"4","right":"5","token":"partir","lex":"E1F5|partir","form":"partir"},"id":"E1n6","label":"partir","#position":4},{"sublabel":["_","VMod"],"#data":{"wall":"1745 1745","deriv":"d15","xcat":"VMod","cat":"VMod","tree":"313 cnoun_as_adv_on_vmod modifier_after_x modifier_at_S_level modifier_post_vmod shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_5_5","left":"5","right":"5","token":"","lex":"","form":"","alternatives":[{"id":"44","ref_ids":["44"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n28"}]},"id":"E1n28","label":"_","#position":5},{"sublabel":["ce","det"],"#data":{"wall":"0","deriv":"d13","xcat":"det","cat":"det","tree":"0 det","lemma":"ce","lemmaid":"ce","cluster":"E1c_5_6","left":"5","right":"6","token":"ce","lex":"E1F6|ce","form":"ce"},"id":"E1n7","label":"ce","#position":6},{"sublabel":["matin","nc"],"#data":{"wall":"1705","deriv":"d14","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"matin","lemmaid":"matin","cluster":"E1c_6_7","left":"6","right":"7","token":"matin","lex":"E1F7|matin","form":"matin"},"id":"E1n8","label":"matin","#position":7},{"sublabel":["_","S"],"#data":{"wall":"7085","deriv":"d59","xcat":"S","cat":"S","tree":"252 modifier_after_S modifier_after_x modifier_at_S_level shallow_auxiliary simple_participiale_after_S","lemma":"","lemmaid":"","cluster":"E1c_7_7","left":"7","right":"7","token":"","lex":"","form":"","alternatives":[{"id":"50","ref_ids":["50"],"#data":{"w":"-25","virtual":true},"#style":{"link-color":"#FF4040"},"label":"S","source":"E1n4","target":"E1n30"},{"id":"43","ref_ids":["43"],"#data":{"w":"-20","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n30"},{"id":"25","ref_ids":["25"],"#data":{"w":"-15","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n30"},{"id":"20","ref_ids":["20"],"#data":{"w":"-5","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n30"}]},"id":"E1n30","label":"_","#position":8},{"sublabel":["en","prep"],"#data":{"xcat":"","cat":"prep","tree":"lexical","lemma":"en","lemmaid":"en","cluster":"E1c_7_8","left":"7","right":"8","token":"en","lex":"E1F8|en","form":"en","alternatives":[{"id":"34","ref_ids":["34"],"#data":{"w":"665","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"clg","source":"E1n14","target":"E1n18"},{"id":"13","ref_ids":["13"],"#data":{"w":"615","virtual":true},"#style":{"link-color":"#FF73E4"},"label":"cll","source":"E1n14","target":"E1n18"},{"id":"27","ref_ids":["27"],"#data":{"w":"2190","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n18"},{"id":"21","ref_ids":["21"],"#data":{"w":"695","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n18"},{"id":"8","ref_ids":["8"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#409AFF"},"label":"PP","source":"E1n30","target":"E1n18"}]},"id":"E1n18","label":"en","#position":9},{"sublabel":["courir","v"],"#data":{"wall":"3900","deriv":"d55","xcat":"S","cat":"v","tree":"354 V1VMod:agreement arg0:caimp:agreement clsubj:agreement clsubj_alt:agreement clsubj_il:agreement clsubj_ilimp:agreement arg0:ilimp:agreement arg0:imp_subj_alt:agreement ante:clitic_sequence post:clitic_sequence clitics arg1:collect_real_arg arg2:collect_real_arg arg0:collect_real_subject arg1:real_group_comp arg2:real_group_comp ncpred:real_group_comp arg0:PP:true_subject arg0:cl:true_subject arg0:noun:true_subject arg0:post_PP:true_subject arg0:post_noun:true_subject arg0:post_s:true_subject arg0:post_v:true_subject arg0:s:true_subject arg0:v:true_subject v_with_subcat Infl:verb_agreement V:verb_agreement v:verb_agreement V1:verb_agreement_ancestor arg1:verb_argument_other arg2:verb_argument_other arg0:verb_argument_subject verb_canonical verb_categorization_active","lemma":"courir","lemmaid":"courir","cluster":"E1c_8_9","left":"8","right":"9","token":"courant","lex":"E1F9|courant","form":"courant","alternatives":[{"id":"22","ref_ids":["22"],"#data":{"w":"-10","virtual":true},"#style":{"link-color":"#409AFF"},"label":"SubS","source":"E1n30","target":"E1n14"},{"id":"17","ref_ids":["17"],"#data":{"w":"705","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n18","target":"E1n14"},{"id":"16","ref_ids":["16"],"#data":{"w":"-495","virtual":true},"#style":{"link-color":"#409AFF"},"label":"adjP","source":"E1n18","target":"E1n14"}]},"id":"E1n14","label":"courant","#position":10},{"sublabel":["_","VMod"],"#data":{"wall":"3500 3500 3500 3500","deriv":"d5","xcat":"VMod","cat":"VMod","tree":"274 modifier_after_x modifier_at_S_level modifier_post_vmod prep_vmod_modifier shallow_auxiliary","lemma":"","lemmaid":"","cluster":"E1c_9_9","left":"9","right":"9","token":"","lex":"","form":"","alternatives":[{"id":"42","ref_ids":["42"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n4","target":"E1n26"},{"id":"33","ref_ids":["33"],"#data":{"w":"400","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n14","target":"E1n26"},{"id":"40","ref_ids":["40"],"#data":{"w":"-35","virtual":true},"#style":{"link-color":"#FF4040"},"label":"vmod","source":"E1n6","target":"E1n26"}]},"id":"E1n26","label":"_","#position":11},{"sublabel":["\u00c3\u00a0","prep"],"#data":{"wall":"2305","deriv":"d4","xcat":"PP","cat":"prep","tree":"6 prep_argument","lemma":"\u00c3\u00a0","lemmaid":"\u00c3\u00a0","cluster":"E1c_9_10","left":"9","right":"10","token":"au","lex":"E1F10|au","form":"\u00c3\u00a0","alternatives":[{"id":"32","ref_ids":["32"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n14","target":"E1n19"},{"id":"29","ref_ids":["29"],"#data":{"w":"1195","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n14","target":"E1n19"},{"id":"38","ref_ids":["38"],"#data":{"w":"1180","virtual":true},"#style":{"link-color":"#FF4040"},"label":"adjP","source":"E1n30","target":"E1n19"},{"id":"39","ref_ids":["39"],"#data":{"w":"2170","virtual":true},"#style":{"link-color":"#409AFF"},"label":"preparg","source":"E1n6","target":"E1n19"},{"id":"37","ref_ids":["37"],"#data":{"w":"980","virtual":true},"#style":{"link-color":"#FF4040"},"label":"N2","source":"E1n8","target":"E1n19"}]},"id":"E1n19","label":"au","#position":12},{"sublabel":["le","det"],"#data":{"wall":"0","deriv":"d2","xcat":"det","cat":"det","tree":"0 det","lemma":"le","lemmaid":"le","cluster":"E1c_10_11","left":"10","right":"11","token":"au","lex":"E1F10|au","form":"le"},"id":"E1n20","label":"_","#position":13},{"sublabel":["supermarch\u00c3\u00a9","nc"],"#data":{"wall":"1705","deriv":"d3","xcat":"N2","cat":"nc","tree":"80 anchor:agreement n:agreement cnoun_leaf","lemma":"supermarch\u00c3\u00a9","lemmaid":"supermarch\u00c3\u00a9","cluster":"E1c_11_12","left":"11","right":"12","token":"supermarch\u00c3\u00a9","lex":"E1F11|supermarch\u00c3\u00a9","form":"supermarch\u00c3\u00a9","alternatives":[{"id":"30","ref_ids":["30"],"#data":{"w":"600","virtual":true},"#style":{"link-color":"#409AFF"},"label":"N2","source":"E1n19","target":"E1n21"}]},"id":"E1n21","label":"supermarch\u00c3\u00a9","#position":14},{"sublabel":["_","S"],"#data":{"wall":"-5","deriv":"d1","xcat":"S","cat":"S","tree":"31 shallow_auxiliary spunct_others","lemma":"","lemmaid":"","cluster":"E1c_12_12","left":"12","right":"12","token":"","lex":"","form":""},"id":"E1n25","label":"_","#position":15},{"sublabel":[".","_"],"#data":{"xcat":"","cat":"_","tree":"lexical","lemma":".","lemmaid":".","cluster":"E1c_12_13","left":"12","right":"13","token":".","lex":"E1F12|.","form":"."},"id":"E1n24","label":".","#position":16}],"links":[{"id":"E1e1","source":"E1n25","target":"E1n24","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"-5","ws":"[-RANK1 : -5]"},"label":"void"},{"id":"E1e2","source":"E1n21","target":"E1n20","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e3","source":"E1n19","target":"E1n21","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"600","ws":"[-RANK1 : -5,-LONG0 : -5,+SUBST : 10,+PREP->X : 400,+PREP->n : 200]"},"label":"N2"},{"id":"E1e4","source":"E1n26","target":"E1n19","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1195","ws":"[-RANK1 : -5,+CLOSED_conj_or_prep : 1200]"},"label":"PP"},{"id":"E1e9","source":"E1n8","target":"E1n7","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1705","ws":"[-RANK1 : -5,+SUBST : 10,+CLOSED_det : 1700]"},"label":"det"},{"id":"E1e10","source":"E1n28","target":"E1n8","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"40","ws":"[-RANK1 : -5,-LONG0 : -5,+time_mod : 50]"},"label":"time_mod"},{"id":"E1e11","source":"E1n6","target":"E1n28","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-5","ws":"[-RANK1 : -5,-incise_on_subS : 0]"},"label":"vmod"},{"id":"E1e26","source":"E1n6","target":"E1n30","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-20","ws":"[-RANK2 : -10,-LONG0 : -10]"},"label":"S"},{"id":"E1e35","source":"E1n14","target":"E1n26","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"400","ws":"[-RANK1 : -5,+PP_V_courir_\u00c3\u00a0 : 5,+V->VMOD->PREP : 400]"},"label":"vmod"},{"id":"E1e23","source":"E1n30","target":"E1n14","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"-10","ws":"[-RANK1 : -5,-LONG0 : -5]"},"label":"SubS"},{"id":"E1e24","source":"E1n30","target":"E1n18","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"3195","ws":"[-RANK1 : -5,+en_as_GERUND : 2000,+CLOSED_conj_or_prep : 1200]"},"label":"en"},{"id":"E1e41","source":"E1n4","target":"E1n25","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"-210","ws":"[-RANK2 : -10,-LONG6 : -200]"},"label":"S"},{"id":"E1e45","source":"E1n4","target":"E1n6","#style":{"link-color":"#409AFF"},"#data":{"type":"subst","w":"1805","ws":"[-RANK1 : -5,+SUBST : 10,+ARG : 1000,+ARG_XCOMP : 800]"},"label":"xcomp"},{"id":"E1e46","source":"E1n4","target":"E1n3","#style":{"link-color":"#FF4040"},"#data":{"type":"adj","w":"2995","ws":"[-RANK1 : -5,+AUX-V : 3000]"},"label":"Infl"},{"id":"E1e47","source":"E1n4","target":"E1n5","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2510","ws":"[-RANK1 : -5,-LONG0 : -5,+LEXICAL : 20,+ARG : 1000,+CLOSED_cl : 1500]"},"label":"object"},{"id":"E1e48","source":"E1n4","target":"E1n1","#style":{"link-color":"#FF73E4"},"#data":{"type":"lexical","w":"2595","ws":"[-RANK2 : -10,-LONG0 : -15,+LEXICAL : 20,+SUBJ : 1100,+CLOSED_cl : 1500]"},"label":"subject"}],"params":""}} ;
var depGraph = new depgraphlib.DepGraph(jQuery("#graph-container2"),json_data);
depGraph.editObject.setEditMode('default');
depGraph.viewer.setFixedToolbar();
</script>
<h3>Creating custom edit modes</h3>
see FRMGEditMode <br>
otherwise, code is open source, so feel free to add your own callback to 'vis.selectAll(g.links)' (for instance)
<h4>Required Callbacks</h4>
<h4>More Options</h4>
Loading a model :
<pre>
var model = {
words : [{name:label,values:[a,b,c],value-restrict:false,onchange:function(depgraph,label){}}]
}
depgraph.editObject.loadModel(model);
</pre>
</body>
</html>