Fix parser oracle

This commit is contained in:
Matthew Honnibal 2021-01-25 15:26:43 +11:00
parent 46b6197248
commit 38ad6c7b6a

View File

@ -70,6 +70,8 @@ cdef class TransitionSystem:
return state
def get_oracle_sequence(self, Example example, _debug=False):
if not self.has_gold(example):
return []
states, golds, _ = self.init_gold_batch([example])
if not states:
return []