mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
bugfix: Doc.noun_chunks
call Doc.noun_chunks_iterator
without checking (closes #2194)
This commit is contained in:
parent
e5055e3cf6
commit
e2f13ec722
|
@ -500,8 +500,9 @@ cdef class Doc:
|
|||
# its tokenisation changing, so it's okay once we have the Span
|
||||
# objects. See Issue #375.
|
||||
spans = []
|
||||
for start, end, label in self.noun_chunks_iterator(self):
|
||||
spans.append(Span(self, start, end, label=label))
|
||||
if self.noun_chunks_iterator is not None:
|
||||
for start, end, label in self.noun_chunks_iterator(self):
|
||||
spans.append(Span(self, start, end, label=label))
|
||||
for span in spans:
|
||||
yield span
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user