From f6c2292e0370c06514bb07188fc74beacc87be07 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch
${subcorpus.q.replace(//g, ">")}
`;
+ this.elements.subcorpusInfo.classList.remove('hide');
+ }
+
+ clearSubcorpusActions() {
+ for (let tooltippedElement of this.elements.subcorpusActions.querySelectorAll('.tooltipped')) {
+ M.Tooltip.getInstance(tooltippedElement).destroy();
+ }
+ this.elements.subcorpusActions.innerHTML = '';
+ }
+
+ renderSubcorpusActions() {
+ this.clearSubcorpusActions();
+ this.elements.subcorpusActions.innerHTML += `
+
+ file_download
+
+
+ delete
+
+ `.trim();
+ M.Tooltip.init(this.elements.subcorpusActions.querySelectorAll('.tooltipped'));
+ this.elements.subcorpusActions.querySelector('.delete-subcorpus-trigger').addEventListener('click', event => {
+ event.preventDefault();
+ let subcorpus = this.data.subcorpora[this.settings.selectedSubcorpus];
+ subcorpus.o.drop().then(
+ cQiStatus => {
+ nopaque.appClient.flash(`${subcorpus.o.name} deleted`, 'corpus');
+ delete this.data.subcorpora[subcorpus.o.name];
+ this.settings.selectedSubcorpus = undefined;
+ for (let subcorpusName in this.data.subcorpora) {
+ this.settings.selectedSubcorpus = subcorpusName;
+ break;
+ }
+ this.renderSubcorpusList();
+ if (this.settings.selectedSubcorpus) {
+ this.renderSubcorpusInfo();
+ this.renderSubcorpusActions();
+ this.renderSubcorpusItems();
+ this.renderSubcorpusPagination();
+ } else {
+ this.clearSubcorpusInfo();
+ this.clearSubcorpusActions();
+ this.clearSubcorpusItems();
+ this.clearSubcorpusPagination();
+ }
+ },
+ cQiError => {
+ nopaque.appClient.flash(`${cQiError.payload.code}: ${cQiError.payload.msg}`, 'error');
+ }
+ );
+ });
+ }
+
+ clearSubcorpusItems() {
+ // Destroy with .p-attr elements associated Materialize tooltips
+ for (let pAttrElement of this.elements.subcorpusItems.querySelectorAll('.p-attr.tooltipped')) {
+ M.Tooltip.getInstance(pAttrElement)?.destroy();
+ }
+ this.elements.subcorpusItems.innerHTML = `
+
+ searchNothing here...
+ No matches available.
+
+ Positional properties
+ Token: ${cpos}
+ `.trim();
+ let structuralPropertiesHTML = `
+
+ Structural properties
+ `.trim();
+ for (let [property, propertyValue] of Object.entries(pAttr)) {
+ if (['lemma', 'ner', 'pos', 'simple_pos', 'word'].includes(property)) {
+ if (propertyValue === 'None') {continue;}
+ positionalPropertiesHTML += `
subdirectory_arrow_right${property}: ${propertyValue}`;
+ } else {
+ structuralPropertiesHTML += `
${property}: ${propertyValue}`;
+ if (!(`${property}_lookup` in subcorpus.p.lookups)) {continue;}
+ for (let [subproperty, subpropertyValue] of Object.entries(subcorpus.p.lookups[`${property}_lookup`][propertyValue])) {
+ if (subpropertyValue === 'NULL') {continue;}
+ structuralPropertiesHTML += `
subdirectory_arrow_right${subproperty}: ${subpropertyValue}`
+ }
+ }
+ }
+ positionalPropertiesHTML += '
+ searchNothing here...
+ No text available.
+
${this.cposRange2HTML(item[0], item[item.length - 1])}
+ `.trim(); + this.setTextStyle(); + this.setTokenRepresentation(); + } + + clearCorpusPagination() { + this.elements.corpusPagination.innerHTML = ''; + this.elements.corpusPagination.classList.add('hide'); + } + + renderCorpusPagination() { + this.clearCorpusPagination(); + if (this.data.corpus.p.pages === 0) {return;} + this.elements.corpusPagination.innerHTML += ` +
+ Positional properties
+ Token: ${cpos}
+ `.trim();
+ let structuralPropertiesHTML = `
+
+ Structural properties
+ `.trim();
+ for (let [property, propertyValue] of Object.entries(pAttr)) {
+ if (['lemma', 'ner', 'pos', 'simple_pos', 'word'].includes(property)) {
+ if (propertyValue === 'None') {continue;}
+ positionalPropertiesHTML += `
subdirectory_arrow_right${property}: ${propertyValue}`;
+ } else {
+ structuralPropertiesHTML += `
${property}: ${propertyValue}`;
+ if (!(`${property}_lookup` in this.data.corpus.p.lookups)) {continue;}
+ for (let [subproperty, subpropertyValue] of Object.entries(this.data.corpus.p.lookups[`${property}_lookup`][propertyValue])) {
+ if (subpropertyValue === 'NULL') {continue;}
+ structuralPropertiesHTML += `
subdirectory_arrow_right${subproperty}: ${subpropertyValue}`
+ }
+ }
+ }
+ positionalPropertiesHTML += '
+ | Source | +Left context | +KWIC | +Right Context | ++ |
---|
Query your corpus with the CQP query language utilizing a KWIC view.
Inspect your corpus in detail with a full text view, including annotations.
Add matches to Sub-Results with the - add - button in the list or inspect view. -
-matches added for sub-results:
- -- help - Server is sending your results. - Functions like "Export Results" and "Match Inspect" will be - available after all matches have been loaded. -
-Fill out the following form to upload and view your exported query data from the corpus analsis.
- arrow_backBack to dashboard -Below the metadata for the results from the Corpus - {{ query_result.query_metadata.corpus_name }} generated with the query - {{ query_result.query_metadata.query }} are shown. -
-Metadata Description | -Value | -||
---|---|---|---|
{{ pair[0] }} | - {% if pair[0] == 'corpus_all_texts' - or pair[0] == 'text_lookup' %} -
-
|
- {% else %}
- {{ pair[1] }} | - {% endif %} -
Nr. | -Title | -Left context | -Match | -{# Actions #} | -Right Context | -
---|