mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Adjust conjuncts iterator in Token
This commit is contained in:
parent
36517516ef
commit
f7dd377575
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user