Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 1 | var treeSnippet = |
| 2 | "<span class=\"context-left\"></span>" + |
| 3 | "<span class=\"match\">" + |
| 4 | " <span title=\"xip/c:MC\">" + |
| 5 | " <span title=\"xip/c:TOP\">" + |
| 6 | " <span title=\"xip/c:PP\">" + |
| 7 | " <span title=\"xip/c:PREP\">Mit</span>" + |
| 8 | " <span title=\"xip/c:NP\">" + |
| 9 | " <span title=\"xip/c:DET\">dieser</span>" + |
| 10 | " <span title=\"xip/c:NPA\">" + |
| 11 | " <span title=\"xip/c:NOUN\">Methode</span>" + |
| 12 | " </span>" + |
| 13 | " </span>" + |
| 14 | " </span>" + |
| 15 | " <span title=\"xip/c:VERB\">ist</span>" + |
| 16 | " <span title=\"xip/c:NP\">" + |
| 17 | " <span title=\"xip/c:PRON\">es</span>" + |
| 18 | " </span>" + |
| 19 | " <span title=\"xip/c:AP\">" + |
| 20 | " <span title=\"xip/c:ADV\">nun</span>" + |
| 21 | " <span title=\"xip/c:ADJ\">möglich</span>" + |
| 22 | " </span>" + |
| 23 | " <span title=\"xip/c:ADV\">z. B.</span>" + |
| 24 | " <span title=\"xip/c:NPA\">" + |
| 25 | " <span title=\"xip/c:NP\">" + |
| 26 | " <span title=\"xip/c:NOUN\">Voice</span>" + |
| 27 | " </span>" + |
| 28 | " </span>" + "(" + |
| 29 | " <span title=\"xip/c:INS\">" + |
| 30 | " <span title=\"xip/c:NPA\">" + |
| 31 | " <span title=\"xip/c:NP\">" + |
| 32 | " <span title=\"xip/c:NOUN\">Sprache</span>" + |
| 33 | " </span>" + |
| 34 | " </span>" + |
| 35 | " </span>" + ")" + |
| 36 | " <span title=\"xip/c:VERB\">bevorzugt</span>" + |
| 37 | " <span title=\"xip/c:PP\">" + |
| 38 | " <span title=\"xip/c:PREP\">in</span>" + |
| 39 | " <span title=\"xip/c:NP\">" + |
| 40 | " <span title=\"xip/c:PRON\">der</span>" + |
| 41 | " </span>" + |
| 42 | " <span title=\"xip/c:NPA\">" + |
| 43 | " <span title=\"xip/c:NP\">" + |
| 44 | " <span title=\"xip/c:NOUN\">Bridge</span>" + |
| 45 | " </span>" + |
| 46 | " </span>" + |
| 47 | " </span>" + |
| 48 | " <span title=\"xip/c:INFC\">" + |
| 49 | " <span title=\"xip/c:INS\">" + |
| 50 | " <span title=\"xip/c:VERB\">weiterzugeben</span>" + |
| 51 | " </span>" + |
| 52 | " </span>" + |
| 53 | " </span>" + |
| 54 | " </span>" + |
| 55 | "</span>" + |
| 56 | "<span class=\"context-right\"></span>"; |
| 57 | |
Akron | 2189662 | 2017-09-12 16:22:23 +0200 | [diff] [blame] | 58 | var relSnippet = |
| 59 | "<span class=\"context-left\"></span>" + |
| 60 | "<span class=\"match\">" + |
| 61 | " <span xml:id=\"token-GOE/AGA/01784-p199\">" + |
| 62 | " <span xlink:title=\"malt/d:ADV\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">dann</span>" + |
| 63 | " </span>" + |
| 64 | " zog " + |
| 65 | " <span xlink:title=\"malt/d:SUBJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">ich</span>" + |
| 66 | " <span xml:id=\"token-GOE/AGA/01784-p202\">" + |
| 67 | " <span xlink:title=\"malt/d:OBJA\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">mich</span>" + |
| 68 | " </span>" + |
| 69 | " <span xlink:title=\"malt/d:PP\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">gegen</span>" + |
| 70 | " <span xml:id=\"token-GOE/AGA/01784-p204\">" + |
| 71 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p204\">das</span>" + |
| 72 | " </span>" + |
| 73 | " <span xlink:title=\"malt/d:PN\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p202\">Regiment</span>" + |
| 74 | " <span xml:id=\"token-GOE/AGA/01784-p206\">" + |
| 75 | " <span xlink:title=\"malt/d:AVZ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">zurück</span>" + |
| 76 | " </span>" + |
| 77 | " <span xml:id=\"token-GOE/AGA/01784-p207\">" + |
| 78 | " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p199\">und</span>" + |
| 79 | " </span>" + |
| 80 | " <span xml:id=\"token-GOE/AGA/01784-p208\">" + |
| 81 | " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p206\">war</span>" + |
| 82 | " </span>" + |
| 83 | " <span xlink:title=\"malt/d:AUX\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p207\">bemüht</span>" + |
| 84 | "," + |
| 85 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p211\">einige</span>" + |
| 86 | " <span xml:id=\"token-GOE/AGA/01784-p211\">" + |
| 87 | " <span xlink:title=\"malt/d:ATTR\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p211\">genaue</span>" + |
| 88 | " </span>" + |
| 89 | " <span xml:id=\"token-GOE/AGA/01784-p212\">" + |
| 90 | " <span xlink:title=\"malt/d:OBJA\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">Umrisse</span>" + |
| 91 | " </span>" + |
| 92 | " <span xlink:title=\"malt/d:OBJP\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">aufs</span>" + |
| 93 | " <span xlink:title=\"malt/d:PN\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p212\">Papier</span>" + |
| 94 | " <span xml:id=\"token-GOE/AGA/01784-p215\">" + |
| 95 | " <span xlink:title=\"malt/d:PART\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p215\">zu</span>" + |
| 96 | " </span>" + |
| 97 | " <span xlink:title=\"malt/d:OBJI\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p208\">bringen</span>" + |
| 98 | ", um mir " + |
| 99 | " <span xml:id=\"token-GOE/AGA/01784-p219\">" + |
| 100 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">die</span>" + |
| 101 | " </span>" + |
| 102 | " <span xml:id=\"token-GOE/AGA/01784-p220\">Bezüge</span>" + |
| 103 | " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">und</span>" + |
| 104 | " <span xml:id=\"token-GOE/AGA/01784-p222\">" + |
| 105 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p222\">die</span>" + |
| 106 | " </span>" + |
| 107 | " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p220\">Distanzen</span>" + |
| 108 | " <mark>" + |
| 109 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p225\">der</span>" + |
| 110 | " </mark>" + |
| 111 | " <span xml:id=\"token-GOE/AGA/01784-p225\">" + |
| 112 | " <span xlink:title=\"malt/d:ATTR\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p225\">landschaftlichen</span>" + |
| 113 | " </span>" + |
| 114 | " <span xml:id=\"token-GOE/AGA/01784-p226\">" + |
| 115 | " <span xlink:title=\"malt/d:GMOD\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p222\">Gegenstände</span>" + |
| 116 | " </span>" + |
| 117 | " <span xlink:title=\"malt/d:KON\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p219\">desto</span>" + |
| 118 | " <span xlink:title=\"malt/d:ADV\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p229\">besser</span>" + |
| 119 | " <span xml:id=\"token-GOE/AGA/01784-p229\">" + |
| 120 | " <span xlink:title=\"malt/d:PART\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p229\">zu</span>" + |
| 121 | " </span>" + |
| 122 | " <span xlink:title=\"malt/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-GOE/AGA/01784-p226\">imprimieren</span>" + |
| 123 | "</span>" + |
| 124 | "<span class=\"context-right\"></span>"; |
| 125 | |
Akron | 71c87de | 2017-09-15 14:24:21 +0200 | [diff] [blame] | 126 | /* |
| 127 | * ___OBJA____ |
| 128 | * |_________|____DET________ |
| 129 | * |_________|____ | |
| 130 | * |_SUBJ_ | | | |
| 131 | * ___|_____|__ADV_ | ___PP____| |
| 132 | * | Y | | Y Y | Y| |
| 133 | * -|------ | -|-----|-- ---------- |
| 134 | * dann zog ich mich gegen das Altern |
| 135 | * 1 2 3 4 5 6 7 |
| 136 | */ |
| 137 | |
| 138 | relSnippet = |
Akron | 0d04a18 | 2017-09-15 14:34:50 +0200 | [diff] [blame] | 139 | // var relSnippetSimple = |
Akron | 71c87de | 2017-09-15 14:24:21 +0200 | [diff] [blame] | 140 | "<span class=\"context-left\"></span>" + |
| 141 | "<span class=\"match\">" + |
| 142 | " <span xml:id=\"token-1\">" + |
| 143 | " <span xlink:title=\"malt/d:ADV\" xlink:type=\"simple\" xlink:href=\"#token-4\">dann</span>" + |
| 144 | " zog " + |
| 145 | " </span>" + |
| 146 | " <span xlink:title=\"malt/d:SUBJ\" xlink:type=\"simple\" xlink:href=\"#token-1\">ich</span>" + |
| 147 | " <span xml:id=\"token-4\">" + |
| 148 | " <span xlink:title=\"malt/d:OBJA\" xlink:type=\"simple\" xlink:href=\"#token-1\">mich</span>" + |
| 149 | " <span xlink:title=\"malt/d:PP\" xlink:type=\"simple\" xlink:href=\"#token-3\">gegen</span>" + |
| 150 | " </span>" + |
| 151 | " <span xml:id=\"token-3\">" + |
| 152 | " <span xlink:title=\"malt/d:DET\" xlink:type=\"simple\" xlink:href=\"#token-1\">" + |
| 153 | " das" + |
| 154 | " <span xml:id=\"token-2\">Altern</span>" + |
| 155 | " </span>" + |
| 156 | " </span>" + |
| 157 | "</span>" + |
| 158 | "<span class=\"context-right\"></span>"; |
| 159 | |
Akron | 2189662 | 2017-09-12 16:22:23 +0200 | [diff] [blame] | 160 | |
Akron | fe4c1b4 | 2018-01-30 18:48:09 +0100 | [diff] [blame] | 161 | // This is just a temprary example |
| 162 | var relSnippet3 = |
| 163 | "<span class=\"context-left\"></span>"+ |
| 164 | "<span class=\"match\">"+ |
| 165 | "<span xml:id=\"token-WDD17/982/72848-p15836-15839\">"+ |
| 166 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15838\">Ein</span>"+ |
| 167 | " "+ |
| 168 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15838\">letztes</span>"+ |
| 169 | " "+ |
| 170 | "<span xml:id=\"token-WDD17/982/72848-p15838\">"+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 171 | |
Akron | fe4c1b4 | 2018-01-30 18:48:09 +0100 | [diff] [blame] | 172 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15836-15839\">mal</span>"+ |
| 173 | "</span>"+ |
| 174 | ": "+ |
| 175 | "<span xml:id=\"token-WDD17/982/72848-p15839-15840\">"+ |
| 176 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">AL</span>"+ |
| 177 | "</span>"+ |
| 178 | "</span>"+ |
| 179 | |
| 180 | // Here is a double given id, that should use a join instead! |
| 181 | "<span xml:id=\"token-WDD17/982/72848-p15839-15840\">"+ |
| 182 | ":"+ |
| 183 | "<span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+ |
| 184 | "<span xml:id=\"token-WDD17/982/72848-p15840\">"+ |
| 185 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">halt</span>"+ |
| 186 | "</span>"+ |
| 187 | "</span>"+ |
| 188 | "</span>"+ |
| 189 | "<span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+ |
| 190 | " "+ |
| 191 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15842\">den</span>"+ |
| 192 | " "+ |
| 193 | "<span xml:id=\"token-WDD17/982/72848-p15842\">"+ |
| 194 | "<span xlink:title=\"lwc/d:OA\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15843\">Ball</span>"+ |
| 195 | "</span>"+ |
| 196 | " "+ |
| 197 | "<span xml:id=\"token-WDD17/982/72848-p15843\">"+ |
| 198 | "<span xlink:title=\"lwc/d:PD\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15840\">flach</span>"+ |
| 199 | "</span>"+ |
| 200 | ", "+ |
| 201 | "<mark>"+ |
| 202 | "<span xlink:title=\"lwc/d:MO\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15845\">ganz</span>"+ |
| 203 | " "+ |
| 204 | "<span xml:id=\"token-WDD17/982/72848-p15845\">"+ |
| 205 | "<span xlink:title=\"lwc/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15843\">flach</span>"+ |
| 206 | "</span>"+ |
| 207 | "</mark>"+ |
| 208 | "</span>"+ |
| 209 | "</span>"+ |
| 210 | "<span class=\"context-right\"></span>"; |
| 211 | |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 212 | relSnippet3 = |
| 213 | "<span class=\"context-left\"></span>"+ |
| 214 | "<span class=\"match\">"+ |
| 215 | "<span xml:id=\"token-WDD17/982/72848-p15836-15839\">"+ |
| 216 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15838\">Ein</span>"+ |
| 217 | " "+ |
| 218 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15838\">letztes</span>"+ |
| 219 | " "+ |
| 220 | "<span xml:id=\"token-WDD17/982/72848-p15838\">"+ |
| 221 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15836-15839\">mal</span>"+ |
| 222 | "</span>"+ |
| 223 | ": "+ |
| 224 | "<span xml:id=\"token-WDD17/982/72848-p15839-15840\">"+ |
| 225 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">AL</span>"+ |
| 226 | "</span>"+ |
| 227 | "</span>"+ |
| 228 | "<span xlink:type=\"join\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">"+ |
| 229 | ":"+ |
| 230 | "<span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+ |
| 231 | "<span xml:id=\"token-WDD17/982/72848-p15840\">"+ |
| 232 | "<span xlink:title=\"lwc/d:--\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">halt</span>"+ |
| 233 | "</span>"+ |
| 234 | "</span>"+ |
| 235 | "</span>"+ |
| 236 | // "<span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+ |
| 237 | "<span xlink:type=\"join\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">"+ |
| 238 | " "+ |
| 239 | "<span xlink:title=\"lwc/d:NK\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15842\">den</span>"+ |
| 240 | " "+ |
| 241 | "<span xml:id=\"token-WDD17/982/72848-p15842\">"+ |
| 242 | "<span xlink:title=\"lwc/d:OA\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15843\">Ball</span>"+ |
| 243 | "</span>"+ |
| 244 | " "+ |
| 245 | "<span xml:id=\"token-WDD17/982/72848-p15843\">"+ |
| 246 | "<span xlink:title=\"lwc/d:PD\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15840\">flach</span>"+ |
| 247 | "</span>"+ |
| 248 | ", "+ |
| 249 | "<mark>"+ |
| 250 | "<span xlink:title=\"lwc/d:MO\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15845\">ganz</span>"+ |
| 251 | " "+ |
| 252 | "<span xml:id=\"token-WDD17/982/72848-p15845\">"+ |
| 253 | "<span xlink:title=\"lwc/d:CJ\" xlink:type=\"simple\" xlink:href=\"#token-WDD17/982/72848-p15843\">flach</span>"+ |
| 254 | "</span>"+ |
| 255 | "</mark>"+ |
| 256 | "</span>"+ |
| 257 | "</span>"+ |
| 258 | "<span class=\"context-right\"></span>"; |
| 259 | |
| 260 | |
| 261 | // xlink conformant |
| 262 | relSnippet3 = |
| 263 | "<span class=\"context-left\"></span>"+ |
| 264 | "<span class=\"match\">"+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 265 | " <span xml:id=\"token-WDD17/982/72848-p15836-15839\">"+ |
| 266 | " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15838\">Ein</span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 267 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 268 | " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15838\">letztes</span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 269 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 270 | " <span xml:id=\"token-WDD17/982/72848-p15838\">"+ |
| 271 | // s1464_n2 "ein" -> ":" |
| 272 | " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15836-15839\">mal</span>"+ |
| 273 | " </span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 274 | ": "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 275 | " <span xml:id=\"token-WDD17/982/72848-p15839-15840\">"+ |
| 276 | " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">AL</span>"+ |
| 277 | " </span>"+ |
| 278 | " </span>"+ |
| 279 | " <span xlink:show=\"other\" data-action=\"join\" xlink:href=\"#token-WDD17/982/72848-p15839-15840\">"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 280 | ":"+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 281 | " <span xml:id=\"token-WDD17/982/72848-p15840-15846\">"+ |
| 282 | " <span xml:id=\"token-WDD17/982/72848-p15840\">"+ |
| 283 | " <span xlink:title=\"lwc/d:--\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">halt</span>"+ |
| 284 | " </span>"+ |
| 285 | " </span>"+ |
| 286 | " </span>"+ |
| 287 | " <span xlink:show=\"other\" data-action=\"join\" xlink:href=\"#token-WDD17/982/72848-p15840-15846\">"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 288 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 289 | " <span xlink:title=\"lwc/d:NK\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15842\">den</span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 290 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 291 | " <span xml:id=\"token-WDD17/982/72848-p15842\">"+ |
| 292 | " <span xlink:title=\"lwc/d:OA\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15843\">Ball</span>"+ |
| 293 | " </span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 294 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 295 | " <span xml:id=\"token-WDD17/982/72848-p15843\">"+ |
| 296 | " <span xlink:title=\"lwc/d:PD\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15840\">flach</span>"+ |
| 297 | " </span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 298 | ", "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 299 | " <mark>"+ |
| 300 | " <span xlink:title=\"lwc/d:MO\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15845\">ganz</span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 301 | " "+ |
Akron | 6358105 | 2018-01-31 17:50:59 +0100 | [diff] [blame^] | 302 | " <span xml:id=\"token-WDD17/982/72848-p15845\">"+ |
| 303 | " <span xlink:title=\"lwc/d:CJ\" xlink:show=\"none\" xlink:href=\"#token-WDD17/982/72848-p15843\">flach</span>"+ |
| 304 | " </span>"+ |
| 305 | " </mark>"+ |
| 306 | " </span>"+ |
Akron | 8faceec | 2018-01-31 11:30:21 +0100 | [diff] [blame] | 307 | "</span>"+ |
| 308 | "<span class=\"context-right\"></span>"; |
Akron | fe4c1b4 | 2018-01-30 18:48:09 +0100 | [diff] [blame] | 309 | |
Akron | f5dc510 | 2017-05-16 20:32:57 +0200 | [diff] [blame] | 310 | requirejs.config({ |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 311 | baseUrl: '../js/src', |
| 312 | paths : { |
| 313 | 'lib': '../lib' |
| 314 | } |
Akron | f5dc510 | 2017-05-16 20:32:57 +0200 | [diff] [blame] | 315 | }); |
| 316 | |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 317 | require(['match/relations', 'match/tree'], function (relClass, treeClass) { |
Akron | f5dc510 | 2017-05-16 20:32:57 +0200 | [diff] [blame] | 318 | var rel = relClass.create(); |
Akron | 3a4a08e | 2017-05-23 22:34:18 +0200 | [diff] [blame] | 319 | |
| 320 | /* |
| 321 | * Start and end may be spans, i.e. arrays |
| 322 | */ |
| 323 | |
| 324 | rel |
| 325 | .addToken("Der") |
| 326 | .addToken("alte") |
| 327 | .addToken("Mann") |
| 328 | .addToken("ging") |
| 329 | .addToken("über") |
| 330 | .addToken("die") |
| 331 | .addToken("breite") |
| 332 | .addToken("nasse") |
| 333 | .addToken("Straße") |
| 334 | ; |
| 335 | |
| 336 | rel |
Akron | 65d3108 | 2017-09-08 16:23:40 +0200 | [diff] [blame] | 337 | .addRel({ start: 0, end: 1, label: "a", direction: "uni"}) |
| 338 | .addRel({ start: 0, end: 1, label: "b", direction: "uni" }) |
Akron | 3a4a08e | 2017-05-23 22:34:18 +0200 | [diff] [blame] | 339 | .addRel({ start: 1, end: 2, label: "c", direction: "bi" }) |
Akron | 65d3108 | 2017-09-08 16:23:40 +0200 | [diff] [blame] | 340 | .addRel({ start: 0, end: 2, label: "dreizehn", direction: "uni" }) |
| 341 | .addRel({ start: [2,4], end: 5, label: "e", direction: "uni" }) |
Akron | 6f1302b | 2017-09-13 12:46:02 +0200 | [diff] [blame] | 342 | .addRel({ start: [5,6], end: 7, direction: "uni" }) |
Akron | 3a4a08e | 2017-05-23 22:34:18 +0200 | [diff] [blame] | 343 | .addRel({ start: 4, end: [6,8], label: "f", direction: "bi" }) |
Akron | fee0b62 | 2017-09-13 14:46:43 +0200 | [diff] [blame] | 344 | .addRel({ start: 8, end: 8, label: "self", direction: "uni"}) |
Akron | 3a4a08e | 2017-05-23 22:34:18 +0200 | [diff] [blame] | 345 | ; |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 346 | |
| 347 | document.getElementById("treeRel").appendChild(rel.element()); |
| 348 | |
| 349 | // Todo: Probably rename to rel.draw() |
Akron | f5dc510 | 2017-05-16 20:32:57 +0200 | [diff] [blame] | 350 | rel.show(); |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 351 | |
Akron | 671fdb9 | 2017-09-12 18:09:46 +0200 | [diff] [blame] | 352 | var rel2 = relClass.create(relSnippet); |
| 353 | document.getElementById("treeRel2").appendChild(rel2.element()); |
| 354 | rel2.show(); |
| 355 | |
Akron | fe4c1b4 | 2018-01-30 18:48:09 +0100 | [diff] [blame] | 356 | var rel3 = relClass.create(relSnippet3); |
| 357 | document.getElementById("treeRel3").appendChild(rel3.element()); |
| 358 | rel3.show(); |
| 359 | |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 360 | var tree = treeClass.create(treeSnippet); |
| 361 | document.getElementById("treeHier").appendChild(tree.element()); |
Akron | f5dc510 | 2017-05-16 20:32:57 +0200 | [diff] [blame] | 362 | }); |
Akron | 1517513 | 2017-09-07 18:12:55 +0200 | [diff] [blame] | 363 | |