spaCy/spacy/tests/doc
Natalia Rodnova 472740d613
Added sents property to Span for Spans spanning over several sentences (#9699)
* Added sents property to Span class that returns a generator of sentences the Span belongs to

* Added description to Span.sents property

* Update test_span to clarify the difference between span.sent and span.sents

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update spacy/tests/doc/test_span.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Fix documentation typos in spacy/tokens/span.pyx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update Span.sents doc string in spacy/tokens/span.pyx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Parametrized test_span_spans

* Corrected Span.sents to check for span-level hook first. Also, made Span.sent respect doc-level sents hook if no span-level hook is provided

* Corrected Span ocumentation copy/paste issue

* Put back accidentally deleted lines

* Fixed formatting in span.pyx

* Moved check for SENT_START annotation after user hooks in Span.sents

* add version where the property was introduced

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2021-12-06 09:58:01 +01:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_add_entities.py Support negative examples in partial NER annotations (#8106) 2021-06-17 17:33:00 +10:00
test_array.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_creation.py Validate pos values when creating Doc (#9148) 2021-09-16 13:28:05 +02:00
test_doc_api.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_graph.py Tidy up and auto-format 2021-01-15 11:57:36 +11:00
test_morphanalysis.py Tidy up and auto-format 2020-10-03 17:20:18 +02:00
test_pickle_doc.py Pickle Doc._context (#9603) 2021-11-03 09:14:29 +01:00
test_retokenize_merge.py Tidy up with flake8: imports, comparisons, etc. 2021-06-28 12:08:15 +02:00
test_retokenize_split.py Migrate regression tests into the main test suite (#9655) 2021-12-04 20:34:48 +01:00
test_span.py Added sents property to Span for Spans spanning over several sentences (#9699) 2021-12-06 09:58:01 +01:00
test_to_json.py Fix morph in Doc.to_json 2020-10-08 14:44:35 +02:00
test_token_api.py Auto-format code with black (#9234) 2021-09-20 08:49:19 +02:00
test_underscore.py Merge branch 'master' into tmp/sync 2020-03-26 13:38:14 +01:00