Fix parser.add_label()

This commit is contained in:
Matthew Honnibal 2019-02-24 16:53:22 +01:00
parent 893aa40d73
commit 1f7c56cd93

View File

@ -163,7 +163,7 @@ cdef class Parser:
added = self.moves.add_action(action, label) added = self.moves.add_action(action, label)
if added: if added:
resized = True resized = True
if resized: if resized and "nr_class" in self.cfg:
self.cfg["nr_class"] = self.moves.n_moves self.cfg["nr_class"] = self.moves.n_moves
if self.model not in (True, False, None) and resized: if self.model not in (True, False, None) and resized:
self.model.resize_output(self.moves.n_moves) self.model.resize_output(self.moves.n_moves)