mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +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 = []
|
spans = []
|
||||||
cdef attr_t label
|
cdef attr_t label
|
||||||
for start, end, label in self.doc.noun_chunks_iterator(self):
|
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:
|
for span in spans:
|
||||||
yield span
|
yield span
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user