Switch special case reload threshold to variable

Refer to variable instead of hard-coded threshold
This commit is contained in:
Adriane Boyd 2019-09-27 09:24:52 +02:00
parent 669bc1a314
commit 72c2f98dc9
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ cdef class Tokenizer:
return return
# only reload if all 4 of prefix, suffix, infix, token_match have # only reload if all 4 of prefix, suffix, infix, token_match have
# have been initialized # have been initialized
if self.vocab is not None and self._property_init_count >= 4: if self.vocab is not None and self._property_init_count >= self._property_init_max:
self._flush_cache() self._flush_cache()
self._flush_specials() self._flush_specials()
self._load_special_cases(self._rules) self._load_special_cases(self._rules)