* Fix token.conjuncts method

This commit is contained in:
Matthew Honnibal 2015-10-15 03:34:57 +11:00
parent b4cac52f7f
commit 23818f89b8

View File

@ -248,12 +248,12 @@ cdef class Token:
property conjuncts:
def __get__(self):
"""Get a list of conjoined words"""
"""Get a list of conjoined words."""
cdef Token word
conjs = []
if self.c.pos != CONJ and self.c.pos != PUNCT:
seen_conj = False
for word in reversed(list(self.lefts)):
for word in self.rights:
if word.c.pos == CONJ:
seen_conj = True
elif seen_conj and word.c.pos == self.c.pos: