Undo harmful pickling hacks on Language class
@@ -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)
