mirror of https://github.com/explosion/spaCy.git
bugfix: `Doc.noun_chunks` call `Doc.noun_chunks_iterator` without checking (closes #2194)
This commit is contained in:
parent
e5055e3cf6
commit
e2f13ec722
|
@ -500,6 +500,7 @@ cdef class Doc:
|
|||
# its tokenisation changing, so it's okay once we have the Span
|
||||
# objects. See Issue #375.
|
||||
spans = []
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue