Avoid relying on final gold check in beam search

This commit is contained in:
Matthew Honnibal 2018-05-08 13:48:19 +02:00
parent fc4dd49b77
commit 8cfe326f87

View File

@ -106,8 +106,6 @@ cdef class ParserBeam(object):
try:
if self.moves.is_gold_parse(state, self.golds[i]):
beam._states[j].loss = 0.0
elif beam._states[j].loss == 0.0:
beam._states[j].loss = 1.0
except NotImplementedError:
break