2021-05-28 13:51:23 +00:00
{% extends "base.html.j2" %}
2021-05-27 11:05:46 +00:00
{% import "materialize/wtf.html.j2" as wtf %}
2023-04-27 13:11:18 +00:00
{% import 'corpora/_analysis/concordance.html.j2' as concordance_extension %}
{% import 'corpora/_analysis/reader.html.j2' as reader_extension %}
2023-04-21 13:00:54 +00:00
{% set extensions = [concordance_extension, reader_extension] %}
2022-02-15 08:25:34 +00:00
{% block main_attribs %} class="service-scheme" data-service="corpus-analysis" id="corpus-analysis-app-container"{% endblock main_attribs %}
2020-06-19 10:30:05 +00:00
2023-04-21 13:00:54 +00:00
2020-03-28 18:29:19 +00:00
{% block page_content %}
2021-11-16 14:23:57 +00:00
<ul class="row tabs no-autoinit" id="corpus-analysis-app-extension-tabs">
2023-01-03 16:03:47 +00:00
<li class="tab col s3"><a class="active" href="#corpus-analysis-app-overview"><i class="nopaque-icons service-icons left" data-service="corpus-analysis"></i>Corpus analysis</a></li>
2023-04-21 13:00:54 +00:00
{% for extension in extensions %}
<li class="tab col s3"><a href="#{{ extension.id_prefix }}-container">{{ extension.tab_content }}</a></li>
{% endfor %}
2021-11-16 14:23:57 +00:00
</ul>
<div class="row" id="corpus-analysis-app-overview">
2020-10-29 13:45:55 +00:00
<div class="col s12">
2021-11-16 14:23:57 +00:00
<h1>{{ title }}</h1>
2023-06-14 11:57:58 +00:00
{% for extension in extensions %}
<div class="col s3">
<div class="card extension-selector hoverable" data-target="{{ extension.id_prefix }}-container">
<div class="card-content">
<span class="card-title">{{ extension.name }}</span>
<p>{{ extension.description }}</p>
</div>
2020-03-28 18:29:19 +00:00
</div>
</div>
2023-06-14 11:57:58 +00:00
{% endfor %}
2023-04-18 09:32:04 +00:00
2023-06-14 11:57:58 +00:00
<div class="row">
<div class="col s12">
<h4><i class="material-icons left">query_stats</i>Visualizations</h4>
2023-06-13 13:41:34 +00:00
</div>
2023-06-19 11:41:56 +00:00
</div>
<div class="row">
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center;">
2023-06-21 15:05:36 +00:00
<p><b>Tokens</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-tokens"></span>
</div>
</div>
</div>
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center">
2023-06-21 15:05:36 +00:00
<p><b>Sentences</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-s"></span>
</div>
</div>
</div>
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center">
2023-06-21 15:05:36 +00:00
<p><b>Unique words</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-unique-words"></span>
</div>
</div>
</div>
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center">
2023-06-21 15:05:36 +00:00
<p><b>Unique lemmas</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-unique-lemmas"></span>
</div>
</div>
</div>
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center">
2023-06-21 15:05:36 +00:00
<p><b>Unique pos</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-unique-pos"></span>
</div>
</div>
</div>
<div class="col s2">
<div class="card hoverable" style="border-radius: 10px !important; background-color:#6b3f89; color:white">
<div class="card-content" style="padding:10px !important; text-align:center">
2023-06-21 15:05:36 +00:00
<p><b>Unique simple_pos</b></p>
2023-06-19 11:41:56 +00:00
<span class="card-title corpus-num-unique-simple-pos"></span>
2023-06-14 11:57:58 +00:00
</div>
</div>
</div>
2023-06-19 11:41:56 +00:00
</div>
<div class="row">
<div class="col s12">
2023-06-14 11:57:58 +00:00
<div class="card hoverable">
<div class="card-content">
2023-06-19 16:33:36 +00:00
<span class="card-title">Text Information Overview</span>
2023-06-19 11:41:56 +00:00
<div class="chip text-count-chip" style="background-color:#6b3f89; color:white""></div>
2023-06-14 11:57:58 +00:00
<div class="corpus-text-info-list no-autoinit"></div>
</div>
</div>
2023-06-13 13:41:34 +00:00
</div>
</div>
2023-06-14 11:57:58 +00:00
<div class="row">
2023-06-21 06:46:08 +00:00
<div class="col s6">
2023-06-14 11:57:58 +00:00
<div class="card hoverable">
<div class="card-content">
2023-06-21 06:46:08 +00:00
<span class="card-title">Proportions</span>
<p>of texts within the corpus</p>
2023-06-14 11:57:58 +00:00
<div id="text-proportions-graphic"></div>
</div>
</div>
</div>
2023-06-21 06:46:08 +00:00
<div class="col s6">
2023-06-14 11:57:58 +00:00
<div class="card hoverable">
<div class="card-content">
2023-06-21 15:05:36 +00:00
<span class="card-title"><a class="dropdown-trigger btn" data-target="frequencies-token-category-dropdown">Word<i class="material-icons right">arrow_drop_down</i></a> Frequencies</span>
<ul id="frequencies-token-category-dropdown" class="dropdown-content">
<li><a data-token-category="word">Word</a></li>
<li><a data-token-category="lemma">Lemma</a></li>
<li><a data-token-category="pos">Pos</a></li>
<li><a data-token-category="simple_pos">Simple_pos</a></li>
</ul>
2023-06-21 06:46:08 +00:00
<p>within the texts of the 5 most frequent words in the corpus</p>
2023-06-21 15:05:36 +00:00
<div id="frequencies-graphic"></div>
2023-06-14 11:57:58 +00:00
</div>
</div>
2023-06-13 13:41:34 +00:00
</div>
2023-06-21 06:46:08 +00:00
</div>
2023-06-21 15:05:36 +00:00
2023-06-21 06:46:08 +00:00
<div class="row">
<div class="col s12">
2023-06-19 11:41:56 +00:00
<div class="card hoverable">
<div class="card-content">
2023-06-21 06:46:08 +00:00
<span class="card-title">Text Bounds</span>
<div id="bounds-graphic"></div>
2023-06-19 11:41:56 +00:00
</div>
</div>
</div>
2023-06-13 13:41:34 +00:00
</div>
</div>
2023-06-14 11:57:58 +00:00
2023-06-13 13:41:34 +00:00
</div>
2023-04-21 13:00:54 +00:00
{% for extension in extensions %}
<div id="{{ extension.id_prefix }}-container">
{{ extension.container_content }}
</div>
{% endfor %}
2020-10-29 13:45:55 +00:00
{% endblock page_content %}
2020-04-02 12:22:03 +00:00
2021-11-16 14:23:57 +00:00
{% block modals %}
2020-10-29 13:45:55 +00:00
{{ super() }}
2021-11-16 14:23:57 +00:00
<div class="modal no-autoinit" id="corpus-analysis-app-init-modal">
<div class="modal-content">
2023-04-18 09:32:04 +00:00
<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>.
2021-11-16 14:23:57 +00:00
</p>
2023-04-18 09:32:04 +00:00
<div class="progress">
2021-11-16 14:23:57 +00:00
<div class="indeterminate"></div>
</div>
2023-04-18 09:32:04 +00:00
<p class="errors error-color-text hide"></p>
2022-05-17 13:31:05 +00:00
</div>
</div>
2022-10-20 13:52:25 +00:00
2023-04-21 13:00:54 +00:00
{% for extension in extensions %}
{{ extension.modals }}
{% endfor %}
2023-03-06 11:27:24 +00:00
2022-10-20 13:52:25 +00:00
<div class="modal" id="concordance-query-builder">
<div class="modal-content">
<div>
<nav>
<div class="nav-wrapper" id="query-builder-nav">
2022-10-24 13:01:13 +00:00
<a href="#!" class="brand-logo"><i class="material-icons">build</i>Query Builder (beta)</a>
2022-10-20 13:52:25 +00:00
<i class="material-icons close right" id="close-query-builder">close</i>
2023-04-18 09:32:04 +00:00
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal">
2022-10-20 13:52:25 +00:00
<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>
</nav>
</div>
<p></p>
<div id="query-container" class="hide">
<div class="row">
<h6 class="col s2">Your Query:
2023-04-18 09:32:04 +00:00
<a class="modal-trigger" data-manual-modal-chapter="manual-modal-query-builder" href="#manual-modal">
2022-10-20 13:52:25 +00:00
<i class="material-icons left" id="general-options-query-builder-tutorial-info-icon">help_outline</i></a>
</h6>
</div>
<div class="row">
2022-10-24 13:01:13 +00:00
<div class="col s10" id="your-query"></div>
2022-10-20 13:52:25 +00:00
<a class="btn-small waves-effect waves-teal col s1" id="insert-query-button">
<i class="material-icons">send</i>
</a>
</div>
<p><i> Preview:</i></p>
<p id="query-preview"></p>
<br>
</div>
<h6>Use the following options to build your query. If you need help, click on the question mark in the upper right corner!</h6>
<p></p>
<a class="btn-large waves-effect waves-light tooltipped" id="positional-attr-button" data-position="bottom" data-tooltip="Search for any token, for example a word, a lemma or a part-of-speech tag">Add new token to your query</a>
<a class="btn-large waves-effect waves-light tooltipped" id="structural-attr-button" data-position="bottom" data-tooltip="Structure your query with structural attributes, for example sentences, entities or annotate the text">Add structural attributes to your query</a>
<div id="structural-attr" class="hide">
<p></p>
2023-04-18 09:32:04 +00:00
<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>
2022-10-20 13:52:25 +00:00
<p></p>
<div class="row">
<div class="col s12">
<a class="btn-small waves-effect waves-light" id="sentence">sentence</a>
<a class="btn-small waves-effect waves-light" id="entity">entity</a>
<a class="btn-small waves-effect waves-light" id="text-annotation">Meta Data</a>
</div>
</div>
<div id="entity-builder" class="hide">
<p></p>
<br>
<div class="row">
<a class="btn waves-effect waves-light col s4" id="empty-entity">Add Entity of any type</a>
<p class="col s1 l1"></p>
<div class= "input-field col s3">
<select name="englishenttype" id="english-ent-type">
<option value="" disabled selected>English ent_type</option>
<option value="CARDINAL">CARDINAL</option>
<option value="DATE">DATE</option>
<option value="EVENT">EVENT</option>
<option value="FAC">FAC</option>
<option value="GPE">GPE</option>
<option value="LANGUAGE">LANGUAGE</option>
<option value="LAW">LAW</option>
<option value="LOC">LOC</option>
<option value="MONEY">MONEY</option>
<option value="NORP">NORP</option>
<option value="ORDINAL">ORDINAL</option>
<option value="ORG">ORG</option>
<option value="PERCENT">PERCENT</option>
<option value="PERSON">PERSON</option>
<option value="PRODUCT">PRODUCT</option>
<option value="QUANTITY">QUANTITY</option>
<option value="TIME">TIME</option>
<option value="WORK_OF_ART">WORK_OF_ART</option>
</select>
<label>Entity Type</label>
</div>
<div class= "input-field col s3">
<select name="germanenttype" id="german-ent-type">
<option value="" disabled selected>German ent_type</option>
<option value="LOC">LOC</option>
<option value="MISC">MISC</option>
<option value="ORG">ORG</option>
<option value="PER">PER</option>
</select>
</div>
</div>
</div>
<div id="text-annotation-builder" class="hide">
<p></p>
<br>
<div class="row">
<div class= "input-field col s4 l3">
<select name="text-annotation-options" id="text-annotation-options">
<option class="btn-small waves-effect waves-light" value="address">address</option>
<option class="btn-small waves-effect waves-light" value="author">author</option>
<option class="btn-small waves-effect waves-light" value="booktitle">booktitle</option>
<option class="btn-small waves-effect waves-light" value="chapter">chapter</option>
<option class="btn-small waves-effect waves-light" value="editor">editor</option>
<option class="btn-small waves-effect waves-light" value="institution">institution</option>
<option class="btn-small waves-effect waves-light" value="journal">journal</option>
<option class="btn-small waves-effect waves-light" value="pages">pages</option>
<option class="btn-small waves-effect waves-light" value="publisher">publisher</option>
<option class="btn-small waves-effect waves-light" value="publishing_year">publishing year</option>
<option class="btn-small waves-effect waves-light" value="school">school</option>
<option class="btn-small waves-effect waves-light" value="title">title</option>
</select>
<label>Meta data</label>
</div>
<div class= "input-field col s7 l5">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="Type in your text annotation" type="text" id="text-annotation-input">
</div>
<div class="col s1 l1 center-align">
<p class="btn-floating waves-effect waves-light" id="text-annotation-submit">
<i class="material-icons right">send</i>
</p>
</div>
<div class="hide" id="no-value-metadata-message"><i>No value entered!</i></div>
</div>
</div>
</div>
<div id="positional-attr" class="hide">
<p></p>
<div class="row" id="token-kind-selector">
<div class="col s5">
2023-04-18 09:32:04 +00:00
<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>
2022-10-20 13:52:25 +00:00
</div>
<div class="input-field col s3">
<select id="token-attr">
<option value="word" selected>word</option>
<option value="lemma">lemma</option>
<option value="english-pos">english pos</option>
<option value="german-pos">german pos</option>
<option value="simple-pos-button">simple_pos</option>
<option value="empty-token">empty token</option>
</select>
</div>
</div>
<p></p>
<div id="token-builder-content">
<div class="row" >
<div id="token-query"></div>
<div id="word-builder">
<div class= "input-field col s3 l4">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="Type in your word" type="text" id="word-input">
</div>
</div>
<div id="lemma-builder" class="hide" >
<div class= "input-field col s3 l4">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="Type in your lemma" type="text" id="lemma-input">
</div>
</div>
<div id="english-pos-builder" class="hide">
<div class="col s6 m4 l4">
<div class="row">
<div class= "input-field col s12">
<select name="englishpos" id="english-pos">
<option value="default" disabled selected>English pos tagset</option>
<option value="ADD">email</option>
<option value="AFX">affix</option>
<option value="CC">conjunction, coordinating</option>
<option value="CD">cardinal number</option>
<option value="DT">determiner</option>
<option value="EX">existential there</option>
<option value="FW">foreign word</option>
<option value="HYPH">punctuation mark, hyphen</option>
<option value="IN">conjunction, subordinating or preposition</option>
<option value="JJ">adjective</option>
<option value="JJR">adjective, comparative</option>
<option value="JJS">adjective, superlative</option>
</select>
<label>Part-of-speech tags</label>
</div>
</div>
</div>
</div>
<div id="german-pos-builder" class="hide">
<div class="col s6 m4 l4">
<div class="row">
<div class= "input-field col s12">
<select name="germanpos" id="german-pos">
<option value="default" disabled selected>German pos tagset</option>
<option value="ADJA">adjective, attributive</option>
<option value="ADJD">adjective, adverbial or predicative</option>
<option value="ADV">adverb</option>
<option value="APPO">postposition</option>
<option value="APPR">preposition; circumposition left</option>
<option value="APPRART">preposition with article</option>
<option value="APZR">circumposition right</option>
<option value="ART">definite or indefinite article</option>
</select>
<label>Part-of-speech tags</label>
</div>
</div>
</div>
</div>
<div id="simplepos-builder" class="hide">
<div class="col s6 m4 l4">
<div class="row">
<div class= "input-field col s12">
<select name="simplepos" id="simple-pos">
<option value="default" disabled selected>simple_pos tagset</option>
<option value="ADJ">adjective</option>
<option value="ADP">adposition</option>
<option value="ADV">adverb</option>
<option value="AUX">auxiliary verb</option>
<option value="CONJ">coordinating conjunction</option>
<option value="DET">determiner</option>
<option value="INTJ">interjection</option>
<option value="NOUN">noun</option>
<option value="NUM">numeral</option>
<option value="PART">particle</option>
<option value="PRON">pronoun</option>
<option value="PROPN">proper noun</option>
<option value="PUNCT">punctuation</option>
<option value="SCONJ">subordinating conjunction</option>
<option value="SYM">symbol</option>
<option value="VERB">verb</option>
<option value="X">other</option>
</select>
<label>Simple part-of-speech tags</label>
</div>
</div>
</div>
</div>
<div class="col s1 l1 center-align">
<p class="btn-floating waves-effect waves-light" id="token-submit">
<i class="material-icons right">send</i>
</p>
</div>
<div class="hide" id="no-value-message"><i>No value entered!</i></div>
</div>
<div id="token-edit-options">
<div class="row">
2023-04-18 09:32:04 +00:00
<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>
2022-10-20 13:52:25 +00:00
</div>
<p></p>
<div class="row">
<div id="input-options" class="col s5 m5 l5 xl4">
<a id="wildcard-char" class="btn-small waves-effect waves-light tooltipped" data-position="top" data-tooltip="Look for a variable character (also called wildcard character)">Wildcard character</a>
<a id="option-group" class="btn-small waves-effect waves-light tooltipped" data-position="top" data-tooltip="Find character sequences from a list of options">Option Group</a>
</div>
<div class="col s3 m3 l3 xl3" id="incidence-modifiers-button">
<a class="dropdown-trigger btn-small waves-effect waves-light" href="#" data-target="incidence-modifiers" data-position="top" data-tooltip="Incidence Modifiers are special characters or patterns, <br>which determine how often a character represented previously should occur.">incidence modifiers</a>
</div>
<ul id="incidence-modifiers" class="dropdown-content">
<li><a id="one-or-more" data-token="+" class="tooltipped" data-position ="top" data-tooltip="...occurrences of the character/token before">one or more (+)</a></li>
<li><a id="zero-or-more" data-token="*" class="tooltipped" data-position ="top" data-tooltip="...occurrences of the character/token before">zero or more (*)</a></li>
<li><a id="zero-or-one" data-token="?" class="tooltipped" data-position ="top" data-tooltip="...occurrences of the character/token before">zero or one (?)</a></li>
<li><a id="exactly-n" class="modal-trigger tooltipped" href="#exactlyN" data-token="{n}" class="" data-position ="top" data-tooltip="...occurrences of the character/token before">exactly n ({n})</a></li>
<li><a id="between-n-m" class="modal-trigger tooltipped" href="#betweenNM" data-token="{n,m}" class="" data-position ="top" data-tooltip="...occurrences of the character/token before">between n and m ({n,m})</a></li>
</ul>
<div id="ignore-case-checkbox" class="col s2 m2 l2 xl2">
<p id="ignore-case">
<label>
<input type="checkbox" class="filled-in" />
<span>Ignore Case</span>
</label>
</p>
</div>
<div class="col s2 m2 l2 xl2" id="condition-container">
<a class="btn-small tooltipped waves-effect waves-light" id="or" data-position="bottom" data-tooltip="You can add another condition to your token. <br>At least one must be fulfilled">or</a>
<a class="btn-small tooltipped waves-effect waves-light" id="and" data-position="bottom" data-tooltip="You can add another condition to your token. <br>Both must be fulfilled">and</a>
</div>
</div>
</div>
</div>
<div id="exactlyN" class="modal">
<div class="row modal-content">
<div class="input-field col s10">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="type in a number for 'n'" type="text" id="n-input">
</div>
<div class="col s2">
<p class="btn-floating waves-effect waves-light" id="n-submit">
<i class="material-icons right">send</i>
</p>
</div>
</div>
</div>
<div id="betweenNM" class="modal">
<div class="row modal-content">
<div class= "input-field col s5">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="number for 'n'" type="text" id="n-m-input">
</div>
<div class= "input-field col s5">
<i class="material-icons prefix">mode_edit</i>
<input placeholder="number for 'm'" type="text" id="m-input">
</div>
<div class="col s2">
<p class="btn-floating waves-effect waves-light" id="n-m-submit">
<i class="material-icons right">send</i>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
2021-11-16 14:23:57 +00:00
{% endblock modals %}
2020-08-21 14:33:47 +00:00
2021-11-16 14:23:57 +00:00
{% block scripts %}
{{ super() }}
<script>
2023-04-21 13:00:54 +00:00
const corpusAnalysisApp = new CorpusAnalysisApp({{ corpus.hashid|tojson }});
</script>
2021-12-09 14:39:45 +00:00
2023-04-21 13:00:54 +00:00
{% for extension in extensions %}
{{ extension.scripts }}
{% endfor %}
<script>
corpusAnalysisApp.init();
2020-03-28 18:29:19 +00:00
</script>
2021-11-16 14:23:57 +00:00
{% endblock scripts %}