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 | |
| 52 | var 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 | |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 109 | 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>"; |
| 110 | |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 111 | KorAP.API.getMatchInfo = function(match, callObj, cb) { |
| 112 | if (callObj["spans"] !== undefined && callObj["spans"] === true) { |
| 113 | return cb({ "snippet": treeSnippet }); |
| 114 | } |
| 115 | else { |
| 116 | return cb({ "snippet": snippet }); |
| 117 | } |
| 118 | }; |
Nils Diewald | 4347ee9 | 2015-05-04 20:32:48 +0000 | [diff] [blame] | 119 | |
| 120 | |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 121 | }); |