Nils Diewald | 8bc7e41 | 2015-03-19 22:08:27 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>MatchInfo demo</title> |
| 5 | <meta charset="utf-8" /> |
| 6 | <script src="../src/matchInfo.js"></script> |
| 7 | <link type="text/css" rel="stylesheet" |
| 8 | href="../../css/matchinfo.css"></link> |
| 9 | <style type="text/css" rel="stylesheet"> |
| 10 | |
| 11 | body { |
| 12 | background-color: #ffa500; |
| 13 | font-family: tahoma, verdana, arial; |
| 14 | } |
| 15 | |
| 16 | </style> |
| 17 | </head> |
| 18 | <body> |
| 19 | |
| 20 | <div class="matchinfo"> |
| 21 | <div class="matchtable"></div> |
| 22 | </div> |
| 23 | |
| 24 | <script> |
| 25 | var snippet = "<span title=\"cnx/l:meist\">" + |
| 26 | " <span title=\"cnx/p:ADV\">" + |
| 27 | " <span title=\"cnx/syn:@PREMOD\">" + |
| 28 | " <span title=\"mate/l:meist\">" + |
| 29 | " <span title=\"mate/p:ADV\">" + |
| 30 | " <span title=\"opennlp/p:ADV\">meist</span>" + |
| 31 | " </span>" + |
| 32 | " </span>" + |
| 33 | " </span>" + |
| 34 | " </span>" + |
| 35 | "</span>" + |
| 36 | "<span title=\"cnx/l:deutlich\">" + |
| 37 | " <span title=\"cnx/p:A\">" + |
| 38 | " <span title=\"cnx/syn:@PREMOD\">" + |
| 39 | " <span title=\"mate/l:deutlich\">" + |
| 40 | " <span title=\"mate/m:degree:pos\">" + |
| 41 | " <span title=\"mate/p:ADJD\">" + |
| 42 | " <span title=\"opennlp/p:ADJD\">deutlich</span>" + |
| 43 | " </span>" + |
| 44 | " </span>" + |
| 45 | " </span>" + |
| 46 | " </span>" + |
| 47 | " </span>" + |
| 48 | "</span>" + |
| 49 | "<span title=\"cnx/l:fähig\">" + |
| 50 | " <span title=\"cnx/l:leistung\">" + |
| 51 | " <span title=\"cnx/p:A\">" + |
| 52 | " <span title=\"cnx/syn:@NH\">" + |
| 53 | " <span title=\"mate/l:leistungsfähig\">" + |
| 54 | " <span title=\"mate/m:degree:comp\">" + |
| 55 | " <span title=\"mate/p:ADJD\">" + |
| 56 | " <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" + |
| 57 | " </span>" + |
| 58 | " </span>" + |
| 59 | " </span>" + |
| 60 | " </span>" + |
| 61 | " </span>" + |
| 62 | " </span>" + |
| 63 | "</span>"; |
| 64 | |
| 65 | // Override getMatchInfo API call |
| 66 | KorAP.API.getMatchInfo = function() { |
| 67 | return { "snippet": snippet }; |
| 68 | }; |
| 69 | |
| 70 | var info = KorAP.MatchInfo.create({ |
| 71 | 'corpusID' : 'WPD', |
| 72 | 'docID' : 'UUU', |
| 73 | 'textID' : '01912', |
| 74 | 'pos' : 'p121-122' |
| 75 | }, |
| 76 | [ |
| 77 | 'base/s=spans', |
| 78 | 'corenlp/c=spans', |
| 79 | 'corenlp/ne=tokens', |
| 80 | 'corenlp/p=tokens', |
| 81 | 'corenlp/s=spans', |
| 82 | 'glemm/l=tokens', |
| 83 | 'mate/l=tokens', |
| 84 | 'mate/m=tokens', |
| 85 | 'mate/p=tokens', |
| 86 | 'opennlp/p=tokens', |
| 87 | 'opennlp/s=spans', |
| 88 | 'tt/l=tokens', |
| 89 | 'tt/p=tokens', |
| 90 | 'tt/s=spans' |
| 91 | ]); |
| 92 | var t = info.getTable(); |
| 93 | document.getElementsByClassName('matchtable')[0] |
| 94 | .appendChild(t.element()); |
| 95 | </script> |
| 96 | |
| 97 | |
| 98 | |
| 99 | <div class="matchinfo"> |
| 100 | <div class="matchtable"> |
| 101 | <table> |
| 102 | <thead> |
| 103 | <tr> |
| 104 | <th>Foundry</th> |
| 105 | <th>Layer</th> |
| 106 | <th>Ich</th> |
| 107 | <th>Du</th> |
| 108 | <th>Er</th> |
| 109 | </tr> |
| 110 | </thead> |
| 111 | <tbody> |
| 112 | <tr tabindex="0"> |
| 113 | <th>Hallo</th> |
| 114 | <th>X</th> |
| 115 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 116 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 117 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 118 | </tr> |
| 119 | <tr tabindex="0"> |
| 120 | <th>geht</th> |
| 121 | <th>y</th> |
| 122 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 123 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 124 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 125 | </tr> |
| 126 | <tr tabindex="0"> |
| 127 | <th>es</th> |
| 128 | <th>z</th> |
| 129 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 130 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 131 | <td>ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ<br />ABC DEF GHI JKL MNO PQR STU VWX YZ ABC DEF GHI JKL MNO PQR STU VWX YZ</td> |
| 132 | </tr> |
| 133 | </tbody> |
| 134 | </table> |
| 135 | </div> |
| 136 | </div> |
| 137 | |
| 138 | </body> |
| 139 | </html> |