diff --git a/spacy/tokens/_serialize.py b/spacy/tokens/_serialize.py index c4478e080..57bc98f4b 100644 --- a/spacy/tokens/_serialize.py +++ b/spacy/tokens/_serialize.py @@ -124,10 +124,10 @@ def pickle_box(box): def unpickle_box(byte_string): - return Box().from_bytes(byte_string) + return DocBox().from_bytes(byte_string) -copy_reg.pickle(Box, pickle_box, unpickle_box) +copy_reg.pickle(DocBox, pickle_box, unpickle_box) # Compatibility, as we had named it this previously. Binder = DocBox