diff --git a/codemeta.json b/codemeta.json index a1e18792..c5462089 100644 --- a/codemeta.json +++ b/codemeta.json @@ -6,7 +6,7 @@ "@type": "SoftwareSourceCode", "identifier": "colibricore", "name": "Colibri Core", - "version": "2.5.1", + "version": "2.5.2", "description": "Colibri core is an NLP tool as well as a C++ and Python library for working with basic linguistic constructions such as n-grams and skipgrams (i.e patterns with one or more gaps, either of fixed or dynamic size) in a quick and memory-efficient way. ", "license": "https://spdx.org/licenses/GPL-3.0", "url": "https://proycon.github.io/colibri-core", diff --git a/configure.ac b/configure.ac index 2e0ee7c7..f87f3278 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ # $URL: https://ilk.uvt.nl/svn/sources/ucto/trunk/configure.ac $ AC_PREREQ([2.67]) -AC_INIT([colibri-core],[2.5.1],[proycon@anaproy.nl]) +AC_INIT([colibri-core],[2.5.2],[proycon@anaproy.nl]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADER([config.h]) diff --git a/include/patternmodel.h b/include/patternmodel.h index 22c938c4..abdaa574 100644 --- a/include/patternmodel.h +++ b/include/patternmodel.h @@ -3049,8 +3049,8 @@ class IndexedPatternModel: public PatternModel= minsubsize) && (candidate != pattern) && ((occurrencethreshold == 0) || (this->occurrencecount(candidate) >= occurrencethreshold)) - && ((category == 0) || (candidate.category() >= category)) - && ((size == 0) || (candidate.n() >= size)) + && ((category == 0) || (candidate.category() == category)) + && ((size == 0) || (candidate.n() == size)) ) { if ((candidate.category() == SKIPGRAM) || (pattern.category() == SKIPGRAM)) { //instance may not have skips in places where the larger candidate pattern does @@ -3100,8 +3100,8 @@ class IndexedPatternModel: public PatternModelsecond; if ((ref2.token + neighbour.n() == ref.token) && ((occurrencethreshold == 0) || (this->occurrencecount(neighbour) >= occurrencethreshold)) - && ((category == 0) || (neighbour.category() >= category)) - && ((size == 0) || (neighbour.n() >= size)) + && ((category == 0) || (neighbour.category() == category)) + && ((size == 0) || (neighbour.n() == size)) ){ neighbours[neighbour]++; if ((cutoff > 0) && (neighbours.size() >= cutoff)) break; @@ -3141,8 +3141,8 @@ class IndexedPatternModel: public PatternModel::iterator iter2 = rindex.begin(); iter2 != rindex.end(); iter2++) { const PatternPointer neighbour = *iter2; if ( ((occurrencethreshold == 0) || (this->occurrencecount(neighbour) >= occurrencethreshold)) - && ((category == 0) || (neighbour.category() >= category)) - && ((size == 0) || (neighbour.n() >= size)) ) { + && ((category == 0) || (neighbour.category() == category)) + && ((size == 0) || (neighbour.n() == size)) ) { neighbours[neighbour]++; if ((cutoff > 0) && (neighbours.size() >= cutoff)) break; } @@ -3279,8 +3279,8 @@ class IndexedPatternModel: public PatternModelsecond; if ( (ref2.token > ref.token + _n) && ((occurrencethreshold == 0) || (this->occurrencecount(neighbour) >= occurrencethreshold)) - && ((category == 0) || (neighbour.category() >= category)) - && ((size == 0) || (neighbour.n() >= size)) + && ((category == 0) || (neighbour.category() == category)) + && ((size == 0) || (neighbour.n() == size)) ) { cooc[neighbour]++; if (matches != NULL) matches->push_back(std::pair(ref,ref2)); @@ -3322,8 +3322,8 @@ class IndexedPatternModel: public PatternModeloccurrencecount(neighbour) >= occurrencethreshold)) - && ((category == 0) || (neighbour.category() >= category)) - && ((size == 0) || (neighbour.n() >= size)) + && ((category == 0) || (neighbour.category() == category)) + && ((size == 0) || (neighbour.n() == size)) ) { cooc[neighbour]++; } @@ -3368,8 +3368,8 @@ class IndexedPatternModel: public PatternModel ref.token + _n)) && ((occurrencethreshold == 0) || (this->occurrencecount(neighbour) >= occurrencethreshold)) - && ((category == 0) || (neighbour.category() >= category)) - && ((size == 0) || (neighbour.n() >= size)) + && ((category == 0) || (neighbour.category() == category)) + && ((size == 0) || (neighbour.n() == size)) ) { cooc[neighbour]++; } diff --git a/setup.py b/setup.py index 2dc743b5..b067d298 100755 --- a/setup.py +++ b/setup.py @@ -183,7 +183,7 @@ def read(fname): license = "GPL", keywords = "nlp computational_linguistics frequency ngram skipgram pmi cooccurrence linguistics", long_description=read('README.rst'), - version = '2.5.1', + version = '2.5.2', ext_modules = extensions, cmdclass = {'build_ext': build_ext}, classifiers=[