Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 1 | requirejs.config({ |
| 2 | baseUrl: '../js/src', |
| 3 | paths : { |
| 4 | 'lib': '../lib' |
| 5 | } |
| 6 | }); |
| 7 | |
| 8 | // Parse and show the table |
| 9 | // Override getMatchInfo API call |
| 10 | require(['init'], function () { |
| 11 | |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 12 | var snippet = "<span title=\"cnx/l:meist\">" + |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 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 | |
Akron | 98a933f | 2016-08-11 00:19:17 +0200 | [diff] [blame^] | 52 | var treeSnippet = |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 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>" + |
Akron | 98a933f | 2016-08-11 00:19:17 +0200 | [diff] [blame^] | 67 | " <mark>" + |
| 68 | " <span title=\"xip/c:NP\">" + |
| 69 | " <span title=\"xip/c:PRON\">es</span>" + |
| 70 | " </span>" + |
| 71 | " <span title=\"xip/c:AP\">" + |
| 72 | " <span title=\"xip/c:ADV\">nun</span>" + |
| 73 | " <span title=\"xip/c:ADJ\">möglich</span>" + |
| 74 | " </span>" + |
| 75 | " </mark>" + |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 76 | " <span title=\"xip/c:ADV\">z. B.</span>" + |
| 77 | " <span title=\"xip/c:NPA\">" + |
| 78 | " <span title=\"xip/c:NP\">" + |
| 79 | " <span title=\"xip/c:NOUN\">Voice</span>" + |
| 80 | " </span>" + |
| 81 | " </span>" + "(" + |
| 82 | " <span title=\"xip/c:INS\">" + |
| 83 | " <span title=\"xip/c:NPA\">" + |
| 84 | " <span title=\"xip/c:NP\">" + |
| 85 | " <span title=\"xip/c:NOUN\">Sprache</span>" + |
| 86 | " </span>" + |
| 87 | " </span>" + |
| 88 | " </span>" + ")" + |
| 89 | " <span title=\"xip/c:VERB\">bevorzugt</span>" + |
| 90 | " <span title=\"xip/c:PP\">" + |
| 91 | " <span title=\"xip/c:PREP\">in</span>" + |
| 92 | " <span title=\"xip/c:NP\">" + |
| 93 | " <span title=\"xip/c:PRON\">der</span>" + |
| 94 | " </span>" + |
| 95 | " <span title=\"xip/c:NPA\">" + |
| 96 | " <span title=\"xip/c:NP\">" + |
| 97 | " <span title=\"xip/c:NOUN\">Bridge</span>" + |
| 98 | " </span>" + |
| 99 | " </span>" + |
| 100 | " </span>" + |
| 101 | " <span title=\"xip/c:INFC\">" + |
| 102 | " <span title=\"xip/c:INS\">" + |
| 103 | " <span title=\"xip/c:VERB\">weiterzugeben</span>" + |
| 104 | " </span>" + |
| 105 | " </span>" + |
| 106 | " </span>" + |
| 107 | " </span>" + |
| 108 | "</span>" + |
| 109 | "<span class=\"context-right\"></span>"; |
| 110 | |
Akron | 98a933f | 2016-08-11 00:19:17 +0200 | [diff] [blame^] | 111 | // var treeSnippet = "<span class=\"context-left\"><\/span><span class=\"match\">In diesem <span title=\"cnx\/c:np\">Sinne<\/span> schrieb <span title=\"cnx\/c:np\">Brunschwicg<\/span>:"In <span title=\"cnx\/c:np\">Euklids<\/span> <span title=\"cnx\/c:np\">Elementen<\/span> <span title=\"cnx\/c:np\">spiegel<\/span> sich die <span title=\"cnx\/c:np\">Resultate<\/span> der <span title=\"cnx\/c:np\">Arbeit von Generationen vor Aristoteles<\/span> wider, nicht nur die <span title=\"cnx\/c:np\">technische Arbeit<\/span> der <span title=\"cnx\/c:np\">Entdecklung<\/span>, sondern auch die <span title=\"cnx\/c:np\">methodologische Arbeit<\/span> der <span title=\"cnx\/c:np\">Verbindung<\/span> und des <span title=\"cnx\/c:np\">Beweises<\/span>, die, in der <span title=\"cnx\/c:np\">Schule<\/span> des <span title=\"cnx\/c:np\">Phythagoras<\/span> begonnen, ihre <span title=\"cnx\/c:np\">Vollendung in den Schulen von Eudoxos von Cnidus<\/span> und <span title=\"cnx\/c:np\">Platon<\/span> gefunden hat"(5<\/span><span class=\"context-right\"><\/span>"; |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 112 | |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 113 | KorAP.API.getMatchInfo = function(match, callObj, cb) { |
| 114 | if (callObj["spans"] !== undefined && callObj["spans"] === true) { |
| 115 | return cb({ "snippet": treeSnippet }); |
| 116 | } |
| 117 | else { |
| 118 | return cb({ "snippet": snippet }); |
| 119 | } |
| 120 | }; |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 121 | |
| 122 | |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 123 | }); |