From 91beacf5e327a5898935050ff8fdb9b9d9268821 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 25 Oct 2017 16:19:38 +0200 Subject: [PATCH] Fix Matcher.__contains__ --- spacy/matcher.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index 6c1069578..fd4a8026a 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -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,