blob: 771b206d2e93c440864970ca14ba14b4270647ea [file] [log] [blame]
Nils Diewalda944fab2015-04-08 21:02:04 +00001var snippet = "<span title=\"cnx/l:meist\">" +
2 " <span title=\"cnx/p:ADV\">" +
3 " <span title=\"cnx/syn:@PREMOD\">" +
4 " <span title=\"mate/l:meist\">" +
5 " <span title=\"mate/p:ADV\">" +
6 " <span title=\"opennlp/p:ADV\">meist</span>" +
7 " </span>" +
8 " </span>" +
9 " </span>" +
10 " </span>" +
11 "</span>" +
12 "<span title=\"cnx/l:deutlich\">" +
13 " <span title=\"cnx/p:A\">" +
14 " <span title=\"cnx/syn:@PREMOD\">" +
15 " <span title=\"mate/l:deutlich\">" +
16 " <span title=\"mate/m:degree:pos\">" +
Akron4e47d0b2017-07-03 17:58:37 +020017 " <span title=\"mate/m:case:nom\">" +
18 " <span title=\"mate/p:ADJD\">" +
19 " <span title=\"opennlp/p:ADJD\">deutlich</span>" +
20 " </span>" +
Nils Diewalda944fab2015-04-08 21:02:04 +000021 " </span>" +
22 " </span>" +
23 " </span>" +
24 " </span>" +
25 " </span>" +
26 "</span>" +
27 "<span title=\"cnx/l:fähig\">" +
28 " <span title=\"cnx/l:leistung\">" +
29 " <span title=\"cnx/p:A\">" +
30 " <span title=\"cnx/syn:@NH\">" +
31 " <span title=\"mate/l:leistungsfähig\">" +
32 " <span title=\"mate/m:degree:comp\">" +
33 " <span title=\"mate/p:ADJD\">" +
34 " <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
35 " </span>" +
36 " </span>" +
37 " </span>" +
38 " </span>" +
39 " </span>" +
40 " </span>" +
41 "</span>";
42
43var treeSnippet =
44 "<span class=\"context-left\"></span>" +
45 "<span class=\"match\">" +
46 " <span title=\"xip/c:MC\">" +
47 " <span title=\"xip/c:TOP\">" +
48 " <span title=\"xip/c:PP\">" +
49 " <span title=\"xip/c:PREP\">Mit</span>" +
50 " <span title=\"xip/c:NP\">" +
51 " <span title=\"xip/c:DET\">dieser</span>" +
52 " <span title=\"xip/c:NPA\">" +
53 " <span title=\"xip/c:NOUN\">Methode</span>" +
54 " </span>" +
55 " </span>" +
56 " </span>" +
57 " <span title=\"xip/c:VERB\">ist</span>" +
58 " <span title=\"xip/c:NP\">" +
59 " <span title=\"xip/c:PRON\">es</span>" +
60 " </span>" +
61 " <span title=\"xip/c:AP\">" +
62 " <span title=\"xip/c:ADV\">nun</span>" +
63 " <span title=\"xip/c:ADJ\">möglich</span>" +
64 " </span>" +
65 " <span title=\"xip/c:ADV\">z. B.</span>" +
66 " <span title=\"xip/c:NPA\">" +
67 " <span title=\"xip/c:NP\">" +
68 " <span title=\"xip/c:NOUN\">Voice</span>" +
69 " </span>" +
70 " </span>" + "(" +
71 " <span title=\"xip/c:INS\">" +
72 " <span title=\"xip/c:NPA\">" +
73 " <span title=\"xip/c:NP\">" +
74 " <span title=\"xip/c:NOUN\">Sprache</span>" +
75 " </span>" +
76 " </span>" +
77 " </span>" + ")" +
78 " <span title=\"xip/c:VERB\">bevorzugt</span>" +
79 " <span title=\"xip/c:PP\">" +
80 " <span title=\"xip/c:PREP\">in</span>" +
81 " <span title=\"xip/c:NP\">" +
82 " <span title=\"xip/c:PRON\">der</span>" +
83 " </span>" +
84 " <span title=\"xip/c:NPA\">" +
85 " <span title=\"xip/c:NP\">" +
86 " <span title=\"xip/c:NOUN\">Bridge</span>" +
87 " </span>" +
88 " </span>" +
89 " </span>" +
90 " <span title=\"xip/c:INFC\">" +
91 " <span title=\"xip/c:INS\">" +
92 " <span title=\"xip/c:VERB\">weiterzugeben</span>" +
93 " </span>" +
94 " </span>" +
95 " </span>" +
96 " </span>" +
97 "</span>" +
98 "<span class=\"context-right\"></span>";
99
100var treeSnippet2 =
101 "<span class=\"context-left\"><\/span>"+
102 "<span class=\"match\">"+
103 "<span title=\"xip\/c:NPA\">"+
104 "<span title=\"xip\/c:NP\">"+
105 "<span title=\"xip\/c:NOUN\">HDTV<\/span>"+
106 "<\/span>"+
107 "<\/span> "+
108 "<span title=\"xip\/c:NPA\">" +
109 "<span title=\"xip\/c:NP\">"+
110 "<span title=\"xip\/c:NOUN\">Samples<\/span>"+
111 "<\/span>"+
112 "<\/span> "+
113 "<span title=\"xip\/c:ADV\">from<\/span> "+
114 "<span title=\"xip\/c:NPA\">"+
115 "<span title=\"xip\/c:NP\">"+
116 "<span title=\"xip\/c:NOUN\">European<\/span>"+
117 "<\/span>"+
118 "<\/span> ("+
119 "<span title=\"xip\/c:INS\">"+
120 "<span title=\"xip\/c:NPA\">"+
121 "<span title=\"xip\/c:NP\">"+
122 "<span title=\"xip\/c:NOUN\">and<\/span>"+
123 "<\/span>"+
124 "<\/span> "+
125 "<span title=\"xip\/c:ADV\">other<\/span>"+
126 "<\/span>) "+
127 "<span title=\"xip\/c:ADV\">broadcasters<\/span> "+
128 "<span title=\"xip\/c:NPA\">"+
129 "<span title=\"xip\/c:NP\">"+
130 "<span title=\"xip\/c:NOUN\">and<\/span>"+
131 "<\/span>"+
132 "<\/span> "+
133 "<span title=\"xip\/c:VERB\">test<\/span> "+
134 "<span title=\"xip\/c:ADV\">transmissions<\/span> "+
135 "<span title=\"xip\/c:PREP\">in<\/span> "+
136 "<span title=\"xip\/c:NOUN\">Europe<\/span>"+
137 "<\/span>"+
138 "<span class=\"context-right\"><\/span>";
139
Akron0988d882017-11-10 16:13:12 +0100140var relSnippet =
141 "<span class=\"context-left\"></span>" +
142 "<span class=\"match\">" +
143 " <span xml:id=\"token-GOE/AGA/01784-p199\">" +
144 " <span xlink:title=\"malt/d:ADV\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">dann</span>" +
145 " </span>" +
146 " zog " +
147 " <span xlink:title=\"malt/d:SUBJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">ich</span>" +
148 " <span xml:id=\"token-GOE/AGA/01784-p202\">" +
149 " <span xlink:title=\"malt/d:OBJA\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">mich</span>" +
150 " </span>" +
151 " <span xlink:title=\"malt/d:PP\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">gegen</span>" +
152 " <span xml:id=\"token-GOE/AGA/01784-p204\">" +
153 " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p204\">das</span>" +
154 " </span>" +
155 " <span xlink:title=\"malt/d:PN\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p202\">Regiment</span>" +
156 " <span xml:id=\"token-GOE/AGA/01784-p206\">" +
157 " <span xlink:title=\"malt/d:AVZ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">zurück</span>" +
158 " </span>" +
159 " <span xml:id=\"token-GOE/AGA/01784-p207\">" +
160 " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">und</span>" +
161 " </span>" +
162 " <span xml:id=\"token-GOE/AGA/01784-p208\">" +
163 " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p206\">war</span>" +
164 " </span>" +
165 " <span xlink:title=\"malt/d:AUX\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p207\">bemüht</span>" +
166 "," +
167 " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p211\">einige</span>" +
168 " <span xml:id=\"token-GOE/AGA/01784-p211\">" +
169 " <span xlink:title=\"malt/d:ATTR\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p211\">genaue</span>" +
170 " </span>" +
171 " <span xml:id=\"token-GOE/AGA/01784-p212\">" +
172 " <span xlink:title=\"malt/d:OBJA\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">Umrisse</span>" +
173 " </span>" +
174 " <span xlink:title=\"malt/d:OBJP\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">aufs</span>" +
175 " <span xlink:title=\"malt/d:PN\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p212\">Papier</span>" +
176 " <span xml:id=\"token-GOE/AGA/01784-p215\">" +
177 " <span xlink:title=\"malt/d:PART\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">zu</span>" +
178 " </span>" +
179 " <span xlink:title=\"malt/d:OBJI\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p208\">bringen</span>" +
180 ", um mir " +
181 " <span xml:id=\"token-GOE/AGA/01784-p219\">" +
182 " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">die</span>" +
183 " </span>" +
184 " <span xml:id=\"token-GOE/AGA/01784-p220\">Bezüge</span>" +
185 " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">und</span>" +
186 " <span xml:id=\"token-GOE/AGA/01784-p222\">" +
187 " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p222\">die</span>" +
188 " </span>" +
189 " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p220\">Distanzen</span>" +
190 " <mark>" +
191 " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p225\">der</span>" +
192 " </mark>" +
193 " <span xml:id=\"token-GOE/AGA/01784-p225\">" +
194 " <span xlink:title=\"malt/d:ATTR\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p225\">landschaftlichen</span>" +
195 " </span>" +
196 " <span xml:id=\"token-GOE/AGA/01784-p226\">" +
197 " <span xlink:title=\"malt/d:GMOD\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p222\">Gegenstände</span>" +
198 " </span>" +
199 " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">desto</span>" +
200 " <span xlink:title=\"malt/d:ADV\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p229\">besser</span>" +
201 " <span xml:id=\"token-GOE/AGA/01784-p229\">" +
202 " <span xlink:title=\"malt/d:PART\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p229\">zu</span>" +
203 " </span>" +
204 " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p226\">imprimieren</span>" +
205 "</span>" +
206 "<span class=\"context-right\"></span>";
207
208
Nils Diewalda944fab2015-04-08 21:02:04 +0000209var menuContent = [
210 ['cnx/c', 'cnx', 'c'],
211 ['mate/c', 'mate', 'c'],
212 ['base/c', 'base', 'c'],
213 ['xip/c', 'xip', 'c'],
214 ['tt/c', 'tt', 'c']
215];
216
217var namedEntities = [
218 ["I-LOC", "I-LOC ", "Location"],
219 ["I-MISC", "I-MISC ", "Miscellaneous"],
220 ["I-ORG", "I-ORG ", "Organization"],
221 ["I-PER", "I-PER ", "Person"]
222];
223
224// http://www.ids-mannheim.de/cosmas2/projekt/referenz/stts/morph.html
225// http://nachhalt.sfb632.uni-potsdam.de/owl-docu/stts.html
226var sttsArray = [
227 // "$.", "$(", "$,"
228 ["ADJA","ADJA ", "Attributive Adjective"],
229 ["ADJD","ADJD ", "Predicative Adjective"],
230 ["ADV","ADV ", "Adverb"],
231 ["APPO","APPO ", "Postposition"],
232 ["APPR","APPR ", "Preposition"],
233 ["APPRART","APPRART ", "Preposition with Determiner"],
234 ["APZR","APZR ","Right Circumposition"],
235 ["ART","ART ", "Determiner"],
236 ["CARD","CARD ", "Cardinal Number"],
237 ["FM","FM ", "Foreign Material"],
238 ["ITJ","ITJ ", "Interjection"],
239 ["KOKOM","KOKOM ", "Comparison Particle"],
240 ["KON","KON ", "Coordinating Conjuncion"],
241 ["KOUI","KOUI ", "Subordinating Conjunction with 'zu'"],
242 ["KOUS","KOUS ", "Subordinating Conjunction with Sentence"],
243 ["NE","NE ", "Named Entity"],
244 ["NN","NN ", "Normal Nomina"],
245 ["PAV", "PAV ", "Pronominal Adverb"],
246 ["PDAT","PDAT ","Attributive Demonstrative Pronoun"],
247 ["PDS","PDS ", "Substitutive Demonstrative Pronoun"],
248 ["PIAT","PIAT ", "Attributive Indefinite Pronoun without Determiner"],
249 ["PIDAT","PIDAT ", "Attributive Indefinite Pronoun with Determiner"],
250 ["PIS","PIS ", "Substitutive Indefinite Pronoun"],
251 ["PPER","PPER ", "Personal Pronoun"],
252 ["PPOSAT","PPOSAT ", "Attributive Possessive Pronoun"],
253 ["PPOSS","PPOSS ", "Substitutive Possessive Pronoun"],
254 ["PRELAT","PRELAT ", "Attributive Relative Pronoun"],
255 ["PRELS","PRELS ", "Substitutive Relative Pronoun"],
256 ["PRF","PRF ", "Reflexive Pronoun"],
257 ["PROAV","PROAV ", "Pronominal Adverb"],
258 ["PTKA","PTKA ","Particle with Adjective"],
259 ["PTKANT","PTKANT ", "Answering Particle"],
260 ["PTKNEG","PTKNEG ", "Negation Particle"],
261 ["PTKVZ","PTKVZ ", "Separated Verbal Particle"],
262 ["PTKZU","PTKZU ", "'zu' Particle"],
263 ["PWAT","PWAT ", "Attributive Interrogative Pronoun"],
264 ["PWAV","PWAV ", "Adverbial Interrogative Pronoun"],
265 ["PWS","PWS ", "Substitutive Interrogative Pronoun"],
266 ["TRUNC","TRUNC ","Truncated"],
267 ["VAFIN","VAFIN ", "Auxiliary Finite Verb"],
268 ["VAINF","VAINF ", "Auxiliary Infinite Verb"],
269 ["VAIMP","VAIMP ", "Auxiliary Finite Imperative Verb"],
270 ["VAPP","VAPP ", "Auxiliary Perfect Participle"],
271 ["VMFIN","VMFIN ", "Modal Finite Verb"],
272 ["VMINF","VMINF ", "Modal Infinite Verb"],
273 ["VMPP","VMPP ", "Modal Perfect Participle"],
274 ["VVFIN","VVFIN ","Finite Verb"],
275 ["VVIMP","VVIMP ", "Finite Imperative Verb"],
276 ["VVINF","VVINF ", "Infinite Verb"],
277 ["VVIZU","VVIZU ", "Infinite Verb with 'zu'"],
278 ["VVPP","VVPP ", "Perfect Participle"],
279 ["XY", "XY ", "Non-Word"]
280];
281
282var mateSttsArray = sttsArray.slice(0);
283mateSttsArray.push(
284 ["<root-POS>","<root-POS>","Root Part of Speech"]
285);
286
Nils Diewalda944fab2015-04-08 21:02:04 +0000287var vcExample = {
288 "@type":"koral:docGroup",
289 "operation":"operation:or",
290 "operands":[
291 {
292 "@type":"koral:docGroup",
293 "operation":"operation:and",
294 "operands":[
295 {
296 "@type":"koral:doc",
Nils Diewald6283d692015-04-23 20:32:53 +0000297 "key":"title",
Nils Diewalda944fab2015-04-08 21:02:04 +0000298 "value":"Der Birnbaum",
299 "match":"match:eq"
300 },
301 {
302 "@type":"koral:doc",
Nils Diewald6283d692015-04-23 20:32:53 +0000303 "key":"pubPlace",
Nils Diewalda944fab2015-04-08 21:02:04 +0000304 "value":"Mannheim",
305 "match":"match:eq"
306 },
307 {
308 "@type":"koral:docGroup",
309 "operation":"operation:or",
310 "operands":[
311 {
312 "@type":"koral:doc",
Nils Diewald6283d692015-04-23 20:32:53 +0000313 "key":"subTitle",
Nils Diewalda944fab2015-04-08 21:02:04 +0000314 "value":"Aufzucht und Pflege",
315 "match":"match:eq"
316 },
317 {
318 "@type":"koral:doc",
Nils Diewald6283d692015-04-23 20:32:53 +0000319 "key":"subTitle",
Nils Diewalda944fab2015-04-08 21:02:04 +0000320 "value":"Gedichte",
321 "match":"match:eq",
322 "rewrites" : [
323 {
324 "@type": "koral:rewrite",
325 "src" : "policy",
326 "operation" : "operation:injection",
327 }
328 ]
329 }
330 ]
331 }
332 ]
333 },
334 {
335 "@type":"koral:doc",
Nils Diewald6283d692015-04-23 20:32:53 +0000336 "key":"pubDate",
Nils Diewalda944fab2015-04-08 21:02:04 +0000337 "type":"type:date",
338 "value":"2015-03-05",
339 "match":"match:geq"
340 }
341 ]
342};
343
Nils Diewald0e6992a2015-04-14 20:13:52 +0000344var hintArray = {
Nils Diewalda944fab2015-04-08 21:02:04 +0000345 "-" : [
346 ["Connexor", "cnx/", "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
347 ["CoreNLP", "corenlp/", "Named Entities"],
348 ["Mate", "mate/", "Lemma, Morphology, Part-of-Speech"],
349 ["OpenNLP", "opennlp/", "Part-of-Speech"],
350 ["TreeTagger", "tt/", "Lemma, Part-of-Speech"],
351 ["Xerox Parser", "xip/", "Constituency, Lemma, Part-of-Speech"]
352 ],
353 "corenlp/" : [
354 ["Named Entity", "ne=" , "Combined"],
355 ["Named Entity", "ne_dewac_175m_600=" , "ne_dewac_175m_600"],
356 ["Named Entity", "ne_hgc_175m_600=", "ne_hgc_175m_600"]
357 ],
358 "corenlp/ne=" : namedEntities,
359 "corenlp/ne_dewac_175m_600=" : namedEntities,
360 "corenlp/ne_hgc_175m_600=" : namedEntities,
361 "cnx/" : [
362 ["Constituency", "c="],
363 ["Lemma", "l="],
364 ["Morphology", "m="],
365 ["Part-of-Speech", "p="],
366 ["Syntax", "syn="]
367 ],
368 "cnx/c=" : [
369 ["np", "np ", "Nominal Phrase"]
370 ],
371 // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
372 "cnx/m=" : [
373 ["Abbr","Abbr ", "Nouns: Abbreviation"],
374 ["CMP","CMP ", "Adjective: Comparative"],
375 ["IMP", "IMP ", "Mood: Imperative"],
376 ["IND", "IND ", "Mood: Indicative"],
377 ["INF", "INF ", "Infinitive"],
378 ["ORD","ORD ", "Numeral: Ordinal"],
379 ["PAST", "PAST ", "Tense: past"],
380 ["PCP", "PCP ", "Participle"],
381 ["PERF", "PERF ", "Perfective Participle"],
382 ["PL","PL ", "Nouns: Plural"],
383 ["PRES", "PRES ", "Tense: present"],
384 ["PROG", "PROG ", "Progressive Participle"],
385 ["Prop","Prop ", "Nouns: Proper Noun"],
386 ["SUB", "SUB ", "Mood: Subjunctive"],
387 ["SUP","SUP ", "Adjective: Superlative"]
388 ],
389 // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/morph.html
390 "cnx/p=" : [
391 ["A", "A ", "Adjective"],
392 ["ADV", "ADV ", "Adverb"],
393 ["CC", "CC ", "Coordination Marker"],
394 ["CS", "CS ", "Clause Marker"],
395 ["DET", "DET ", "Determiner"],
396 ["INTERJ", "INTERJ ", "Interjection"],
397 ["N", "N ", "Noun"],
398 ["NUM", "NUM ", "Numeral"],
399 ["PREP", "PREP ", "Preposition"],
400 ["PRON", "PRON ", "Pro-Nominal"],
401 ["V", "V ", "Verb"]
402 ],
403 // http://www.ids-mannheim.de/cosmas2/projekt/referenz/connexor/syntax.html
404 "cnx/syn=" : [
405 ["@ADVL", "@ADVL ", "Adverbial Head"],
406 ["@AUX", "@AUX ", "Auxiliary Verb"],
407 ["@CC", "@CC ", "Coordination"]
408 ["@MAIN", "@MAIN ", "Main Verb"],
409 ["@NH", "@NH ", "Nominal Head"],
410 ["@POSTMOD", "@POSTMOD ", "Postmodifier"],
411 ["@PREMARK", "@PREMARK ", "Preposed Marker"],
412 ["@PREMOD", "@POSTMOD ", "Premodifier"]
413 ],
414 "opennlp/" : [
415 ["Part-of-Speech", "p="]
416 ],
417 "opennlp/p=" : sttsArray,
418 "xip/" : [
419 ["Constituency", "c="],
420 // Inactive: ["Dependency", "d="],
421 ["Lemma", "l="],
422 ["Part-of-Speech", "p="],
423 ],
424 // "xip/c=" : [],
425 // Inactive: "xip/d=" : [],
426 // "xip/p=" : [],
427 "tt/" : [
428 ["Lemma", "l="],
429 ["Part-of-Speech", "p="]
430 ],
431 "tt/p=" : sttsArray,
432 "mate/" : [
433 // Inactive: "d" : ["d=", "Dependency"],
434 ["Lemma", "l="],
435 ["Morphology", "m="],
436 ["Part-of-Speech", "p="]
437 ],
438 // Inactive: mate/d=
439 "mate/p=" : mateSttsArray,
440 "mate/m=" : [
441 ["Case", "case:"],
442 ["Degree", "degree:"],
443 ["Gender", "gender:"],
444 ["Mood", "mood:"],
445 ["Number", "number:"],
446 ["Person", "person:"],
447 ["Tense","tense:"],
448 ["No type", "<no-type> "]
449 ],
450 "mate/m=case:" : [
451 ["acc", "acc ", "Accusative"],
452 ["dat","dat ", "Dative"],
453 ["gen", "gen ","Genitive"],
454 ["nom","nom ", "Nominative"],
455 ["*","* ", "Undefined"]
456 ],
457 "mate/m=degree:" : [
458 ["comp","comp ", "Comparative"],
459 ["pos","pos ", "Positive"],
460 ["sup","sup ", "Superative"]
461 ],
462 "mate/m=gender:" : [
463 ["fem", "fem ", "Feminium"],
464 ["masc", "masc ", "Masculinum"],
465 ["neut","neut ", "Neuter"],
466 ["*","* ","Undefined"]
467 ],
468 "mate/m=mood:" : [
469 ["imp","imp ", "Imperative"],
470 ["ind","ind ", "Indicative"],
471 ["subj","subj ", "Subjunctive"]
472 ],
473 "mate/m=number:" : [
474 ["pl","pl ","Plural"],
475 ["sg","sg ","Singular"],
476 ["*","* ","Undefined"]
477 ],
478 "mate/m=person:" : [
479 ["1","1 ", "First Person"],
480 ["2","2 ", "Second Person"],
481 ["3","3 ", "Third Person"]
482 ],
483 "mate/m=tense:" : [
484 ["past","past ", "Past"],
485 ["pres","pres ", "Present"]
486 ]
487};
488
Nils Diewald845282c2015-05-14 07:53:03 +0000489var queryExample = {"wrap":{"layer":"orth","match":"match:eq","foundry":"opennlp","key":"Baum","@type":"korap:term"},"@type":"korap:token"};
490
491queryExample = {
492 "@context" : "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
493 "collection" : {
494 "@type" : "koral:doc",
495 "key" : "pubDate",
496 "value" : "2005-05-25",
497 "type" : "type:date",
498 "match" : "match:geq"
499 },
500 "query" : {}
501};
502
503queryExample = {
504 "@type" : "koral:docGroup",
505 "operation" : "operation:and",
506 "operands" : [{
507 "@type":"koral:doc",
508 "key":"title",
509 "match":"match:eq",
510 "value":"Der Birnbaum",
511 "type":"type:string"
512 },{
513 "@type":"koral:doc",
514 "key":"pubPlace",
515 "match":"match:eq",
516 "value":"Mannheim",
517 "type":"type:string"
518 }
519 ]
520 };
521
522queryExample = {
523 "@context" : "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
524 "collection" : {},
525 "query" : {
526 "@type":"koral:group",
527 "operation" : "operation:sequence",
528 "operands" : [
529 {
530 "@type" : "koral:token",
531 "wrap" : {
532 "@type" : "koral:termGroup",
533 "relation" : "relation:and",
534 "operands" : [ {
535 "@type" : "koral:term",
536 "foundry" : "tt",
537 "key" : "ADJA",
538 "layer" : "pos",
539 "match" : "match:eq"
540 },
541 {
542 "@type" : "koral:term",
543 "foundry" : "cnx",
544 "key" : "@PREMOD",
545 "layer" : "syn",
546 "match" : "match:eq"
547 } ]
548 }
549 },
550 {
551 "@type" : "koral:token",
552 "wrap" : {
553 "@type" : "koral:term",
554 "key" : "octopus",
555 "layer" : "lemma",
556 "match" : "match:eq"
557 }
558 } ]
559 }
560};
561
562
563queryExample = {
564 "@context" : "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
565 "collection" : {
566 "@type" : "koral:doc",
567 "key" : "pubDate",
568 "value" : "2005-05-25",
569 "type" : "type:date",
570 "match" : "match:geq"
571 },
572 "query" : {
573 "@type" : "koral:token",
574 "wrap" : {
575 "@type" : "koral:term",
576 "key" : "octopus",
577 "layer" : "lemma",
578 "match" : "match:eq"
579 }
580 }
581};
582
583queryExample = {
584 "@type":"koral:doc",
585 "key":"subTitle",
586 "value":"Gedichte",
587 "match":"match:eq",
588 "rewrites" : [
589 {
590 "@type": "koral:rewrite",
591 "src" : "policy",
592 "operation" : "operation:injection",
593 }
594 ]
595};
596
Nils Diewald0e6992a2015-04-14 20:13:52 +0000597
Akron4bbd8b32018-03-06 19:19:44 +0100598var textInfo = {
599 "@context":"http:\/\/korap.ids-mannheim.de\/ns\/KoralQuery\/v0.3\/context.jsonld",
600 "document":{
601 "@type":"koral:document",
602 "fields":[
603 {
604 "@type":"koral:field",
605 "key":"editor",
606 "type":"type:store",
607 "value":"wikipedia.org"
608 },
609 {
610 "@type":"koral:field",
611 "key":"textSigle",
612 "type":"type:string",
613 "value":"WPD15\/264\/58336"
614 },
615 {
616 "@type":"koral:field",
617 "key":"author",
618 "type":"type:text",
619 "value":"Sprachpfleger, u.a."
620 },
621 {
622 "@type":"koral:field",
623 "key":"docSigle",
624 "type":"type:string",
625 "value":"WPD15\/264"
626 },
627 {
628 "@type":"koral:field",
629 "key":"textTypeArt",
630 "type":"type:string",
631 "value":"Enzyklopädie-Artikel"
632 },
633 {
634 "@type":"koral:field",
635 "key":"language",
636 "type":"type:string",
637 "value":"de"
638 },
639 {
640 "@type":"koral:field",
641 "key":"docTitle",
642 "type":"type:text",
643 "value":"Wikipedia, Artikel mit Anfangszahl 2, Teil 64"
644 },
645 {
646 "@type":"koral:field",
647 "key":"textType",
648 "type":"type:string",
649 "value":"Enzyklopädie"
650 },
651 {
652 "@type":"koral:field",
653 "key":"availability",
654 "type":"type:string",
655 "value":"CC-BY-SA"
656 },
657 {
658 "@type":"koral:field",
659 "key":"foundries",
660 "type":"type:string",
661 "value":"corenlp corenlp\/constituency corenlp\/morpho corenlp\/sentences dereko dereko\/structure dereko\/structure\/base-sentences-paragraphs-pagebreaks opennlp opennlp\/morpho opennlp\/sentences"
662 },
663 {
664 "@type":"koral:field",
665 "key":"creationDate",
666 "type":"type:number",
667 "value":20150417
668 },
669 {
670 "@type":"koral:field",
671 "key":"title",
672 "type":"type:text",
673 "value":"22:43 – Das Schicksal hat einen Plan"
674 },
675 {
676 "@type":"koral:field",
677 "key":"pubDate",
678 "type":"type:number",
679 "value":20150501
680 },
681 {
682 "@type":"koral:field",
683 "key":"reference",
684 "type":"type:store",
685 "value":"22:43 – Das Schicksal hat einen Plan, In: Wikipedia - URL:http:\/\/de.wikipedia.org\/wiki\/22:43_–_Das_Schicksal_hat_einen_Plan: Wikipedia, 2015"
686 },
687 {
688 "@type":"koral:field",
689 "key":"textClass",
690 "type":"type:string",
691 "value":"kultur film"
692 },
693 {
694 "@type":"koral:field",
695 "key":"tokenSource",
696 "type":"type:store",
697 "value":"base#tokens"
698 },
699 {
700 "@type":"koral:field",
701 "key":"publisher",
702 "type":"type:store",
703 "value":"Wikipedia"
704 },
705 {
706 "@type":"koral:field",
707 "key":"layerInfos",
708 "type":"type:store",
709 "value":"corenlp\/c=spans corenlp\/p=tokens corenlp\/s=spans dereko\/s=spans opennlp\/p=tokens opennlp\/s=spans"
710 },
711 {
712 "@type":"koral:field",
713 "key":"pubPlace",
714 "type":"type:string",
715 "value":"URL:http:\/\/de.wikipedia.org"
716 },
717 {
718 "@type":"koral:field",
719 "key":"corpusTitle",
720 "type":"type:text",
721 "value":"Wikipedia"
722 },
723 {
724 "@type":"koral:field",
725 "key":"corpusEditor",
726 "type":"type:store",
727 "value":"wikipedia.org"
728 },
729 {
730 "@type":"koral:field",
731 "key":"corpusSigle",
732 "type":"type:string",
733 "value":"WPD15"
734 }
735 ]
736 }
737};
738
Nils Diewald0e6992a2015-04-14 20:13:52 +0000739requirejs.config({
740 baseUrl: '../js/src',
741 paths : {
742 'lib': '../lib'
Nils Diewalda944fab2015-04-08 21:02:04 +0000743 }
Nils Diewald0e6992a2015-04-14 20:13:52 +0000744});
Nils Diewalda944fab2015-04-08 21:02:04 +0000745
Akron48b1e4d2015-06-17 18:47:01 +0200746KorAP.currentQuery = queryExample;
Nils Diewald845282c2015-05-14 07:53:03 +0000747
Akron80055992017-12-20 16:30:52 +0100748require(['app/en', 'init', 'hint/foundries/cnx'], function (lang) {
Nils Diewald0e6992a2015-04-14 20:13:52 +0000749 KorAP.hintArray = hintArray;
Nils Diewalda944fab2015-04-08 21:02:04 +0000750
Nils Diewald6283d692015-04-23 20:32:53 +0000751 // Set current virtual collection
752 KorAP.currentVC = vcExample;
753
Nils Diewald0e6992a2015-04-14 20:13:52 +0000754 // Parse and show the table
755 // Override getMatchInfo API call
756 KorAP.API.getMatchInfo = function(match, callObj, cb) {
Akron311ca652017-06-26 20:39:56 +0200757
758 console.log(match);
Akron0988d882017-11-10 16:13:12 +0100759
760 if (callObj["foundry"] === "malt" && callObj["layer"] === "d") {
761 cb({ "snippet": relSnippet });
762 }
763 else if (callObj["spans"] !== undefined && callObj["spans"] === true) {
Nils Diewald0e6992a2015-04-14 20:13:52 +0000764 cb({ "snippet": treeSnippet2 });
765 }
766 else {
767 cb({ "snippet": snippet });
768 }
769 };
770
Akron4bbd8b32018-03-06 19:19:44 +0100771 KorAP.API.getTextInfo = function (doc, param, cb) {
772 cb(textInfo);
773 };
774
Nils Diewald0e6992a2015-04-14 20:13:52 +0000775 /**
776 * Do some things at the beginning.
777 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000778
Nils Diewalda944fab2015-04-08 21:02:04 +0000779 // document.getElementById('vc-choose').click();
Nils Diewalda944fab2015-04-08 21:02:04 +0000780 // init.tutorial.show();
781
Nils Diewald0e6992a2015-04-14 20:13:52 +0000782 /*
783 KorAP.HintMenu.hide = function () {};
784 init.hint.show();
Nils Diewald2488d052015-04-09 21:46:02 +0000785
Nils Diewald0e6992a2015-04-14 20:13:52 +0000786 var menu = KorAP.MatchTreeMenu.create(
787 undefined,
788 menuContent
789 );
790 menu.hide = function () {};
791 document.getElementById('menu').appendChild(menu.element());
792 menu.limit(3);
793 menu.show();
794 menu.focus();
795 */
Nils Diewalda944fab2015-04-08 21:02:04 +0000796});