mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
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:
parent
b818afaa0e
commit
a52e195a0a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user