mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-04 21:50:35 +03:00
Fix issue #1069 with custom hook Doc.sents
definition
This commit is contained in:
parent
35795c88c4
commit
f37d078d6a
|
@ -431,7 +431,9 @@ cdef class Doc:
|
|||
"""
|
||||
def __get__(self):
|
||||
if 'sents' in self.user_hooks:
|
||||
return self.user_hooks['sents'](self)
|
||||
for sent in self.user_hooks['sents'](self):
|
||||
yield sent
|
||||
return
|
||||
|
||||
if not self.is_parsed:
|
||||
raise ValueError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user