* Fix get_state

This commit is contained in:
Matthew Honnibal 2015-08-09 01:45:30 +02:00
parent f0f4fa9838
commit 55fde0e240
1 changed files with 2 additions and 2 deletions

View File

@ -108,8 +108,8 @@ cdef class Parser:
self.moves.set_valid(eg.c.is_valid, stcls) self.moves.set_valid(eg.c.is_valid, stcls)
fill_context(eg.c.atoms, stcls) fill_context(eg.c.atoms, stcls)
self.model.set_scores(eg.c.scores, eg.c.atoms) self.model.set_scores(eg.c.scores, eg.c.atoms)
eg.guess = arg_max_if_true(eg.c.scores, eg.c.is_valid, self.model.n_classes) eg.c.guess = arg_max_if_true(eg.c.scores, eg.c.is_valid, self.model.n_classes)
self.moves.c[eg.guess].do(stcls, self.moves.c[eg.guess].label) self.moves.c[eg.c.guess].do(stcls, self.moves.c[eg.c.guess].label)
if stcls.is_final(): if stcls.is_final():
self.moves.finalize_state(stcls) self.moves.finalize_state(stcls)
tokens.set_parse(stcls._sent) tokens.set_parse(stcls._sent)