mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
16 lines
432 B
Python
16 lines
432 B
Python
# coding: utf-8
|
|
from __future__ import unicode_literals
|
|
|
|
from spacy.lang.en import English
|
|
|
|
|
|
def test_issue3289():
|
|
"""Test that Language.to_bytes handles serializing a pipeline component
|
|
with an uninitialized model."""
|
|
nlp = English()
|
|
nlp.add_pipe(nlp.create_pipe("textcat"))
|
|
bytes_data = nlp.to_bytes()
|
|
new_nlp = English()
|
|
new_nlp.add_pipe(nlp.create_pipe("textcat"))
|
|
new_nlp.from_bytes(bytes_data)
|