Fixes Issue #1207 where `noun_chunks` of `Span` gives an error.

Make sure to reference `self.doc` when getting the noun chunks.

Same fix as 9750a0128c
This commit is contained in:
Motoki Wu 2017-11-17 17:13:13 -08:00
parent b818afaa0e
commit a52e195a0a
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ cdef class Span:
spans = []
cdef attr_t label
for start, end, label in self.doc.noun_chunks_iterator(self):
spans.append(Span(self, start, end, label=label))
spans.append(Span(self.doc, start, end, label=label))
for span in spans:
yield span