From cb78d91ec5f9ab95757c8b9687edbd2c7464a8bd Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 1 Feb 2016 03:07:37 +0100 Subject: [PATCH] * Fix ArcEager.set_valid --- spacy/syntax/arc_eager.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index b9cec50ad..b6a94e5d4 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -395,13 +395,13 @@ cdef class ArcEager(TransitionSystem): elif USE_ROOT_ARC_SEGMENT and st.c._sent[i].dep == self.root_label: st.c._sent[i].head = 0 - cdef int set_valid(self, int* output, StateClass stcls) nogil: + cdef int set_valid(self, int* output, const StateC* st) nogil: cdef bint[N_MOVES] is_valid - is_valid[SHIFT] = Shift.is_valid(stcls.c, -1) - is_valid[REDUCE] = Reduce.is_valid(stcls.c, -1) - is_valid[LEFT] = LeftArc.is_valid(stcls.c, -1) - is_valid[RIGHT] = RightArc.is_valid(stcls.c, -1) - is_valid[BREAK] = Break.is_valid(stcls.c, -1) + is_valid[SHIFT] = Shift.is_valid(st, -1) + is_valid[REDUCE] = Reduce.is_valid(st, -1) + is_valid[LEFT] = LeftArc.is_valid(st, -1) + is_valid[RIGHT] = RightArc.is_valid(st, -1) + is_valid[BREAK] = Break.is_valid(st, -1) cdef int i for i in range(self.n_moves): output[i] = is_valid[self.c[i].move]