spaCy/bin
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
..
ud small fixes 2019-06-24 10:55:04 +02:00
wiki_entity_linking Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
__init__.py clean up code, remove old code, move to bin 2019-06-18 13:20:40 +02:00
cythonize.py 💫 Tidy up and auto-format .py files (#2983) 2018-11-30 17:03:03 +01:00
load_reddit.py Replacing regex library with re to increase tokenization speed (#3218) 2019-02-01 18:05:22 +11:00
push-tag.sh Fix push-tag script 2019-05-11 19:04:35 +02:00
spacy Add entry point-style auto alias for "spacy" 2017-08-14 12:18:39 +02:00
train_word_vectors.py counter instead of preshcounter 2019-07-11 13:05:53 +02:00