Fix significant train/test skew error in history feats

This commit is contained in:
Matthew Honnibal 2017-10-06 06:08:50 -05:00
parent 555d8c8bff
commit 21d11936fe

View File

@ -684,6 +684,7 @@ cdef class Parser:
while state.B(0) < start and not state.is_final():
action = self.moves.c[oracle_actions.pop(0)]
action.do(state.c, action.label)
state.c.push_hist(action.clas)
n_moves += 1
has_gold = self.moves.has_gold(gold, start=start,
end=start+max_length)