diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index e83b4c5ee..ebd8a0cac 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -383,7 +383,7 @@ cdef class ArcEager(TransitionSystem): elif USE_ROOT_ARC_SEGMENT and st._sent[i].dep == self.root_label: st._sent[i].head = 0 - cdef int set_valid(self, bint* output, StateClass stcls) nogil: + cdef int set_valid(self, int* output, StateClass stcls) nogil: cdef bint[N_MOVES] is_valid is_valid[SHIFT] = Shift.is_valid(stcls, -1) is_valid[REDUCE] = Reduce.is_valid(stcls, -1) @@ -394,7 +394,7 @@ cdef class ArcEager(TransitionSystem): for i in range(self.n_moves): output[i] = is_valid[self.c[i].move] - cdef int set_costs(self, bint* is_valid, int* costs, + cdef int set_costs(self, int* is_valid, int* costs, StateClass stcls, GoldParse gold) except -1: cdef int i, move, label cdef label_cost_func_t[N_MOVES] label_cost_funcs diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 85308fc0e..33c970f9a 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -93,7 +93,7 @@ cdef class Parser: while not stcls.is_final(): memset(eg.scores, 0, eg.nr_class * sizeof(weight_t)) - self.moves.set_valid(eg.is_valid, stcls) + self.moves.set_valid(eg.is_valid, stcls) fill_context(eg.atoms, stcls) self.model.set_scores(eg.scores, eg.atoms) eg.guess = arg_max_if_true(eg.scores, eg.is_valid, self.model.n_classes) @@ -113,7 +113,7 @@ cdef class Parser: while not stcls.is_final(): memset(eg.c.scores, 0, eg.c.nr_class * sizeof(weight_t)) - self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold) + self.moves.set_costs(eg.c.is_valid, eg.c.costs, stcls, gold) fill_context(eg.c.atoms, stcls) diff --git a/spacy/syntax/transition_system.pxd b/spacy/syntax/transition_system.pxd index 509833253..2114df410 100644 --- a/spacy/syntax/transition_system.pxd +++ b/spacy/syntax/transition_system.pxd @@ -45,7 +45,7 @@ cdef class TransitionSystem: cdef Transition init_transition(self, int clas, int move, int label) except * - cdef int set_valid(self, bint* output, StateClass state) nogil + cdef int set_valid(self, int* output, StateClass state) nogil - cdef int set_costs(self, bint* is_valid, int* costs, + cdef int set_costs(self, int* is_valid, int* costs, StateClass state, GoldParse gold) except -1 diff --git a/spacy/syntax/transition_system.pyx b/spacy/syntax/transition_system.pyx index 7a0b22b1a..083a4990b 100644 --- a/spacy/syntax/transition_system.pyx +++ b/spacy/syntax/transition_system.pyx @@ -44,12 +44,12 @@ cdef class TransitionSystem: cdef Transition init_transition(self, int clas, int move, int label) except *: raise NotImplementedError - cdef int set_valid(self, bint* is_valid, StateClass stcls) nogil: + cdef int set_valid(self, int* is_valid, StateClass stcls) nogil: cdef int i for i in range(self.n_moves): is_valid[i] = self.c[i].is_valid(stcls, self.c[i].label) - cdef int set_costs(self, bint* is_valid, int* costs, + cdef int set_costs(self, int* is_valid, int* costs, StateClass stcls, GoldParse gold) except -1: cdef int i self.set_valid(is_valid, stcls)