spaCy/spacy/tests/morphology/test_morphology_pickle.py
2015-10-26 00:07:31 +11:00

18 lines
314 B
Python

import pytest
import pickle
import io
from spacy.morphology import Morphology
from spacy.lemmatizer import Lemmatizer
from spacy.strings import StringStore
def test_pickle():
morphology = Morphology(StringStore(), {}, Lemmatizer({}, {}, {}))
file_ = io.BytesIO()
pickle.dump(morphology, file_)