From 72c2f98dc972b39a46fe352ba1a3765fd9e20576 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Fri, 27 Sep 2019 09:24:52 +0200 Subject: [PATCH] Switch special case reload threshold to variable Refer to variable instead of hard-coded threshold --- spacy/tokenizer.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokenizer.pyx b/spacy/tokenizer.pyx index de3e2fd95..ec3394861 100644 --- a/spacy/tokenizer.pyx +++ b/spacy/tokenizer.pyx @@ -585,7 +585,7 @@ cdef class Tokenizer: return # only reload if all 4 of prefix, suffix, infix, token_match have # 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_specials() self._load_special_cases(self._rules)