mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 09:14:32 +03:00
* Fix unintialised variable error
This commit is contained in:
parent
83a4df5a1a
commit
251dbf24d7
|
@ -266,7 +266,7 @@ cdef class Token:
|
|||
msg = _parse_unset_error
|
||||
raise AttributeError(msg)
|
||||
cdef const TokenC* tokens = self._seq.data
|
||||
cdef int n
|
||||
cdef int n = 0
|
||||
for i in range(self.i):
|
||||
if i + tokens[i].head == self.i:
|
||||
n += 1
|
||||
|
@ -278,7 +278,7 @@ cdef class Token:
|
|||
msg = _parse_unset_error
|
||||
raise AttributeError(msg)
|
||||
cdef const TokenC* tokens = self._seq.data
|
||||
cdef int n
|
||||
cdef int n = 0
|
||||
for i in range(self.i+1, self._seq.length):
|
||||
if (i + tokens[i].head) == self.i:
|
||||
n += 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user