diff --git a/app/SpaCyNLPPipelineModel.defaults.yml b/app/SpaCyNLPPipelineModel.defaults.yml index f8f3116b..62dc5e65 100644 --- a/app/SpaCyNLPPipelineModel.defaults.yml +++ b/app/SpaCyNLPPipelineModel.defaults.yml @@ -120,6 +120,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'German' description: 'German pipeline optimized for CPU. Components: tok2vec, tagger, morphologizer, parser, lemmatizer (trainable_lemmatizer), senter, ner.' url: 'https://github.com/explosion/spacy-models/releases/download/de_core_news_md-3.4.0/de_core_news_md-3.4.0.tar.gz' @@ -131,6 +132,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Greek' description: 'Greek pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, lemmatizer (trainable_lemmatizer), senter, ner, attribute_ruler.' url: 'https://github.com/explosion/spacy-models/releases/download/el_core_news_md-3.4.0/el_core_news_md-3.4.0.tar.gz' @@ -142,6 +144,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'English' description: 'English pipeline optimized for CPU. Components: tok2vec, tagger, parser, senter, ner, attribute_ruler, lemmatizer.' url: 'https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.4.1/en_core_web_md-3.4.1.tar.gz' @@ -153,6 +156,7 @@ version: '3.4.1' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Spanish' description: 'Spanish pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, senter, ner, attribute_ruler, lemmatizer.' url: 'https://github.com/explosion/spacy-models/releases/download/es_core_news_md-3.4.0/es_core_news_md-3.4.0.tar.gz' @@ -164,6 +168,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'French' description: 'French pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, senter, ner, attribute_ruler, lemmatizer.' url: 'https://github.com/explosion/spacy-models/releases/download/fr_core_news_md-3.4.0/fr_core_news_md-3.4.0.tar.gz' @@ -175,6 +180,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Italian' description: 'Italian pipeline optimized for CPU. Components: tok2vec, morphologizer, tagger, parser, lemmatizer (trainable_lemmatizer), senter, ner' url: 'https://github.com/explosion/spacy-models/releases/download/it_core_news_md-3.4.0/it_core_news_md-3.4.0.tar.gz' @@ -186,6 +192,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Polish' description: 'Polish pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, lemmatizer (trainable_lemmatizer), tagger, senter, ner.' url: 'https://github.com/explosion/spacy-models/releases/download/pl_core_news_md-3.4.0/pl_core_news_md-3.4.0.tar.gz' @@ -197,6 +204,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Russian' description: 'Russian pipeline optimized for CPU. Components: tok2vec, morphologizer, parser, senter, ner, attribute_ruler, lemmatizer.' url: 'https://github.com/explosion/spacy-models/releases/download/ru_core_news_md-3.4.0/ru_core_news_md-3.4.0.tar.gz' @@ -208,6 +216,7 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' - title: 'Chinese' description: 'Chinese pipeline optimized for CPU. Components: tok2vec, tagger, parser, senter, ner, attribute_ruler.' url: 'https://github.com/explosion/spacy-models/releases/download/zh_core_web_md-3.4.0/zh_core_web_md-3.4.0.tar.gz' @@ -219,3 +228,4 @@ version: '3.4.0' compatible_service_versions: - '0.1.1' + - '0.1.2' diff --git a/app/models.py b/app/models.py index 9b232c1a..c53956fd 100644 --- a/app/models.py +++ b/app/models.py @@ -558,6 +558,18 @@ class User(HashidMixin, UserMixin, db.Model): self.profile_privacy_settings = 0 #endregion Profile Privacy settings + def follow_corpus(self, corpus): + if not self.is_following(corpus): + self.followed_corpora.append(corpus) + + def unfollow_corpus(self, corpus): + if self.is_following(corpus): + self.followed_corpora.remove(corpus) + + def is_following_corpus(self, corpus): + return self.followed_corpora.filter( + corpus_followers.c.corpus_id == corpus.id).count() > 0 + def to_json_serializeable(self, backrefs=False, relationships=False, filter_by_privacy_settings=False): json_serializeable = { 'id': self.hashid, diff --git a/app/services/services.yml b/app/services/services.yml index 4d00163d..a686f683 100644 --- a/app/services/services.yml +++ b/app/services/services.yml @@ -41,7 +41,7 @@ transkribus-htr-pipeline: spacy-nlp-pipeline: name: 'SpaCy NLP Pipeline' publisher: 'Bielefeld University - CRC 1288 - INF' - latest_version: '0.1.1' + latest_version: '0.1.2' versions: 0.1.0: methods: @@ -53,3 +53,8 @@ spacy-nlp-pipeline: - 'encoding_detection' publishing_year: 2022 url: 'https://gitlab.ub.uni-bielefeld.de/sfb1288inf/spacy-nlp-pipeline/-/releases/v0.1.1' + 0.1.2: + methods: + - 'encoding_detection' + publishing_year: 2022 + url: 'https://gitlab.ub.uni-bielefeld.de/sfb1288inf/spacy-nlp-pipeline/-/releases/v0.1.2' diff --git a/app/static/js/CorpusAnalysis/QueryBuilder.js b/app/static/js/CorpusAnalysis/QueryBuilder.js index 4e34f04c..ef7d96f1 100644 --- a/app/static/js/CorpusAnalysis/QueryBuilder.js +++ b/app/static/js/CorpusAnalysis/QueryBuilder.js @@ -14,6 +14,7 @@ class ConcordanceQueryBuilder { queryBuilderTutorialModal: document.querySelector('#query-builder-tutorial-modal'), valueValidator: true, + //#region QueryBuilder Elements positionalAttrButton: document.querySelector('#positional-attr-button'), @@ -175,6 +176,7 @@ class ConcordanceQueryBuilder { closeQueryBuilderModal(closeInstance) { let instance = M.Modal.getInstance(closeInstance); instance.close(); + } showPositionalAttrArea() { @@ -362,7 +364,7 @@ class ConcordanceQueryBuilder { } clearAll() { - // Everything is reset. After 5 seconds for 5 seconds (with 'instance'), a message is displayed indicating that further information can be obtained via the question mark icon + // Everything is reset. let instance = M.Tooltip.getInstance(this.elements.queryBuilderTutorialInfoIcon); this.hideEverything(); @@ -375,16 +377,20 @@ class ConcordanceQueryBuilder { this.elements.entity.innerHTML = 'Entity'; this.elements.sentence.innerHTML = 'Sentence'; + // If the Modal is open after 5 seconds for 5 seconds (with 'instance'), a message is displayed indicating that further information can be obtained via the question mark icon instance.tooltipEl.style.background = '#98ACD2'; instance.tooltipEl.style.borderTop = 'solid 4px #0064A3'; instance.tooltipEl.style.padding = '10px'; instance.tooltipEl.style.color = 'black'; setTimeout(() => { - instance.open(); - setTimeout(() => { - instance.close(); - }, 5000); + let modalInstance = M.Modal.getInstance(this.elements.concordanceQueryBuilder); + if (modalInstance.isOpen) { + instance.open(); + setTimeout(() => { + instance.close(); + }, 5000); + } }, 5000); }