mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
* Add comment on Vocab.__reduce__
This commit is contained in:
parent
e1282b7f2f
commit
63e3d4e27f
|
@ -107,6 +107,9 @@ cdef class Vocab:
|
|||
return self.length
|
||||
|
||||
def __reduce__(self):
|
||||
# TODO: This is hopelessly broken. The state is transferred as just
|
||||
# a temp directory! We then fail to clean this up. This method therefore
|
||||
# only pretends to work. What we need to do is form an archive file.
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
lex_loc = path.join(tmp_dir, 'lexemes.bin')
|
||||
str_loc = path.join(tmp_dir, 'strings.json')
|
||||
|
|
Loading…
Reference in New Issue
Block a user