mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-21 17:41:59 +03:00
Fix Span.sents issue.
This commit is contained in:
parent
7851f6eb8e
commit
97018de33b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user