diff --git a/spacy/tests/serialize/test_serialize_empty_model.py b/spacy/tests/serialize/test_serialize_empty_model.py new file mode 100644 index 000000000..b614a3648 --- /dev/null +++ b/spacy/tests/serialize/test_serialize_empty_model.py @@ -0,0 +1,9 @@ +import spacy +import spacy.lang.en +from spacy.pipeline import TextCategorizer + +def test_bytes_serialize_issue_1105(): + nlp = spacy.lang.en.English() + tokenizer = nlp.tokenizer + textcat = TextCategorizer(tokenizer.vocab, labels=['ENTITY', 'ACTION', 'MODIFIER']) + textcat_bytes = textcat.to_bytes()