Fix Span.sents issue.

This commit is contained in:
Raphael Mitsch 2023-03-29 15:22:27 +02:00
parent 7851f6eb8e
commit 97018de33b

View File

@ -463,6 +463,11 @@ cdef class Span:
elif i == self.doc.length - 1:
yield Span(self.doc, start, self.doc.length)
# Ensure that trailing parts of the Span instance are included in last element of .sents.
if start == self.doc.length - 1:
yield Span(self.doc, start, self.doc.length)
@property
def ents(self):
"""The named entities that fall completely within the span. Returns