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,8 +500,9 @@ cdef class Doc:
|
||||||
# its tokenisation changing, so it's okay once we have the Span
|
# its tokenisation changing, so it's okay once we have the Span
|
||||||
# objects. See Issue #375.
|
# objects. See Issue #375.
|
||||||
spans = []
|
spans = []
|
||||||
for start, end, label in self.noun_chunks_iterator(self):
|
if self.noun_chunks_iterator is not None:
|
||||||
spans.append(Span(self, start, end, label=label))
|
for start, end, label in self.noun_chunks_iterator(self):
|
||||||
|
spans.append(Span(self, start, end, label=label))
|
||||||
for span in spans:
|
for span in spans:
|
||||||
yield span
|
yield span
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue