From 9db77fd914d9f4778d48c273bb807bff17a8b89d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 20 Jul 2018 14:11:09 +0200 Subject: [PATCH] Fix deserialization for msgpack --- spacy/tokens/doc.pyx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 6f8dcebde..b95a0be0b 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -833,7 +833,6 @@ cdef class Doc: for key, value in zip(user_data_keys, user_data_values): self.user_data[key] = value - cdef attr_t[:, :] attrs cdef int i, start, end, has_space if 'sentiment' not in exclude and 'sentiment' in msg: @@ -853,8 +852,7 @@ cdef class Doc: lex = self.vocab.get(self.mem, orth_) self.push_back(lex, has_space) start = end + has_space - self.from_array(msg['array_head'][2:], - attrs[:, 2:]) + self.from_array(msg['array_head'][2:], attrs[:, 2:]) return self def extend_tensor(self, tensor):