mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-28 19:06:33 +03:00
Merge pull request #1070 from raphael0202/issue_1069
Fix issue #1069 with custom hook `Doc.sents` definition
This commit is contained in:
commit
2262211c46
|
@ -431,7 +431,8 @@ cdef class Doc:
|
|||
"""
|
||||
def __get__(self):
|
||||
if 'sents' in self.user_hooks:
|
||||
return self.user_hooks['sents'](self)
|
||||
yield from self.user_hooks['sents'](self)
|
||||
return
|
||||
|
||||
if not self.is_parsed:
|
||||
raise ValueError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user