From b8f3345a82d9626c77bc23e25973b306a4305715 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 15 Oct 2015 03:36:01 +1100 Subject: [PATCH] * Fix token.conjuncts method --- spacy/tokens/token.pyx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spacy/tokens/token.pyx b/spacy/tokens/token.pyx index 140d07251..bb2bbdf89 100644 --- a/spacy/tokens/token.pyx +++ b/spacy/tokens/token.pyx @@ -250,7 +250,7 @@ cdef class Token: def __get__(self): """Get a list of conjoined words.""" cdef Token word - conjs = [] + conjs = [self] if self.c.pos != CONJ and self.c.pos != PUNCT: seen_conj = False for word in self.rights: @@ -258,8 +258,6 @@ cdef class Token: seen_conj = True elif seen_conj and word.c.pos == self.c.pos: conjs.append(word) - conjs.reverse() - conjs.append(self) if seen_conj: return conjs elif self is not self.head and self in self.head.conjuncts: