spaCy/tests/morphology/test_morphology_pickle.py

18 lines
327 B
Python
Raw Normal View History

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