mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
Add "(beta)" to Static Visualization + small fixes
This commit is contained in:
parent
0627b27ec7
commit
27fe4a95e4
@ -66,7 +66,7 @@ def get_stopwords():
|
|||||||
stopwords = {}
|
stopwords = {}
|
||||||
for language in languages:
|
for language in languages:
|
||||||
stopwords[language] = nltk.corpus.stopwords.words(language)
|
stopwords[language] = nltk.corpus.stopwords.words(language)
|
||||||
stopwords['punctuation'] = list(punctuation) + ['—', '|']
|
stopwords['punctuation'] = list(punctuation) + ['—', '|', '–', '“', '„']
|
||||||
stopwords['user_stopwords'] = []
|
stopwords['user_stopwords'] = []
|
||||||
response_data = stopwords
|
response_data = stopwords
|
||||||
return response_data, 202
|
return response_data, 202
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class CorpusAnalysisStaticVisualization {
|
class CorpusAnalysisStaticVisualization {
|
||||||
name = 'Static Visualization';
|
name = 'Static Visualization (beta)';
|
||||||
|
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
@ -65,7 +65,6 @@ class CorpusAnalysisStaticVisualization {
|
|||||||
actionButton.addEventListener('click', (event) => {
|
actionButton.addEventListener('click', (event) => {
|
||||||
let action = event.target.closest('.frequencies-stopword-setting-modal-action-buttons').dataset.action;
|
let action = event.target.closest('.frequencies-stopword-setting-modal-action-buttons').dataset.action;
|
||||||
if (action === 'submit') {
|
if (action === 'submit') {
|
||||||
console.log('Stopwords changed');
|
|
||||||
this.renderTokenList();
|
this.renderTokenList();
|
||||||
} else if (action === 'cancel') {
|
} else if (action === 'cancel') {
|
||||||
this.data.stopwords = structuredClone(this.data.stopwordCache);
|
this.data.stopwords = structuredClone(this.data.stopwordCache);
|
||||||
@ -279,7 +278,7 @@ class CorpusAnalysisStaticVisualization {
|
|||||||
},
|
},
|
||||||
height: 627,
|
height: 627,
|
||||||
margin: {
|
margin: {
|
||||||
l: 17
|
l: 33
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let config = {
|
let config = {
|
||||||
|
@ -26,7 +26,7 @@ class CorpusTokenList extends ResourceList {
|
|||||||
this.selectedItemTerms.add(termElement.textContent);
|
this.selectedItemTerms.add(termElement.textContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
corpusAnalysisApp.extensions['Static Visualization'].renderFrequenciesGraphic(this.selectedItemTerms);
|
corpusAnalysisApp.extensions['Static Visualization (beta)'].renderFrequenciesGraphic(this.selectedItemTerms);
|
||||||
});
|
});
|
||||||
|
|
||||||
let tokenListResetButtonElement = this.listContainerElement.querySelector('#token-list-reset-button');
|
let tokenListResetButtonElement = this.listContainerElement.querySelector('#token-list-reset-button');
|
||||||
@ -43,7 +43,7 @@ class CorpusTokenList extends ResourceList {
|
|||||||
item.elm.querySelector('.select-checkbox').checked = false;
|
item.elm.querySelector('.select-checkbox').checked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
corpusAnalysisApp.extensions['Static Visualization'].renderFrequenciesGraphic(this.selectedItemTerms);
|
corpusAnalysisApp.extensions['Static Visualization (beta)'].renderFrequenciesGraphic(this.selectedItemTerms);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ class CorpusTokenList extends ResourceList {
|
|||||||
} else {
|
} else {
|
||||||
this.selectedItemTerms.delete(item);
|
this.selectedItemTerms.delete(item);
|
||||||
}
|
}
|
||||||
corpusAnalysisApp.extensions['Static Visualization'].renderFrequenciesGraphic(this.selectedItemTerms);
|
corpusAnalysisApp.extensions['Static Visualization (beta)'].renderFrequenciesGraphic(this.selectedItemTerms);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% set name = 'Static Visualization' %}
|
{% set name = 'Static Visualization (beta)' %}
|
||||||
|
|
||||||
{% set description = '' %}
|
{% set description = '' %}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<a class="btn disabled frequencies-graph-mode-button" data-graph-type="bar"><i class="material-icons">stacked_bar_chart</i></a>
|
<a class="btn disabled frequencies-graph-mode-button" data-graph-type="bar"><i class="material-icons">stacked_bar_chart</i></a>
|
||||||
<a class="btn frequencies-graph-mode-button" data-graph-type="scatter"><i class="material-icons">show_chart</i></a>
|
<a class="btn frequencies-graph-mode-button" data-graph-type="scatter"><i class="material-icons">show_chart</i></a>
|
||||||
<a class="btn frequencies-graph-mode-button" data-graph-type="markers"><i class="material-icons">bubble_chart</i></a>
|
{# <a class="btn frequencies-graph-mode-button" data-graph-type="markers"><i class="material-icons">bubble_chart</i></a> #}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<ul class="row tabs no-autoinit" id="corpus-analysis-app-extension-tabs">
|
<ul class="row tabs no-autoinit" id="corpus-analysis-app-extension-tabs">
|
||||||
<li class="tab col s3"><a class="active" href="#corpus-analysis-app-home-container"><i class="nopaque-icons service-icons left" data-service="corpus-analysis"></i>Corpus analysis</a></li>
|
<li class="tab col s3"><a class="active" href="#corpus-analysis-app-home-container"><i class="nopaque-icons service-icons left" data-service="corpus-analysis"></i>Corpus analysis</a></li>
|
||||||
{% for extension in extensions if extension.name != 'Static Visualization' %}
|
{% for extension in extensions if extension.name != 'Static Visualization (beta)' %}
|
||||||
<li class="tab col s3"><a href="#{{ extension.id_prefix }}-container">{{ extension.tab_content }}</a></li>
|
<li class="tab col s3"><a href="#{{ extension.id_prefix }}-container">{{ extension.tab_content }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
|
|
||||||
<div class="row" id="corpus-analysis-app-extension-cards">
|
<div class="row" id="corpus-analysis-app-extension-cards">
|
||||||
{% for extension in extensions if extension.name != 'Static Visualization' %}
|
{% for extension in extensions if extension.name != 'Static Visualization (beta)' %}
|
||||||
<div class="col s3">
|
<div class="col s3">
|
||||||
<div class="card extension-selector hoverable" data-target="{{ extension.id_prefix }}-container">
|
<div class="card extension-selector hoverable" data-target="{{ extension.id_prefix }}-container">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% for extension in extensions if extension.name != 'Static Visualization' %}
|
{% for extension in extensions if extension.name != 'Static Visualization (beta)' %}
|
||||||
<div id="{{ extension.id_prefix }}-container">
|
<div id="{{ extension.id_prefix }}-container">
|
||||||
{{ extension.container_content }}
|
{{ extension.container_content }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user