blob: c2f7c8a1d27db65e9b452f2c053ef5213e030f2b [file] [log] [blame]
Nils Diewald4af3f0b2014-06-25 01:43:17 +00001% content main => begin
Nils Diewald2329e1d2014-06-12 16:07:57 +00002
Nils Diewaldbd56adc2014-06-22 18:44:53 +00003%# 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
Nils Diewald2329e1d2014-06-12 16:07:57 +00006
Nils Diewald1eba6572014-06-17 19:49:53 +00007<h2>KorAP-Tutorial</h2>
Nils Diewald2329e1d2014-06-12 16:07:57 +00008
Nils Diewald0d2dcc82014-06-18 17:10:49 +00009<!--
Nils Diewaldbd56adc2014-06-22 18:44:53 +000010<p>Links to Blog, FAQ, About, Contact ...</p>
Nils Diewald2329e1d2014-06-12 16:07:57 +000011<ul>
12 <li>Introduction to KorAP</li>
13 <li>How to use Poliqarp+ QL?</li>
14 <li>How to use Cosmas-II QL?</li>
15 <li>How to use CQL?</li>
Nils Diewald7cad8402014-07-08 17:06:56 +000016 <li>API</li>
17 <li>Search</li>
Nils Diewald2329e1d2014-06-12 16:07:57 +000018</ul>
Nils Diewald0d2dcc82014-06-18 17:10:49 +000019-->
Nils Diewald2329e1d2014-06-12 16:07:57 +000020
Nils Diewald7cad8402014-07-08 17:06:56 +000021<section name="intro">
22<h3>Example Queries</h3>
23%# <p>This is a Tutorial to KorAP. It may be maintained separately (as a Wiki?) and has some nice features - like embedded example queries - just click on the queries below:</p>
Nils Diewald2329e1d2014-06-12 16:07:57 +000024
Nils Diewald7cad8402014-07-08 17:06:56 +000025<p><strong>Poliqarp</strong>: Find all occurrences of the lemma &quot;baum&quot; as annotated by the default foundry.</p>
Nils Diewald2329e1d2014-06-12 16:07:57 +000026%= korap_tut_query poliqarp => '[base=baum]'
27
Nils Diewald7cad8402014-07-08 17:06:56 +000028<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>
Nils Diewald2329e1d2014-06-12 16:07:57 +000029%= korap_tut_query cosmas2 => 'der /w5 Baum'
30
Nils Diewald4af3f0b2014-06-25 01:43:17 +000031
Nils Diewald7cad8402014-07-08 17:06:56 +000032<p><strong>Poliqarp+</strong>: Find all nominal phrases as annotated using Connexor, that contain an adverb as annotated by OpenNLP.</p>
33%= korap_tut_query poliqarp => 'contains(<cnx/c=np>,[opennlp/p=ADV])'
34
35<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;der&quot; annotated by the default foundry. Highlight both terms of the sequence.</p>
Nils Diewald4af3f0b2014-06-25 01:43:17 +000036%= korap_tut_query poliqarp => 'startswith(<s>, {1:[cnx/m=PRES]}{2:[base=der]})'
37
Nils Diewald7cad8402014-07-08 17:06:56 +000038
39%# <p>And here is a short cheat sheet for foundries and layers</p>
Nils Diewaldbd56adc2014-06-22 18:44:53 +000040</section>
Nils Diewald2329e1d2014-06-12 16:07:57 +000041
Nils Diewald7cad8402014-07-08 17:06:56 +000042<section name="cheatsheet">
Nils Diewaldbd56adc2014-06-22 18:44:53 +000043 <h3>Cheatsheet</h3>
44 <ul>
45 <li><strong>base</strong>
46 <ul>
47 <li>Supports two types of spans: <strong>&lt;s&gt;</strong> for sentences and <strong>&lt;p&gt;</strong> for paragraphs - this will likely change in the next index version. These spans lack prefix information!</li>
48 </ul>
49 </li>
50 <li><strong>cnx</strong>
51 <ul>
52 <li><strong>l</strong> (Token:Lemma): All lemmas are written in lower case. Composita are split, e.g. the token &quot;Leitfähigkeit&quot; is matched by the lemmas &quot;leit&quot; and &quot;fähigkeit&quot; - not by the lemma &quot;leitfähigkeit&quot;</li>
53 <li><strong>p</strong> (Token:Part of Speech): All pos infos are written in capital letters and are based on STTS</li>
54 <li><strong>syn</strong> (Token:Syntactical information): Includes token based information like @PREMOD, @NH, @MAIN ...</li>
55 <li><strong>m</strong> (Token:Morphosyntactical information): Includes information about tense (&quot;PRES&quot; ...), mode (&quot;IND&qut;), number (&quot;PL&quot; ...) etc.</li>
56 <li><strong>c</strong> (Span:Phrases): Only nominal phrases are available and all nominal phrases are written in lower case (&quot;np&quot;)</li>
57 </ul>
58 </li>
59 <li><strong>corenlp</strong>
60 <ul>
61 <li><strong>ne_hgc_175m_600</strong> (Token:Named Entity): Contains named entities like &quot;I-PER&quot;, &quot;I-ORG&quot; etc. </li>
62 <li><strong>ne_dewac_175_175m_600</strong> (Token:Named Entity): see above</li>
63 </ul>
64 </li>
65 <li><strong>tt</strong>
66 <ul>
67 <li><strong>l</strong> (Token:Lemma): All non-noun lemmas are written in lower case, nouns are written upper case. Composita stay intact (e.g. &quot;Normalbedingung&quot;)</li>
68 <li><strong>p</strong> (Token:Part of Speech): All pos infos are written in capital letters and are based on STTS</li>
69 </ul>
70 </li>
71 <li><strong>mate</strong>
72 <ul>
73 <li><strong>l</strong> (Token:Lemma): All lemmas are written in lower case. Composita stay intact (e.g. &quot;buchstabenbezeichnung&quot;)</li>
74 <li><strong>p</strong> (Token:Part of Speech): All pos infos are written in capital letters and are based on STTS</li>
75 <li><strong>m</strong> (Token:Morphosyntactical information): Includes information about tense (&quot;tense:pres&quot; ...), mode (&quot;mood:ind&qut;), number (&quot;number:pl&quot; ...), gender (&quot;gender:masc&quot; etc.</li>
76 </ul>
77 </li>
78 <li><strong>opennlp</strong>
79 <ul>
80 <li><strong>p</strong> (Token:Part of Speech): All pos infos are written in capital letters and are based on STTS</li>
81 </ul>
82 </li>
83 <li><strong>xip</strong>
84 <ul>
85 <li><strong>l</strong> (Token:Lemma): All non-noun lemmas are written in lower case, nouns are written upper case. Composita are split, e.g. the token &quot;Leitfähigkeit&quot; is matched by the lemmas &quot;leiten&quot; and &quot;Fähigkeit&quot; - and by a merged and pretty useless &quot;leitenfähigkeit&quot; (This is going to change)</li>
86 <li><strong>p</strong> (Token:Part of Speech): All pos infos are written in capital letters and are based on STTS</li>
87 <li><strong>c</strong> (Span:Phrases): Some phrases to create sentences, all upper case (&quot;NP&quot;, &quot;NPA&quot;, &quot;NOUN&quot;, &quot;VERB&quot;, &quot;PREP&quot;, &quot;AP&quot; ...)</li>
88 </ul>
89 </li>
90 </ul>
91</section>
Nils Diewald2329e1d2014-06-12 16:07:57 +000092
Nils Diewald4af3f0b2014-06-25 01:43:17 +000093% end