diff --git a/spacy/matcher/matcher.pyx b/spacy/matcher/matcher.pyx index fdce7e9fa..ee8efd688 100644 --- a/spacy/matcher/matcher.pyx +++ b/spacy/matcher/matcher.pyx @@ -203,7 +203,7 @@ cdef class Matcher: else: yield doc - def __call__(self, object doclike, as_spans=False): + def __call__(self, object doclike, *, as_spans=False): """Find all token sequences matching the supplied pattern. doclike (Doc or Span): The document to match over. diff --git a/spacy/matcher/phrasematcher.pyx b/spacy/matcher/phrasematcher.pyx index 6658c713e..44dda115b 100644 --- a/spacy/matcher/phrasematcher.pyx +++ b/spacy/matcher/phrasematcher.pyx @@ -217,7 +217,7 @@ cdef class PhraseMatcher: result = internal_node map_set(self.mem, result, self.vocab.strings[key], NULL) - def __call__(self, doc, as_spans=False): + def __call__(self, doc, *, as_spans=False): """Find all sequences matching the supplied patterns on the `Doc`. doc (Doc): The document to match over.