spaCy/spacy/tokens
Adriane Boyd b9c3045033 Require that all SpanGroup spans are from the current doc
The restriction on only adding spans from the current doc were already
implemented for all operations except for `SpanGroup.__init__`.

Initialize copied spans for `SpanGroup.copy` with `Doc.char_span` in
order to validate the character offsets and to make it possible to copy
spans between documents with differing tokenization. Currently there is
no validation that the document texts are identical, but the span char
offsets must be valid spans in the target doc, which prevents you from
ending up with completely invalid spans.
2023-04-24 19:50:45 +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 SpanGroup(s)-related optimizations (#11380) 2022-08-31 09:03:20 +02:00
_retokenize.pyi 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
_retokenize.pyx Fix tensor retokenization for non-numpy ops (#7527) 2021-03-29 22:34:48 +11:00
_serialize.py Add Span.kb_id/Span.id strings to Doc/DocBin serialization if set (#12493) 2023-04-03 15:11:12 +02:00
doc.pxd Set as_tuples on Doc during processing (#9592) 2021-11-02 15:08:22 +01:00
doc.pyi Add span_id to Span.char_span, update Doc/Span.char_span docs (#12196) 2023-01-27 15:09:17 +01:00
doc.pyx Require that all SpanGroup spans are from the current doc 2023-04-24 19:50:45 +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 Refactor error messages to remove hardcoded strings (#10729) 2022-05-02 13:38:46 +02:00
morphanalysis.pxd Modify morphology to support arbitrary features (#4932) 2020-01-23 22:01:54 +01:00
morphanalysis.pyi Add default option to MorphAnalysis.get (#12545) 2023-04-20 14:06:32 +02:00
morphanalysis.pyx Add default option to MorphAnalysis.get (#12545) 2023-04-20 14:06:32 +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 Fix SpanGroup and Span typing (#12009) 2022-12-21 18:54:27 +01:00
span_group.pyx Require that all SpanGroup spans are from the current doc 2023-04-24 19:50:45 +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 span_id to Span.char_span, update Doc/Span.char_span docs (#12196) 2023-01-27 15:09:17 +01:00
span.pyx Fix Span.sents for edge case of Span being the only Span in the last sentence of a Doc. (#12484) 2023-03-29 18:54:47 +02:00
token.pxd cleanup 2021-01-13 14:20:05 +01:00
token.pyi 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
token.pyx Update vector handling in similarity methods (#11013) 2022-06-28 19:50:47 +02:00
underscore.py Update typing hints (#10109) 2022-01-28 16:59:54 +01:00