blob: f7fd779ebd1af5e6fb89c8fb0b8bdaf6d5ab65aa [file] [log] [blame]
Nils Diewald0e6992a2015-04-14 20:13:52 +00001requirejs.config({
2 baseUrl: '../js/src',
3 paths : {
4 'lib': '../lib'
5 }
6});
7
8// Parse and show the table
9// Override getMatchInfo API call
10require(['init'], function () {
11
Nils Diewald4347ee92015-05-04 20:32:48 +000012 var snippet = "<span title=\"cnx/l:meist\">" +
Nils Diewald0e6992a2015-04-14 20:13:52 +000013 " <span title=\"cnx/p:ADV\">" +
14 " <span title=\"cnx/syn:@PREMOD\">" +
15 " <span title=\"mate/l:meist\">" +
16 " <span title=\"mate/p:ADV\">" +
17 " <span title=\"opennlp/p:ADV\">meist</span>" +
18 " </span>" +
19 " </span>" +
20 " </span>" +
21 " </span>" +
22 "</span>" +
23 "<span title=\"cnx/l:deutlich\">" +
24 " <span title=\"cnx/p:A\">" +
25 " <span title=\"cnx/syn:@PREMOD\">" +
26 " <span title=\"mate/l:deutlich\">" +
27 " <span title=\"mate/m:degree:pos\">" +
28 " <span title=\"mate/p:ADJD\">" +
29 " <span title=\"opennlp/p:ADJD\">deutlich</span>" +
30 " </span>" +
31 " </span>" +
32 " </span>" +
33 " </span>" +
34 " </span>" +
35 "</span>" +
36 "<span title=\"cnx/l:fähig\">" +
37 " <span title=\"cnx/l:leistung\">" +
38 " <span title=\"cnx/p:A\">" +
39 " <span title=\"cnx/syn:@NH\">" +
40 " <span title=\"mate/l:leistungsfähig\">" +
41 " <span title=\"mate/m:degree:comp\">" +
42 " <span title=\"mate/p:ADJD\">" +
43 " <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
44 " </span>" +
45 " </span>" +
46 " </span>" +
47 " </span>" +
48 " </span>" +
49 " </span>" +
50 "</span>";
51
Akronad1e46a2018-09-19 15:55:40 +020052 snippet = "<span class=\"context-left\"></span>" +
53 "<span class=\"match\">"+
54 " <span title=\"corenlp\/p:KOUI\">"+
55 " <span title=\"marmot\/p:KOUI\">"+
56 " <span title=\"opennlp\/p:KOUI\">"+
57 " <span title=\"tt\/l:um\">"+
58 " <span title=\"tt\/l:um\">"+
59 " <span title=\"tt\/p:APPR\">"+
60 " <span title=\"tt\/p:KOUI\">Um</span>" +
61 " </span>" +
62 " </span>" +
63 " </span>" +
64 " </span>" +
65 " </span>" +
66 " </span>"+
67 " " +
68 " <span title=\"corenlp\/p:ART\">"+
69 " <span title=\"marmot\/m:case:acc\">"+
70 " <span title=\"marmot\/m:gender:masc\">"+
71 " <span title=\"marmot\/m:number:pl\">"+
72 " <span title=\"marmot\/p:ART\">"+
73 " <span title=\"opennlp\/p:ART\">"+
74 " <span title=\"tt\/l:die\">" +
75 " <span title=\"tt\/p:ART\">die</span>" +
76 " </span>" +
77 " </span>" +
78 " </span>" +
79 " </span>" +
80 " </span>" +
81 " </span>" +
82 " </span>" +
83 " " +
84 " <span title=\"corenlp\/p:APPR\">"+
85 " <span title=\"marmot\/p:APPR\">"+
86 " <span title=\"opennlp\/p:APPR\">"+
87 " <span title=\"tt\/l:von\">"+
88 " <span title=\"tt\/p:APPR\">von</span>" +
89 " </span>" +
90 " </span>" +
91 " </span>" +
92 " </span>" +
93 " " +
94 " <span title=\"corenlp\/p:PPOSAT\">"+
95 " <span title=\"marmot\/m:case:dat\">"+
96 " <span title=\"marmot\/m:gender:masc\">"+
97 " <span title=\"marmot\/m:number:sg\">"+
98 " <span title=\"marmot\/p:PPOSAT\">"+
99 " <span title=\"opennlp\/p:PPOSAT\">"+
100 " <span title=\"tt\/l:sein\">"+
101 " <span title=\"tt\/p:PPOSAT\">seinem</span>" +
102 " </span>" +
103 " </span>" +
104 " </span>" +
105 " </span>" +
106 " </span>" +
107 " </span>" +
108 " </span>" +
109 " " +
110 " <span title=\"corenlp\/p:NN\">"+
111 " <span title=\"marmot\/m:case:dat\">"+
112 " <span title=\"marmot\/m:gender:masc\">"+
113 " <span title=\"marmot\/m:number:sg\">"+
114 " <span title=\"marmot\/p:NN\">"+
115 " <span title=\"opennlp\/p:NN\">"+
116 " <span title=\"tt\/l:Großvater\">"+
117 " <span title=\"tt\/p:NN\">Großvater</span>" +
118 " </span>" +
119 " </span>" +
120 " </span>" +
121 " </span>" +
122 " </span>" +
123 " </span>" +
124 " </span>" +
125 " " +
126 " <span title=\"corenlp\/p:ADJA\">" +
127 " <span title=\"marmot\/m:case:acc\">" +
128 " <span title=\"marmot\/m:degree:pos\">" +
129 " <span title=\"marmot\/m:gender:fem\">" +
130 " <span title=\"marmot\/m:number:sg\">" +
131 " <span title=\"marmot\/p:ADJA\">" +
132 " <span title=\"opennlp\/p:ADJA\">" +
133 " <span title=\"tt\/l:gepflanzt\">" +
134 " <span title=\"tt\/p:ADJA\">gepflanzte</span>" +
135 " </span>" +
136 " </span>" +
137 " </span>" +
138 " </span>" +
139 " </span>" +
140 " </span>" +
141 " </span>" +
142 " </span>" +
143 " " +
144 " <span title=\"corenlp\/p:NN\">" +
145 " <span title=\"marmot\/m:case:acc\">" +
146 " <span title=\"marmot\/m:gender:fem\">" +
147 " <span title=\"marmot\/m:number:sg\">" +
148 " <span title=\"marmot\/p:NN\">" +
149 " <span title=\"opennlp\/p:NN\">" +
150 " <span title=\"tt\/l:Esche\">" +
151 " <span title=\"tt\/p:NN\">Esche</span>" +
152 " </span>" +
153 " </span>" +
154 " </span>" +
155 " </span>" +
156 " </span>" +
157 " </span>" +
158 " </span>" +
159 " " +
160 " <span title=\"corenlp\/p:VAFIN\">" +
161 " <span title=\"marmot\/m:mood:ind\">" +
162 " <span title=\"marmot\/m:number:sg\">" +
163 " <span title=\"marmot\/m:person:3\">" +
164 " <span title=\"marmot\/m:tense:pres\">" +
165 " <span title=\"marmot\/p:VAFIN\">" +
166 " <span title=\"opennlp\/p:VAFIN\">" +
167 " <span title=\"tt\/l:haben\">" +
168 " <span title=\"tt\/p:VAFIN\">hat</span>" +
169 " </span>" +
170 " </span>" +
171 " </span>" +
172 " </span>" +
173 " </span>" +
174 " </span>" +
175 " </span>" +
176 " </span>" +
177 " " +
178 " <span title=\"corenlp\/p:NE\">" +
179 " <span title=\"marmot\/m:case:nom\">" +
180 " <span title=\"marmot\/m:gender:*\">" +
181 " <span title=\"marmot\/m:number:sg\">" +
182 " <span title=\"marmot\/p:NE\">" +
183 " <span title=\"opennlp\/p:NE\">" +
184 " <span title=\"tt\/l:Behrens\">" +
185 " <span title=\"tt\/p:NE\">Behrens</span>" +
186 " </span>" +
187 " </span>" +
188 " </span>" +
189 " </span>" +
190 " </span>" +
191 " </span>" +
192 " </span>" +
193 " " +
194 " <span title=\"corenlp\/p:APPR\">" +
195 " <span title=\"marmot\/p:APPR\">" +
196 " <span title=\"opennlp\/p:APPR\">" +
197 " <span title=\"tt\/l:bei\">" +
198 " <span title=\"tt\/p:APPR\">bei</span>" +
199 " </span>" +
200 " </span>" +
201 " </span>" +
202 " </span>" +
203 " " +
204 " <span title=\"corenlp\/p:ART\">" +
205 " <span title=\"marmot\/m:case:dat\">" +
206 " <span title=\"marmot\/m:gender:fem\">" +
207 " <span title=\"marmot\/m:number:sg\">" +
208 " <span title=\"marmot\/p:ART\">" +
209 " <span title=\"opennlp\/p:ART\">" +
210 " <span title=\"tt\/l:die\">" +
211 " <span title=\"tt\/p:ART\">der</span>" +
212 " </span>" +
213 " </span>" +
214 " </span>" +
215 " </span>" +
216 " </span>" +
217 " </span>" +
218 " </span>" +
219 " " +
220 " <span title=\"corenlp\/p:NN\">" +
221 " <span title=\"marmot\/m:case:dat\">" +
222 " <span title=\"marmot\/m:gender:fem\">" +
223 " <span title=\"marmot\/m:number:sg\">" +
224 " <span title=\"marmot\/p:NN\">" +
225 " <span title=\"opennlp\/p:NN\">" +
226 " <span title=\"tt\/l:Vergrößerung\">" +
227 " <span title=\"tt\/p:NN\">Vergrößerung</span>" +
228 " </span>" +
229 " </span>" +
230 " </span>" +
231 " </span>" +
232 " </span>" +
233 " </span>" +
234 " </span>" +
235 " " +
236 " <span title=\"corenlp\/p:ART\">" +
237 " <span title=\"marmot\/m:case:gen\">" +
238 " <span title=\"marmot\/m:gender:neut\">" +
239 " <span title=\"marmot\/m:number:sg\">" +
240 " <span title=\"marmot\/p:ART\">" +
241 " <span title=\"opennlp\/p:ART\">" +
242 " <span title=\"tt\/l:die\">" +
243 " <span title=\"tt\/p:ART\">des</span>" +
244 " </span>" +
245 " </span>" +
246 " </span>" +
247 " </span>" +
248 " </span>" +
249 " </span>" +
250 " </span>" +
251 " " +
252 " <span title=\"corenlp\/p:NN\">" +
253 " <span title=\"marmot\/m:case:gen\">" +
254 " <span title=\"marmot\/m:gender:neut\">" +
255 " <span title=\"marmot\/m:number:sg\">" +
256 " <span title=\"marmot\/p:NN\">" +
257 " <span title=\"opennlp\/p:NN\">" +
258 " <span title=\"tt\/l:Laden\">" +
259 " <span title=\"tt\/p:NN\">Ladens</span>" +
260 " </span>" +
261 " </span>" +
262 " </span>" +
263 " </span>" +
264 " </span>" +
265 " </span>" +
266 " </span>" +
267 " " +
268 " <span title=\"corenlp\/p:ADV\">" +
269 " <span title=\"marmot\/p:ADV\">" +
270 " <span title=\"opennlp\/p:ADV\">" +
271 " <span title=\"tt\/l:einfach\">" +
272 " <span title=\"tt\/p:ADJD\">einfach</span>" +
273 " </span>" +
274 " </span>" +
275 " </span>" +
276 " </span>" +
277 " " +
278 " <span title=\"corenlp\/p:VVPP\">" +
279 " <span title=\"marmot\/p:VVPP\">" +
280 " <span title=\"opennlp\/p:VVPP\">" +
281 " <span title=\"tt\/l:herumbauen\">" +
282 " <span title=\"tt\/p:VVPP\">herumgebaut</span>" +
283 " </span>" +
284 " </span>" +
285 " </span>" +
286 " </span>" +
287 " : " +
288 " <span title=\"corenlp\/p:ADV\">" +
289 " <span title=\"marmot\/p:ADV\">" +
290 " <span title=\"opennlp\/p:ADV\">" +
291 " <span title=\"tt\/l:nun\">" +
292 " <span title=\"tt\/p:ADV\">Nun</span>" +
293 " </span>" +
294 " </span>" +
295 " </span>" +
296 " </span>" +
297 " " +
298 " <span title=\"corenlp\/p:VVFIN\">" +
299 " <span title=\"marmot\/m:mood:ind\">" +
300 " <span title=\"marmot\/m:number:sg\">" +
301 " <span title=\"marmot\/m:person:3\">" +
302 " <span title=\"marmot\/m:tense:pres\">" +
303 " <span title=\"marmot\/p:VVFIN\">" +
304 " <span title=\"opennlp\/p:VVFIN\">" +
305 " <span title=\"tt\/l:stehen\">" +
306 " <span title=\"tt\/p:VVFIN\">steht</span>" +
307 " </span>" +
308 " </span>" +
309 " </span>" +
310 " </span>" +
311 " </span>" +
312 " </span>" +
313 " </span>" +
314 " </span>" +
315 " " +
316 " <mark>" +
317 " <span title=\"corenlp\/p:ART\">" +
318 " <span title=\"marmot\/m:case:nom\">" +
319 " <span title=\"marmot\/m:gender:masc\">" +
320 " <span title=\"marmot\/m:number:sg\">" +
321 " <span title=\"marmot\/p:ART\">" +
322 " <span title=\"opennlp\/p:ART\">" +
323 " <span title=\"tt\/l:die\">" +
324 " <span title=\"tt\/p:ART\">der</span>" +
325 " </span>" +
326 " </span>" +
327 " </span>" +
328 " </span>" +
329 " </span>" +
330 " </span>" +
331 " </span>" +
332 " " +
333 " <span title=\"corenlp\/p:ADJA\">" +
334 " <span title=\"marmot\/m:case:nom\">" +
335 " <span title=\"marmot\/m:degree:pos\">" +
336 " <span title=\"marmot\/m:gender:masc\">" +
337 " <span title=\"marmot\/m:number:sg\">" +
338 " <span title=\"marmot\/p:ADJA\">" +
339 " <span title=\"opennlp\/p:ADJA\">" +
340 " <span title=\"tt\/l:alt\">" +
341 " <span title=\"tt\/p:ADJA\">alte</span>" +
342 " </span>" +
343 " </span>" +
344 " </span>" +
345 " </span>" +
346 " </span>" +
347 " </span>" +
348 " </span>" +
349 " </span>" +
350 " " +
351 " <span title=\"corenlp\/p:NN\">" +
352 " <span title=\"marmot\/m:case:nom\">" +
353 " <span title=\"marmot\/m:gender:masc\">" +
354 " <span title=\"marmot\/m:number:sg\">" +
355 " <span title=\"marmot\/p:NN\">" +
356 " <span title=\"opennlp\/p:NN\">" +
357 " <span title=\"tt\/l:Baum\">" +
358 " <span title=\"tt\/p:NN\">Baum</span>" +
359 " </span>" +
360 " </span>" +
361 " </span>" +
362 " </span>" +
363 " </span>" +
364 " </span>" +
365 " </span>" +
366 " " +
367 " </mark> <span title=\"corenlp\/p:ADV\">" +
368 " <span title=\"marmot\/p:ADV\">" +
369 " <span title=\"opennlp\/p:ADV\">" +
370 " <span title=\"tt\/l:mitten\">" +
371 " <span title=\"tt\/p:ADV\">mitten</span>" +
372 " </span>" +
373 " </span>" +
374 " </span>" +
375 " </span>" +
376 " " +
377 " <span title=\"corenlp\/p:APPR\">" +
378 " <span title=\"marmot\/p:APPR\">" +
379 " <span title=\"opennlp\/p:APPR\">" +
380 " <span title=\"tt\/l:in\">" +
381 " <span title=\"tt\/p:APPR\">in</span>" +
382 " </span>" +
383 " </span>" +
384 " </span>" +
385 " </span>" +
386 " " +
387 " <span title=\"corenlp\/p:ART\">" +
388 " <span title=\"marmot\/m:case:dat\">" +
389 " <span title=\"marmot\/m:gender:fem\">" +
390 " <span title=\"marmot\/m:number:sg\">" +
391 " <span title=\"marmot\/p:ART\">" +
392 " <span title=\"opennlp\/p:ART\">" +
393 " <span title=\"tt\/l:die\">" +
394 " <span title=\"tt\/p:ART\">der</span>" +
395 " </span>" +
396 " </span>" +
397 " </span>" +
398 " </span>" +
399 " </span>" +
400 " </span>" +
401 " </span>" +
402 " " +
403 " <span title=\"marmot\/p:TRUNC\">" +
404 " <span title=\"opennlp\/p:TRUNC\">" +
405 " <span title=\"tt\/l:Obst-\">" +
406 " <span title=\"tt\/p:TRUNC\">Obst-</span>" +
407 " </span>" +
408 " </span>" +
409 " </span>" +
410 " " +
411 " <span title=\"corenlp\/p:KON\">" +
412 " <span title=\"marmot\/p:KON\">" +
413 " <span title=\"opennlp\/p:KON\">" +
414 " <span title=\"tt\/l:und\">" +
415 " <span title=\"tt\/p:KON\">und</span>" +
416 " </span>" +
417 " </span>" +
418 " </span>" +
419 " </span>" +
420 " " +
421 " <span title=\"corenlp\/p:NN\">" +
422 " <span title=\"marmot\/m:case:gen\">" +
423 " <span title=\"marmot\/m:gender:fem\">" +
424 " <span title=\"marmot\/m:number:sg\">" +
425 " <span title=\"marmot\/p:NN\">" +
426 " <span title=\"opennlp\/p:NN\">" +
427 " <span title=\"tt\/l:Gemüseabteilung\">" +
428 " <span title=\"tt\/p:NN\">Gemüseabteilung</span>" +
429 " </span>" +
430 " </span>" +
431 " </span>" +
432 " </span>" +
433 " </span>" +
434 " </span>" +
435 " </span>" +
436 " ." +
437 "</span>" +
438 "<span class=\"context-right\">" +
439 "</span>";
440
Akron98a933f2016-08-11 00:19:17 +0200441 var treeSnippet =
Nils Diewald0e6992a2015-04-14 20:13:52 +0000442 "<span class=\"context-left\"></span>" +
443 "<span class=\"match\">" +
444 " <span title=\"xip/c:MC\">" +
445 " <span title=\"xip/c:TOP\">" +
446 " <span title=\"xip/c:PP\">" +
447 " <span title=\"xip/c:PREP\">Mit</span>" +
448 " <span title=\"xip/c:NP\">" +
449 " <span title=\"xip/c:DET\">dieser</span>" +
450 " <span title=\"xip/c:NPA\">" +
451 " <span title=\"xip/c:NOUN\">Methode</span>" +
452 " </span>" +
453 " </span>" +
454 " </span>" +
455 " <span title=\"xip/c:VERB\">ist</span>" +
Akron98a933f2016-08-11 00:19:17 +0200456 " <mark>" +
457 " <span title=\"xip/c:NP\">" +
458 " <span title=\"xip/c:PRON\">es</span>" +
459 " </span>" +
460 " <span title=\"xip/c:AP\">" +
461 " <span title=\"xip/c:ADV\">nun</span>" +
462 " <span title=\"xip/c:ADJ\">möglich</span>" +
463 " </span>" +
464 " </mark>" +
Nils Diewald0e6992a2015-04-14 20:13:52 +0000465 " <span title=\"xip/c:ADV\">z. B.</span>" +
466 " <span title=\"xip/c:NPA\">" +
467 " <span title=\"xip/c:NP\">" +
468 " <span title=\"xip/c:NOUN\">Voice</span>" +
469 " </span>" +
470 " </span>" + "(" +
471 " <span title=\"xip/c:INS\">" +
472 " <span title=\"xip/c:NPA\">" +
473 " <span title=\"xip/c:NP\">" +
474 " <span title=\"xip/c:NOUN\">Sprache</span>" +
475 " </span>" +
476 " </span>" +
477 " </span>" + ")" +
478 " <span title=\"xip/c:VERB\">bevorzugt</span>" +
479 " <span title=\"xip/c:PP\">" +
480 " <span title=\"xip/c:PREP\">in</span>" +
481 " <span title=\"xip/c:NP\">" +
482 " <span title=\"xip/c:PRON\">der</span>" +
483 " </span>" +
484 " <span title=\"xip/c:NPA\">" +
485 " <span title=\"xip/c:NP\">" +
486 " <span title=\"xip/c:NOUN\">Bridge</span>" +
487 " </span>" +
488 " </span>" +
489 " </span>" +
490 " <span title=\"xip/c:INFC\">" +
491 " <span title=\"xip/c:INS\">" +
492 " <span title=\"xip/c:VERB\">weiterzugeben</span>" +
493 " </span>" +
494 " </span>" +
495 " </span>" +
496 " </span>" +
497 "</span>" +
498 "<span class=\"context-right\"></span>";
499
Akronaa01dca2018-02-05 19:51:28 +0100500
501 var relSnippet =
502 "<span class=\"context-left\"></span>"+
503 "<span class=\"match\">"+
504 " <span xml:id=\"token-WDD17/982/72848-p15836-15839\">"+
505 " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15838\">Ein</span>"+
506 " "+
507 " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15838\">letztes</span>"+
508 " "+
509 " <span xml:id=\"token-WDD17/982/72848-p15838\">"+
510 // s1464_n2 "ein" -> ":"
511 " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15836-15839\">mal</span>"+
512 " </span>"+
513 ": "+
514 " <span xml:id=\"token-WDD17/982/72848-p15839-15840\">"+
515 " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">AL</span>"+
516 " </span>"+
517 " </span>"+
518 " <span xlink:show=\"other\" data-action=\"join\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">"+
519 ":"+
520 " <span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+
521 " <span xml:id=\"token-WDD17/982/72848-p15840\">"+
522 " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">halt</span>"+
523 " </span>"+
524 " </span>"+
525 " </span>"+
526 " <span xlink:show=\"other\" data-action=\"join\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">"+
527 " "+
528 " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15842\">den</span>"+
529 " "+
530 " <span xml:id=\"token-WDD17/982/72848-p15842\">"+
531 " <span xlink:title=\"lwc/d:OA\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15843\">Ball</span>"+
532 " </span>"+
533 " "+
534 " <span xml:id=\"token-WDD17/982/72848-p15843\">"+
535 " <span xlink:title=\"lwc/d:PD\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15840\">flach</span>"+
536 " </span>"+
537 ", "+
538 " <mark>"+
539 " <span xlink:title=\"lwc/d:MO\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15845\">ganz</span>"+
540 " "+
541 " <span xml:id=\"token-WDD17/982/72848-p15845\">"+
542 " <span xlink:title=\"lwc/d:CJ\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15843\">flach</span>"+
543 " </span>"+
544 " </mark>"+
545 " </span>"+
546 "</span>"+
547 "<span class=\"context-right\"></span>";
548
Akron0ad7cd22018-02-08 18:03:06 +0100549 var meta = {"messages":[["Response format is temporary"]],"@context":"http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld","meta":{},"document":{"@type":"koral:document","fields":[{"@type":"koral:field","type":"type:store","key":"ref","value":"My reference"},{"@type":"koral:field","type":"type:text","key":"title","value":"Der Name der Rose"},{"@type":"koral:field","type":"type:string","key":"textSigle","value":"a/b/c"},{"@type":"koral:field","type":"type:string","key":"keyword","value":["baum","wald"]},{"@type":"koral:field","type":"type:number","key":"zahl1","value":56},{"@type":"koral:field","type":"type:string","key":"name","value":"Peter"}]}};
550
Akronbf3fc9d2018-03-08 12:36:39 +0100551 meta = {"messages":[["Response format is temporary"]],"@context":"http://korap.ids-mannheim.de/ns/KoralQuery/v0.3/context.jsonld","meta":{},"document":{"@type":"koral:document","fields":[{"@type":"koral:field","type":"type:number","key":"pubDate","value":20170701},{"@type":"koral:field","type":"type:string","key":"textSigle","value":"WDD17/982/72848"},{"@type":"koral:field","type":"type:string","key":"foundries","value":"dereko dereko/structure dereko/structure/base-sentences-paragraphs-pagebreaks lwc lwc/dependency treetagger treetagger/morpho"},{"@type":"koral:field","type":"type:string","key":"corpusSigle","value":"WDD17"},{"@type":"koral:field","type":"type:string","key":"docSigle","value":"WDD17/982"},{"@type":"koral:field","type":"type:store","key":"reference","value":"Diskussion:99 Namen Allahs/Archiv/1, In: Wikipedia - URL:http://de.wikipedia.org/wiki/Diskussion:99_Namen_Allahs/Archiv/1: Wikipedia, 2017"},{"@type":"koral:field","type":"type:text","key":"author","value":"ArchivBot, u.a."},{"@type":"koral:field","type":"type:number","key":"creationDate","value":20140609},{"@type":"koral:field","type":"type:string","key":"textTypeArt","value":"Diskussion"},{"@type":"koral:field","type":"type:store","key":"editor","value":"wikipedia.org"},{"@type":"koral:field","type":"type:text","key":"title","value":"Diskussion:99 Namen Allahs/Archiv/1"},{"@type":"koral:field","type":"type:store","key":"tokenSource","value":"base#tokens"},{"@type":"koral:field","type":"type:store","key":"layerInfos","value":"dereko/s=spans lwc/d=rels tt/l=tokens tt/p=tokens"},{"@type":"koral:field","type":"type:string","key":"textClass","value":"staat-gesellschaft biographien-interviews"},{"@type":"koral:field","type":"type:string","key":"availability","value":"CC-BY-SA"}]}};
Akron0ad7cd22018-02-08 18:03:06 +0100552
Akronbf3fc9d2018-03-08 12:36:39 +0100553 meta = {
554 "@context":"http:\/\/korap.ids-mannheim.de\/ns\/KoralQuery\/v0.3\/context.jsonld",
555 "document":{
556 "@type":"koral:document",
557 "fields":[
558 {
559 "@type":"koral:field",
560 "key":"editor",
561 "type":"type:store",
562 "value":"wikipedia.org"
563 },
564 {
565 "@type":"koral:field",
566 "key":"textSigle",
567 "type":"type:string",
568 "value":"WPD15\/264\/58336"
569 },
570 {
571 "@type":"koral:field",
572 "key":"author",
573 "type":"type:text",
574 "value":"Sprachpfleger, u.a."
575 },
576 {
577 "@type":"koral:field",
578 "key":"docSigle",
579 "type":"type:string",
580 "value":"WPD15\/264"
581 },
582 {
583 "@type":"koral:field",
584 "key":"textTypeArt",
585 "type":"type:string",
586 "value":"Enzyklopädie-Artikel"
587 },
588 {
589 "@type":"koral:field",
590 "key":"language",
591 "type":"type:string",
592 "value":"de"
593 },
594 {
595 "@type":"koral:field",
596 "key":"docTitle",
597 "type":"type:text",
598 "value":"Wikipedia, Artikel mit Anfangszahl 2, Teil 64"
599 },
600 {
601 "@type":"koral:field",
602 "key":"textType",
603 "type":"type:string",
604 "value":"Enzyklopädie"
605 },
606 {
607 "@type":"koral:field",
608 "key":"availability",
609 "type":"type:string",
610 "value":"CC-BY-SA"
611 },
612 {
613 "@type":"koral:field",
614 "key":"foundries",
615 "type":"type:keywords",
616 "value":[
617 "corenlp",
618 "corenlp\/constituency",
619 "corenlp\/morpho",
620 "corenlp\/sentences",
621 "dereko",
622 "dereko\/structure",
623 "dereko\/structure\/base-sentences-paragraphs-pagebreaks",
624 "opennlp",
625 "opennlp\/morpho",
626 "opennlp\/sentences"
627 ]
628 },
629 {
630 "@type":"koral:field",
631 "key":"creationDate",
632 "type":"type:date",
633 "value":"2015-04-17"
634 },
635 {
636 "@type":"koral:field",
637 "key":"title",
638 "type":"type:text",
639 "value":"22:43 – Das Schicksal hat einen Plan"
640 },
641 {
642 "@type":"koral:field",
643 "key":"pubDate",
644 "type":"type:date",
645 "value":"2015-05-01"
646 },
647 {
648 "@type":"koral:field",
649 "key":"reference",
650 "type":"type:store",
651 "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"
652 },
653 {
654 "@type":"koral:field",
655 "key":"textClass",
656 "type":"type:keywords",
657 "value":["kultur","film"]
658 },
659 {
660 "@type":"koral:field",
661 "key":"tokenSource",
662 "type":"type:store",
663 "value":"base#tokens"
664 },
665 {
666 "@type":"koral:field",
667 "key":"publisher",
668 "type":"type:store",
669 "value":"Wikipedia"
670 },
671 {
672 "@type":"koral:field",
673 "key":"layerInfos",
674 "type":"type:store",
675 "value":"corenlp\/c=spans corenlp\/p=tokens corenlp\/s=spans dereko\/s=spans opennlp\/p=tokens opennlp\/s=spans"
676 },
677 {
678 "@type":"koral:field",
679 "key":"pubPlace",
680 "type":"type:string",
681 "value":"URL:http:\/\/de.wikipedia.org"
682 },
683 {
684 "@type":"koral:field",
685 "key":"corpusTitle",
686 "type":"type:text",
687 "value":"Wikipedia"
688 },
689 {
690 "@type":"koral:field",
691 "key":"corpusEditor",
692 "type":"type:store",
693 "value":"wikipedia.org"
694 },
695 {
696 "@type":"koral:field",
697 "key":"corpusSigle",
698 "type":"type:string",
699 "value":"WPD15"
700 }
701 ]
702 }
703 };
Akron0ad7cd22018-02-08 18:03:06 +0100704
Nils Diewald4347ee92015-05-04 20:32:48 +0000705
Nils Diewald0e6992a2015-04-14 20:13:52 +0000706 KorAP.API.getMatchInfo = function(match, callObj, cb) {
Akron7f613e02016-11-07 02:50:44 +0100707 console.dir(callObj);
Nils Diewald0e6992a2015-04-14 20:13:52 +0000708 if (callObj["spans"] !== undefined && callObj["spans"] === true) {
Akronaa01dca2018-02-05 19:51:28 +0100709 if (callObj["layer"] === "d") {
710 return cb({ "snippet": relSnippet });
711 }
712 else {
713 return cb({ "snippet": treeSnippet });
714 }
Nils Diewald0e6992a2015-04-14 20:13:52 +0000715 }
716 else {
717 return cb({ "snippet": snippet });
718 }
719 };
Akron0ad7cd22018-02-08 18:03:06 +0100720
721 KorAP.API.getTextInfo = function(doc, callObj, cb) {
722 return cb(meta);
723 };
Nils Diewald0e6992a2015-04-14 20:13:52 +0000724});