Merge pull request #1070 from raphael0202/issue_1069

Fix issue #1069 with custom hook `Doc.sents` definition
This commit is contained in:
Matthew Honnibal 2017-05-23 11:07:06 +02:00 committed by GitHub
commit 2262211c46

View File

@ -431,7 +431,8 @@ cdef class Doc:
""" """
def __get__(self): def __get__(self):
if 'sents' in self.user_hooks: 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: if not self.is_parsed:
raise ValueError( raise ValueError(