mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Swap keys in proper place
Remove unnecessary clear of the hits
This commit is contained in:
parent
86ca434c93
commit
870defa815
|
@ -260,12 +260,10 @@ cdef class StringStore:
|
|||
if self.hits.count(key) != 0:
|
||||
tmp.push_back(key)
|
||||
|
||||
self.keys.swap(tmp)
|
||||
strings = list(self)
|
||||
self._reset_and_load(strings)
|
||||
|
||||
self.keys.swap(tmp)
|
||||
self.hits.clear()
|
||||
|
||||
cdef const Utf8Str* intern_unicode(self, unicode py_string):
|
||||
# 0 means missing, but we don't bother offsetting the index.
|
||||
cdef bytes byte_string = py_string.encode('utf8')
|
||||
|
|
Loading…
Reference in New Issue
Block a user