Updated tutorial
diff --git a/dev/demo/build.html b/dev/demo/build.html
index 1a7a86d..9e577de 100644
--- a/dev/demo/build.html
+++ b/dev/demo/build.html
@@ -4,7 +4,13 @@
<title>Complete Demo</title>
<meta charset="utf-8" />
<link type="text/css" rel="stylesheet" href="../css/kalamar.css" />
- <script src="../../public/js/kalamar-0.14.1.js" async="async"></script>
+ <script>//<![CDATA[
+
+ window.KorAP = window.KorAP || {};
+ KorAP.URL = '/';
+
+//]]></script>
+ <script src="../../public/js/kalamar-0.18.0-en.js" async="async"></script>
</head>
<body>
<div id="kalamar-bg"></div>
diff --git a/dev/js/src/hint/array.js b/dev/js/src/hint/array.js
index 2575004..822d658 100644
--- a/dev/js/src/hint/array.js
+++ b/dev/js/src/hint/array.js
@@ -1,3 +1,4 @@
+/*
var menuContent = [
['cnx/c', 'cnx', 'c'],
['mate/c', 'mate', 'c'],
@@ -5,6 +6,7 @@
['xip/c', 'xip', 'c'],
['tt/c', 'tt', 'c']
];
+*/
var namedEntities = [
["I-LOC", "I-LOC ", "Location"],
@@ -192,14 +194,21 @@
define(function () {
var obj = {
"-" : [
+ ["Base Annotation", "base/s=", "Structure"],
["Connexor", "cnx/", "Constituency, Lemma, Morphology, Part-of-Speech, Syntax"],
["CoreNLP", "corenlp/", "Constituency, Named Entities, Part-of-Speech"],
+ ["DeReKo", "dereko/s=", "Structure"],
["Mate", "mate/", "Lemma, Morphology, Part-of-Speech"],
["OpenNLP", "opennlp/", "Part-of-Speech"],
["Schreibgebrauch", "sgbr/", "Lemma, Lemma Variants, Part-of-Speech"],
["TreeTagger", "tt/", "Lemma, Part-of-Speech"],
["Xerox Parser", "xip/", "Constituency, Lemma, Part-of-Speech"]
],
+ "base/s=" : [
+ ["s", "s", "Sentence"],
+ ["p", "p", "Paragraph"],
+ ["t", "t", "Text"]
+ ],
"corenlp/" : [
["Constituency", "c="],
["Named Entity", "ne=" , "Combined"],
diff --git a/templates/doc/ql.html.ep b/templates/doc/ql.html.ep
index 392927b..5ae2cbe 100644
--- a/templates/doc/ql.html.ep
+++ b/templates/doc/ql.html.ep
@@ -39,10 +39,10 @@
%= doc_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']]
<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 <%= doc_link_to 'default foundry', 'data', 'annotation' %>. Highlight both terms of the sequence.</p>
- %= doc_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']]
+ %= doc_query poliqarp => 'startswith(<base/s=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']]
<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>
- %= doc_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']]
+ %= doc_query poliqarp => 'focus(3:endswith(<base/s=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']]
<p><strong>Annis</strong>: Find all occurrences of the sequence of two tokens annotated as adverbs by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.</p>
%= doc_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']]
diff --git a/templates/doc/ql/poliqarp-plus.html.ep b/templates/doc/ql/poliqarp-plus.html.ep
index ecc0967..8ffe0aa 100644
--- a/templates/doc/ql/poliqarp-plus.html.ep
+++ b/templates/doc/ql/poliqarp-plus.html.ep
@@ -164,7 +164,7 @@
<p>You are also able to mix segments and spans in sequences, for example to search for the word "Der" at the beginning of a sentence (which can be interpreted as the first word after the end of a sentence).</p>
- %= doc_query poliqarp => '<s>[orth=Der]'
+ %= doc_query poliqarp => '<base/s=s>[orth=Der]'
<h4>Groups</h4>
@@ -245,19 +245,19 @@
<p>Positional operators compare two matches of subqueries and will match, in case a certain condition regarding the position of both is true.</p>
<p>The <code>contains()</code> operation will match, when a second subquery matches inside the span of a first subquery.</p>
- %= doc_query poliqarp => 'contains(<s>, [tt/p=KOUS])', cutoff => 1
+ %= doc_query poliqarp => 'contains(<base/s=s>, [tt/p=KOUS])', cutoff => 1
<p>The <code>startsWith()</code> operation will match, when a second subquery matches at the beginning of the span of a first subquery.</p>
- %= doc_query poliqarp => 'startsWith(<s>, [tt/p=KOUS])', cutoff => 1
+ %= doc_query poliqarp => 'startsWith(<base/s=s>, [tt/p=KOUS])', cutoff => 1
<p>The <code>endsWith()</code> operation will match, when a second subquery matches at the end of the span of a first subquery.</p>
- %= doc_query poliqarp => 'endsWith(<s>, [opennlp/p=NN])', cutoff => 1
+ %= doc_query poliqarp => 'endsWith(<base/s=s>, [opennlp/p=NN])', cutoff => 1
<p>The <code>matches()</code> operation will match, when a second subquery has the exact same span of a first subquery.</p>
- %= doc_query poliqarp => 'matches(<s>,[tt/p=CARD][tt/p="N.*"])', cutoff => 1
+ %= doc_query poliqarp => 'matches(<base/s=s>,[tt/p=CARD][tt/p="N.*"])', cutoff => 1
<p>The <code>overlaps()</code> operation will match, when a second subquery has an overlapping span with the first subquery.</p>