mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Test Issue #599: .is_tagged and .is_parsed attributes not reflected after deserialization for empty documents.
This commit is contained in:
parent
05a8b752a2
commit
3d6c79e595
11
spacy/tests/regression/test_issue599.py
Normal file
11
spacy/tests/regression/test_issue599.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from ...tokens import Doc
|
||||
from ...vocab import Vocab
|
||||
|
||||
def test_issue599():
|
||||
doc = Doc(Vocab())
|
||||
doc.is_tagged = True
|
||||
doc.is_parsed = True
|
||||
bytes_ = doc.to_bytes()
|
||||
doc2 = Doc(doc.vocab)
|
||||
doc2.from_bytes(bytes_)
|
||||
assert doc2.is_parsed
|
Loading…
Reference in New Issue
Block a user