Skip to content

Commit

Permalink
Fix Matcher.__contains__
Browse files Browse the repository at this point in the history
  • Loading branch information
ines committed Oct 25, 2017
1 parent 18aae42 commit 91beacf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy/matcher.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ cdef class Matcher:
key (unicode): The 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):
"""Add a match-rule to the matcher. A match-rule consists of: an ID key,
Expand Down

0 comments on commit 91beacf

Please sign in to comment.