* Adjust conjuncts iterator in Token

This commit is contained in:
Matthew Honnibal 2015-11-03 13:23:22 +11:00
parent 36517516ef
commit f7dd377575
1 changed files with 0 additions and 3 deletions

View File

@ -253,14 +253,11 @@ cdef class Token:
def __get__(self): def __get__(self):
"""Get a list of conjoined words.""" """Get a list of conjoined words."""
cdef Token word cdef Token word
conjuncts = []
if self.dep_ != 'conj': if self.dep_ != 'conj':
for word in self.rights: for word in self.rights:
if word.dep_ == 'conj': if word.dep_ == 'conj':
yield word yield word
yield from word.conjuncts yield from word.conjuncts
conjuncts.append(word)
conjuncts.extend(word.conjuncts)
property ent_type: property ent_type:
def __get__(self): def __get__(self):