Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 1 | %# https://letsencrypt.org/howitworks/ |
| 2 | |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 3 | % content main => begin |
| 4 | |
| 5 | %# Store the id of an active section in the session, so the system is able to directly scroll to the relevant section |
| 6 | %# This should be stored when clicking on a specific query |
| 7 | %# but the remembered section contains the id - not the query |
| 8 | |
| 9 | <h2>KorAP-Tutorial</h2> |
| 10 | |
Nils Diewald | f736623 | 2014-07-25 15:57:08 +0000 | [diff] [blame] | 11 | <p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 12 | <%= kalamar_tut_link_to 'Poliqarp+-Tutorial', '/tutorial/poliqarp-plus' %> |
| 13 | <%= kalamar_tut_link_to 'Foundry Overview', '/tutorial/foundries' %> |
| 14 | <%= kalamar_tut_link_to 'Regular Expressions', '/tutorial/regular-expressions' %> |
| 15 | <%= kalamar_tut_link_to 'Wildcards', '/tutorial/wildcards' %> |
Nils Diewald | f736623 | 2014-07-25 15:57:08 +0000 | [diff] [blame] | 16 | </p> |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 17 | |
| 18 | <!-- |
| 19 | <p>Links to Blog, FAQ, About, Contact ...</p> |
| 20 | <ul> |
| 21 | <li>Introduction to KorAP</li> |
Nils Diewald | e99d904 | 2014-11-20 23:36:54 +0000 | [diff] [blame] | 22 | <li>How to use Annis QL?</li> |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 23 | <li>How to use Cosmas-II QL?</li> |
| 24 | <li>How to use CQL?</li> |
| 25 | <li>API</li> |
| 26 | <li>Search</li> |
| 27 | </ul> |
| 28 | --> |
| 29 | |
| 30 | <section id="tut-intro"> |
Nils Diewald | 729f718 | 2014-07-15 16:22:34 +0000 | [diff] [blame] | 31 | <h3>Frontend Features</h3> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 32 | <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 <%= kalamar_tut_link_to 'foundry prefixes', '/tutorial/foundries' %> like <code>cnx/</code>).</p> |
Nils Diewald | 729f718 | 2014-07-15 16:22:34 +0000 | [diff] [blame] | 33 | </section> |
| 34 | |
| 35 | |
| 36 | <section id="tut-examples"> |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 37 | |
| 38 | <h3>Example Queries</h3> |
Nils Diewald | 29c0b1d | 2014-11-13 21:14:17 +0000 | [diff] [blame] | 39 | |
| 40 | %# Tests: |
| 41 | %# [is => 'json_pointer', 'result'] |
| 42 | %# [ok => 'json_pointer'] |
| 43 | %# [isnt => 'json_pointer', 'result'] |
| 44 | %# [not_ok => 'json_pointer'] |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 45 | |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 46 | <p><strong>Poliqarp</strong>: Find all occurrences of the lemma "baum" as annotated by the <%= kalamar_tut_link_to 'default foundry', '/tutorial/foundries' %>.</p> |
| 47 | %= kalamar_tut_query poliqarp => '[base=Baum]', 'tests' => [[is => '/query', 'tokens:tt/l:Baum'],[is => '/request/query/wrap/layer', 'lemma'],[is => '/request/query/wrap/foundry', 'tt'], [ok => '/matches/10']] |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 48 | |
Nils Diewald | e2c8381 | 2014-11-11 21:13:18 +0000 | [diff] [blame] | 49 | <p><strong>Poliqarp</strong>: Find all sequences of adjectives as annotated by Treetagger, that are repeated 3 to 5 times in a row.</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 50 | %= kalamar_tut_query poliqarp => '[tt/p=ADJA]{3,5}', 'tests' => [[is => '/query', 'spanRepetition(tokens:tt/p:ADJA{3,5})'], [is => '/request/query/operation', 'operation:repetition'],[is => '/request/query/operands/0/wrap/foundry', 'tt'], [ok => '/matches/5']] |
Nils Diewald | e2c8381 | 2014-11-11 21:13:18 +0000 | [diff] [blame] | 51 | |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 52 | <p><strong>Cosmas-II</strong>: Find all occurrences of the words "der" and "Baum", in case they are in a maximum distance of 5 tokens. The order is not relevant.</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 53 | %= kalamar_tut_query cosmas2 => 'der /w5 Baum', 'tests' => [[is => '/query', 'shrink(129: spanDistance({129: tokens:s:der}, {129: tokens:s:Baum}, [(w[0:5], notOrdered, notExcluded)]))'], [is => '/request/query/operation', 'operation:focus'], [is => '/request/query/@type', 'korap:reference'],[is => '/request/query/operands/0/operands/1/operation', 'operation:class'], [is => '/itemsPerPage', 25], [ok => '/matches/20'], [is => '/matches/4/corpusID', 'WPD'], [is => '/matches/12/corpusID', 'WPD']] |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 54 | |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 55 | <p><strong>Cosmas-II</strong>: Find all sequences of a word starting with a "d" (using a wildcard) followed by an adjective as annotated in the mate foundry, followed by the word "Baum" (ignore the case), that is in a sentence element annotated by the <%= kalamar_tut_link_to 'default foundry', '/tutorial/foundries' %>.</p> |
Nils Diewald | 4802d9e | 2014-11-13 21:24:22 +0000 | [diff] [blame] | 56 | <p><em>Be aware</em>: Minor incompatibilities with implemented languages may be announced with warnings.</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 57 | %= kalamar_tut_query cosmas2 => 'd* MORPH(mate/p=ADJA) $Baum #IN #ELEM(s)', 'tests' => [[ok => '/matches/3'], [is => '/query', 'shrink(130: {131: spanContain({129: <tokens:s />}, {130: spanNext(spanNext(SpanMultiTermQueryWrapper(tokens:s:d*), tokens:mate/p:ADJA), tokens:i:baum)})})'], [is => '/request/query/@type', 'korap:reference'], [is => '/request/query/operation', 'operation:focus'], [is => '/request/query/operands/0/operands/0/operation', 'operation:position'], [is => '/request/query/operands/0/operands/0/operands/1/operands/0/operation', 'operation:sequence'], [is => '/request/query/operands/0/operands/0/operands/1/operands/0/operands/0/wrap/type', 'type:wildcard'], [is => '/request/query/operands/0/operands/0/operands/1/operands/0/operands/1/wrap/key', 'ADJA'], [is => '/request/query/operands/0/operands/0/operands/1/operands/0/operands/1/wrap/foundry', 'mate'], [ok => '/request/query/operands/0/operands/0/operands/1/operands/0/operands/2/wrap/caseInsensitive'], [ok => '/matches/5']] |
Nils Diewald | 29c0b1d | 2014-11-13 21:14:17 +0000 | [diff] [blame] | 58 | |
| 59 | <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 "A" using regular expressions in Treetagger.</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 60 | %= kalamar_tut_query poliqarp => 'contains(<cnx/c=np>,{[opennlp/p=ADV & tt/p="A.*"]})', cutoff => 1, 'tests' => [[is => '/query', 'spanContain(<tokens:cnx/c:np />, {1: spanSegment(tokens:opennlp/p:ADV, SpanMultiTermQueryWrapper(tokens:/tt/p:A.*/))})'], [is => '/request/query/operation', 'operation:position'], [is => '/request/query/frames/0', 'frames:contains'], [is => '/request/query/operands/0/foundry', 'cnx'], [is => '/request/query/operands/0/layer', 'c'], [is => '/request/query/operands/0/foundry', 'cnx'], [is => '/request/query/operands/0/key', 'np'], [is => '/request/query/operands/1/operands/0/wrap/operands/0/foundry', 'opennlp'], [is => '/request/query/operands/1/operands/0/wrap/operands/0/layer', 'p'], [is => '/request/query/operands/1/operands/0/wrap/operands/1/foundry', 'tt'], [is => '/request/query/operands/1/operands/0/wrap/operands/1/type', 'type:regex'], [is => '/request/query/operands/1/operands/0/wrap/operands/1/key', 'A.*'], [ok => '/matches/5']] |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 61 | |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 62 | <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 "die" annotated by the <%= kalamar_tut_link_to 'default foundry', '/tutorial/foundries' %>. Highlight both terms of the sequence.</p> |
| 63 | %= kalamar_tut_query poliqarp => 'startswith(<s>, {1:[cnx/m=PRES]}{2:[base=die]})', cutoff => 1, tests => [[is => '/query', 'spanStartsWith(<tokens:s />, spanNext({1: tokens:cnx/m:PRES}, {2: tokens:tt/l:die}))'], [is => '/request/meta/startPage', 1], [is => '/request/query/operation', 'operation:position'], [is => '/request/query/operands/0/@type','korap:span'], [is => '/request/query/operands/1/operands/0/operation', 'operation:class'], [is => '/request/query/operands/1/operands/1/operation', 'operation:class'], [is => '/request/query/operands/1/operands/1/operands/0/wrap/foundry', 'tt'], [ok => '/matches/4']] |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 64 | |
Nils Diewald | ec591a0 | 2014-11-13 03:11:28 +0000 | [diff] [blame] | 65 | <p><strong>Poliqarp+</strong>: Find all sequences of an article, followed by three to four adjectives and a noun as annotated by the Treetagger foundry, that finish a sentence. Highlight all parts of the sequence.</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 66 | %= kalamar_tut_query poliqarp => 'focus(3:endswith(<s>,{3:[tt/p=ART]{1:{2:[tt/p=ADJA]{3,4}}[tt/p=NN]}}))', cutoff => 1, 'tests' => [[is => '/query', 'shrink(3: spanEndsWith(<tokens:s />, {3: spanNext(tokens:tt/p:ART, {1: spanNext({2: spanRepetition(tokens:tt/p:ADJA{3,4})}, tokens:tt/p:NN)})}))'], [is => '/request/query/operation', 'operation:focus'], [is => '/request/query/operands/0/frames/0', 'frames:endswith'], [ok => '/matches/3'], [is => '/matches/4/corpusID', 'WPD']] |
Nils Diewald | ec591a0 | 2014-11-13 03:11:28 +0000 | [diff] [blame] | 67 | |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 68 | <p><strong>Annis</strong>: Find all occurrences of the sequence of two tokens annotated as adverbs by the <%= kalamar_tut_link_to 'default foundry', '/tutorial/foundries' %>.</p> |
| 69 | %= kalamar_tut_query annis => 'pos="ADV" & pos="ADV" & #1 . #2', 'tests' => [[is => '/query', 'spanNext(tokens:tt/p:ADV, tokens:tt/p:ADV)'], [is => '/request/query/operands/0/wrap/foundry', 'tt'], [is => '/request/query/operands/1/wrap/foundry', 'tt'], [ok => '/matches/5'], [ok => '/matches/15'], [is => '/matches/15/corpusID', 'WPD']] |
Nils Diewald | e2c8381 | 2014-11-11 21:13:18 +0000 | [diff] [blame] | 70 | |
Nils Diewald | 7e25959 | 2014-11-12 19:04:55 +0000 | [diff] [blame] | 71 | <p><strong>CQL</strong>: Find all occurrences of the sequence "der alte Mann".</p> |
Nils Diewald | 2fe12e1 | 2015-03-06 16:47:06 +0000 | [diff] [blame] | 72 | %= kalamar_tut_query cql => '"der alte Mann"', 'tests' => [[is => '/query', 'spanNext(spanNext(tokens:s:der, tokens:s:alte), tokens:s:Mann)'], [is => '/request/query/operation', 'operation:sequence'],[is => '/request/query/operands/0/wrap/key', 'der'],[is => '/request/query/operands/1/wrap/key', 'alte'],[is => '/request/query/operands/2/wrap/key', 'Mann'], [ok => '/matches/5'], [ok => '/matches/5']] |
Nils Diewald | 13bad6a | 2014-07-18 16:44:51 +0000 | [diff] [blame] | 73 | |
Nils Diewald | 4e9fbcb | 2014-07-15 11:45:09 +0000 | [diff] [blame] | 74 | </section> |
| 75 | |
| 76 | % end |