Fix oracles

This commit is contained in:
Matthew Honnibal 2020-06-20 02:36:12 +02:00
parent 03db143cd0
commit be81577719
2 changed files with 3 additions and 2 deletions

View File

@ -513,7 +513,8 @@ cdef class ArcEager(TransitionSystem):
keeps = [i for i, s in enumerate(states) if not s.is_final()]
states = [states[i] for i in keeps]
golds = [ArcEagerGold(self, states[i], examples[i]) for i in keeps]
n_steps = sum([len(s.buffer_length()) * 4 for s in states])
cdef StateClass s
n_steps = sum([len(s.queue) * 4 for s in states])
return states, golds, n_steps
cdef Transition lookup_transition(self, object name_or_id) except *:

View File

@ -145,7 +145,7 @@ cdef class BiluoPushDown(TransitionSystem):
states = [states[i] for i in keeps]
examples = [examples[i] for i in keeps]
golds = [BiluoGold(self, states[i], examples[i]) for i in keeps]
n_steps = sum([len(s.buffer_length()) for s in states])
n_steps = sum([len(s.queue) for s in states])
return states, golds, n_steps
cdef Transition lookup_transition(self, object name) except *: