spaCy/spacy/tokens
Paul O'Leary McCann c4f0800fb8
Validate pos values when creating Doc (#9148)
* Validate pos values when creating Doc

* Add clear error when setting invalid pos

This also changes the error language slightly.

* Fix variable name

* Update spacy/tokens/doc.pyx

* Test that setting invalid pos raises an error

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2021-09-16 13:28:05 +02:00
..
__init__.pxd * Break up tokens.pyx into tokens/doc.pyx, tokens/token.pyx, tokens/spans.pyx 2015-07-13 20:20:58 +02:00
__init__.py Fix SpanGroup import (#7182) 2021-02-24 21:06:16 +11:00
_dict_proxies.py Fix spans weak ref in doc copy (#7225) 2021-02-28 12:32:48 +11:00
_retokenize.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
_retokenize.pyx Fix tensor retokenization for non-numpy ops (#7527) 2021-03-29 22:34:48 +11:00
_serialize.py Custom warning if the doc_bin is too large (#8069) 2021-05-17 15:48:40 +02:00
doc.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
doc.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
doc.pyx Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
graph.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
graph.pyx Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
morphanalysis.pxd Modify morphology to support arbitrary features (#4932) 2020-01-23 22:01:54 +01:00
morphanalysis.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
morphanalysis.pyx Minor refactor for Morphology and MorphAnalysis (#5804) 2020-07-24 09:28:06 +02:00
span_group.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
span_group.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
span_group.pyx Warn and document spangroup.doc weakref (#8980) 2021-08-20 11:06:19 +02:00
span.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
span.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
span.pyx fix docs for Span constructor arguments (#9023) 2021-08-25 16:06:22 +02:00
token.pxd cleanup 2021-01-13 14:20:05 +01:00
token.pyi Add stub files for main cython classes (#8427) 2021-08-07 12:30:03 +02:00
token.pyx Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
underscore.py Remove object subclassing 2020-07-12 14:03:23 +02:00