Fix parser

This commit is contained in:
Matthew Honnibal 2018-05-08 00:27:26 +02:00
parent 8a82367a9d
commit 99649d114d

View File

@ -218,9 +218,10 @@ cdef class Parser:
if beam_width == 1:
batch = self.moves.init_batch(docs)
weights = get_c_weights(model)
sizes = get_c_sizes(model, states.size())
for state in batch:
states.push_back(state.c)
if not state.is_final():
states.push_back(state.c)
sizes = get_c_sizes(model, states.size())
with nogil:
self._parseC(&states[0],
weights, sizes)