From f8b4407a29df5cbf85f5b4179c8b4c1cdd847ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Gilli=C3=9Fen?= Date: Tue, 24 Mar 2020 10:22:12 +0100 Subject: [PATCH] Remove max_length parameter The parameter max_length is deprecated in PhraseMatcher, as stated here: https://spacy.io/api/phrasematcher#init --- examples/information_extraction/phrase_matcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/information_extraction/phrase_matcher.py b/examples/information_extraction/phrase_matcher.py index cc6f46055..f3622bfdd 100644 --- a/examples/information_extraction/phrase_matcher.py +++ b/examples/information_extraction/phrase_matcher.py @@ -88,8 +88,8 @@ def read_text(bz2_loc, n=10000): break -def get_matches(tokenizer, phrases, texts, max_length=6): - matcher = PhraseMatcher(tokenizer.vocab, max_length=max_length) +def get_matches(tokenizer, phrases, texts): + matcher = PhraseMatcher(tokenizer.vocab) matcher.add("Phrase", None, *phrases) for text in texts: doc = tokenizer(text)