From caae77f72de4e1bf5bb4ac493672939feb0bfd63 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 14 Nov 2017 19:44:40 +0300 Subject: [PATCH] Update strings.pyx --- spacy/strings.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/strings.pyx b/spacy/strings.pyx index abd4fa69e..d08d96bb2 100644 --- a/spacy/strings.pyx +++ b/spacy/strings.pyx @@ -263,6 +263,8 @@ cdef class StringStore: self.keys.swap(tmp) strings = list(self) self._reset_and_load(strings) + # Here we have strings but hits to it should be reseted + self.hits.clear() cdef const Utf8Str* intern_unicode(self, unicode py_string): # 0 means missing, but we don't bother offsetting the index.