Generalize documentation helpers
Change-Id: Iaba69a433f25d2160857694b0b434c51c02c0367
diff --git a/templates/doc/ql/annis.html.ep b/templates/doc/ql/annis.html.ep
index e3ca663..24a2145 100644
--- a/templates/doc/ql/annis.html.ep
+++ b/templates/doc/ql/annis.html.ep
@@ -1,15 +1,15 @@
% layout 'main', title => 'KorAP: Annis QL';
-<h2 id="tutorial-top">Annis QL</h2>
+%= page_title
-<p><%= doc_ext_link_to 'ANNIS Query Language (Annis QL or AQL)', "https://corpus-tools.org/annis/aql.html" %>
- is a query language of the <%= doc_ext_link_to 'ANNIS corpus search system', "https://corpus-tools.org/annis/" %>
+<p><%= ext_link_to 'ANNIS Query Language (Annis QL or AQL)', "https://corpus-tools.org/annis/aql.html" %>
+ is a query language of the <%= ext_link_to 'ANNIS corpus search system', "https://corpus-tools.org/annis/" %>
designed particularly to deal with complex linguistic corpora with multiple
annotation layers (e.g. morphology) and various annotation types (e.g. attribute-value
pairs, relations). The concept of AQL is similar to searching node elements and edges
between them, where a node element can be a token or an attribute-value pair.</p>
-<p>KorAP supports the following keywords by using the <%= doc_link_to 'default foundries', 'data', 'annotation' %>: </p>
+<p>KorAP supports the following keywords by using the <%= embedded_link_to 'default foundries', 'data', 'annotation' %>: </p>
<dl>
<dt><code>node</code></dt>
<dd>a node element</dd>
diff --git a/templates/doc/ql/cosmas-2.html.ep b/templates/doc/ql/cosmas-2.html.ep
index e7fba99..d320eb3 100644
--- a/templates/doc/ql/cosmas-2.html.ep
+++ b/templates/doc/ql/cosmas-2.html.ep
@@ -1,8 +1,8 @@
% layout 'main', title => 'KorAP: COSMAS II';
-<h2 id="tutorial-top">COSMAS II</h2>
+%= page_title
-<p>The following documentation introduces some features provided by our version of the COSMAS II Query Language. For more information, please visit the <%= doc_ext_link_to 'online help of COSMAS II', "http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/allgemein.html" %>.</p>
+<p>The following documentation introduces some features provided by our version of the COSMAS II Query Language. For more information, please visit the <%= ext_link_to 'online help of COSMAS II', "http://www.ids-mannheim.de/cosmas2/web-app/hilfe/suchanfrage/eingabe-zeile/syntax/allgemein.html" %>.</p>
<section id="queryterms">
<h3>Query Terms</h3>
@@ -30,7 +30,7 @@
<h4>Lemma Operator</h4>
- <p>Instead of searching for the surface form of a word, a lemma (as annotated by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>) can be requested by prepending the term with the <code>&</code> operator. The form of the lemma is dependent on the annotation.</p>
+ <p>Instead of searching for the surface form of a word, a lemma (as annotated by the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>) can be requested by prepending the term with the <code>&</code> operator. The form of the lemma is dependent on the annotation.</p>
<%= doc_query cosmas2 => '&laufen' %>
<h4>Case Insensitivity Operator</h4>
@@ -40,11 +40,11 @@
<h4>Regular Expression Operator</h4>
- <p>By using the <code>#REG(...)</code> operator, query terms can be formulated using <%= doc_link_to 'regular expressions', 'ql', 'regexp' %>.</p>
+ <p>By using the <code>#REG(...)</code> operator, query terms can be formulated using <%= embedded_link_to 'regular expressions', 'ql', 'regexp' %>.</p>
<blockquote class="bug">
- <p>Regular expressions in COSMAS II are not yet properly implemented in KorAP. If you want to use regular expressions, please refer to <%= doc_link_to 'Poliqarp', 'ql', 'poliqarp-plus#regexp' %>.</p>
+ <p>Regular expressions in COSMAS II are not yet properly implemented in KorAP. If you want to use regular expressions, please refer to <%= embedded_link_to 'Poliqarp', 'ql', 'poliqarp-plus#regexp' %>.</p>
</blockquote>
</section>
@@ -81,10 +81,10 @@
<p>Distance operators accept the definition of a distance interval by appending numerical values. If only a single numerical value is given (e.g. in <code>/+s4</code>), the defined distance is considered a maximum distance. So both operands can or can not occur in a distance equal or lower the given value. If two numerical values are given separated by the <code>:</code> symbol (e.g. in <code>/+s4:2</code>), they define an interval, in which the distance is valid.</p>
%# <blockquote class="warning">
-%# <p>Currently, intervals are interpreted as MIN:MAX only, while COSMAS 2 defines intervals as being MAX:MIN, while taking the smaller number as being the minimum value of the interval and the greater number as being the maximum value of the interval. <%= doc_ext_link_to 'KorAP will adopt the behaviour of COSMAS II in the near future', "https://github.com/KorAP/Koral/issues/67" %>.</p>
+%# <p>Currently, intervals are interpreted as MIN:MAX only, while COSMAS 2 defines intervals as being MAX:MIN, while taking the smaller number as being the minimum value of the interval and the greater number as being the maximum value of the interval. <%= ext_link_to 'KorAP will adopt the behaviour of COSMAS II in the near future', "https://github.com/KorAP/Koral/issues/67" %>.</p>
%# </blockquote>
- <p>Distance operators rely on the <%= doc_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
+ <p>Distance operators rely on the <%= embedded_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
<h4>Word Distance Operator</h4>
@@ -105,7 +105,7 @@
<h4>Sentence Distance Operator</h4>
<p>The sentence distance operator <code>s</code> defines how many sentences are allowed or are not allowed in-between two search operands.</p>
- <p>The sentence distance relies on the <%= doc_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
+ <p>The sentence distance relies on the <%= embedded_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
<p>Search for two operands occuring in the same or a following sentence in arbitrary order:</p>
%= doc_query cosmas2 => 'offen /s1 Geschäft'
@@ -119,7 +119,7 @@
<h4>Paragraph Distance Operator</h4>
<p>The paragraph distance operator <code>p</code> defines how many paragraphs are allowed or are not allowed in-between two search operands.</p>
- <p>The paragraph distance relies on the <%= doc_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
+ <p>The paragraph distance relies on the <%= embedded_link_to 'default foundry', 'data', 'annotation' %> annotation for document structures.</p>
<p>Search for two operands occuring in the same or a following paragraph in arbitrary order:</p>
%= doc_query cosmas2 => 'offen /p1 Geschäft'
@@ -136,7 +136,7 @@
<h4>Multiple Distance Operators</h4>
- %= doc_uc
+ %= under_construction
<h4>Nesting of multiple Distance Operations</h4>
@@ -147,18 +147,18 @@
<section id="annotation-operators">
<h3>Annotation Operators</h3>
- %= doc_uc
+ %= under_construction
%# MORPH and ELEM
</section>
<section id="combination-operators">
<h3>Combination Operators</h3>
- %= doc_uc
+ %= under_construction
%# IN and OV
</section>
<section id="area-operators">
<h3>Area Operators</h3>
- %= doc_uc
+ %= under_construction
%# LINKS, RECHTS, INKLUSIVE, EXKLUSIVE, BED
</section>
diff --git a/templates/doc/ql/cql.html.ep b/templates/doc/ql/cql.html.ep
index cf580de..5c51e1e 100644
--- a/templates/doc/ql/cql.html.ep
+++ b/templates/doc/ql/cql.html.ep
@@ -1,6 +1,6 @@
% layout 'main', title => 'KorAP: CQL';
-<h2 id="tutorial-top">CQL</h2>
+%= page_title
<p>CQL stands for Contextual Query Language. The main purpose of CQL is to represent queries
to information retrieval systems. In fact, CQL is commonly used together with the Search
@@ -27,6 +27,6 @@
<section id="References">
<h3>References: </h3>
- <p><%= doc_ext_link_to 'searchRetrieve: Part 5', "http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/os/part5-cql/searchRetrieve-v1.0-os-part5-cql.doc" %>.
- <%= doc_ext_link_to 'CQL: The Contextual Query Language version 1.0', "https://www.loc.gov/standards/sru/cql/" %>, OASIS, January 2013</p>
+ <p><%= ext_link_to 'searchRetrieve: Part 5', "http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/os/part5-cql/searchRetrieve-v1.0-os-part5-cql.doc" %>.
+ <%= ext_link_to 'CQL: The Contextual Query Language version 1.0', "https://www.loc.gov/standards/sru/cql/" %>, OASIS, January 2013</p>
</section>
diff --git a/templates/doc/ql/fcsql.html.ep b/templates/doc/ql/fcsql.html.ep
index fdd4d9d..843438e 100644
--- a/templates/doc/ql/fcsql.html.ep
+++ b/templates/doc/ql/fcsql.html.ep
@@ -1,12 +1,12 @@
% layout 'main', title => 'KorAP: FCSQL';
-<h2 id="tutorial-top">FCSQL</h2>
+%= page_title
<p>FCS-QL is a query language specifically developed to accomodate advanced search in
- <%= doc_ext_link_to 'Clarin Federated Content Search (FCS)', "https://www.clarin.eu/content/federated-content-search-clarin-fcs" %>,
+ <%= ext_link_to 'Clarin Federated Content Search (FCS)', "https://www.clarin.eu/content/federated-content-search-clarin-fcs" %>,
that allows searching through annotated data.
Accordingly, FCS-QL is primarily intended to represent queries involving annotation layers
-such as part-of-speech and lemma. FCS-QL grammar is fairly similar to <%= doc_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %> since it was
+such as part-of-speech and lemma. FCS-QL grammar is fairly similar to <%= embedded_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %> since it was
built heavily based on Poliqarp/CQP.</p>
<p>In FCS-QL, foundries are called qualifiers. A combination of a foundry and a layer is
@@ -43,7 +43,7 @@
%= doc_query fcsql => '[text = "Semmel"]', cutoff => 1
%= doc_query fcsql => '[text = "essen"/c]', cutoff => 1
- <p>Querying adverbs from the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.</p>
+ <p>Querying adverbs from the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.</p>
%= doc_query fcsql => '[pos="ADV"]', cutoff => 1
@@ -72,7 +72,7 @@
<h4>Empty token</h4>
- <p>Like in <%= doc_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %>, an empty token is signified by <code>[]</code>
+ <p>Like in <%= embedded_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %>, an empty token is signified by <code>[]</code>
which means any token. Due to the
excessive number of results, empty token is not allowed to be used independently, but in
combination with other tokens, for instance in a sequence query.</p>
diff --git a/templates/doc/ql/poliqarp-plus.html.ep b/templates/doc/ql/poliqarp-plus.html.ep
index 912b485..6dabcbc 100644
--- a/templates/doc/ql/poliqarp-plus.html.ep
+++ b/templates/doc/ql/poliqarp-plus.html.ep
@@ -1,6 +1,6 @@
% layout 'main', title => 'KorAP: Poliqarp+';
-<h2 id="tutorial-top">Poliqarp+</h2>
+%= page_title
<p>The following documentation introduces all features provided by our version of the Poliqarp Query Language and some KorAP specific extensions.</p>
@@ -24,7 +24,7 @@
<h4 id="regexp">Regular Expressions</h4>
- <p>Segments can also be queried using <%= doc_link_to 'regular expressions', 'ql', 'regexp' %> - by surrounding the segment with double quotes.</p>
+ <p>Segments can also be queried using <%= embedded_link_to 'regular expressions', 'ql', 'regexp' %> - by surrounding the segment with double quotes.</p>
%= doc_query poliqarp => loc('Q_poliqarp_re', '** "r(u|a)n"'), cutoff => 1
@@ -70,12 +70,12 @@
%= doc_query poliqarp => loc('Q_poliqarp_complexre', '** [orth="r(u|a)n"/xi]'), cutoff => 1
- <p>Another special key is <code>base</code>, refering to the lemma annotation of the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.
+ <p>Another special key is <code>base</code>, refering to the lemma annotation of the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.
The following query finds all occurrences of segments annotated as a specified lemma by the default foundry.</p>
%= doc_query poliqarp => loc('Q_poliqarp_complexlemma', '** [base=Tree]'), cutoff => 1
- <p>The third special key is <code>pos</code>, refering to the part-of-speech annotation of the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.
+ <p>The third special key is <code>pos</code>, refering to the part-of-speech annotation of the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.
The following query finds all attributive adjectives:</p>
%= doc_query poliqarp => loc('Q_poliqarp_complexpos', '** [pos=ADJA]'), cutoff => 1
@@ -97,7 +97,7 @@
<blockquote class="warning">
<p>Beware: Negated complex segments can't be searched as a single statement.
- However, they work in case they are part of a <%= doc_link_to 'sequence', 'ql', 'poliqarp-plus#syntagmatic-operators-sequence' %>.</p>
+ However, they work in case they are part of a <%= embedded_link_to 'sequence', 'ql', 'poliqarp-plus#syntagmatic-operators-sequence' %>.</p>
</blockquote>
<h4 id="empty-segments">Empty Segments</h4>
@@ -106,11 +106,11 @@
%= doc_query poliqarp => '[]', cutoff => 1
- <p>Empty segments are useful to express distances of words by using <%= doc_link_to 'repetitions', 'ql', 'poliqarp-plus#syntagmatic-operators-repetitions' %>.</p>
+ <p>Empty segments are useful to express distances of words by using <%= embedded_link_to 'repetitions', 'ql', 'poliqarp-plus#syntagmatic-operators-repetitions' %>.</p>
<blockquote class="warning">
<p>Beware: Empty segments can't be searched as a single statement.
- However, they work in case they are part of a <%= doc_link_to 'sequence', 'ql', 'poliqarp-plus#syntagmatic-operators-sequence' %>.</p>
+ However, they work in case they are part of a <%= embedded_link_to 'sequence', 'ql', 'poliqarp-plus#syntagmatic-operators-sequence' %>.</p>
</blockquote>
</section>
@@ -191,7 +191,7 @@
<h4 id="syntagmatic-operators-repetitions">Repetition</h4>
- <p>Repetitions in Poliqarp are realized as in <%= doc_link_to 'regular expressions', 'ql', 'regexp' %>, by giving quantifieres in curly brackets.</p>
+ <p>Repetitions in Poliqarp are realized as in <%= embedded_link_to 'regular expressions', 'ql', 'regexp' %>, by giving quantifieres in curly brackets.</p>
<p>To search for a sequence of three occurrences of a defined string, you can formulate your query in any of the following ways - they will have the same results:</p>
%= doc_query poliqarp => loc('Q_poliqarp_repmanual', '** the the the'), cutoff => 1
@@ -231,7 +231,7 @@
<p>Keep in mind that optionality may be somehow <i>inherited</i>, for example an entire query becomes optional as soon as one segment of an alternation is optional.</p>
</blockquote>
- <p>Repetition can also be used to express distances between segments by using <%= doc_link_to 'empty segments', 'ql', 'poliqarp-plus#empty-segments' %>.</p>
+ <p>Repetition can also be used to express distances between segments by using <%= embedded_link_to 'empty segments', 'ql', 'poliqarp-plus#empty-segments' %>.</p>
%= doc_query poliqarp => loc('Q_poliqarp_seqdistance1', '** [base=the][][base=Tree]'), cutoff => 1
%= doc_query poliqarp => loc('Q_poliqarp_seqdistance2', '** [base=the][]{2}[base=Tree]'), cutoff => 1
@@ -246,7 +246,7 @@
<h4>Position</h4>
- <p>Sequences as shown above can all be nested in further complex queries and treated as subqueries (see <%= doc_link_to 'class operators', 'ql', 'poliqarp-plus#class-operators' %> on how to later access these subqueries directly).</p>
+ <p>Sequences as shown above can all be nested in further complex queries and treated as subqueries (see <%= embedded_link_to 'class operators', 'ql', 'poliqarp-plus#class-operators' %> on how to later access these subqueries directly).</p>
<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>
diff --git a/templates/doc/ql/regexp.html.ep b/templates/doc/ql/regexp.html.ep
index 095d622..f1a5995 100644
--- a/templates/doc/ql/regexp.html.ep
+++ b/templates/doc/ql/regexp.html.ep
@@ -1,6 +1,6 @@
% layout 'main', title => 'KorAP: Regular Expressions';
-<h2 id="tutorial-top">Regular Expressions</h2>
+%= page_title
<p>Regular expressions are patterns describing a set of strings.</p>
<p>In the KorAP backend a wide range of operators is supported, but only the following are guaranteed to be stable throughout the system:</p>