mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
* Fix negative index for __getitem__
This commit is contained in:
parent
ef795aece8
commit
ab8bb047d0
|
@ -102,7 +102,7 @@ cdef class Tokens:
|
|||
token (Token):
|
||||
"""
|
||||
if i < 0:
|
||||
i = self.length - i
|
||||
i = self.length + i
|
||||
bounds_check(i, self.length, PADDING)
|
||||
return Token.cinit(self.vocab, self._string,
|
||||
&self.data[i], i, self.length,
|
||||
|
|
Loading…
Reference in New Issue
Block a user