blob: c9c95e6fd5e3ec622b2fa4ac30f12c41330ff60f [file] [log] [blame]
Nils Diewald44e1edb2015-04-08 19:12:15 +00001% my $match = stash('match') || {};
Nils Diewald4347ee92015-05-04 20:32:48 +00002% my $id = $match->{corpusID} . '-' . $match->{docID} . '.' . $match->{textID} . '#' . $match->{ID};
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00003<li data-corpus-id="<%= $match->{corpusID} %>"
4 data-doc-id="<%= $match->{docID} %>"
Nils Diewald87507832015-05-01 23:36:41 +00005 data-text-id="<%= $match->{textID} %>"
Nils Diewaldfccfbcb2015-04-29 20:48:19 +00006 data-match-id="<%= $match->{ID} %>"
7 %# TODO: This needs to be retrieved per match
Nils Diewald4347ee92015-05-04 20:32:48 +00008%# data-available-info="base/s=spans corenlp/c=spans corenlp/ne=tokens corenlp/p=tokens corenlp/s=spans glemm/l=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens opennlp/s=spans tt/l=tokens tt/p=tokens tt/s=spans xip/c=spans"
9 data-available-info="cnx/c=spans corenlp/ne=tokens corenlp/p=tokens mate/l=tokens mate/m=tokens mate/p=tokens opennlp/p=tokens tt/l=tokens tt/p=tokens xip/c=spans"
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000010 id="<%= $id %>"\
11<% if (current_route eq 'match') { %> class="active"<% } =%>>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000012 <div>
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000013%# --- Snippet
Nils Diewald791b5902014-12-04 04:47:24 +000014 <div class="snippet<%= $match->{startMore} ? ' startMore' : '' %><%= $match->{endMore} ? ' endMore' : '' %>"><%== $match->{snippet} %></div>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000015 </div>
Nils Diewald996aa552014-12-02 03:26:44 +000016%# -- Reference string
Nils Diewaldfccfbcb2015-04-29 20:48:19 +000017 <p class="ref">\
18<% if ($match->{title}) { %><strong><%= $match->{title} %></strong><% }; %>\
19<%= $match->{author} ? ' ' . loc('by') . ' ' . $match->{author} : '' %>\
20<% if ($match->{title} || $match->{author}) { %>;<% } =%> \
21<%= loc('pubOn') %> <%= $match->{pubDate} %> \
22(<%= $id %>)\
Nils Diewald996aa552014-12-02 03:26:44 +000023</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000024</li>