mirror of https://github.com/explosion/spaCy.git
Fix variable error in token
This commit is contained in:
parent
8c4d1b46ce
commit
11664b9f20
|
@ -336,7 +336,7 @@ cdef class Token:
|
||||||
Returns:
|
Returns:
|
||||||
is_ancestor (bool): Whether this token is the ancestor of the descendant.
|
is_ancestor (bool): Whether this token is the ancestor of the descendant.
|
||||||
'''
|
'''
|
||||||
if self.doc is not other.doc:
|
if self.doc is not descendant.doc:
|
||||||
return False
|
return False
|
||||||
return any( ancestor.i == self.i for ancestor in descendant.ancestors )
|
return any( ancestor.i == self.i for ancestor in descendant.ancestors )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue