spaCy/spacy/tests/pipeline
adrianeboyd 8fe7bdd0fa Improve token pattern checking without validation (#4105)
* Fix typo in rule-based matching docs

* Improve token pattern checking without validation

Add more detailed token pattern checks without full JSON pattern validation and
provide more detailed error messages.

Addresses #4070 (also related: #4063, #4100).

* Check whether top-level attributes in patterns and attr for PhraseMatcher are
  in token pattern schema

* Check whether attribute value types are supported in general (as opposed to
  per attribute with full validation)

* Report various internal error types (OverflowError, AttributeError, KeyError)
  as ValueError with standard error messages

* Check for tagger/parser in PhraseMatcher pipeline for attributes TAG, POS,
  LEMMA, and DEP

* Add error messages with relevant details on how to use validate=True or nlp()
  instead of nlp.make_doc()

* Support attr=TEXT for PhraseMatcher

* Add NORM to schema

* Expand tests for pattern validation, Matcher, PhraseMatcher, and EntityRuler

* Remove unnecessary .keys()

* Rephrase error messages

* Add another type check to Matcher

Add another type check to Matcher for more understandable error messages
in some rare cases.

* Support phrase_matcher_attr=TEXT for EntityRuler

* Don't use spacy.errors in examples and bin scripts

* Fix error code

* Auto-format

Also try get Azure pipelines to finally start a build :(

* Update errors.py


Co-authored-by: Ines Montani <ines@ines.io>
Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
2019-08-21 14:00:37 +02:00
..
__init__.py Start adding tests for new pipeline management 2017-10-07 01:48:23 +02:00
test_entity_linker.py CLI scripts for entity linking (wikipedia & generic) (#4091) 2019-08-13 15:38:59 +02:00
test_entity_ruler.py Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
test_factories.py 💫 Tidy up and auto-format tests (#2967) 2018-11-27 01:09:36 +01:00
test_pipe_methods.py Tidy up and auto-format 2019-08-20 17:36:34 +02:00
test_sentencizer.py 💫 Add better and serializable sentencizer (#3471) 2019-03-23 15:45:02 +01:00
test_textcat.py 💫 Tidy up and auto-format tests (#2967) 2018-11-27 01:09:36 +01:00