Fix variable error in token

This commit is contained in:
Matthew Honnibal 2016-11-01 13:28:00 +01:00
parent 8c4d1b46ce
commit 11664b9f20
1 changed files with 1 additions and 1 deletions

View File

@ -336,7 +336,7 @@ cdef class Token:
Returns:
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 any( ancestor.i == self.i for ancestor in descendant.ancestors )