mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-28 18:24:08 +03:00
Remove reinitialized PreshMaps on cache flush
This commit is contained in:
parent
cf7047bbdf
commit
104cb93d8b
|
@ -199,8 +199,6 @@ cdef class Tokenizer:
|
|||
del self._cache[k]
|
||||
if cached is not NULL:
|
||||
self.mem.free(cached)
|
||||
if len(self._cache) == 0:
|
||||
self._cache = PreshMap()
|
||||
|
||||
def _flush_specials(self):
|
||||
for k in self._specials:
|
||||
|
@ -208,7 +206,6 @@ cdef class Tokenizer:
|
|||
del self._specials[k]
|
||||
if cached is not NULL:
|
||||
self.mem.free(cached)
|
||||
self._specials = PreshMap()
|
||||
|
||||
cdef int _apply_special_cases(self, Doc doc):
|
||||
"""Retokenize doc according to special cases.
|
||||
|
|
Loading…
Reference in New Issue
Block a user