From c81330d02f646723f5c131c6509b542716202c0d Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 11 Nov 2022 14:01:49 +0100 Subject: [PATCH] Change regex kwarg type to bool --- spacy/matcher/matcher.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/matcher/matcher.pyx b/spacy/matcher/matcher.pyx index 5c313a020..f985cf76c 100644 --- a/spacy/matcher/matcher.pyx +++ b/spacy/matcher/matcher.pyx @@ -832,7 +832,7 @@ class _FuzzyPredicate: operators = ("FUZZY", "FUZZY1", "FUZZY2", "FUZZY3", "FUZZY4", "FUZZY5") def __init__(self, i, attr, value, predicate, is_extension=False, vocab=None, - regex=None, fuzzy=None): + regex=False, fuzzy=None): self.i = i self.attr = attr self.value = value @@ -858,7 +858,7 @@ class _RegexPredicate: operators = ("REGEX",) def __init__(self, i, attr, value, predicate, is_extension=False, vocab=None, - regex=None, fuzzy=None): + regex=False, fuzzy=None): self.i = i self.attr = attr self.value = re.compile(value) @@ -880,7 +880,7 @@ class _SetPredicate: operators = ("IN", "NOT_IN", "IS_SUBSET", "IS_SUPERSET", "INTERSECTS") def __init__(self, i, attr, value, predicate, is_extension=False, vocab=None, - regex=None, fuzzy=None): + regex=False, fuzzy=None): self.i = i self.attr = attr self.vocab = vocab @@ -965,7 +965,7 @@ class _ComparisonPredicate: operators = ("==", "!=", ">=", "<=", ">", "<") def __init__(self, i, attr, value, predicate, is_extension=False, vocab=None, - regex=None, fuzzy=None): + regex=False, fuzzy=None): self.i = i self.attr = attr self.value = value @@ -1037,7 +1037,7 @@ def _get_extra_predicates(spec, extra_predicates, vocab): def _get_extra_predicates_dict(attr, value_dict, vocab, predicate_types, - extra_predicates, seen_predicates, regex=None, fuzzy=None): + extra_predicates, seen_predicates, regex=False, fuzzy=None): output = [] for type_, value in value_dict.items(): type_ = type_.upper()