Fix issue #1069 with custom hook Doc.sents definition

This commit is contained in:
Raphaël Bournhonesque 2017-05-18 09:59:38 +02:00
parent 35795c88c4
commit f37d078d6a

View File

@ -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(