mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix Matcher.__contains__
This commit is contained in:
parent
18aae423fb
commit
91beacf5e3
|
@ -230,7 +230,7 @@ cdef class Matcher:
|
||||||
key (unicode): The match ID.
|
key (unicode): The match ID.
|
||||||
RETURNS (bool): Whether the matcher contains rules for this match ID.
|
RETURNS (bool): Whether the matcher contains rules for this match ID.
|
||||||
"""
|
"""
|
||||||
return key in self._patterns
|
return self._normalize_key(key) in self._patterns
|
||||||
|
|
||||||
def add(self, key, on_match, *patterns):
|
def add(self, key, on_match, *patterns):
|
||||||
"""Add a match-rule to the matcher. A match-rule consists of: an ID key,
|
"""Add a match-rule to the matcher. A match-rule consists of: an ID key,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user