Rename routes and templates in corpora package

This commit is contained in:
Patrick Jentsch 2023-04-18 11:32:04 +02:00
parent 8dd3669af4
commit a844cdb45b
21 changed files with 94 additions and 294 deletions

View File

@ -9,11 +9,11 @@ def corpus_follower_permission_required(*permissions):
@wraps(f)
def decorated_function(*args, **kwargs):
corpus_id = kwargs.get('corpus_id')
cfa = CorpusFollowerAssociation.query.filter_by(corpus_id=corpus_id, follower_id=current_user.id).first()
if cfa is None:
abort(403)
corpus = cfa.corpus
corpus = Corpus.query.get_or_404(corpus_id)
if not (corpus.user == current_user or current_user.is_administrator()):
cfa = CorpusFollowerAssociation.query.filter_by(corpus_id=corpus_id, follower_id=current_user.id).first()
if cfa is None:
abort(403)
if not all([cfa.role.has_permission(p) for p in permissions]):
abort(403)
return f(*args, **kwargs)

View File

@ -14,9 +14,7 @@ from ..decorators import corpus_follower_permission_required
from ..utils import corpus_endpoint_arguments_constructor as corpus_eac
from . import bp
from .forms import CreateCorpusFileForm, UpdateCorpusFileForm
from .utils import (
corpus_file_dynamic_list_constructor as corpus_file_dlc
)
from .utils import corpus_file_dynamic_list_constructor as corpus_file_dlc
@bp.route('/<hashid:corpus_id>/files')
@ -60,7 +58,7 @@ def create_corpus_file(corpus_id):
flash(f'Corpus File "{corpus_file.filename}" added', category='corpus')
return '', 201, {'Location': corpus.url}
return render_template(
'corpora/files/create_corpus_file.html.j2',
'corpora/files/create.html.j2',
title='Add corpus file',
form=form,
corpus=corpus

View File

@ -40,7 +40,7 @@ def create_corpus():
flash(f'Corpus "{corpus.title}" created', 'corpus')
return redirect(corpus.url)
return render_template(
'corpora/create_corpus.html.j2',
'corpora/create.html.j2',
title='Create corpus',
form=form
)
@ -72,13 +72,13 @@ def corpus(corpus_id):
abort(403)
@bp.route('/<hashid:corpus_id>/analyse')
@bp.route('/<hashid:corpus_id>/analysis')
@corpus_follower_permission_required('VIEW')
@register_breadcrumb(bp, '.entity.analyse', 'Analyse', endpoint_arguments_constructor=corpus_eac)
def analyse_corpus(corpus_id):
@register_breadcrumb(bp, '.entity.analysis', 'Analysis', endpoint_arguments_constructor=corpus_eac)
def analysis(corpus_id):
corpus = Corpus.query.get_or_404(corpus_id)
return render_template(
'corpora/analyse_corpus.html.j2',
'corpora/analysis.html.j2',
corpus=corpus,
title=f'Analyse Corpus {corpus.title}'
)

View File

@ -7,8 +7,6 @@ class CorpusAnalysisApp {
container: document.querySelector('#corpus-analysis-app-container'),
extensionTabs: document.querySelector('#corpus-analysis-app-extension-tabs'),
initModal: document.querySelector('#corpus-analysis-app-init-modal'),
initError: document.querySelector('#corpus-analysis-app-init-error'),
initProgress: document.querySelector('#corpus-analysis-app-init-progress'),
overview: document.querySelector('#corpus-analysis-app-overview')
};
// Materialize elements
@ -27,6 +25,7 @@ class CorpusAnalysisApp {
init() {
this.disableActionElements();
this.elements.m.initModal.open();
// Init data
this.data.cQiClient = new CQiClient(this.settings.corpusId);
this.data.cQiClient.connect()
@ -43,14 +42,17 @@ class CorpusAnalysisApp {
this.elements.m.initModal.close();
},
cQiError => {
this.elements.initError.innerText = JSON.stringify(cQiError);
this.elements.initError.classList.remove('hide');
this.elements.initProgress.classList.add('hide');
let errorsElement = this.elements.initModal.querySelector('.errors');
let progressElement = this.elements.initModal.querySelector('.progress');
errorsElement.innerText = JSON.stringify(cQiError);
errorsElement.classList.remove('hide');
progressElement.classList.add('hide');
if ('payload' in cQiError && 'code' in cQiError.payload && 'msg' in cQiError.payload) {
app.flash(`${cQiError.payload.code}: ${cQiError.payload.msg}`, 'error');
}
}
);
// Add event listeners
for (let extensionSelectorElement of this.elements.overview.querySelectorAll('.extension-selector')) {
extensionSelectorElement.addEventListener('click', () => {

View File

@ -108,6 +108,21 @@
app.flash(message, message);
}
// Initialize manual modal
let manualModalTableOfContentsElement = document.querySelector('#manual-modal-table-of-contents');
let manualModalTableOfContents = M.Tabs.init(manualModalTableOfContentsElement);
let manualModalElement = document.querySelector('#manual-modal');
let manualModal = M.Modal.init(
manualModalElement,
{
onOpenStart: (manualModalElement, modalTriggerElement) => {
if ('manualModalChapter' in modalTriggerElement.dataset) {
manualModalTableOfContents.select(modalTriggerElement.dataset.manualModalChapter);
}
}
}
);
// Initialize terms of use modal
const termsOfUseModal = document.getElementById('terms-of-use-modal');
M.Modal.init(

View File

@ -9,9 +9,9 @@
<input class="validate corpus-analysis-action" id="concordance-extension-form-query" name="query" type="text" required pattern=".*\S+.*" placeholder="Type in your query or use the Query Builder on the right"</input>
<label for="concordance-extension-form-query">Query</label>
<span class="error-color-text helper-text hide" id="concordance-extension-error"></span>
<a class="modal-trigger" href="#cql-tutorial-modal" style="margin-left: 40px;"><i class="material-icons" style="font-size: inherit;">help</i> Corpus Query Language tutorial</a>
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-cqp-query-language" href="#manual-modal" style="margin-left: 40px;"><i class="material-icons" style="font-size: inherit;">help</i> Corpus Query Language tutorial</a>
<span> | </span>
<a class="modal-trigger" href="#tagsets-modal"><i class="material-icons" style="font-size: inherit;">info</i> Tagsets</a>
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-tagsets" href="#manual-modal"><i class="material-icons" style="font-size: inherit;">info</i> Tagsets</a>
<span> | </span>
<a class="modal-trigger" href="#example-modal"><i class="material-icons" style="font-size: inherit;">info</i> Examples</a>
</div>

View File

@ -32,216 +32,25 @@
</div>
</div>
</div>
{% include "corpora/analyse_corpus.reader.html.j2" %}
{% include "corpora/analyse_corpus.concordance.html.j2" %}
{# #}
{% include "corpora/_analysis/reader.html.j2" %}
{% include "corpora/_analysis/concordance.html.j2" %}
{% endblock page_content %}
{% block modals %}
{{ super() }}
<div class="modal no-autoinit" id="corpus-analysis-app-init-modal">
<div class="modal-content">
<h4>Initializing session...</h4>
<p>If the loading takes to long or an error occured,
<a onclick="window.location.reload()" href="#">click here</a>
to refresh your session or
<a href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}">go back</a>!
<h4>Initializing session</h4>
<p>
If initialization takes longer than usual or an error occurs, <a onclick="window.location.reload()" href="#">reload the page</a>.
</p>
<div class="progress" id="corpus-analysis-app-init-progress">
<div class="progress">
<div class="indeterminate"></div>
</div>
<p class="error-color-text hide" id="corpus-analysis-app-init-error"></p>
</div>
</div>
<div class="modal" id="cql-tutorial-modal">
<div class="modal-content">
{% with headline_num=4 %}
{% include "main/manual/_08_cqp_query_language.html.j2" %}
{% endwith %}
</div>
</div>
<div class="modal" id="tagsets-modal">
<div class="modal-content">
<h4>Tagsets</h4>
<ul class="tabs">
<li class="tab"><a class="active" href="#simple_pos-tagset">simple_pos</a></li>
<li class="tab"><a href="#english-ent_type-tagset">English ent_type</a></li>
<li class="tab"><a href="#english-pos-tagset">English pos</a></li>
<li class="tab"><a href="#german-ent_type-tagset">German ent_type</a></li>
<li class="tab"><a href="#german-pos-tagset">German pos</a></li>
</ul>
<div id="simple_pos-tagset">
<h5>simple_pos tagset</h5>
<ul>
<li>ADJ: adjective</li>
<li>ADP: adposition</li>
<li>ADV: adverb</li>
<li>AUX: auxiliary verb</li>
<li>CONJ: coordinating conjunction</li>
<li>DET: determiner</li>
<li>INTJ: interjection</li>
<li>NOUN: noun</li>
<li>NUM: numeral</li>
<li>PART: particle</li>
<li>PRON: pronoun</li>
<li>PROPN: proper noun</li>
<li>PUNCT: punctuation</li>
<li>SCONJ: subordinating conjunction</li>
<li>SYM: symbol</li>
<li>VERB: verb</li>
<li>X: other</li>
</ul>
</div>
<div id="english-ent_type-tagset">
<h5>English ent_type tagset</h5>
<ul>
<li>CARDINAL: Numerals that do not fall under another type</li>
<li>DATE: Absolute or relative dates or periods</li>
<li>EVENT: Named hurricanes, battles, wars, sports events, etc.</li>
<li>FAC: Buildings, airports, highways, bridges, etc.</li>
<li>GPE: Countries, cities, states</li>
<li>LANGUAGE: Any named language</li>
<li>LAW: Named documents made into laws.</li>
<li>LOC: Non-GPE locations, mountain ranges, bodies of water</li>
<li>MONEY: Monetary values, including unit</li>
<li>NORP: Nationalities or religious or political groups</li>
<li>ORDINAL: "first" "second" etc.</li>
<li>ORG: Companies, agencies, institutions, etc.</li>
<li>PERCENT: Percentage, including "%"</li>
<li>PERSON: People, including fictional</li>
<li>PRODUCT: Objects, vehicles, foods, etc. (not services)</li>
<li>QUANTITY: Measurements, as of weight or distance</li>
<li>TIME: Times smaller than a day</li>
<li>WORK_OF_ART: Titles of books, songs, etc.</li>
</ul>
</div>
<div id="english-pos-tagset">
<h5>English pos tagset</h5>
<ul>
<li>ADD: email</li>
<li>AFX: affix</li>
<li>CC: conjunction, coordinating</li>
<li>CD: cardinal number</li>
<li>DT: determiner</li>
<li>EX: existential there</li>
<li>FW: foreign word</li>
<li>HYPH: punctuation mark, hyphen</li>
<li>IN: conjunction, subordinating or preposition</li>
<li>JJ: adjective</li>
<li>JJR: adjective, comparative</li>
<li>JJS: adjective, superlative</li>
<li>LS: list item marker</li>
<li>MD: verb, modal auxiliary</li>
<li>NFP: superfluous punctuation</li>
<li>NN: noun, singular or mass</li>
<li>NNP: noun, proper singular</li>
<li>NNPS: noun, proper plural</li>
<li>NNS: noun, plural</li>
<li>PDT: predeterminer</li>
<li>POS: possessive ending</li>
<li>PRP: pronoun, personal</li>
<li>PRP$: pronoun, possessive RB: adverb</li>
<li>RBR: adverb, comparative</li>
<li>RBS: adverb, superlative</li>
<li>RP: adverb, particle</li>
<li>SYM: symbol</li>
<li>TO: infinitival "to"</li>
<li>UH: interjection</li>
<li>VB: verb, base form</li>
<li>VBD: verb, past tense</li>
<li>VBG: verb, gerund or present participle</li>
<li>VBN: verb, past participle</li>
<li>VBP: verb, non-3rd person singular present</li>
<li>VBZ: verb, 3rd person singular present</li>
<li>WDT: wh-determiner</li>
<li>WP: wh-pronoun, personal</li>
<li>WP$: wh-pronoun, possessive</li>
<li>WRB: wh-adverb</li>
<li>XX: unknown</li>
<li>``: opening quotation mark</li>
<li>$: symbol, currency</li>
<li>'': closing quotation mark</li>
<li>: punctuation mark, comma</li>
<li>-LRB-: left round bracket</li>
<li>-RRB-: right round bracket</li>
<li>.: punctuation mark, sentence closer</li>
<li>:: punctuation mark, colon or ellipsis</li>
</ul>
</div>
<div id="german-ent_type-tagset">
<h5>German ent_type tagset</h5>
<ul>
<li>LOC: Non-GPE locations, mountain ranges, bodies of water</li>
<li>MISC: Miscellaneous entities, e.g. events, nationalities, products or works of art</li>
<li>ORG: Companies, agencies, institutions, etc.</li>
<li>PER: Named person or family.</li>
</ul>
</div>
<div id="german-pos-tagset">
<h5>German pos tagset</h5>
<ul>
<li>ADJA: adjective, attributive</li>
<li>ADJD: adjective, adverbial or predicative</li>
<li>ADV: adverb</li>
<li>APPO: postposition</li>
<li>APPR: preposition; circumposition left</li>
<li>APPRART: preposition with article</li>
<li>APZR: circumposition right</li>
<li>ART: definite or indefinite article</li>
<li>CARD: cardinal number</li>
<li>FM: foreign language material</li>
<li>ITJ: interjection</li>
<li>KOKOM: comparative conjunction</li>
<li>KON: coordinate conjunction</li>
<li>KOUI: subordinate conjunction with \zu\ and infinitive</li>
<li>KOUS: subordinate conjunction with sentence</li>
<li>NE: proper noun</li>
<li>NN: noun, singular or mass</li>
<li>NNE: proper noun</li>
<li>PDAT: attributive demonstrative pronoun</li>
<li>PDS: substituting demonstrative pronoun</li>
<li>PIAT: attributive indefinite pronoun without determiner</li>
<li>PIS: substituting indefinite pronoun</li>
<li>PPER: non-reflexive personal pronoun</li>
<li>PPOSAT: attributive possessive pronoun</li>
<li>PPOSS: substituting possessive pronoun</li>
<li>PRELAT: attributive relative pronoun</li>
<li>PRELS: substituting relative pronoun</li>
<li>PRF: reflexive personal pronoun</li>
<li>PROAV: pronominal adverb</li>
<li>PTKA: particle with adjective or adverb</li>
<li>PTKANT: answer particle</li>
<li>PTKNEG: negative particle</li>
<li>PTKVZ: separable verbal particle</li>
<li>PTKZU: "zu" before infinitive</li>
<li>PWAT: attributive interrogative pronoun</li>
<li>PWAV: adverbial interrogative or relative pronoun</li>
<li>PWS: substituting interrogative pronoun</li>
<li>TRUNC: word remnant</li>
<li>VAFIN: finite verb, auxiliary</li>
<li>VAIMP: imperative, auxiliary</li>
<li>VAINF: infinitive, auxiliary</li>
<li>VAPP: perfect participle, auxiliary</li>
<li>VMFIN: finite verb, modal</li>
<li>VMINF: infinitive, modal</li>
<li>VMPP: perfect participle, modal</li>
<li>VVFIN: finite verb, full</li>
<li>VVIMP: imperative, full</li>
<li>VVINF: infinitive, full</li>
<li>VVIZU: infinitive with "zu" full</li>
<li>VVPP: perfect participle, full</li>
<li>XY: non-word containing non-letter</li>
<li>$(: other sentence-internal punctuation mark</li>
<li>$,: comma</li>
<li>$.: sentence-final punctuation mark</li>
</ul>
</div>
<p class="errors error-color-text hide"></p>
</div>
</div>
@ -280,7 +89,7 @@
<div class="nav-wrapper" id="query-builder-nav">
<a href="#!" class="brand-logo"><i class="material-icons">build</i>Query Builder (beta)</a>
<i class="material-icons close right" id="close-query-builder">close</i>
<a class="modal-trigger" href="#query-builder-tutorial-modal" >
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal">
<i class="material-icons right tooltipped" id="query-builder-tutorial-info-icon" data-position="bottom" data-tooltip="Click here if you are unsure how to use the Query Builder <br>and want to find out what other options it offers.">help</i>
</a>
</div>
@ -293,7 +102,7 @@
<div class="row">
<h6 class="col s2">Your Query:
<a class="modal-trigger" href="#query-builder-tutorial-modal">
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal">
<i class="material-icons left" id="general-options-query-builder-tutorial-info-icon">help_outline</i></a>
</h6>
</div>
@ -316,7 +125,7 @@
<div id="structural-attr" class="hide">
<p></p>
<h6>Which structural attribute do you want to add to your query?<a class="modal-trigger" href="#query-builder-tutorial-modal"><i class="material-icons left" id="add-structural-attribute-tutorial-info-icon">help_outline</i></a></h6>
<h6>Which structural attribute do you want to add to your query?<a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal"><i class="material-icons left" id="add-structural-attribute-tutorial-info-icon">help_outline</i></a></h6>
<p></p>
<div class="row">
<div class="col s12">
@ -409,7 +218,7 @@
<p></p>
<div class="row" id="token-kind-selector">
<div class="col s5">
<h6>Which kind of token are you looking for? <a class="modal-trigger" href="#query-builder-tutorial-modal"><i class="material-icons left" id="token-tutorial-info-icon">help_outline</i></a></h6>
<h6>Which kind of token are you looking for? <a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal"><i class="material-icons left" id="token-tutorial-info-icon">help_outline</i></a></h6>
</div>
<div class="input-field col s3">
<select id="token-attr">
@ -525,7 +334,7 @@
</div>
<div id="token-edit-options">
<div class="row">
<h6>Options to edit your token: <a class="modal-trigger" href="#query-builder-tutorial-modal"><i class="material-icons left" id="edit-options-tutorial-info-icon">help_outline</i></a></h6>
<h6>Options to edit your token: <a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal"><i class="material-icons left" id="edit-options-tutorial-info-icon">help_outline</i></a></h6>
</div>
<p></p>
<div class="row">
@ -595,38 +404,6 @@
</div>
</div>
<div class="modal modal-fixed-footer" id="query-builder-tutorial-modal">
<div class="modal-content" >
<div id="query-builder-tutorial-start"></div>
<ul class="tabs">
<li class="tab"><a class="active" href="#query-builder-tutorial">Query Builder Tutorial</a></li>
{# <li class="tab"><a href="#qb-examples">Examples</a></li> #}
<li class="tab"><a href="#cql-cb-tutorial">Corpus Query Language Tutorial</a></li>
<li class="tab"><a href="#tagsets-cb-tutorial">Tagsets</a></li>
</ul>
<div id="query-builder-tutorial">
{% include "main/manual/_09_query_builder.html.j2" %}
</div>
{# <div id="qb-examples"></div> #}
<div id ="cql-cb-tutorial">
{% with headline_num=4 %}
{% include "main/manual/_08_cqp_query_language.html.j2" %}
{% endwith %}
</div>
<div id="tagsets-cb-tutorial">
<h4>Tagsets</h4>
{% include "main/manual/_10_tagsets.html.j2" %}
</div>
<div class="fixed-action-btn">
<a class="btn-floating btn-large teal" id="scroll-up-button-query-builder-tutorial" href='#query-builder-tutorial-start'>
<i class="large material-icons">arrow_upward</i>
</a>
</div>
</div>
</div>
{% endblock modals %}
{% block scripts %}

View File

@ -61,7 +61,7 @@
<a class="action-button btn disabled waves-effect waves-light" data-action="build-request" style="width: 100%;"><i class="nopaque-icons left">K</i>Build</a>
</div>
<div class="col s12 l6" style="padding: 0 2.5px;">
<a class="action-button btn disabled waves-effect waves-light" data-action="analyze" href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}" style="width: 100%;"><i class="material-icons left">search</i>Analyze</a>
<a class="action-button btn disabled waves-effect waves-light" data-action="analyze" href="{{ url_for('corpora.analysis', corpus_id=corpus.id) }}" style="width: 100%;"><i class="material-icons left">search</i>Analyze</a>
</div>
<div class="col s12 l6" style="padding: 5px 2.5px 0 2.5px;">
<a class="btn waves-effect waves-light modal-trigger" href="#publishing-modal" style="width: 100%;"><i class="material-icons left">publish</i>Publishing</a>

View File

@ -1,39 +1,47 @@
<div id="manual-modal" class="modal">
<div id="manual-modal" class="modal no-autoinit">
<div class="modal-content">
<h2>Manual</h2>
<div id="manual-table-of-contents">
<ul class="tabs">
<li class="tab"><a href="#manual-modal-introduction">Introduction</a></li>
<li class="tab"><a href="#manual-modal-registration-and-log-in">Registration and Log in</a></li>
<li class="tab"><a href="#manual-modal-dashboard">Dashboard</a></li>
<li class="tab"><a href="#manual-modal-services">Services</a></li>
<li class="tab"><a href="#manual-modal-a-closer-look-at-the-corpus-analysis">A closer look at the Corpus Analysis</a></li>
<li class="tab"><a href="#manual-modal-cqp-query-language">CQP Query Language</a></li>
</ul>
</div>
<ul class="tabs no-autoinit" id="manual-modal-table-of-contents">
<li class="tab"><a href="#manual-modal-introduction">Introduction</a></li>
<li class="tab"><a href="#manual-modal-registration-and-log-in">Registration and Log in</a></li>
<li class="tab"><a href="#manual-modal-dashboard">Dashboard</a></li>
<li class="tab"><a href="#manual-modal-services">Services</a></li>
<li class="tab"><a href="#manual-modal-a-closer-look-at-the-corpus-analysis">A closer look at the Corpus Analysis</a></li>
<li class="tab"><a href="#manual-modal-cqp-query-language">CQP Query Language</a></li>
<li class="tab"><a href="#manual-modal-query-builder">Query Builder</a></li>
<li class="tab"><a href="#manual-modal-tagsets">Tagsets</a></li>
</ul>
<div id="manual-modal-introduction">
<br>
{% include "main/manual/_01_introduction.html.j2" %}
{% include "main/_manual_modal/_01_introduction.html.j2" %}
</div>
<div id="manual-modal-registration-and-log-in">
<br>
{% include "main/manual/_02_registration_and_log_in.html.j2" %}
{% include "main/_manual_modal/_02_registration_and_log_in.html.j2" %}
</div>
<div id="manual-modal-dashboard">
<br>
{% include "main/manual/_03_dashboard.html.j2" %}
{% include "main/_manual_modal/_03_dashboard.html.j2" %}
</div>
<div id="manual-modal-services">
<br>
{% include "main/manual/_06_services.html.j2" %}
{% include "main/_manual_modal/_06_services.html.j2" %}
</div>
<div id="manual-modal-a-closer-look-at-the-corpus-analysis">
<br>
{% include "main/manual/_07_a_closer_look_at_the_corpus_analysis.html.j2" %}
{% include "main/_manual_modal/_07_a_closer_look_at_the_corpus_analysis.html.j2" %}
</div>
<div id="manual-modal-cqp-query-language">
<br>
{% include "main/manual/_08_cqp_query_language.html.j2" %}
{% include "main/_manual_modal/_08_cqp_query_language.html.j2" %}
</div>
<div id="manual-modal-query-builder">
<br>
{% include "main/_manual_modal/_09_query_builder.html.j2" %}
</div>
<div id="manual-modal-tagsets">
<br>
{% include "main/_manual_modal/_10_tagsets.html.j2" %}
</div>
</div>
<div class="modal-footer">

View File

@ -1,4 +1,4 @@
<h2>Query Builder Tutorial</h2>
<h3 class="manual-chapter-title">Query Builder Tutorial</h3>
<p>The query builder helps you to make a query in the form of the Corpus Query
Language (CQL) to your text. You can use the CQL to filter out various types of
@ -26,12 +26,12 @@ under the tab "Examples".</p>
<hr>
<p></p>
<br>
<h3 id="add-new-token-tutorial">Add new token to your Query</h3>
<h4 id="add-new-token-tutorial">Add new token to your Query</h4>
<p>If you are only looking for a specific token, you can click on the left
button and select the type of token you are looking for from the drop-down menu.
By default "Word" is selected. </p>
<h4>Word and Lemma</h4>
<h5>Word and Lemma</h5>
<p>If you want to search for a specific word or lemma and the respective
category is selected in the drop-down menu, you can type in the word or lemma
of your choice in the input field. You can confirm your entry by clicking the
@ -41,13 +41,13 @@ under the tab "Examples".</p>
<img src="{{ url_for('static', filename='images/manual/query_builder/word_lemma.gif') }}" alt="word and lemma explanation" width="100%;" style="margin-bottom:20px;">
<br>
<h4>English pos, german pos or simple_pos</h4>
<h5>English pos, german pos or simple_pos</h5>
<p>You can choose between the options "english pos", "german pos" and
"simple_pos" to search for different parts-of-speech. You can find an overview
of all tags under the "Tagsets" tab.</p>
<img src="{{ url_for('static', filename='images/manual/query_builder/pos.gif') }}" alt="part-of-speech-tag explanation" width="100%;" style="margin-bottom:20px;">
<h4>Empty Token</h4>
<h5>Empty Token</h5>
<p>Here you can search for an empty token. This selection should never stand
alone and should always be extended with an incidence modifier or stand in a
larger query, because otherwise all possible tokens would be searched for and
@ -61,17 +61,17 @@ under the tab "Examples".</p>
<hr>
<p></p>
<br>
<h3 id="edit-options-tutorial">Options to edit your token</h3>
<h4 id="edit-options-tutorial">Options to edit your token</h4>
<p>You have the possibility to extend or specify your searched token with
certain factors. For this the query builder offers some fixed options. You can
find more information about the options in the Corpus Query Language Tutorial.</p>
<br>
<h4>Wildcard Character</h4>
<h5>Wildcard Character</h5>
<p>A wildcard character replaces any character and is represented in the form of a dot. </p>
<br>
<h4>Option Group</h4>
<h5>Option Group</h5>
<p>With an option group you can search for different variants of a token. The
variants are not limited, so you can manually enter more options in the same
format. "Option1" and "option2" must be replaced accordingly. </p>
@ -79,7 +79,7 @@ under the tab "Examples".</p>
<p></p>
<br>
<h4>Incidence Modifiers</h4>
<h5>Incidence Modifiers</h5>
<p>With the Incidence Modifiers you can determine the occurrence of single
tokens. For example you can use "?" to indicate that the token occurs either
not at all or once: <br>
@ -88,12 +88,12 @@ under the tab "Examples".</p>
[word="dogs?"] the search is for "dog "or "dogs". </p>
<br>
<h4>Ignore Case</h4>
<h5>Ignore Case</h5>
<p>With the check mark at Ignore Case the upper and lower case is ignored.
This is marked with a "%c". By default (if not checked) it is case sensitive.</p>
<br>
<h4>"or" & "and"</h4>
<h5>"or" & "and"</h5>
<p>"Or" ( | ) and "and" ( & ) are conditions you can put on a token. With "or"
one of the two conditions must be fulfilled, with "and" both conditions must be
fulfilled. For example, the word must be called "will" AND be a verb, only then
@ -110,12 +110,12 @@ under the tab "Examples".</p>
<hr>
<p></p>
<br>
<h3 id="add-structural-attribute-tutorial">Add structural attributes to your query</h3>
<h4 id="add-structural-attribute-tutorial">Add structural attributes to your query</h4>
<p>You can use structural attributes to search specifically for structures in
the text or to further narrow down your previous search query. </p>
<br>
<h4>Sentence</h4>
<h5>Sentence</h5>
With "Sentence" (<s></s>) you can search for sentences within your text.
This search can of course be specified if you search for particular tokens or
entities between the sentence tags (<s></s>). For example, you can search for
@ -127,7 +127,7 @@ under the tab "Examples".</p>
<div class="chip" style="background-color:#FD9720;">Sentence End</div>.<br>
<br>
<h4>Entities</h4>
<h5>Entities</h5>
<p>With entities, i.e. units of meaning, you search for text sections that
follow a certain code. For example, persons, dates, certain events. You can
select the codes using the drop-down menus. You can find an explanation of
@ -138,7 +138,7 @@ under the tab "Examples".</p>
<p></p>
<br>
<h4>Meta Data</h4>
<h5>Meta Data</h5>
<p>With the meta data you can annotate your text and add specific conditions.
You can select a category on the left and enter your desired value on the right.
The selected metadata will apply to your entire request and will be added at the end.</p>
@ -153,14 +153,14 @@ under the tab "Examples".</p>
<hr>
<p></p>
<br>
<h3 id="general-options-query-builder">General Options of the query builder</h3>
<h4 id="general-options-query-builder">General Options of the query builder</h4>
<p>You have several options to edit your query after adding it to the preview.</p>
<h4>Deleting the elements</h4>
<h5>Deleting the elements</h5>
<p>You can delete the added elements from the query by clicking the X behind the respective content.</p>
<img src="{{ url_for('static', filename='images/manual/query_builder/delete.gif') }}" alt="delete explanation" width="100%;" style="margin-bottom:20px;">
<h4>Move the elements of your query</h4>
<h5>Move the elements of your query</h5>
<p>You can drag and drop elements to customize your query.</p>
<img src="{{ url_for('static', filename='images/manual/query_builder/drag_and_drop.gif') }}" alt="Drag&Drop explanation" width="100%;" style="margin-bottom:20px;">