spaCy/spacy
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
..
cli Fix absolute imports and avoid importing from cli 2019-08-20 15:08:59 +02:00
data
displacy Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
lang Tidy up and auto-format 2019-08-20 17:36:34 +02:00
matcher Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
pipeline Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
syntax 💫 Improve error message when model.from_bytes() dies (#4014) 2019-07-24 11:27:34 +02:00
tests Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
tokens CLI scripts for entity linking (wikipedia & generic) (#4091) 2019-08-13 15:38:59 +02:00
__init__.pxd
__init__.py Fix formatting (hopefully also restarts build properly) 2019-03-20 09:55:45 +01:00
__main__.py Update __main__.py 2019-03-20 09:43:26 +01:00
_align.pyx
_ml.py Fix absolute imports and avoid importing from cli 2019-08-20 15:08:59 +02:00
about.py Set version to v2.1.8 2019-08-07 13:53:58 +02:00
attrs.pxd Fix attrs alignment 2019-07-12 17:59:47 +02:00
attrs.pyx ensure Span.as_doc keeps the entity links + unit test 2019-06-25 15:28:51 +02:00
compat.py Fix symlink creation to show error message on failure (#3589) (resolves #3307)) 2019-04-16 11:58:31 +02:00
errors.py Improve token pattern checking without validation (#4105) 2019-08-21 14:00:37 +02:00
glossary.py Update glossary.py to match information found in documentation (#3704) (closes ##3679) 2019-05-10 14:23:20 +02:00
gold.pxd fixes in kb and gold 2019-07-17 17:18:26 +02:00
gold.pyx WIP: Extending debug-data (#4114) 2019-08-16 10:52:46 +02:00
kb.pxd rename entity frequency 2019-07-19 17:40:28 +02:00
kb.pyx CLI scripts for entity linking (wikipedia & generic) (#4091) 2019-08-13 15:38:59 +02:00
language.py Tidy up and auto-format 2019-08-20 17:36:34 +02:00
lemmatizer.py Fix inconsistant lemmatizer issue #3484 (#3646) 2019-05-04 18:16:03 +02:00
lexeme.pxd 💫 Support lexical attributes in retokenizer attrs (closes #2390) (#3325) 2019-02-24 21:13:51 +01:00
lexeme.pyx Tidy up property code style (#3391) 2019-03-11 15:59:09 +01:00
morphology.pxd annotate kb_id through ents in doc 2019-03-22 11:36:44 +01:00
morphology.pyx Fix issue #3551: Upper case lemmas 2019-04-16 12:27:15 +02:00
parts_of_speech.pxd
parts_of_speech.pyx
scorer.py Tidy up and auto-format 2019-08-18 15:09:16 +02:00
strings.pxd
strings.pyx 💫 Make serialization methods consistent (#3385) 2019-03-10 19:16:45 +01:00
structs.pxd rename entity frequency 2019-07-19 17:40:28 +02:00
symbols.pxd Fix symbol alignment 2019-07-12 17:48:38 +02:00
symbols.pyx ensure Span.as_doc keeps the entity links + unit test 2019-06-25 15:28:51 +02:00
tokenizer.pxd
tokenizer.pyx tokenizer doc fix 2019-07-15 11:19:34 +02:00
typedefs.pxd
typedefs.pyx
util.py Reduce size of language data (#4141) 2019-08-20 14:54:11 +02:00
vectors.pyx Update Vectors.find docs [ci skip] 2019-03-16 17:10:57 +01:00
vocab.pxd
vocab.pyx Tidy up property code style (#3391) 2019-03-11 15:59:09 +01:00