mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 10:16:27 +03:00
* Update oov check in tokenizer
This commit is contained in:
parent
cfd842769e
commit
e49c7f1478
|
@ -212,7 +212,7 @@ cdef class Tokenizer:
|
||||||
cdef int _save_cached(self, const TokenC* tokens, hash_t key, int n) except -1:
|
cdef int _save_cached(self, const TokenC* tokens, hash_t key, int n) except -1:
|
||||||
cdef int i
|
cdef int i
|
||||||
for i in range(n):
|
for i in range(n):
|
||||||
if tokens[i].lex.id == 1:
|
if tokens[i].lex.id == 0:
|
||||||
return 0
|
return 0
|
||||||
cached = <_Cached*>self.mem.alloc(1, sizeof(_Cached))
|
cached = <_Cached*>self.mem.alloc(1, sizeof(_Cached))
|
||||||
cached.length = n
|
cached.length = n
|
||||||
|
|
Loading…
Reference in New Issue
Block a user