mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Fix deserialization for msgpack
This commit is contained in:
parent
adde3826e2
commit
9db77fd914
|
@ -833,7 +833,6 @@ cdef class Doc:
|
||||||
for key, value in zip(user_data_keys, user_data_values):
|
for key, value in zip(user_data_keys, user_data_values):
|
||||||
self.user_data[key] = value
|
self.user_data[key] = value
|
||||||
|
|
||||||
cdef attr_t[:, :] attrs
|
|
||||||
cdef int i, start, end, has_space
|
cdef int i, start, end, has_space
|
||||||
|
|
||||||
if 'sentiment' not in exclude and 'sentiment' in msg:
|
if 'sentiment' not in exclude and 'sentiment' in msg:
|
||||||
|
@ -853,8 +852,7 @@ cdef class Doc:
|
||||||
lex = self.vocab.get(self.mem, orth_)
|
lex = self.vocab.get(self.mem, orth_)
|
||||||
self.push_back(lex, has_space)
|
self.push_back(lex, has_space)
|
||||||
start = end + has_space
|
start = end + has_space
|
||||||
self.from_array(msg['array_head'][2:],
|
self.from_array(msg['array_head'][2:], attrs[:, 2:])
|
||||||
attrs[:, 2:])
|
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def extend_tensor(self, tensor):
|
def extend_tensor(self, tensor):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user