* Adjust conjuncts iterator in Token

This commit is contained in:
Matthew Honnibal 2015-11-03 13:23:22 +11:00
parent 36517516ef
commit f7dd377575

View File

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