Undo harmful pickling hacks on Language class

This commit is contained in:
Matthew Honnibal 2017-11-04 23:07:03 +01:00
parent 718f1c50fb
commit d185927998
1 changed files with 0 additions and 10 deletions

View File

@ -135,10 +135,6 @@ class Language(object):
self.pipeline = []
self._optimizer = None
def __reduce__(self):
bytes_data = self.to_bytes(vocab=False)
return (unpickle_language, (self.vocab, self.meta, bytes_data))
@property
def path(self):
return self._path
@ -724,12 +720,6 @@ class DisabledPipes(list):
self[:] = []
def unpickle_language(vocab, meta, bytes_data):
lang = Language(vocab=vocab)
lang.from_bytes(bytes_data)
return lang
def _pipe(func, docs):
for doc in docs:
func(doc)