diff --git a/spacy/matcher.pyx b/spacy/matcher.pyx index 5106161a0..84414c255 100644 --- a/spacy/matcher.pyx +++ b/spacy/matcher.pyx @@ -436,6 +436,9 @@ cdef class PhraseMatcher: abstract_patterns.append([{tag: True} for tag in get_bilou(length)]) self.matcher.add('Candidate', None, *abstract_patterns) self._callbacks = {} + + def __len__(self): + raise NotImplementedError def __reduce__(self): return (self.__class__, (self.vocab,), None, None)