blob: 56bf675ebf0c0b30345741accc78a807759ad127 [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
12var snippet = "<span title=\"cnx/l:meist\">" +
13 " <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
52var treeSnippet =
53 "<span class=\"context-left\"></span>" +
54 "<span class=\"match\">" +
55 " <span title=\"xip/c:MC\">" +
56 " <span title=\"xip/c:TOP\">" +
57 " <span title=\"xip/c:PP\">" +
58 " <span title=\"xip/c:PREP\">Mit</span>" +
59 " <span title=\"xip/c:NP\">" +
60 " <span title=\"xip/c:DET\">dieser</span>" +
61 " <span title=\"xip/c:NPA\">" +
62 " <span title=\"xip/c:NOUN\">Methode</span>" +
63 " </span>" +
64 " </span>" +
65 " </span>" +
66 " <span title=\"xip/c:VERB\">ist</span>" +
67 " <span title=\"xip/c:NP\">" +
68 " <span title=\"xip/c:PRON\">es</span>" +
69 " </span>" +
70 " <span title=\"xip/c:AP\">" +
71 " <span title=\"xip/c:ADV\">nun</span>" +
72 " <span title=\"xip/c:ADJ\">möglich</span>" +
73 " </span>" +
74 " <span title=\"xip/c:ADV\">z. B.</span>" +
75 " <span title=\"xip/c:NPA\">" +
76 " <span title=\"xip/c:NP\">" +
77 " <span title=\"xip/c:NOUN\">Voice</span>" +
78 " </span>" +
79 " </span>" + "(" +
80 " <span title=\"xip/c:INS\">" +
81 " <span title=\"xip/c:NPA\">" +
82 " <span title=\"xip/c:NP\">" +
83 " <span title=\"xip/c:NOUN\">Sprache</span>" +
84 " </span>" +
85 " </span>" +
86 " </span>" + ")" +
87 " <span title=\"xip/c:VERB\">bevorzugt</span>" +
88 " <span title=\"xip/c:PP\">" +
89 " <span title=\"xip/c:PREP\">in</span>" +
90 " <span title=\"xip/c:NP\">" +
91 " <span title=\"xip/c:PRON\">der</span>" +
92 " </span>" +
93 " <span title=\"xip/c:NPA\">" +
94 " <span title=\"xip/c:NP\">" +
95 " <span title=\"xip/c:NOUN\">Bridge</span>" +
96 " </span>" +
97 " </span>" +
98 " </span>" +
99 " <span title=\"xip/c:INFC\">" +
100 " <span title=\"xip/c:INS\">" +
101 " <span title=\"xip/c:VERB\">weiterzugeben</span>" +
102 " </span>" +
103 " </span>" +
104 " </span>" +
105 " </span>" +
106 "</span>" +
107 "<span class=\"context-right\"></span>";
108
109 KorAP.API.getMatchInfo = function(match, callObj, cb) {
110 if (callObj["spans"] !== undefined && callObj["spans"] === true) {
111 return cb({ "snippet": treeSnippet });
112 }
113 else {
114 return cb({ "snippet": snippet });
115 }
116 };
117});