spaCy/spacy/tokens
Adriane Boyd 5d0f48fe69
Enforce that Span.start/end(_char) remain valid and in sync (#12268)
* Enforce that Span.start/end(_char) remain valid and in sync

Allowing span attributes to be writable starting in v3 has made it
possible for the internal `Span.start/end/start_char/end_char` to get
out-of-sync or have invalid values.

This checks that the values are valid and syncs the token and char
offsets if any attributes are modified directly. It does not yet handle
the case where the underlying doc is modified.

* Format
2023-04-06 16:01:59 +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 Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
doc_bin.py Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
doc.pxd Remove sentiment extension (#11722) 2022-11-23 13:09:32 +01:00
doc.pyi Return Tuple[Span] for all Doc/Span attrs that provide spans (#12288) 2023-03-01 16:00:02 +01:00
doc.pyx Return Tuple[Span] for all Doc/Span attrs that provide spans (#12288) 2023-03-01 16:00:02 +01:00
graph.pxd Add SpanGroup and Graph container types to represent arbitrary annotations (#6696) 2021-01-14 17:30:41 +11:00
graph.pyx StringStore refactoring (#11344) 2022-10-06 10:51:06 +02:00
morphanalysis.pxd Morphology/Morphologizer optimizations and refactoring (#11024) 2022-07-15 11:14:08 +02:00
morphanalysis.pyi 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
morphanalysis.pyx Morphology/Morphologizer optimizations and refactoring (#11024) 2022-07-15 11:14:08 +02:00
retokenizer.pyi Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
retokenizer.pyx Refactor lexeme mem passing (#12125) 2023-01-25 12:50:21 +09:00
span_group.pxd Span/SpanGroup: wrap SpanC in shared_ptr (#9869) 2022-01-12 13:38:52 +01:00
span_group.pyi Fix SpanGroup and Span typing (#12009) 2022-12-21 18:54:27 +01:00
span_group.pyx Merge remote-tracking branch 'upstream/master' into chore/v4-merge-master-20221222 2022-12-22 10:08:54 +01:00
span_groups.py Merge branch 'develop' into merge-develop-into-v4 2022-09-07 11:35:47 +02:00
span.pxd Span/SpanGroup: wrap SpanC in shared_ptr (#9869) 2022-01-12 13:38:52 +01:00
span.pyi Return Tuple[Span] for all Doc/Span attrs that provide spans (#12288) 2023-03-01 16:00:02 +01:00
span.pyx Enforce that Span.start/end(_char) remain valid and in sync (#12268) 2023-04-06 16:01:59 +02:00
token.pxd cleanup 2021-01-13 14:20:05 +01:00
token.pyi Remove sentiment extension (#11722) 2022-11-23 13:09:32 +01:00
token.pyx Remove backoff from .vector to .tensor (#12292) 2023-02-23 11:36:50 +01:00
underscore.py Custom extensions for spans with equal boundaries (#11429) 2022-12-12 08:55:53 +01:00