mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
* Fix token.conjuncts method
This commit is contained in:
parent
b4cac52f7f
commit
23818f89b8
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user