blob: c612aac67d3e22cb291a54717253bdabc1408ba8 [file] [log] [blame]
Nils Diewald4e9fbcb2014-07-15 11:45:09 +00001% content main => begin
2
3%# Store the id of an active section in the session, so the system is able to directly scroll to the relevant section
4%# This should be stored when clicking on a specific query
5%# but the remembered section contains the id - not the query
6
7<h2>KorAP-Tutorial</h2>
8
Nils Diewaldf7366232014-07-25 15:57:08 +00009<p>
10 <%= korap_tut_link_to 'Poliqarp+-Tutorial', '/tutorial/poliqarp-plus' %>
11 <%= korap_tut_link_to 'Foundry Overview', '/tutorial/foundries' %>
12 <%= korap_tut_link_to 'Regular Expressions', '/tutorial/regular-expressions' %>
13 <%= korap_tut_link_to 'Wildcards', '/tutorial/wildcards' %>
14</p>
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000015
16<!--
17<p>Links to Blog, FAQ, About, Contact ...</p>
18<ul>
19 <li>Introduction to KorAP</li>
20 <li>How to use Poliqarp+ QL?</li>
21 <li>How to use Cosmas-II QL?</li>
22 <li>How to use CQL?</li>
23 <li>API</li>
24 <li>Search</li>
25</ul>
26-->
27
28<section id="tut-intro">
Nils Diewald729f7182014-07-15 16:22:34 +000029 <h3>Frontend Features</h3>
30 <p>This frontend differs to the <%= link_to 'official frontend', 'http://korap.ids-mannheim.de/app/', target => '_blank' %> by providing a serialization view, an integrated tutorial, a comparison view for morphological annotations, and an autocompletion for closed annotations (type in <%= korap_tut_link_to 'foundry prefixes', '/tutorial/foundries' %> like <code>cnx/</code>).</p>
31</section>
32
33
34<section id="tut-examples">
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000035
36<h3>Example Queries</h3>
Nils Diewalde2c83812014-11-11 21:13:18 +000037%# <p>This is a Tutorial to KorAP. For examples click on the queries below:</p>
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000038
Nils Diewald13bad6a2014-07-18 16:44:51 +000039<p><strong>Poliqarp</strong>: Find all occurrences of the lemma &quot;baum&quot; as annotated by the <%= korap_tut_link_to 'default foundry', '/tutorial/foundries' %>.</p>
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000040%= korap_tut_query poliqarp => '[base=baum]'
41
Nils Diewalde2c83812014-11-11 21:13:18 +000042<p><strong>Poliqarp</strong>: Find all sequences of adjectives as annotated by Treetagger, that are repeated 3 to 5 times in a row.</p>
43%= korap_tut_query poliqarp => '[tt/p=ADJA]{3,5}'
44
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000045<p><strong>Cosmas-II</strong>: Find all occurrences of the words &quot;der&quot; and &quot;Baum&quot;, in case they are in a maximum distance of 5 tokens. The order is not relevant.</p>
46%= korap_tut_query cosmas2 => 'der /w5 Baum'
47
Nils Diewalde2c83812014-11-11 21:13:18 +000048<p><strong>Poliqarp+</strong>: Find all nominal phrases as annotated using Connexor, that contain an adverb as annotated by OpenNLP, that is annotated as something starting with an &quot;A&quot; in Treetagger.</p>
49%= korap_tut_query poliqarp => 'contains(<cnx/c=np>,{[opennlp/p=ADV & tt/p="A.*"]})', cutoff => 1
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000050
Nils Diewalde2c83812014-11-11 21:13:18 +000051<p><strong>Poliqarp+</strong>: Find all sentences as annotated by the base foundry that start with a sequence of one token in present tense as annotated by Connexor and the lemma &quot;die&quot; annotated by the <%= korap_tut_link_to 'default foundry', '/tutorial/foundries' %>. Highlight both terms of the sequence.</p>
52%= korap_tut_query poliqarp => 'startswith(<s>, {1:[cnx/m=PRES]}{2:[base=die]})', cutoff => 1
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000053
Nils Diewald7e259592014-11-12 19:04:55 +000054<p><strong>Annis</strong>: Find all occurrences of the sequence of two tokens annotated as adverbs by the <%= korap_tut_link_to 'default foundry', '/tutorial/foundries' %>.</p>
55%= korap_tut_query annis => 'pos="ADV" & pos="ADV" & #1 . #2'
Nils Diewalde2c83812014-11-11 21:13:18 +000056
Nils Diewald7e259592014-11-12 19:04:55 +000057<p><strong>CQL</strong>: Find all occurrences of the sequence &quot;der alte Mann&quot;.</p>
Nils Diewalde2c83812014-11-11 21:13:18 +000058%= korap_tut_query cql => '"der alte Mann"'
Nils Diewald13bad6a2014-07-18 16:44:51 +000059
60
Nils Diewald4e9fbcb2014-07-15 11:45:09 +000061</section>
62
63% end