spaCy/spacy/tests/parser
Paul O'Leary McCann 2c105cdbce
Raise error if deps not provided with heads (#8335)
* Fill in deps if not provided with heads

Before this change, if heads were passed without deps they would be
silently ignored, which could be confusing. See #8334.

* Use "dep" instead of a blank string

This is the customary placeholder dep. It might be better to show an
error here instead though.

* Throw error on heads without deps

* Add a test

* Fix tests

* Formatting

* Fix all tests

* Fix a test I missed

* Revise error message

* Clean up whitespace

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2021-06-15 13:23:32 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_add_label.py Fix beam NER resizing (#6834) 2021-01-27 23:39:14 +11:00
test_arc_eager_oracle.py Tidy up and auto-format 2021-01-05 13:41:53 +11:00
test_ner.py Preserve existing ENT_KB_ID annotation in NER (#7988) 2021-05-06 18:49:55 +10:00
test_neural_parser.py Update config resolution to use new Thinc 2020-09-27 22:21:31 +02:00
test_nn_beam.py Tidy up and auto-format 2021-01-05 13:41:53 +11:00
test_nonproj.py introduce token.has_head and refer to MISSING_DEP_ (WIP) 2021-01-12 17:17:06 +01:00
test_parse_navigate.py Raise error if deps not provided with heads (#8335) 2021-06-15 13:23:32 +02:00
test_parse.py cleanup 2021-01-13 14:20:05 +01:00
test_preset_sbd.py Add beam_parser and beam_ner components for v3 (#6369) 2020-12-13 09:08:32 +08:00
test_space_attachment.py Tidy up tests and docs 2020-09-21 20:43:54 +02:00
test_state.py Tidy up and auto-format 2021-01-05 13:41:53 +11:00