diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index 960f9f2c2..6ba7ad396 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -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 *: diff --git a/spacy/syntax/ner.pyx b/spacy/syntax/ner.pyx index 53d9c67de..04fbbefc1 100644 --- a/spacy/syntax/ner.pyx +++ b/spacy/syntax/ner.pyx @@ -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 *: