spaCy/spacy/tests/matcher
Ines Montani ad2a514cdf Show warning if phrase pattern Doc was overprocessed (#3255)
In most cases, the PhraseMatcher will match on the verbatim token text or as of v2.1, sometimes the lowercase text. This means that we only need a tokenized Doc, without any other attributes.

If phrase patterns are created by processing large terminology lists with the full `nlp` object, this easily can make things a lot slower, because all components will be applied, even if we don't actually need the attributes they set (like part-of-speech tags, dependency labels).

The warning message also includes a suggestion to use nlp.make_doc or nlp.tokenizer.pipe for even faster processing. For now, the validation has to be enabled explicitly by setting validate=True.
2019-02-13 01:45:31 +11:00
..
__init__.py 💫 Refactor test suite (#2568) 2018-07-24 23:38:44 +02:00
test_matcher_api.py Add xfailing test for set value with operator [ci skip] 2019-02-06 13:40:11 +01:00
test_matcher_logic.py 💫 Tidy up and auto-format tests (#2967) 2018-11-27 01:09:36 +01:00
test_phrase_matcher.py Show warning if phrase pattern Doc was overprocessed (#3255) 2019-02-13 01:45:31 +11:00