Fix spaCy deprecation warning
Doc.is_sentenced
is deprecated in spaCy 3.0, see What's New in v3.0.
pytest output:
tests/pipeline/test_conllu_formatter.py::test_conllu_formatter
src/monapipe/pipeline/formatter/conllu_formatter.py:112: DeprecationWarning: [W107] The property `Doc.is_sentenced` is deprecated. Use `Doc.has_annotation("SENT_START")` instead.
if doc.is_sentenced:
tests/pipeline/test_conllu_formatter.py: 234 warnings
src/monapipe/pipeline/formatter/conllu_formatter.py:89: DeprecationWarning: [W107] The property `Doc.is_sentenced` is deprecated. Use `Doc.has_annotation("SENT_START")` instead.
list(token.sent).index(token) if token.doc.is_sentenced else token.i
tests/pipeline/test_conllu_formatter.py: 226 warnings
src/monapipe/pipeline/formatter/conllu_formatter.py:101: DeprecationWarning: [W107] The property `Doc.is_sentenced` is deprecated. Use `Doc.has_annotation("SENT_START")` instead.
list(token.sent).index(token.head) if token.doc.is_sentenced else token.head.i
tests/pipeline/test_from_start_slicer.py::test_from_start_slicer
src/monapipe/pipeline/slicer/from_start_slicer.py:54: DeprecationWarning: [W107] The property `Doc.is_sentenced` is deprecated. Use `Doc.has_annotation("SENT_START")` instead.
if (self.units == "sents" or self.complete_sentences) and not doc.is_sentenced: