mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-11 09:00:36 +03:00
Fix oracles
This commit is contained in:
parent
03db143cd0
commit
be81577719
|
@ -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 *:
|
||||
|
|
|
@ -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 *:
|
||||
|
|
Loading…
Reference in New Issue
Block a user