Reset all caches when reloading special cases

This commit is contained in:
Adriane Boyd 2022-03-07 14:28:02 +01:00
parent 59eba273bb
commit 4ef6bd171d
1 changed files with 2 additions and 0 deletions

View File

@ -620,6 +620,8 @@ cdef class Tokenizer:
def _reload_special_cases(self): def _reload_special_cases(self):
self._flush_cache() self._flush_cache()
self._flush_specials() self._flush_specials()
self._cache = PreshMap()
self._specials = PreshMap()
self._load_special_cases(self._rules) self._load_special_cases(self._rules)
def explain(self, text): def explain(self, text):