diff --git a/spacy/syntax/_parse_features.cpp b/spacy/syntax/_parse_features.cpp index eb10c425b..c8da2dcf8 100644 --- a/spacy/syntax/_parse_features.cpp +++ b/spacy/syntax/_parse_features.cpp @@ -1249,12 +1249,12 @@ struct __pyx_t_5spacy_6syntax_6_state_State; * * * cdef struct State: # <<<<<<<<<<<<<< - * TokenC** stack * TokenC* sent + * int* stack */ struct __pyx_t_5spacy_6syntax_6_state_State { - struct __pyx_t_5spacy_6tokens_TokenC **stack; struct __pyx_t_5spacy_6tokens_TokenC *sent; + int *stack; int i; int sent_len; int stack_len; @@ -2358,8 +2358,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ -static struct __pyx_t_5spacy_6tokens_TokenC *(*__pyx_f_5spacy_6syntax_6_state_get_right)(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int); /*proto*/ -static struct __pyx_t_5spacy_6tokens_TokenC *(*__pyx_f_5spacy_6syntax_6_state_get_left)(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int); /*proto*/ +static struct __pyx_t_5spacy_6tokens_TokenC const *(*__pyx_f_5spacy_6syntax_6_state_get_right)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const ); /*proto*/ +static struct __pyx_t_5spacy_6tokens_TokenC const *(*__pyx_f_5spacy_6syntax_6_state_get_left)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const ); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ /* Module declarations from 'spacy.syntax._parse_features' */ @@ -2469,84 +2469,154 @@ static PyObject *__pyx_codeobj__8; * * * cdef inline void fill_token(atom_t* context, const TokenC* token) nogil: # <<<<<<<<<<<<<< - * context[0] = token.lex.sic - * context[1] = token.pos + * if token is NULL: + * context[0] = 0 */ static CYTHON_INLINE void __pyx_f_5spacy_6syntax_15_parse_features_fill_token(__pyx_t_5thinc_8typedefs_atom_t *__pyx_v_context, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_token) { - __pyx_t_5spacy_8typedefs_attr_t __pyx_t_1; - int __pyx_t_2; + int __pyx_t_1; + __pyx_t_5spacy_8typedefs_attr_t __pyx_t_2; + int __pyx_t_3; /* "spacy/syntax/_parse_features.pyx":20 * * cdef inline void fill_token(atom_t* context, const TokenC* token) nogil: - * context[0] = token.lex.sic # <<<<<<<<<<<<<< - * context[1] = token.pos - * context[2] = token.lex.cluster + * if token is NULL: # <<<<<<<<<<<<<< + * context[0] = 0 + * context[1] = 0 */ - __pyx_t_1 = __pyx_v_token->lex->sic; - (__pyx_v_context[0]) = __pyx_t_1; + __pyx_t_1 = ((__pyx_v_token == NULL) != 0); + if (__pyx_t_1) { - /* "spacy/syntax/_parse_features.pyx":21 + /* "spacy/syntax/_parse_features.pyx":21 * cdef inline void fill_token(atom_t* context, const TokenC* token) nogil: - * context[0] = token.lex.sic - * context[1] = token.pos # <<<<<<<<<<<<<< - * context[2] = token.lex.cluster - * # We've read in the string little-endian, so now we can take & (2**n)-1 + * if token is NULL: + * context[0] = 0 # <<<<<<<<<<<<<< + * context[1] = 0 + * context[2] = 0 */ - __pyx_t_2 = __pyx_v_token->pos; - (__pyx_v_context[1]) = __pyx_t_2; + (__pyx_v_context[0]) = 0; - /* "spacy/syntax/_parse_features.pyx":22 - * context[0] = token.lex.sic - * context[1] = token.pos - * context[2] = token.lex.cluster # <<<<<<<<<<<<<< - * # We've read in the string little-endian, so now we can take & (2**n)-1 - * # to get the first n bits of the cluster. + /* "spacy/syntax/_parse_features.pyx":22 + * if token is NULL: + * context[0] = 0 + * context[1] = 0 # <<<<<<<<<<<<<< + * context[2] = 0 + * context[3] = 0 */ - __pyx_t_1 = __pyx_v_token->lex->cluster; - (__pyx_v_context[2]) = __pyx_t_1; + (__pyx_v_context[1]) = 0; - /* "spacy/syntax/_parse_features.pyx":35 - * # 15 is 1111, 63 is 111111 and doing bitwise AND, so getting all bits in - * # the source that are set to 1. - * context[3] = token.lex.cluster & 63 # <<<<<<<<<<<<<< - * context[4] = token.lex.cluster & 15 - * context[5] = token.dep_tag + /* "spacy/syntax/_parse_features.pyx":23 + * context[0] = 0 + * context[1] = 0 + * context[2] = 0 # <<<<<<<<<<<<<< + * context[3] = 0 + * context[4] = 0 */ - (__pyx_v_context[3]) = (__pyx_v_token->lex->cluster & 63); + (__pyx_v_context[2]) = 0; - /* "spacy/syntax/_parse_features.pyx":36 - * # the source that are set to 1. - * context[3] = token.lex.cluster & 63 - * context[4] = token.lex.cluster & 15 # <<<<<<<<<<<<<< - * context[5] = token.dep_tag + /* "spacy/syntax/_parse_features.pyx":24 + * context[1] = 0 + * context[2] = 0 + * context[3] = 0 # <<<<<<<<<<<<<< + * context[4] = 0 + * context[5] = 0 + */ + (__pyx_v_context[3]) = 0; + + /* "spacy/syntax/_parse_features.pyx":25 + * context[2] = 0 + * context[3] = 0 + * context[4] = 0 # <<<<<<<<<<<<<< + * context[5] = 0 + * else: + */ + (__pyx_v_context[4]) = 0; + + /* "spacy/syntax/_parse_features.pyx":26 + * context[3] = 0 + * context[4] = 0 + * context[5] = 0 # <<<<<<<<<<<<<< + * else: + * context[0] = token.lex.sic + */ + (__pyx_v_context[5]) = 0; + goto __pyx_L3; + } + /*else*/ { + + /* "spacy/syntax/_parse_features.pyx":28 + * context[5] = 0 + * else: + * context[0] = token.lex.sic # <<<<<<<<<<<<<< + * context[1] = token.pos + * context[2] = token.lex.cluster + */ + __pyx_t_2 = __pyx_v_token->lex->sic; + (__pyx_v_context[0]) = __pyx_t_2; + + /* "spacy/syntax/_parse_features.pyx":29 + * else: + * context[0] = token.lex.sic + * context[1] = token.pos # <<<<<<<<<<<<<< + * context[2] = token.lex.cluster + * # We've read in the string little-endian, so now we can take & (2**n)-1 + */ + __pyx_t_3 = __pyx_v_token->pos; + (__pyx_v_context[1]) = __pyx_t_3; + + /* "spacy/syntax/_parse_features.pyx":30 + * context[0] = token.lex.sic + * context[1] = token.pos + * context[2] = token.lex.cluster # <<<<<<<<<<<<<< + * # We've read in the string little-endian, so now we can take & (2**n)-1 + * # to get the first n bits of the cluster. + */ + __pyx_t_2 = __pyx_v_token->lex->cluster; + (__pyx_v_context[2]) = __pyx_t_2; + + /* "spacy/syntax/_parse_features.pyx":43 + * # 15 is 1111, 63 is 111111 and doing bitwise AND, so getting all bits in + * # the source that are set to 1. + * context[3] = token.lex.cluster & 63 # <<<<<<<<<<<<<< + * context[4] = token.lex.cluster & 15 + * context[5] = token.dep_tag + */ + (__pyx_v_context[3]) = (__pyx_v_token->lex->cluster & 63); + + /* "spacy/syntax/_parse_features.pyx":44 + * # the source that are set to 1. + * context[3] = token.lex.cluster & 63 + * context[4] = token.lex.cluster & 15 # <<<<<<<<<<<<<< + * context[5] = token.dep_tag * */ - (__pyx_v_context[4]) = (__pyx_v_token->lex->cluster & 15); + (__pyx_v_context[4]) = (__pyx_v_token->lex->cluster & 15); - /* "spacy/syntax/_parse_features.pyx":37 - * context[3] = token.lex.cluster & 63 - * context[4] = token.lex.cluster & 15 - * context[5] = token.dep_tag # <<<<<<<<<<<<<< + /* "spacy/syntax/_parse_features.pyx":45 + * context[3] = token.lex.cluster & 63 + * context[4] = token.lex.cluster & 15 + * context[5] = token.dep_tag # <<<<<<<<<<<<<< * * */ - __pyx_t_2 = __pyx_v_token->dep_tag; - (__pyx_v_context[5]) = __pyx_t_2; + __pyx_t_3 = __pyx_v_token->dep_tag; + (__pyx_v_context[5]) = __pyx_t_3; + } + __pyx_L3:; /* "spacy/syntax/_parse_features.pyx":19 * * * cdef inline void fill_token(atom_t* context, const TokenC* token) nogil: # <<<<<<<<<<<<<< - * context[0] = token.lex.sic - * context[1] = token.pos + * if token is NULL: + * context[0] = 0 */ /* function exit code */ } -/* "spacy/syntax/_parse_features.pyx":40 +/* "spacy/syntax/_parse_features.pyx":48 * * * cdef int fill_context(atom_t* context, State* state) except -1: # <<<<<<<<<<<<<< @@ -2555,86 +2625,209 @@ static CYTHON_INLINE void __pyx_f_5spacy_6syntax_15_parse_features_fill_token(__ */ static int __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_t_5thinc_8typedefs_atom_t *__pyx_v_context, struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_state) { - CYTHON_UNUSED struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_n1; int __pyx_r; __Pyx_RefNannyDeclarations + int __pyx_t_1; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("fill_context", 0); - __Pyx_TraceCall("fill_context", __pyx_f[0], 40); + __Pyx_TraceCall("fill_context", __pyx_f[0], 48); - /* "spacy/syntax/_parse_features.pyx":43 + /* "spacy/syntax/_parse_features.pyx":51 * # This fills in the basic properties of each of our "slot" tokens, e.g. * # word on top of the stack, word at the front of the buffer, etc. - * cdef TokenC* n1 = get_n1(state) # <<<<<<<<<<<<<< - * fill_token(&context[S2w], get_s2(state)) - * fill_token(&context[S1w], get_s1(state)) - */ - __pyx_v_n1 = __pyx_f_5spacy_6syntax_6_state_get_n1(__pyx_v_state); - - /* "spacy/syntax/_parse_features.pyx":44 - * # word on top of the stack, word at the front of the buffer, etc. - * cdef TokenC* n1 = get_n1(state) * fill_token(&context[S2w], get_s2(state)) # <<<<<<<<<<<<<< * fill_token(&context[S1w], get_s1(state)) - * #fill_token(&context[S1rw], get_right(state, get_s1(state), 0)) + * fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) */ __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S2w])), __pyx_f_5spacy_6syntax_6_state_get_s2(__pyx_v_state)); - /* "spacy/syntax/_parse_features.pyx":45 - * cdef TokenC* n1 = get_n1(state) + /* "spacy/syntax/_parse_features.pyx":52 + * # word on top of the stack, word at the front of the buffer, etc. * fill_token(&context[S2w], get_s2(state)) * fill_token(&context[S1w], get_s1(state)) # <<<<<<<<<<<<<< - * #fill_token(&context[S1rw], get_right(state, get_s1(state), 0)) - * fill_token(&context[S0lw], get_left(state, get_s0(state), 0)) + * fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) + * fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) */ __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S1w])), __pyx_f_5spacy_6syntax_6_state_get_s1(__pyx_v_state)); - /* "spacy/syntax/_parse_features.pyx":47 + /* "spacy/syntax/_parse_features.pyx":53 + * fill_token(&context[S2w], get_s2(state)) * fill_token(&context[S1w], get_s1(state)) - * #fill_token(&context[S1rw], get_right(state, get_s1(state), 0)) - * fill_token(&context[S0lw], get_left(state, get_s0(state), 0)) # <<<<<<<<<<<<<< - * fill_token(&context[S0l2w], get_left(state, get_s0(state), 1)) + * fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) # <<<<<<<<<<<<<< + * fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) + * fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S1rw])), __pyx_f_5spacy_6syntax_6_state_get_right(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s1(__pyx_v_state), 1)); + + /* "spacy/syntax/_parse_features.pyx":54 + * fill_token(&context[S1w], get_s1(state)) + * fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) + * fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) # <<<<<<<<<<<<<< + * fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) * fill_token(&context[S0w], get_s0(state)) */ - __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0lw])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 0)); + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0lw])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 1)); - /* "spacy/syntax/_parse_features.pyx":48 - * #fill_token(&context[S1rw], get_right(state, get_s1(state), 0)) - * fill_token(&context[S0lw], get_left(state, get_s0(state), 0)) - * fill_token(&context[S0l2w], get_left(state, get_s0(state), 1)) # <<<<<<<<<<<<<< + /* "spacy/syntax/_parse_features.pyx":55 + * fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) + * fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) + * fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) # <<<<<<<<<<<<<< * fill_token(&context[S0w], get_s0(state)) - * #fill_token(&context[S0r2w], get_right(state, get_s0(state), 1)) + * fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) */ - __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0l2w])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 1)); + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0l2w])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 2)); - /* "spacy/syntax/_parse_features.pyx":49 - * fill_token(&context[S0lw], get_left(state, get_s0(state), 0)) - * fill_token(&context[S0l2w], get_left(state, get_s0(state), 1)) + /* "spacy/syntax/_parse_features.pyx":56 + * fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) + * fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) * fill_token(&context[S0w], get_s0(state)) # <<<<<<<<<<<<<< - * #fill_token(&context[S0r2w], get_right(state, get_s0(state), 1)) - * fill_token(&context[S0rw], get_right(state, get_s0(state), 0)) + * fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) + * fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) */ __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0w])), __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state)); - /* "spacy/syntax/_parse_features.pyx":51 + /* "spacy/syntax/_parse_features.pyx":57 + * fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) * fill_token(&context[S0w], get_s0(state)) - * #fill_token(&context[S0r2w], get_right(state, get_s0(state), 1)) - * fill_token(&context[S0rw], get_right(state, get_s0(state), 0)) # <<<<<<<<<<<<<< - * #fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) - * #fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + * fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) # <<<<<<<<<<<<<< + * fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) + * fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) */ - __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0rw])), __pyx_f_5spacy_6syntax_6_state_get_right(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 0)); + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0r2w])), __pyx_f_5spacy_6syntax_6_state_get_right(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 2)); - /* "spacy/syntax/_parse_features.pyx":54 - * #fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) - * #fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + /* "spacy/syntax/_parse_features.pyx":58 + * fill_token(&context[S0w], get_s0(state)) + * fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) + * fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) # <<<<<<<<<<<<<< + * fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) + * fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0rw])), __pyx_f_5spacy_6syntax_6_state_get_right(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_state), 1)); + + /* "spacy/syntax/_parse_features.pyx":59 + * fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) + * fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) + * fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) # <<<<<<<<<<<<<< + * fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + * fill_token(&context[N0w], get_n0(state)) + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N0lw])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_state), 0)); + + /* "spacy/syntax/_parse_features.pyx":60 + * fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) + * fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) + * fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) # <<<<<<<<<<<<<< + * fill_token(&context[N0w], get_n0(state)) + * fill_token(&context[N1w], get_n1(state)) + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N0l2w])), __pyx_f_5spacy_6syntax_6_state_get_left(__pyx_v_state, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_state), 1)); + + /* "spacy/syntax/_parse_features.pyx":61 + * fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) + * fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) * fill_token(&context[N0w], get_n0(state)) # <<<<<<<<<<<<<< - * #fill_token(&context[N1w], get_n1(state)) - * #fill_token(&context[N2w], get_n2(state)) + * fill_token(&context[N1w], get_n1(state)) + * fill_token(&context[N2w], get_n2(state)) */ __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N0w])), __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_state)); - /* "spacy/syntax/_parse_features.pyx":40 + /* "spacy/syntax/_parse_features.pyx":62 + * fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + * fill_token(&context[N0w], get_n0(state)) + * fill_token(&context[N1w], get_n1(state)) # <<<<<<<<<<<<<< + * fill_token(&context[N2w], get_n2(state)) + * + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N1w])), __pyx_f_5spacy_6syntax_6_state_get_n1(__pyx_v_state)); + + /* "spacy/syntax/_parse_features.pyx":63 + * fill_token(&context[N0w], get_n0(state)) + * fill_token(&context[N1w], get_n1(state)) + * fill_token(&context[N2w], get_n2(state)) # <<<<<<<<<<<<<< + * + * if state.stack_len >= 1: + */ + __pyx_f_5spacy_6syntax_15_parse_features_fill_token((&(__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N2w])), __pyx_f_5spacy_6syntax_6_state_get_n2(__pyx_v_state)); + + /* "spacy/syntax/_parse_features.pyx":65 + * fill_token(&context[N2w], get_n2(state)) + * + * if state.stack_len >= 1: # <<<<<<<<<<<<<< + * context[dist] = state.stack[0] - state.i + * else: + */ + __pyx_t_1 = ((__pyx_v_state->stack_len >= 1) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_parse_features.pyx":66 + * + * if state.stack_len >= 1: + * context[dist] = state.stack[0] - state.i # <<<<<<<<<<<<<< + * else: + * context[dist] = 0 + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_dist]) = ((__pyx_v_state->stack[0]) - __pyx_v_state->i); + goto __pyx_L3; + } + /*else*/ { + + /* "spacy/syntax/_parse_features.pyx":68 + * context[dist] = state.stack[0] - state.i + * else: + * context[dist] = 0 # <<<<<<<<<<<<<< + * context[N0lv] = 0 + * context[S0lv] = 0 + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_dist]) = 0; + } + __pyx_L3:; + + /* "spacy/syntax/_parse_features.pyx":69 + * else: + * context[dist] = 0 + * context[N0lv] = 0 # <<<<<<<<<<<<<< + * context[S0lv] = 0 + * context[S0rv] = 0 + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_N0lv]) = 0; + + /* "spacy/syntax/_parse_features.pyx":70 + * context[dist] = 0 + * context[N0lv] = 0 + * context[S0lv] = 0 # <<<<<<<<<<<<<< + * context[S0rv] = 0 + * context[S1lv] = 0 + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0lv]) = 0; + + /* "spacy/syntax/_parse_features.pyx":71 + * context[N0lv] = 0 + * context[S0lv] = 0 + * context[S0rv] = 0 # <<<<<<<<<<<<<< + * context[S1lv] = 0 + * context[S1rv] = 0 + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S0rv]) = 0; + + /* "spacy/syntax/_parse_features.pyx":72 + * context[S0lv] = 0 + * context[S0rv] = 0 + * context[S1lv] = 0 # <<<<<<<<<<<<<< + * context[S1rv] = 0 + * + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S1lv]) = 0; + + /* "spacy/syntax/_parse_features.pyx":73 + * context[S0rv] = 0 + * context[S1lv] = 0 + * context[S1rv] = 0 # <<<<<<<<<<<<<< + * + * + */ + (__pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_S1rv]) = 0; + + /* "spacy/syntax/_parse_features.pyx":48 * * * cdef int fill_context(atom_t* context, State* state) except -1: # <<<<<<<<<<<<<< @@ -2649,7 +2842,7 @@ static int __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_t_5thinc_ return __pyx_r; } -/* "spacy/syntax/_parse_features.pyx":205 +/* "spacy/syntax/_parse_features.pyx":212 * * * def pos_bigrams(): # <<<<<<<<<<<<<< @@ -2697,32 +2890,32 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("pos_bigrams", 0); - __Pyx_TraceCall("pos_bigrams", __pyx_f[0], 205); + __Pyx_TraceCall("pos_bigrams", __pyx_f[0], 212); - /* "spacy/syntax/_parse_features.pyx":206 + /* "spacy/syntax/_parse_features.pyx":213 * * def pos_bigrams(): * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] # <<<<<<<<<<<<<< * bitags = [] * for t1, t2 in combinations(kernels, 2): */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2w); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1w); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1w); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lw); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lw); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rw); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rw); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lw); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lw); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyList_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyList_New(8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -2751,26 +2944,26 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __pyx_v_kernels = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "spacy/syntax/_parse_features.pyx":207 + /* "spacy/syntax/_parse_features.pyx":214 * def pos_bigrams(): * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] * bitags = [] # <<<<<<<<<<<<<< * for t1, t2 in combinations(kernels, 2): * feat = (t1 + 1, t2 + 1) */ - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_v_bitags = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "spacy/syntax/_parse_features.pyx":208 + /* "spacy/syntax/_parse_features.pyx":215 * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] * bitags = [] * for t1, t2 in combinations(kernels, 2): # <<<<<<<<<<<<<< * feat = (t1 + 1, t2 + 1) * bitags.append(feat) */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_combinations); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_combinations); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; __pyx_t_10 = 0; @@ -2784,7 +2977,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __pyx_t_10 = 1; } } - __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = NULL; @@ -2795,7 +2988,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_INCREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -2803,9 +2996,9 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { @@ -2813,16 +3006,16 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { @@ -2831,7 +3024,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -2847,7 +3040,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -2860,15 +3053,15 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -2876,7 +3069,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L6_unpacking_done; @@ -2884,7 +3077,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_t1, __pyx_t_6); @@ -2892,18 +3085,18 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_t2, __pyx_t_7); __pyx_t_7 = 0; - /* "spacy/syntax/_parse_features.pyx":209 + /* "spacy/syntax/_parse_features.pyx":216 * bitags = [] * for t1, t2 in combinations(kernels, 2): * feat = (t1 + 1, t2 + 1) # <<<<<<<<<<<<<< * bitags.append(feat) * print "Adding %d bitags" % len(bitags) */ - __pyx_t_9 = PyNumber_Add(__pyx_v_t1, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyNumber_Add(__pyx_v_t1, __pyx_int_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyNumber_Add(__pyx_v_t2, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Add(__pyx_v_t2, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); @@ -2914,16 +3107,16 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN __Pyx_XDECREF_SET(__pyx_v_feat, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "spacy/syntax/_parse_features.pyx":210 + /* "spacy/syntax/_parse_features.pyx":217 * for t1, t2 in combinations(kernels, 2): * feat = (t1 + 1, t2 + 1) * bitags.append(feat) # <<<<<<<<<<<<<< * print "Adding %d bitags" % len(bitags) * return tuple(bitags) */ - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_bitags, __pyx_v_feat); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_bitags, __pyx_v_feat); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/_parse_features.pyx":208 + /* "spacy/syntax/_parse_features.pyx":215 * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] * bitags = [] * for t1, t2 in combinations(kernels, 2): # <<<<<<<<<<<<<< @@ -2933,34 +3126,34 @@ static PyObject *__pyx_pf_5spacy_6syntax_15_parse_features_pos_bigrams(CYTHON_UN } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "spacy/syntax/_parse_features.pyx":211 + /* "spacy/syntax/_parse_features.pyx":218 * feat = (t1 + 1, t2 + 1) * bitags.append(feat) * print "Adding %d bitags" % len(bitags) # <<<<<<<<<<<<<< * return tuple(bitags) */ - __pyx_t_10 = PyList_GET_SIZE(__pyx_v_bitags); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyList_GET_SIZE(__pyx_v_bitags); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Adding_d_bitags, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Adding_d_bitags, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_PrintOne(0, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PrintOne(0, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "spacy/syntax/_parse_features.pyx":212 + /* "spacy/syntax/_parse_features.pyx":219 * bitags.append(feat) * print "Adding %d bitags" % len(bitags) * return tuple(bitags) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyList_AsTuple(__pyx_v_bitags); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_AsTuple(__pyx_v_bitags); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "spacy/syntax/_parse_features.pyx":205 + /* "spacy/syntax/_parse_features.pyx":212 * * * def pos_bigrams(): # <<<<<<<<<<<<<< @@ -3099,8 +3292,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { @@ -3110,33 +3303,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta /* "spacy/syntax/_state.pxd":36 * * cdef inline TokenC* get_n1(const State* s) nogil: - * if s.i < (s.sent_len - 1): # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL * else: */ - __pyx_t_1 = ((__pyx_v_s->i < (__pyx_v_s->sent_len - 1)) != 0); + __pyx_t_1 = (((__pyx_v_s->i + 1) >= __pyx_v_s->sent_len) != 0); if (__pyx_t_1) { /* "spacy/syntax/_state.pxd":37 * cdef inline TokenC* get_n1(const State* s) nogil: - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] # <<<<<<<<<<<<<< + * if (s.i+1) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< * else: - * return s.sent - 1 + * return &s.sent[s.i+1] */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); + __pyx_r = NULL; goto __pyx_L0; } /*else*/ { /* "spacy/syntax/_state.pxd":39 - * return &s.sent[s.i+1] + * return NULL * else: - * return s.sent - 1 # <<<<<<<<<<<<<< + * return &s.sent[s.i+1] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->sent - 1); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); goto __pyx_L0; } @@ -3144,8 +3337,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -3157,29 +3350,53 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; /* "spacy/syntax/_state.pxd":43 * * cdef inline TokenC* get_n2(const State* s) nogil: - * return &s.sent[s.i+2] # <<<<<<<<<<<<<< + * if (s.i + 2) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 2) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":44 + * cdef inline TokenC* get_n2(const State* s) nogil: + * if (s.i + 2) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+2] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":46 + * return NULL + * else: + * return &s.sent[s.i+2] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); + goto __pyx_L0; + } /* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -3187,32 +3404,32 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":46 +/* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":47 + /* "spacy/syntax/_state.pxd":50 * * cdef inline TokenC* get_s0(const State *s) nogil: - * return s.stack[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[0]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->stack[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[0])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":46 + /* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ @@ -3221,43 +3438,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":50 +/* "spacy/syntax/_state.pxd":53 * * * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 + * return &s.sent[s.stack[-1]] */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s1; struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":52 + /* "spacy/syntax/_state.pxd":55 * cdef inline TokenC* get_s1(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 # <<<<<<<<<<<<<< - * return s1[0] - * - */ - __pyx_v_s1 = (__pyx_v_s->stack - 1); - - /* "spacy/syntax/_state.pxd":53 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - * return s1[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[-1]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s1[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-1])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":50 + /* "spacy/syntax/_state.pxd":53 * * * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 + * return &s.sent[s.stack[-1]] */ /* function exit code */ @@ -3265,43 +3472,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":56 +/* "spacy/syntax/_state.pxd":58 * * * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-2]] */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s2; struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":58 + /* "spacy/syntax/_state.pxd":60 * cdef inline TokenC* get_s2(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 # <<<<<<<<<<<<<< - * return s2[0] + * return &s.sent[s.stack[-2]] # <<<<<<<<<<<<<< * + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil */ - __pyx_v_s2 = (__pyx_v_s->stack - 2); - - /* "spacy/syntax/_state.pxd":59 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 - * return s2[0] # <<<<<<<<<<<<<< - * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil - */ - __pyx_r = (__pyx_v_s2[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-2])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":56 + /* "spacy/syntax/_state.pxd":58 * * * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-2]] */ /* function exit code */ @@ -3309,8 +3506,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":64 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil +/* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -3320,7 +3517,7 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":65 + /* "spacy/syntax/_state.pxd":67 * * cdef inline bint at_eol(const State *s) nogil: * return s.i >= s.sent_len # <<<<<<<<<<<<<< @@ -3330,8 +3527,8 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s __pyx_r = (__pyx_v_s->i >= __pyx_v_s->sent_len); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":64 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil + /* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -3343,7 +3540,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s return __pyx_r; } -/* "spacy/syntax/_state.pxd":68 +/* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -3354,7 +3551,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":69 + /* "spacy/syntax/_state.pxd":71 * * cdef inline bint is_final(const State *s) nogil: * return at_eol(s) # The stack will be attached to root anyway # <<<<<<<<<<<<<< @@ -3364,7 +3561,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ __pyx_r = __pyx_f_5spacy_6syntax_6_state_at_eol(__pyx_v_s); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":68 + /* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -3377,7 +3574,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ return __pyx_r; } -/* "spacy/syntax/_state.pxd":81 +/* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -3385,52 +3582,74 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ * for i in range(32): */ -static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, CYTHON_UNUSED int __pyx_v_n) { +static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, int __pyx_v_n) { int __pyx_v_i; uint32_t __pyx_r; int __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pxd":83 + /* "spacy/syntax/_state.pxd":85 * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: * cdef int i * for i in range(32): # <<<<<<<<<<<<<< * if bits & (1 << i): - * return i + * n -= 1 */ for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; - /* "spacy/syntax/_state.pxd":84 + /* "spacy/syntax/_state.pxd":86 * cdef int i * for i in range(32): * if bits & (1 << i): # <<<<<<<<<<<<<< - * return i - * return 0 + * n -= 1 + * if n < 1: */ __pyx_t_2 = ((__pyx_v_bits & (1 << __pyx_v_i)) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pxd":85 + /* "spacy/syntax/_state.pxd":87 * for i in range(32): * if bits & (1 << i): - * return i # <<<<<<<<<<<<<< + * n -= 1 # <<<<<<<<<<<<<< + * if n < 1: + * return i + */ + __pyx_v_n = (__pyx_v_n - 1); + + /* "spacy/syntax/_state.pxd":88 + * if bits & (1 << i): + * n -= 1 + * if n < 1: # <<<<<<<<<<<<<< + * return i * return 0 */ - __pyx_r = __pyx_v_i; - goto __pyx_L0; + __pyx_t_2 = ((__pyx_v_n < 1) != 0); + if (__pyx_t_2) { + + /* "spacy/syntax/_state.pxd":89 + * n -= 1 + * if n < 1: + * return i # <<<<<<<<<<<<<< + * return 0 + */ + __pyx_r = __pyx_v_i; + goto __pyx_L0; + } + goto __pyx_L5; } + __pyx_L5:; } - /* "spacy/syntax/_state.pxd":86 - * if bits & (1 << i): - * return i + /* "spacy/syntax/_state.pxd":90 + * if n < 1: + * return i * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; - /* "spacy/syntax/_state.pxd":81 + /* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -5855,7 +6074,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; @@ -5933,17 +6152,17 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "spacy/syntax/_parse_features.pyx":205 + /* "spacy/syntax/_parse_features.pyx":212 * * * def pos_bigrams(): # <<<<<<<<<<<<<< * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] * bitags = [] */ - __pyx_tuple__7 = PyTuple_Pack(5, __pyx_n_s_kernels, __pyx_n_s_bitags, __pyx_n_s_t1, __pyx_n_s_t2, __pyx_n_s_feat); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__7 = PyTuple_Pack(5, __pyx_n_s_kernels, __pyx_n_s_bitags, __pyx_n_s_t1, __pyx_n_s_t2, __pyx_n_s_feat); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_pos_bigrams, 205, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_pos_bigrams, 212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -6172,8 +6391,8 @@ PyMODINIT_FUNC PyInit__parse_features(void) if (__Pyx_ImportFunction(__pyx_t_2, "hash64", (void (**)(void))&__pyx_f_10murmurhash_4mrmr_hash64, "uint64_t (void *, int, uint64_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_ImportModule("spacy.syntax._state"); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "get_right", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_get_right, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "get_left", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_get_left, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "get_right", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_get_right, "struct __pyx_t_5spacy_6tokens_TokenC const *(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const )") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "get_left", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_get_left, "struct __pyx_t_5spacy_6tokens_TokenC const *(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const )") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*--- Execution code ---*/ @@ -6198,18 +6417,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "spacy/syntax/_parse_features.pyx":70 + /* "spacy/syntax/_parse_features.pyx":77 * * arc_eager = ( * (S0w, S0p), # <<<<<<<<<<<<<< * (S0w,), * (S0p,), */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -6218,48 +6437,48 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_5 = 0; __pyx_t_4 = 0; - /* "spacy/syntax/_parse_features.pyx":71 + /* "spacy/syntax/_parse_features.pyx":78 * arc_eager = ( * (S0w, S0p), * (S0w,), # <<<<<<<<<<<<<< * (S0p,), * (N0w, N0p), */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "spacy/syntax/_parse_features.pyx":72 + /* "spacy/syntax/_parse_features.pyx":79 * (S0w, S0p), * (S0w,), * (S0p,), # <<<<<<<<<<<<<< * (N0w, N0p), * (N0w,), */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "spacy/syntax/_parse_features.pyx":73 + /* "spacy/syntax/_parse_features.pyx":80 * (S0w,), * (S0p,), * (N0w, N0p), # <<<<<<<<<<<<<< * (N0w,), * (N0p,), */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -6268,48 +6487,48 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_4 = 0; __pyx_t_8 = 0; - /* "spacy/syntax/_parse_features.pyx":74 + /* "spacy/syntax/_parse_features.pyx":81 * (S0p,), * (N0w, N0p), * (N0w,), # <<<<<<<<<<<<<< * (N0p,), * (N1w, N1p), */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "spacy/syntax/_parse_features.pyx":75 + /* "spacy/syntax/_parse_features.pyx":82 * (N0w, N0p), * (N0w,), * (N0p,), # <<<<<<<<<<<<<< * (N1w, N1p), * (N1w,), */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "spacy/syntax/_parse_features.pyx":76 + /* "spacy/syntax/_parse_features.pyx":83 * (N0w,), * (N0p,), * (N1w, N1p), # <<<<<<<<<<<<<< * (N1w,), * (N1p,), */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); @@ -6318,48 +6537,48 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_8 = 0; __pyx_t_11 = 0; - /* "spacy/syntax/_parse_features.pyx":77 + /* "spacy/syntax/_parse_features.pyx":84 * (N0p,), * (N1w, N1p), * (N1w,), # <<<<<<<<<<<<<< * (N1p,), * (N2w, N2p), */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1w); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/_parse_features.pyx":78 + /* "spacy/syntax/_parse_features.pyx":85 * (N1w, N1p), * (N1w,), * (N1p,), # <<<<<<<<<<<<<< * (N2w, N2p), * (N2w,), */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/_parse_features.pyx":79 + /* "spacy/syntax/_parse_features.pyx":86 * (N1w,), * (N1p,), * (N2w, N2p), # <<<<<<<<<<<<<< * (N2w,), * (N2p,), */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2w); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2w); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); @@ -6368,52 +6587,52 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_11 = 0; __pyx_t_14 = 0; - /* "spacy/syntax/_parse_features.pyx":80 + /* "spacy/syntax/_parse_features.pyx":87 * (N1p,), * (N2w, N2p), * (N2w,), # <<<<<<<<<<<<<< * (N2p,), * */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2w); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2w); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "spacy/syntax/_parse_features.pyx":81 + /* "spacy/syntax/_parse_features.pyx":88 * (N2w, N2p), * (N2w,), * (N2p,), # <<<<<<<<<<<<<< * * (S0w, S0p, N0w, N0p), */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "spacy/syntax/_parse_features.pyx":83 + /* "spacy/syntax/_parse_features.pyx":90 * (N2p,), * * (S0w, S0p, N0w, N0p), # <<<<<<<<<<<<<< * (S0w, S0p, N0w), * (S0w, N0w, N0p), */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_20 = PyTuple_New(4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_20 = PyTuple_New(4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); @@ -6428,20 +6647,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":84 + /* "spacy/syntax/_parse_features.pyx":91 * * (S0w, S0p, N0w, N0p), * (S0w, S0p, N0w), # <<<<<<<<<<<<<< * (S0w, N0w, N0p), * (S0w, S0p, N0p), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6453,20 +6672,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_17 = 0; - /* "spacy/syntax/_parse_features.pyx":85 + /* "spacy/syntax/_parse_features.pyx":92 * (S0w, S0p, N0w, N0p), * (S0w, S0p, N0w), * (S0w, N0w, N0p), # <<<<<<<<<<<<<< * (S0w, S0p, N0p), * (S0p, N0w, N0p), */ - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_21 = PyTuple_New(3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = PyTuple_New(3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); @@ -6478,20 +6697,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":86 + /* "spacy/syntax/_parse_features.pyx":93 * (S0w, S0p, N0w), * (S0w, N0w, N0p), * (S0w, S0p, N0p), # <<<<<<<<<<<<<< * (S0p, N0w, N0p), * (S0w, N0w), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_22 = PyTuple_New(3); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6503,20 +6722,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_17 = 0; - /* "spacy/syntax/_parse_features.pyx":87 + /* "spacy/syntax/_parse_features.pyx":94 * (S0w, N0w, N0p), * (S0w, S0p, N0p), * (S0p, N0w, N0p), # <<<<<<<<<<<<<< * (S0w, N0w), * (S0p, N0p), */ - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = PyTuple_New(3); if (unlikely(!__pyx_t_23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); @@ -6528,18 +6747,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":88 + /* "spacy/syntax/_parse_features.pyx":95 * (S0w, S0p, N0p), * (S0p, N0w, N0p), * (S0w, N0w), # <<<<<<<<<<<<<< * (S0p, N0p), * (N0p, N1p), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6548,18 +6767,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":89 + /* "spacy/syntax/_parse_features.pyx":96 * (S0p, N0w, N0p), * (S0w, N0w), * (S0p, N0p), # <<<<<<<<<<<<<< * (N0p, N1p), * (N0p, N1p, N2p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_24 = PyTuple_New(2); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6568,18 +6787,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":90 + /* "spacy/syntax/_parse_features.pyx":97 * (S0w, N0w), * (S0p, N0p), * (N0p, N1p), # <<<<<<<<<<<<<< * (N0p, N1p, N2p), * (S0p, N0p, N1p), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_25 = PyTuple_New(2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_25 = PyTuple_New(2); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_25); PyTuple_SET_ITEM(__pyx_t_25, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6588,20 +6807,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":91 + /* "spacy/syntax/_parse_features.pyx":98 * (S0p, N0p), * (N0p, N1p), * (N0p, N1p, N2p), # <<<<<<<<<<<<<< * (S0p, N0p, N1p), * (S1p, S0p, N0p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N2p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_27 = PyTuple_New(3); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_27 = PyTuple_New(3); if (unlikely(!__pyx_t_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_27); PyTuple_SET_ITEM(__pyx_t_27, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6613,20 +6832,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_26 = 0; - /* "spacy/syntax/_parse_features.pyx":92 + /* "spacy/syntax/_parse_features.pyx":99 * (N0p, N1p), * (N0p, N1p, N2p), * (S0p, N0p, N1p), # <<<<<<<<<<<<<< * (S1p, S0p, N0p), * (S0p, S0lp, N0p), */ - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_28 = PyTuple_New(3); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_28 = PyTuple_New(3); if (unlikely(!__pyx_t_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_28); PyTuple_SET_ITEM(__pyx_t_28, 0, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); @@ -6638,20 +6857,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":93 + /* "spacy/syntax/_parse_features.pyx":100 * (N0p, N1p, N2p), * (S0p, N0p, N1p), * (S1p, S0p, N0p), # <<<<<<<<<<<<<< * (S0p, S0lp, N0p), * (S0p, S0rp, N0p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_29 = PyTuple_New(3); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_29 = PyTuple_New(3); if (unlikely(!__pyx_t_29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_29); PyTuple_SET_ITEM(__pyx_t_29, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6663,20 +6882,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_26 = 0; - /* "spacy/syntax/_parse_features.pyx":94 + /* "spacy/syntax/_parse_features.pyx":101 * (S0p, N0p, N1p), * (S1p, S0p, N0p), * (S0p, S0lp, N0p), # <<<<<<<<<<<<<< * (S0p, S0rp, N0p), * (S0p, N0p, N0lp), */ - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_30 = PyTuple_New(3); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_30 = PyTuple_New(3); if (unlikely(!__pyx_t_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_30); PyTuple_SET_ITEM(__pyx_t_30, 0, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); @@ -6688,20 +6907,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":95 + /* "spacy/syntax/_parse_features.pyx":102 * (S1p, S0p, N0p), * (S0p, S0lp, N0p), * (S0p, S0rp, N0p), # <<<<<<<<<<<<<< * (S0p, N0p, N0lp), * (dist, S0w), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_31 = PyTuple_New(3); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_31 = PyTuple_New(3); if (unlikely(!__pyx_t_31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_31); PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6713,20 +6932,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_26 = 0; - /* "spacy/syntax/_parse_features.pyx":96 + /* "spacy/syntax/_parse_features.pyx":103 * (S0p, S0lp, N0p), * (S0p, S0rp, N0p), * (S0p, N0p, N0lp), # <<<<<<<<<<<<<< * (dist, S0w), * (dist, S0p), */ - __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_32 = PyTuple_New(3); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_32 = PyTuple_New(3); if (unlikely(!__pyx_t_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_32); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_26); __Pyx_GIVEREF(__pyx_t_26); @@ -6738,18 +6957,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":97 + /* "spacy/syntax/_parse_features.pyx":104 * (S0p, S0rp, N0p), * (S0p, N0p, N0lp), * (dist, S0w), # <<<<<<<<<<<<<< * (dist, S0p), * (dist, N0w), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_26 = PyTuple_New(2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = PyTuple_New(2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_26); PyTuple_SET_ITEM(__pyx_t_26, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6758,18 +6977,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":98 + /* "spacy/syntax/_parse_features.pyx":105 * (S0p, N0p, N0lp), * (dist, S0w), * (dist, S0p), # <<<<<<<<<<<<<< * (dist, N0w), * (dist, N0p), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_33 = PyTuple_New(2); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_33 = PyTuple_New(2); if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_33); PyTuple_SET_ITEM(__pyx_t_33, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6778,18 +6997,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":99 + /* "spacy/syntax/_parse_features.pyx":106 * (dist, S0w), * (dist, S0p), * (dist, N0w), # <<<<<<<<<<<<<< * (dist, N0p), * (dist, S0w, N0w), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_34 = PyTuple_New(2); if (unlikely(!__pyx_t_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_34 = PyTuple_New(2); if (unlikely(!__pyx_t_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_34); PyTuple_SET_ITEM(__pyx_t_34, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6798,18 +7017,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":100 + /* "spacy/syntax/_parse_features.pyx":107 * (dist, S0p), * (dist, N0w), * (dist, N0p), # <<<<<<<<<<<<<< * (dist, S0w, N0w), * (dist, S0p, N0p), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_35 = PyTuple_New(2); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_35 = PyTuple_New(2); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_35); PyTuple_SET_ITEM(__pyx_t_35, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6818,20 +7037,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":101 + /* "spacy/syntax/_parse_features.pyx":108 * (dist, N0w), * (dist, N0p), * (dist, S0w, N0w), # <<<<<<<<<<<<<< * (dist, S0p, N0p), * (S0w, S0rv), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_36 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_36 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_36); - __pyx_t_37 = PyTuple_New(3); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_37 = PyTuple_New(3); if (unlikely(!__pyx_t_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_37); PyTuple_SET_ITEM(__pyx_t_37, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6843,20 +7062,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_36 = 0; - /* "spacy/syntax/_parse_features.pyx":102 + /* "spacy/syntax/_parse_features.pyx":109 * (dist, N0p), * (dist, S0w, N0w), * (dist, S0p, N0p), # <<<<<<<<<<<<<< * (S0w, S0rv), * (S0p, S0rv), */ - __pyx_t_36 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_36 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_dist); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_36); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_38 = PyTuple_New(3); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_38 = PyTuple_New(3); if (unlikely(!__pyx_t_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_38); PyTuple_SET_ITEM(__pyx_t_38, 0, __pyx_t_36); __Pyx_GIVEREF(__pyx_t_36); @@ -6868,18 +7087,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":103 + /* "spacy/syntax/_parse_features.pyx":110 * (dist, S0w, N0w), * (dist, S0p, N0p), * (S0w, S0rv), # <<<<<<<<<<<<<< * (S0p, S0rv), * (S0w, S0lv), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_36 = PyTuple_New(2); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_36 = PyTuple_New(2); if (unlikely(!__pyx_t_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_36); PyTuple_SET_ITEM(__pyx_t_36, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6888,18 +7107,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":104 + /* "spacy/syntax/_parse_features.pyx":111 * (dist, S0p, N0p), * (S0w, S0rv), * (S0p, S0rv), # <<<<<<<<<<<<<< * (S0w, S0lv), * (S0p, S0lv), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_39 = PyTuple_New(2); if (unlikely(!__pyx_t_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_39 = PyTuple_New(2); if (unlikely(!__pyx_t_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_39); PyTuple_SET_ITEM(__pyx_t_39, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6908,18 +7127,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":105 + /* "spacy/syntax/_parse_features.pyx":112 * (S0w, S0rv), * (S0p, S0rv), * (S0w, S0lv), # <<<<<<<<<<<<<< * (S0p, S0lv), * (N0w, N0lv), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_40 = PyTuple_New(2); if (unlikely(!__pyx_t_40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_40); PyTuple_SET_ITEM(__pyx_t_40, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6928,18 +7147,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":106 + /* "spacy/syntax/_parse_features.pyx":113 * (S0p, S0rv), * (S0w, S0lv), * (S0p, S0lv), # <<<<<<<<<<<<<< * (N0w, N0lv), * (N0p, N0lv), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_41 = PyTuple_New(2); if (unlikely(!__pyx_t_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_41); PyTuple_SET_ITEM(__pyx_t_41, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6948,18 +7167,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":107 + /* "spacy/syntax/_parse_features.pyx":114 * (S0w, S0lv), * (S0p, S0lv), * (N0w, N0lv), # <<<<<<<<<<<<<< * (N0p, N0lv), * (S1w,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lv); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_42 = PyTuple_New(2); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_42 = PyTuple_New(2); if (unlikely(!__pyx_t_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_42); PyTuple_SET_ITEM(__pyx_t_42, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -6968,18 +7187,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_18 = 0; __pyx_t_19 = 0; - /* "spacy/syntax/_parse_features.pyx":108 + /* "spacy/syntax/_parse_features.pyx":115 * (S0p, S0lv), * (N0w, N0lv), * (N0p, N0lv), # <<<<<<<<<<<<<< * (S1w,), * (S1p,), */ - __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lv); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_43 = PyTuple_New(2); if (unlikely(!__pyx_t_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_43); PyTuple_SET_ITEM(__pyx_t_43, 0, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); @@ -6988,260 +7207,260 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_19 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":109 + /* "spacy/syntax/_parse_features.pyx":116 * (N0w, N0lv), * (N0p, N0lv), * (S1w,), # <<<<<<<<<<<<<< * (S1p,), * (S0lw,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":110 + /* "spacy/syntax/_parse_features.pyx":117 * (N0p, N0lv), * (S1w,), * (S1p,), # <<<<<<<<<<<<<< * (S0lw,), * (S0lp,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_44 = PyTuple_New(1); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_44 = PyTuple_New(1); if (unlikely(!__pyx_t_44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_44); PyTuple_SET_ITEM(__pyx_t_44, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":111 + /* "spacy/syntax/_parse_features.pyx":118 * (S1w,), * (S1p,), * (S0lw,), # <<<<<<<<<<<<<< * (S0lp,), * (S0rw,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_45 = PyTuple_New(1); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_45 = PyTuple_New(1); if (unlikely(!__pyx_t_45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_45); PyTuple_SET_ITEM(__pyx_t_45, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":112 + /* "spacy/syntax/_parse_features.pyx":119 * (S1p,), * (S0lw,), * (S0lp,), # <<<<<<<<<<<<<< * (S0rw,), * (S0rp,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_46 = PyTuple_New(1); if (unlikely(!__pyx_t_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_46 = PyTuple_New(1); if (unlikely(!__pyx_t_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_46); PyTuple_SET_ITEM(__pyx_t_46, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":113 + /* "spacy/syntax/_parse_features.pyx":120 * (S0lw,), * (S0lp,), * (S0rw,), # <<<<<<<<<<<<<< * (S0rp,), * (N0lw,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_47 = PyTuple_New(1); if (unlikely(!__pyx_t_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_47 = PyTuple_New(1); if (unlikely(!__pyx_t_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_47); PyTuple_SET_ITEM(__pyx_t_47, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":114 + /* "spacy/syntax/_parse_features.pyx":121 * (S0lp,), * (S0rw,), * (S0rp,), # <<<<<<<<<<<<<< * (N0lw,), * (N0lp,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_48 = PyTuple_New(1); if (unlikely(!__pyx_t_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_48 = PyTuple_New(1); if (unlikely(!__pyx_t_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_48); PyTuple_SET_ITEM(__pyx_t_48, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":115 + /* "spacy/syntax/_parse_features.pyx":122 * (S0rw,), * (S0rp,), * (N0lw,), # <<<<<<<<<<<<<< * (N0lp,), * (S2w,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lw); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_49 = PyTuple_New(1); if (unlikely(!__pyx_t_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_49 = PyTuple_New(1); if (unlikely(!__pyx_t_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_49); PyTuple_SET_ITEM(__pyx_t_49, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":116 + /* "spacy/syntax/_parse_features.pyx":123 * (S0rp,), * (N0lw,), * (N0lp,), # <<<<<<<<<<<<<< * (S2w,), * (S2p,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_50 = PyTuple_New(1); if (unlikely(!__pyx_t_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_50 = PyTuple_New(1); if (unlikely(!__pyx_t_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_50); PyTuple_SET_ITEM(__pyx_t_50, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":117 + /* "spacy/syntax/_parse_features.pyx":124 * (N0lw,), * (N0lp,), * (S2w,), # <<<<<<<<<<<<<< * (S2p,), * (S0l2w,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_51 = PyTuple_New(1); if (unlikely(!__pyx_t_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_51 = PyTuple_New(1); if (unlikely(!__pyx_t_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_51); PyTuple_SET_ITEM(__pyx_t_51, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":118 + /* "spacy/syntax/_parse_features.pyx":125 * (N0lp,), * (S2w,), * (S2p,), # <<<<<<<<<<<<<< * (S0l2w,), * (S0l2p,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_52 = PyTuple_New(1); if (unlikely(!__pyx_t_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_52 = PyTuple_New(1); if (unlikely(!__pyx_t_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_52); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":119 + /* "spacy/syntax/_parse_features.pyx":126 * (S2w,), * (S2p,), * (S0l2w,), # <<<<<<<<<<<<<< * (S0l2p,), * (S0r2w,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_53 = PyTuple_New(1); if (unlikely(!__pyx_t_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_53 = PyTuple_New(1); if (unlikely(!__pyx_t_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_53); PyTuple_SET_ITEM(__pyx_t_53, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":120 + /* "spacy/syntax/_parse_features.pyx":127 * (S2p,), * (S0l2w,), * (S0l2p,), # <<<<<<<<<<<<<< * (S0r2w,), * (S0r2p,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_54 = PyTuple_New(1); if (unlikely(!__pyx_t_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_54 = PyTuple_New(1); if (unlikely(!__pyx_t_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_54); PyTuple_SET_ITEM(__pyx_t_54, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":121 + /* "spacy/syntax/_parse_features.pyx":128 * (S0l2w,), * (S0l2p,), * (S0r2w,), # <<<<<<<<<<<<<< * (S0r2p,), * (N0l2w,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_55 = PyTuple_New(1); if (unlikely(!__pyx_t_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_55 = PyTuple_New(1); if (unlikely(!__pyx_t_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_55); PyTuple_SET_ITEM(__pyx_t_55, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":122 + /* "spacy/syntax/_parse_features.pyx":129 * (S0l2p,), * (S0r2w,), * (S0r2p,), # <<<<<<<<<<<<<< * (N0l2w,), * (N0l2p,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_56 = PyTuple_New(1); if (unlikely(!__pyx_t_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_56 = PyTuple_New(1); if (unlikely(!__pyx_t_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_56); PyTuple_SET_ITEM(__pyx_t_56, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":123 + /* "spacy/syntax/_parse_features.pyx":130 * (S0r2w,), * (S0r2p,), * (N0l2w,), # <<<<<<<<<<<<<< * (N0l2p,), * (S0p, S0lp, S0l2p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_57 = PyTuple_New(1); if (unlikely(!__pyx_t_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_57 = PyTuple_New(1); if (unlikely(!__pyx_t_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_57); PyTuple_SET_ITEM(__pyx_t_57, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":124 + /* "spacy/syntax/_parse_features.pyx":131 * (S0r2p,), * (N0l2w,), * (N0l2p,), # <<<<<<<<<<<<<< * (S0p, S0lp, S0l2p), * (S0p, S0rp, S0r2p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_58 = PyTuple_New(1); if (unlikely(!__pyx_t_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_58 = PyTuple_New(1); if (unlikely(!__pyx_t_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_58); PyTuple_SET_ITEM(__pyx_t_58, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":125 + /* "spacy/syntax/_parse_features.pyx":132 * (N0l2w,), * (N0l2p,), * (S0p, S0lp, S0l2p), # <<<<<<<<<<<<<< * (S0p, S0rp, S0r2p), * (S0p, S1p, S2p), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); - __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); - __pyx_t_61 = PyTuple_New(3); if (unlikely(!__pyx_t_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_61 = PyTuple_New(3); if (unlikely(!__pyx_t_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_61); PyTuple_SET_ITEM(__pyx_t_61, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7253,20 +7472,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_59 = 0; __pyx_t_60 = 0; - /* "spacy/syntax/_parse_features.pyx":126 + /* "spacy/syntax/_parse_features.pyx":133 * (N0l2p,), * (S0p, S0lp, S0l2p), * (S0p, S0rp, S0r2p), # <<<<<<<<<<<<<< * (S0p, S1p, S2p), * (N0p, N0lp, N0l2p), */ - __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); - __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_62 = PyTuple_New(3); if (unlikely(!__pyx_t_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_62 = PyTuple_New(3); if (unlikely(!__pyx_t_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_62); PyTuple_SET_ITEM(__pyx_t_62, 0, __pyx_t_60); __Pyx_GIVEREF(__pyx_t_60); @@ -7278,20 +7497,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_59 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":127 + /* "spacy/syntax/_parse_features.pyx":134 * (S0p, S0lp, S0l2p), * (S0p, S0rp, S0r2p), * (S0p, S1p, S2p), # <<<<<<<<<<<<<< * (N0p, N0lp, N0l2p), * (S0L,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); - __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S2p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); - __pyx_t_63 = PyTuple_New(3); if (unlikely(!__pyx_t_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_63 = PyTuple_New(3); if (unlikely(!__pyx_t_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_63); PyTuple_SET_ITEM(__pyx_t_63, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7303,20 +7522,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_59 = 0; __pyx_t_60 = 0; - /* "spacy/syntax/_parse_features.pyx":128 + /* "spacy/syntax/_parse_features.pyx":135 * (S0p, S0rp, S0r2p), * (S0p, S1p, S2p), * (N0p, N0lp, N0l2p), # <<<<<<<<<<<<<< * (S0L,), * (S0lL,), */ - __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); - __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_64 = PyTuple_New(3); if (unlikely(!__pyx_t_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_64 = PyTuple_New(3); if (unlikely(!__pyx_t_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_64); PyTuple_SET_ITEM(__pyx_t_64, 0, __pyx_t_60); __Pyx_GIVEREF(__pyx_t_60); @@ -7328,140 +7547,140 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_59 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":129 + /* "spacy/syntax/_parse_features.pyx":136 * (S0p, S1p, S2p), * (N0p, N0lp, N0l2p), * (S0L,), # <<<<<<<<<<<<<< * (S0lL,), * (S0rL,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_59 = PyTuple_New(1); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = PyTuple_New(1); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); PyTuple_SET_ITEM(__pyx_t_59, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":130 + /* "spacy/syntax/_parse_features.pyx":137 * (N0p, N0lp, N0l2p), * (S0L,), * (S0lL,), # <<<<<<<<<<<<<< * (S0rL,), * (N0lL,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_60 = PyTuple_New(1); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = PyTuple_New(1); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); PyTuple_SET_ITEM(__pyx_t_60, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":131 + /* "spacy/syntax/_parse_features.pyx":138 * (S0L,), * (S0lL,), * (S0rL,), # <<<<<<<<<<<<<< * (N0lL,), * (S1L,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_65 = PyTuple_New(1); if (unlikely(!__pyx_t_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_65 = PyTuple_New(1); if (unlikely(!__pyx_t_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_65); PyTuple_SET_ITEM(__pyx_t_65, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":132 + /* "spacy/syntax/_parse_features.pyx":139 * (S0lL,), * (S0rL,), * (N0lL,), # <<<<<<<<<<<<<< * (S1L,), * (S0l2L,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_66 = PyTuple_New(1); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = PyTuple_New(1); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); PyTuple_SET_ITEM(__pyx_t_66, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":133 + /* "spacy/syntax/_parse_features.pyx":140 * (S0rL,), * (N0lL,), * (S1L,), # <<<<<<<<<<<<<< * (S0l2L,), * (S0r2L,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_67 = PyTuple_New(1); if (unlikely(!__pyx_t_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_67 = PyTuple_New(1); if (unlikely(!__pyx_t_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_67); PyTuple_SET_ITEM(__pyx_t_67, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":134 + /* "spacy/syntax/_parse_features.pyx":141 * (N0lL,), * (S1L,), * (S0l2L,), # <<<<<<<<<<<<<< * (S0r2L,), * (N0l2L,), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_68 = PyTuple_New(1); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = PyTuple_New(1); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); PyTuple_SET_ITEM(__pyx_t_68, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":135 + /* "spacy/syntax/_parse_features.pyx":142 * (S1L,), * (S0l2L,), * (S0r2L,), # <<<<<<<<<<<<<< * (N0l2L,), * (S0w, S0rL, S0r2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = PyTuple_New(1); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = PyTuple_New(1); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); PyTuple_SET_ITEM(__pyx_t_69, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":136 + /* "spacy/syntax/_parse_features.pyx":143 * (S0l2L,), * (S0r2L,), * (N0l2L,), # <<<<<<<<<<<<<< * (S0w, S0rL, S0r2L), * (S0p, S0rL, S0r2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_70 = PyTuple_New(1); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = PyTuple_New(1); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); PyTuple_SET_ITEM(__pyx_t_70, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":137 + /* "spacy/syntax/_parse_features.pyx":144 * (S0r2L,), * (N0l2L,), * (S0w, S0rL, S0r2L), # <<<<<<<<<<<<<< * (S0p, S0rL, S0r2L), * (S0w, S0lL, S0l2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_73); PyTuple_SET_ITEM(__pyx_t_73, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7473,20 +7692,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_72 = 0; - /* "spacy/syntax/_parse_features.pyx":138 + /* "spacy/syntax/_parse_features.pyx":145 * (N0l2L,), * (S0w, S0rL, S0r2L), * (S0p, S0rL, S0r2L), # <<<<<<<<<<<<<< * (S0w, S0lL, S0l2L), * (S0p, S0lL, S0l2L), */ - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_74); PyTuple_SET_ITEM(__pyx_t_74, 0, __pyx_t_72); __Pyx_GIVEREF(__pyx_t_72); @@ -7498,20 +7717,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":139 + /* "spacy/syntax/_parse_features.pyx":146 * (S0w, S0rL, S0r2L), * (S0p, S0rL, S0r2L), * (S0w, S0lL, S0l2L), # <<<<<<<<<<<<<< * (S0p, S0lL, S0l2L), * (N0w, N0lL, N0l2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_75); PyTuple_SET_ITEM(__pyx_t_75, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7523,20 +7742,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_72 = 0; - /* "spacy/syntax/_parse_features.pyx":140 + /* "spacy/syntax/_parse_features.pyx":147 * (S0p, S0rL, S0r2L), * (S0w, S0lL, S0l2L), * (S0p, S0lL, S0l2L), # <<<<<<<<<<<<<< * (N0w, N0lL, N0l2L), * (N0p, N0lL, N0l2L), */ - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_76); PyTuple_SET_ITEM(__pyx_t_76, 0, __pyx_t_72); __Pyx_GIVEREF(__pyx_t_72); @@ -7548,20 +7767,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":141 + /* "spacy/syntax/_parse_features.pyx":148 * (S0w, S0lL, S0l2L), * (S0p, S0lL, S0l2L), * (N0w, N0lL, N0l2L), # <<<<<<<<<<<<<< * (N0p, N0lL, N0l2L), * ) */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_77 = PyTuple_New(3); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = PyTuple_New(3); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); PyTuple_SET_ITEM(__pyx_t_77, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7573,20 +7792,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_72 = 0; - /* "spacy/syntax/_parse_features.pyx":142 + /* "spacy/syntax/_parse_features.pyx":149 * (S0p, S0lL, S0l2L), * (N0w, N0lL, N0l2L), * (N0p, N0lL, N0l2L), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_72 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_72); - __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_71 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_71); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_78 = PyTuple_New(3); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = PyTuple_New(3); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); PyTuple_SET_ITEM(__pyx_t_78, 0, __pyx_t_72); __Pyx_GIVEREF(__pyx_t_72); @@ -7598,14 +7817,14 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_71 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":70 + /* "spacy/syntax/_parse_features.pyx":77 * * arc_eager = ( * (S0w, S0p), # <<<<<<<<<<<<<< * (S0w,), * (S0p,), */ - __pyx_t_18 = PyTuple_New(72); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(72); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); @@ -7823,23 +8042,23 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_76 = 0; __pyx_t_77 = 0; __pyx_t_78 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_arc_eager, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_arc_eager, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":147 + /* "spacy/syntax/_parse_features.pyx":154 * * label_sets = ( * (S0w, S0lL, S0l2L), # <<<<<<<<<<<<<< * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0l2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_76); PyTuple_SET_ITEM(__pyx_t_76, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7851,20 +8070,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_77 = 0; - /* "spacy/syntax/_parse_features.pyx":148 + /* "spacy/syntax/_parse_features.pyx":155 * label_sets = ( * (S0w, S0lL, S0l2L), * (S0p, S0rL, S0r2L), # <<<<<<<<<<<<<< * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0r2L), */ - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_75); PyTuple_SET_ITEM(__pyx_t_75, 0, __pyx_t_77); __Pyx_GIVEREF(__pyx_t_77); @@ -7876,20 +8095,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":149 + /* "spacy/syntax/_parse_features.pyx":156 * (S0w, S0lL, S0l2L), * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0l2L), # <<<<<<<<<<<<<< * (S0p, S0rL, S0r2L), * (N0w, N0lL, N0l2L), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_74); PyTuple_SET_ITEM(__pyx_t_74, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7901,20 +8120,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_77 = 0; - /* "spacy/syntax/_parse_features.pyx":150 + /* "spacy/syntax/_parse_features.pyx":157 * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0r2L), # <<<<<<<<<<<<<< * (N0w, N0lL, N0l2L), * (N0p, N0lL, N0l2L), */ - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_73); PyTuple_SET_ITEM(__pyx_t_73, 0, __pyx_t_77); __Pyx_GIVEREF(__pyx_t_77); @@ -7926,20 +8145,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":151 + /* "spacy/syntax/_parse_features.pyx":158 * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0r2L), * (N0w, N0lL, N0l2L), # <<<<<<<<<<<<<< * (N0p, N0lL, N0l2L), * ) */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0w); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_70 = PyTuple_New(3); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = PyTuple_New(3); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); PyTuple_SET_ITEM(__pyx_t_70, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -7951,20 +8170,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_77 = 0; - /* "spacy/syntax/_parse_features.pyx":152 + /* "spacy/syntax/_parse_features.pyx":159 * (S0p, S0rL, S0r2L), * (N0w, N0lL, N0l2L), * (N0p, N0lL, N0l2L), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); - __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lL); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = PyTuple_New(3); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = PyTuple_New(3); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); PyTuple_SET_ITEM(__pyx_t_69, 0, __pyx_t_77); __Pyx_GIVEREF(__pyx_t_77); @@ -7976,14 +8195,14 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":147 + /* "spacy/syntax/_parse_features.pyx":154 * * label_sets = ( * (S0w, S0lL, S0l2L), # <<<<<<<<<<<<<< * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0l2L), */ - __pyx_t_18 = PyTuple_New(6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_76); __Pyx_GIVEREF(__pyx_t_76); @@ -8003,23 +8222,23 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_73 = 0; __pyx_t_70 = 0; __pyx_t_69 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_label_sets, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_label_sets, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":156 + /* "spacy/syntax/_parse_features.pyx":163 * * extra_labels = ( * (S0p, S0lL, S0lp), # <<<<<<<<<<<<<< * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0rp), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_73 = PyTuple_New(3); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_73); PyTuple_SET_ITEM(__pyx_t_73, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -8031,20 +8250,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":157 + /* "spacy/syntax/_parse_features.pyx":164 * extra_labels = ( * (S0p, S0lL, S0lp), * (S0p, S0lL, S0l2L), # <<<<<<<<<<<<<< * (S0p, S0rL, S0rp), * (S0p, S0rL, S0r2L), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0l2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_74 = PyTuple_New(3); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_74); PyTuple_SET_ITEM(__pyx_t_74, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8056,20 +8275,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":158 + /* "spacy/syntax/_parse_features.pyx":165 * (S0p, S0lL, S0lp), * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0rp), # <<<<<<<<<<<<<< * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0rL), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_75 = PyTuple_New(3); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_75); PyTuple_SET_ITEM(__pyx_t_75, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -8081,20 +8300,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":159 + /* "spacy/syntax/_parse_features.pyx":166 * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0rp), * (S0p, S0rL, S0r2L), # <<<<<<<<<<<<<< * (S0p, S0lL, S0rL), * (S1p, S0L, S0rL), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0r2L); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_76 = PyTuple_New(3); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_76); PyTuple_SET_ITEM(__pyx_t_76, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8106,20 +8325,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":160 + /* "spacy/syntax/_parse_features.pyx":167 * (S0p, S0rL, S0rp), * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0rL), # <<<<<<<<<<<<<< * (S1p, S0L, S0rL), * (S1p, S0L, S0lL), */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_78 = PyTuple_New(3); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = PyTuple_New(3); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); PyTuple_SET_ITEM(__pyx_t_78, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -8131,20 +8350,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":161 + /* "spacy/syntax/_parse_features.pyx":168 * (S0p, S0rL, S0r2L), * (S0p, S0lL, S0rL), * (S1p, S0L, S0rL), # <<<<<<<<<<<<<< * (S1p, S0L, S0lL), * ) */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_77 = PyTuple_New(3); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = PyTuple_New(3); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); PyTuple_SET_ITEM(__pyx_t_77, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8156,20 +8375,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_18 = 0; - /* "spacy/syntax/_parse_features.pyx":162 + /* "spacy/syntax/_parse_features.pyx":169 * (S0p, S0lL, S0rL), * (S1p, S0L, S0rL), * (S1p, S0L, S0lL), # <<<<<<<<<<<<<< * ) * */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0L); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lL); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = PyTuple_New(3); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = PyTuple_New(3); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); PyTuple_SET_ITEM(__pyx_t_68, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -8181,14 +8400,14 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_69 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":156 + /* "spacy/syntax/_parse_features.pyx":163 * * extra_labels = ( * (S0p, S0lL, S0lp), # <<<<<<<<<<<<<< * (S0p, S0lL, S0l2L), * (S0p, S0rL, S0rp), */ - __pyx_t_70 = PyTuple_New(7); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = PyTuple_New(7); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); PyTuple_SET_ITEM(__pyx_t_70, 0, __pyx_t_73); __Pyx_GIVEREF(__pyx_t_73); @@ -8211,21 +8430,21 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_78 = 0; __pyx_t_77 = 0; __pyx_t_68 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_extra_labels, __pyx_t_70) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_extra_labels, __pyx_t_70) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_70); __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":169 + /* "spacy/syntax/_parse_features.pyx":176 * clusters = ( * # Koo et al have (head, child) --- we have S0, N0 for both. * (S0c4, N0c4), # <<<<<<<<<<<<<< * (S0c6, N0c6), * (S0c, N0c), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_77 = PyTuple_New(2); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_77 = PyTuple_New(2); if (unlikely(!__pyx_t_77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_77); PyTuple_SET_ITEM(__pyx_t_77, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8234,18 +8453,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":170 + /* "spacy/syntax/_parse_features.pyx":177 * # Koo et al have (head, child) --- we have S0, N0 for both. * (S0c4, N0c4), * (S0c6, N0c6), # <<<<<<<<<<<<<< * (S0c, N0c), * (S0p, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_78 = PyTuple_New(2); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_78 = PyTuple_New(2); if (unlikely(!__pyx_t_78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_78); PyTuple_SET_ITEM(__pyx_t_78, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8254,18 +8473,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_68 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":171 + /* "spacy/syntax/_parse_features.pyx":178 * (S0c4, N0c4), * (S0c6, N0c6), * (S0c, N0c), # <<<<<<<<<<<<<< * (S0p, N0c4), * (S0p, N0c6), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_76 = PyTuple_New(2); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_76 = PyTuple_New(2); if (unlikely(!__pyx_t_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_76); PyTuple_SET_ITEM(__pyx_t_76, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8274,18 +8493,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":172 + /* "spacy/syntax/_parse_features.pyx":179 * (S0c6, N0c6), * (S0c, N0c), * (S0p, N0c4), # <<<<<<<<<<<<<< * (S0p, N0c6), * (S0p, N0c), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_75 = PyTuple_New(2); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_75 = PyTuple_New(2); if (unlikely(!__pyx_t_75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_75); PyTuple_SET_ITEM(__pyx_t_75, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8294,18 +8513,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_68 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":173 + /* "spacy/syntax/_parse_features.pyx":180 * (S0c, N0c), * (S0p, N0c4), * (S0p, N0c6), # <<<<<<<<<<<<<< * (S0p, N0c), * (S0c4, N0p), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_74 = PyTuple_New(2); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_74 = PyTuple_New(2); if (unlikely(!__pyx_t_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_74); PyTuple_SET_ITEM(__pyx_t_74, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8314,18 +8533,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":174 + /* "spacy/syntax/_parse_features.pyx":181 * (S0p, N0c4), * (S0p, N0c6), * (S0p, N0c), # <<<<<<<<<<<<<< * (S0c4, N0p), * (S0c6, N0p), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_73 = PyTuple_New(2); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_73 = PyTuple_New(2); if (unlikely(!__pyx_t_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_73); PyTuple_SET_ITEM(__pyx_t_73, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8334,18 +8553,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_68 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":175 + /* "spacy/syntax/_parse_features.pyx":182 * (S0p, N0c6), * (S0p, N0c), * (S0c4, N0p), # <<<<<<<<<<<<<< * (S0c6, N0p), * (S0c, N0p), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_69 = PyTuple_New(2); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_69 = PyTuple_New(2); if (unlikely(!__pyx_t_69)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_69); PyTuple_SET_ITEM(__pyx_t_69, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8354,18 +8573,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":176 + /* "spacy/syntax/_parse_features.pyx":183 * (S0p, N0c), * (S0c4, N0p), * (S0c6, N0p), # <<<<<<<<<<<<<< * (S0c, N0p), * # Siblings --- right arc */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(2); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8374,18 +8593,18 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_68 = 0; __pyx_t_70 = 0; - /* "spacy/syntax/_parse_features.pyx":177 + /* "spacy/syntax/_parse_features.pyx":184 * (S0c4, N0p), * (S0c6, N0p), * (S0c, N0p), # <<<<<<<<<<<<<< * # Siblings --- right arc * (S0c4, S0rc4, N0c4), */ - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_67 = PyTuple_New(2); if (unlikely(!__pyx_t_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_67 = PyTuple_New(2); if (unlikely(!__pyx_t_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_67); PyTuple_SET_ITEM(__pyx_t_67, 0, __pyx_t_70); __Pyx_GIVEREF(__pyx_t_70); @@ -8394,20 +8613,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":179 + /* "spacy/syntax/_parse_features.pyx":186 * (S0c, N0p), * # Siblings --- right arc * (S0c4, S0rc4, N0c4), # <<<<<<<<<<<<<< * (S0c6, S0rc6, N0c6), * (S0p, S0rc4, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_65 = PyTuple_New(3); if (unlikely(!__pyx_t_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_65 = PyTuple_New(3); if (unlikely(!__pyx_t_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_65); PyTuple_SET_ITEM(__pyx_t_65, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8419,20 +8638,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":180 + /* "spacy/syntax/_parse_features.pyx":187 * # Siblings --- right arc * (S0c4, S0rc4, N0c4), * (S0c6, S0rc6, N0c6), # <<<<<<<<<<<<<< * (S0p, S0rc4, N0c4), * (S0c4, S0rp, N0c4), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_60 = PyTuple_New(3); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_60 = PyTuple_New(3); if (unlikely(!__pyx_t_60)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_60); PyTuple_SET_ITEM(__pyx_t_60, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8444,20 +8663,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":181 + /* "spacy/syntax/_parse_features.pyx":188 * (S0c4, S0rc4, N0c4), * (S0c6, S0rc6, N0c6), * (S0p, S0rc4, N0c4), # <<<<<<<<<<<<<< * (S0c4, S0rp, N0c4), * (S0c4, S0rc4, N0p), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_59 = PyTuple_New(3); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_59 = PyTuple_New(3); if (unlikely(!__pyx_t_59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_59); PyTuple_SET_ITEM(__pyx_t_59, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8469,20 +8688,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":182 + /* "spacy/syntax/_parse_features.pyx":189 * (S0c6, S0rc6, N0c6), * (S0p, S0rc4, N0c4), * (S0c4, S0rp, N0c4), # <<<<<<<<<<<<<< * (S0c4, S0rc4, N0p), * # Siblings --- left arc */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_64 = PyTuple_New(3); if (unlikely(!__pyx_t_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_64 = PyTuple_New(3); if (unlikely(!__pyx_t_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_64); PyTuple_SET_ITEM(__pyx_t_64, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8494,20 +8713,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":183 + /* "spacy/syntax/_parse_features.pyx":190 * (S0p, S0rc4, N0c4), * (S0c4, S0rp, N0c4), * (S0c4, S0rc4, N0p), # <<<<<<<<<<<<<< * # Siblings --- left arc * (S0c4, N0lc4, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0rc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_63 = PyTuple_New(3); if (unlikely(!__pyx_t_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_63 = PyTuple_New(3); if (unlikely(!__pyx_t_63)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_63); PyTuple_SET_ITEM(__pyx_t_63, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8519,20 +8738,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":185 + /* "spacy/syntax/_parse_features.pyx":192 * (S0c4, S0rc4, N0p), * # Siblings --- left arc * (S0c4, N0lc4, N0c4), # <<<<<<<<<<<<<< * (S0c6, N0c6, N0c6), * (S0c4, N0lc4, N0p), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_62 = PyTuple_New(3); if (unlikely(!__pyx_t_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_62 = PyTuple_New(3); if (unlikely(!__pyx_t_62)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_62); PyTuple_SET_ITEM(__pyx_t_62, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8544,20 +8763,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":186 + /* "spacy/syntax/_parse_features.pyx":193 * # Siblings --- left arc * (S0c4, N0lc4, N0c4), * (S0c6, N0c6, N0c6), # <<<<<<<<<<<<<< * (S0c4, N0lc4, N0p), * (S0c4, N0lp, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_61 = PyTuple_New(3); if (unlikely(!__pyx_t_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_61 = PyTuple_New(3); if (unlikely(!__pyx_t_61)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_61); PyTuple_SET_ITEM(__pyx_t_61, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8569,20 +8788,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":187 + /* "spacy/syntax/_parse_features.pyx":194 * (S0c4, N0lc4, N0c4), * (S0c6, N0c6, N0c6), * (S0c4, N0lc4, N0p), # <<<<<<<<<<<<<< * (S0c4, N0lp, N0c4), * (S0p, N0lc4, N0c4), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_58 = PyTuple_New(3); if (unlikely(!__pyx_t_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_58 = PyTuple_New(3); if (unlikely(!__pyx_t_58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_58); PyTuple_SET_ITEM(__pyx_t_58, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8594,20 +8813,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":188 + /* "spacy/syntax/_parse_features.pyx":195 * (S0c6, N0c6, N0c6), * (S0c4, N0lc4, N0p), * (S0c4, N0lp, N0c4), # <<<<<<<<<<<<<< * (S0p, N0lc4, N0c4), * # Grand-child, right-arc */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lp); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_57 = PyTuple_New(3); if (unlikely(!__pyx_t_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_57 = PyTuple_New(3); if (unlikely(!__pyx_t_57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_57); PyTuple_SET_ITEM(__pyx_t_57, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8619,20 +8838,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":189 + /* "spacy/syntax/_parse_features.pyx":196 * (S0c4, N0lc4, N0p), * (S0c4, N0lp, N0c4), * (S0p, N0lc4, N0c4), # <<<<<<<<<<<<<< * # Grand-child, right-arc * (S1c4, S0c4, N0c4), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0lc4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_56 = PyTuple_New(3); if (unlikely(!__pyx_t_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_56 = PyTuple_New(3); if (unlikely(!__pyx_t_56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_56); PyTuple_SET_ITEM(__pyx_t_56, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8644,20 +8863,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":191 + /* "spacy/syntax/_parse_features.pyx":198 * (S0p, N0lc4, N0c4), * # Grand-child, right-arc * (S1c4, S0c4, N0c4), # <<<<<<<<<<<<<< * (S1c6, S0c6, N0c6), * (S1p, S0c4, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_55 = PyTuple_New(3); if (unlikely(!__pyx_t_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_55 = PyTuple_New(3); if (unlikely(!__pyx_t_55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_55); PyTuple_SET_ITEM(__pyx_t_55, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8669,20 +8888,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":192 + /* "spacy/syntax/_parse_features.pyx":199 * # Grand-child, right-arc * (S1c4, S0c4, N0c4), * (S1c6, S0c6, N0c6), # <<<<<<<<<<<<<< * (S1p, S0c4, N0c4), * (S1c4, S0p, N0c4), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_54 = PyTuple_New(3); if (unlikely(!__pyx_t_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_54 = PyTuple_New(3); if (unlikely(!__pyx_t_54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_54); PyTuple_SET_ITEM(__pyx_t_54, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8694,20 +8913,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":193 + /* "spacy/syntax/_parse_features.pyx":200 * (S1c4, S0c4, N0c4), * (S1c6, S0c6, N0c6), * (S1p, S0c4, N0c4), # <<<<<<<<<<<<<< * (S1c4, S0p, N0c4), * (S1c4, S0c4, N0p), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_53 = PyTuple_New(3); if (unlikely(!__pyx_t_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_53 = PyTuple_New(3); if (unlikely(!__pyx_t_53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_53); PyTuple_SET_ITEM(__pyx_t_53, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8719,20 +8938,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":194 + /* "spacy/syntax/_parse_features.pyx":201 * (S1c6, S0c6, N0c6), * (S1p, S0c4, N0c4), * (S1c4, S0p, N0c4), # <<<<<<<<<<<<<< * (S1c4, S0c4, N0p), * # Grand-child, left-arc */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_52 = PyTuple_New(3); if (unlikely(!__pyx_t_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_52 = PyTuple_New(3); if (unlikely(!__pyx_t_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_52); PyTuple_SET_ITEM(__pyx_t_52, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8744,20 +8963,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":195 + /* "spacy/syntax/_parse_features.pyx":202 * (S1p, S0c4, N0c4), * (S1c4, S0p, N0c4), * (S1c4, S0c4, N0p), # <<<<<<<<<<<<<< * # Grand-child, left-arc * (S0lc4, S0c4, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S1c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_51 = PyTuple_New(3); if (unlikely(!__pyx_t_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_51 = PyTuple_New(3); if (unlikely(!__pyx_t_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_51); PyTuple_SET_ITEM(__pyx_t_51, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8769,20 +8988,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":197 + /* "spacy/syntax/_parse_features.pyx":204 * (S1c4, S0c4, N0p), * # Grand-child, left-arc * (S0lc4, S0c4, N0c4), # <<<<<<<<<<<<<< * (S0lc6, S0c6, N0c6), * (S0lp, S0c4, N0c4), */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_50 = PyTuple_New(3); if (unlikely(!__pyx_t_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_50 = PyTuple_New(3); if (unlikely(!__pyx_t_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_50); PyTuple_SET_ITEM(__pyx_t_50, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8794,20 +9013,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":198 + /* "spacy/syntax/_parse_features.pyx":205 * # Grand-child, left-arc * (S0lc4, S0c4, N0c4), * (S0lc6, S0c6, N0c6), # <<<<<<<<<<<<<< * (S0lp, S0c4, N0c4), * (S0lc4, S0p, N0c4), */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc6); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c6); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c6); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_49 = PyTuple_New(3); if (unlikely(!__pyx_t_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_49 = PyTuple_New(3); if (unlikely(!__pyx_t_49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_49); PyTuple_SET_ITEM(__pyx_t_49, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8819,20 +9038,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":199 + /* "spacy/syntax/_parse_features.pyx":206 * (S0lc4, S0c4, N0c4), * (S0lc6, S0c6, N0c6), * (S0lp, S0c4, N0c4), # <<<<<<<<<<<<<< * (S0lc4, S0p, N0c4), * (S0lc4, S0c4, N0p) */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lp); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_48 = PyTuple_New(3); if (unlikely(!__pyx_t_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_48 = PyTuple_New(3); if (unlikely(!__pyx_t_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_48); PyTuple_SET_ITEM(__pyx_t_48, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8844,20 +9063,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":200 + /* "spacy/syntax/_parse_features.pyx":207 * (S0lc6, S0c6, N0c6), * (S0lp, S0c4, N0c4), * (S0lc4, S0p, N0c4), # <<<<<<<<<<<<<< * (S0lc4, S0c4, N0p) * ) */ - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0p); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0c4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_47 = PyTuple_New(3); if (unlikely(!__pyx_t_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_47 = PyTuple_New(3); if (unlikely(!__pyx_t_47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_47); PyTuple_SET_ITEM(__pyx_t_47, 0, __pyx_t_68); __Pyx_GIVEREF(__pyx_t_68); @@ -8869,20 +9088,20 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_66 = 0; - /* "spacy/syntax/_parse_features.pyx":201 + /* "spacy/syntax/_parse_features.pyx":208 * (S0lp, S0c4, N0c4), * (S0lc4, S0p, N0c4), * (S0lc4, S0c4, N0p) # <<<<<<<<<<<<<< * ) * */ - __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_66 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0lc4); if (unlikely(!__pyx_t_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_66); - __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_70 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_S0c4); if (unlikely(!__pyx_t_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_70); - __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = __Pyx_PyInt_From_int(__pyx_e_5spacy_6syntax_15_parse_features_N0p); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - __pyx_t_46 = PyTuple_New(3); if (unlikely(!__pyx_t_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_46 = PyTuple_New(3); if (unlikely(!__pyx_t_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_46); PyTuple_SET_ITEM(__pyx_t_46, 0, __pyx_t_66); __Pyx_GIVEREF(__pyx_t_66); @@ -8894,14 +9113,14 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_70 = 0; __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":169 + /* "spacy/syntax/_parse_features.pyx":176 * clusters = ( * # Koo et al have (head, child) --- we have S0, N0 for both. * (S0c4, N0c4), # <<<<<<<<<<<<<< * (S0c6, N0c6), * (S0c, N0c), */ - __pyx_t_68 = PyTuple_New(29); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = PyTuple_New(29); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); PyTuple_SET_ITEM(__pyx_t_68, 0, __pyx_t_77); __Pyx_GIVEREF(__pyx_t_77); @@ -8990,19 +9209,19 @@ PyMODINIT_FUNC PyInit__parse_features(void) __pyx_t_48 = 0; __pyx_t_47 = 0; __pyx_t_46 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_clusters, __pyx_t_68) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_clusters, __pyx_t_68) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_68); __pyx_t_68 = 0; - /* "spacy/syntax/_parse_features.pyx":205 + /* "spacy/syntax/_parse_features.pyx":212 * * * def pos_bigrams(): # <<<<<<<<<<<<<< * kernels = [S2w, S1w, S0w, S0lw, S0rw, N0w, N0lw, N1w] * bitags = [] */ - __pyx_t_68 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_15_parse_features_1pos_bigrams, NULL, __pyx_n_s_spacy_syntax__parse_features); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_68 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_15_parse_features_1pos_bigrams, NULL, __pyx_n_s_spacy_syntax__parse_features); if (unlikely(!__pyx_t_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_68); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pos_bigrams, __pyx_t_68) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pos_bigrams, __pyx_t_68) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_68); __pyx_t_68 = 0; /* "spacy/syntax/_parse_features.pyx":1 diff --git a/spacy/syntax/_parse_features.pyx b/spacy/syntax/_parse_features.pyx index e655c12c5..014376e3a 100644 --- a/spacy/syntax/_parse_features.pyx +++ b/spacy/syntax/_parse_features.pyx @@ -17,53 +17,60 @@ from ._state cimport get_left, get_right cdef inline void fill_token(atom_t* context, const TokenC* token) nogil: - context[0] = token.lex.sic - context[1] = token.pos - context[2] = token.lex.cluster - # We've read in the string little-endian, so now we can take & (2**n)-1 - # to get the first n bits of the cluster. - # e.g. s = "1110010101" - # s = ''.join(reversed(s)) - # first_4_bits = int(s, 2) - # print first_4_bits - # 5 - # print "{0:b}".format(prefix).ljust(4, '0') - # 1110 - # What we're doing here is picking a number where all bits are 1, e.g. - # 15 is 1111, 63 is 111111 and doing bitwise AND, so getting all bits in - # the source that are set to 1. - context[3] = token.lex.cluster & 63 - context[4] = token.lex.cluster & 15 - context[5] = token.dep_tag + if token is NULL: + context[0] = 0 + context[1] = 0 + context[2] = 0 + context[3] = 0 + context[4] = 0 + context[5] = 0 + else: + context[0] = token.lex.sic + context[1] = token.pos + context[2] = token.lex.cluster + # We've read in the string little-endian, so now we can take & (2**n)-1 + # to get the first n bits of the cluster. + # e.g. s = "1110010101" + # s = ''.join(reversed(s)) + # first_4_bits = int(s, 2) + # print first_4_bits + # 5 + # print "{0:b}".format(prefix).ljust(4, '0') + # 1110 + # What we're doing here is picking a number where all bits are 1, e.g. + # 15 is 1111, 63 is 111111 and doing bitwise AND, so getting all bits in + # the source that are set to 1. + context[3] = token.lex.cluster & 63 + context[4] = token.lex.cluster & 15 + context[5] = token.dep_tag cdef int fill_context(atom_t* context, State* state) except -1: # This fills in the basic properties of each of our "slot" tokens, e.g. # word on top of the stack, word at the front of the buffer, etc. - cdef TokenC* n1 = get_n1(state) fill_token(&context[S2w], get_s2(state)) fill_token(&context[S1w], get_s1(state)) - #fill_token(&context[S1rw], get_right(state, get_s1(state), 0)) - fill_token(&context[S0lw], get_left(state, get_s0(state), 0)) - fill_token(&context[S0l2w], get_left(state, get_s0(state), 1)) + fill_token(&context[S1rw], get_right(state, get_s1(state), 1)) + fill_token(&context[S0lw], get_left(state, get_s0(state), 1)) + fill_token(&context[S0l2w], get_left(state, get_s0(state), 2)) fill_token(&context[S0w], get_s0(state)) - #fill_token(&context[S0r2w], get_right(state, get_s0(state), 1)) - fill_token(&context[S0rw], get_right(state, get_s0(state), 0)) - #fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) - #fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) + fill_token(&context[S0r2w], get_right(state, get_s0(state), 2)) + fill_token(&context[S0rw], get_right(state, get_s0(state), 1)) + fill_token(&context[N0lw], get_left(state, get_n0(state), 0)) + fill_token(&context[N0l2w], get_left(state, get_n0(state), 1)) fill_token(&context[N0w], get_n0(state)) - #fill_token(&context[N1w], get_n1(state)) - #fill_token(&context[N2w], get_n2(state)) + fill_token(&context[N1w], get_n1(state)) + fill_token(&context[N2w], get_n2(state)) - #if state.stack_len >= 1: - # context[dist] = state.stack[0] - state.sent - #else: - # context[dist] = 0 - #context[N0lv] = 0 - #context[S0lv] = 0 - #context[S0rv] = 0 - #context[S1lv] = 0 - #context[S1rv] = 0 + if state.stack_len >= 1: + context[dist] = state.stack[0] - state.i + else: + context[dist] = 0 + context[N0lv] = 0 + context[S0lv] = 0 + context[S0rv] = 0 + context[S1lv] = 0 + context[S1rv] = 0 arc_eager = ( diff --git a/spacy/syntax/_state.cpp b/spacy/syntax/_state.cpp index cca8744ac..1543f5a7e 100644 --- a/spacy/syntax/_state.cpp +++ b/spacy/syntax/_state.cpp @@ -1248,12 +1248,12 @@ struct __pyx_t_5spacy_6syntax_6_state_State; * * * cdef struct State: # <<<<<<<<<<<<<< - * TokenC** stack * TokenC* sent + * int* stack */ struct __pyx_t_5spacy_6syntax_6_state_State { - struct __pyx_t_5spacy_6tokens_TokenC **stack; struct __pyx_t_5spacy_6tokens_TokenC *sent; + int *stack; int i; int sent_len; int stack_len; @@ -2245,7 +2245,6 @@ static PyTypeObject *__pyx_ptype_5spacy_6tokens_Tokens = 0; static PyTypeObject *__pyx_ptype_5spacy_6tokens_Token = 0; /* Module declarations from 'spacy.syntax._state' */ -static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_get_idx(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t, int); /*proto*/ #define __Pyx_MODULE_NAME "spacy.syntax._state" @@ -2310,42 +2309,43 @@ static PyObject *__pyx_tuple__6; /* "spacy/syntax/_state.pyx":8 * * - * cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1: # <<<<<<<<<<<<<< - * child.head = head - child - * child.dep_tag = label + * cdef int add_dep(State *s, int head, int child, int label) except -1: # <<<<<<<<<<<<<< + * s.sent[child].head = head - child + * s.sent[child].dep_tag = label */ -static int __pyx_f_5spacy_6syntax_6_state_add_dep(CYTHON_UNUSED struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_head, struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_child, int __pyx_v_label) { +static int __pyx_f_5spacy_6syntax_6_state_add_dep(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s, int __pyx_v_head, int __pyx_v_child, int __pyx_v_label) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_t_2; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("add_dep", 0); __Pyx_TraceCall("add_dep", __pyx_f[1], 8); /* "spacy/syntax/_state.pyx":9 * - * cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1: - * child.head = head - child # <<<<<<<<<<<<<< - * child.dep_tag = label + * cdef int add_dep(State *s, int head, int child, int label) except -1: + * s.sent[child].head = head - child # <<<<<<<<<<<<<< + * s.sent[child].dep_tag = label * # Keep a bit-vector tracking child dependencies. If a word has a child at */ - __pyx_v_child->head = (__pyx_v_head - __pyx_v_child); + (__pyx_v_s->sent[__pyx_v_child]).head = (__pyx_v_head - __pyx_v_child); /* "spacy/syntax/_state.pyx":10 - * cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1: - * child.head = head - child - * child.dep_tag = label # <<<<<<<<<<<<<< + * cdef int add_dep(State *s, int head, int child, int label) except -1: + * s.sent[child].head = head - child + * s.sent[child].dep_tag = label # <<<<<<<<<<<<<< * # Keep a bit-vector tracking child dependencies. If a word has a child at * # offset i from it, set that bit (tracking left and right separately) */ - __pyx_v_child->dep_tag = __pyx_v_label; + (__pyx_v_s->sent[__pyx_v_child]).dep_tag = __pyx_v_label; /* "spacy/syntax/_state.pyx":13 * # Keep a bit-vector tracking child dependencies. If a word has a child at * # offset i from it, set that bit (tracking left and right separately) * if child > head: # <<<<<<<<<<<<<< - * head.r_kids |= 1 << child.head + * s.sent[head].r_kids |= 1 << (-s.sent[child].head) * else: */ __pyx_t_1 = ((__pyx_v_child > __pyx_v_head) != 0); @@ -2354,32 +2354,34 @@ static int __pyx_f_5spacy_6syntax_6_state_add_dep(CYTHON_UNUSED struct __pyx_t_5 /* "spacy/syntax/_state.pyx":14 * # offset i from it, set that bit (tracking left and right separately) * if child > head: - * head.r_kids |= 1 << child.head # <<<<<<<<<<<<<< + * s.sent[head].r_kids |= 1 << (-s.sent[child].head) # <<<<<<<<<<<<<< * else: - * head.l_kids |= 1 << (-child.head) + * s.sent[head].l_kids |= 1 << s.sent[child].head */ - __pyx_v_head->r_kids = (__pyx_v_head->r_kids | (1 << __pyx_v_child->head)); + __pyx_t_2 = __pyx_v_head; + (__pyx_v_s->sent[__pyx_t_2]).r_kids = ((__pyx_v_s->sent[__pyx_t_2]).r_kids | (1 << (-(__pyx_v_s->sent[__pyx_v_child]).head))); goto __pyx_L3; } /*else*/ { /* "spacy/syntax/_state.pyx":16 - * head.r_kids |= 1 << child.head + * s.sent[head].r_kids |= 1 << (-s.sent[child].head) * else: - * head.l_kids |= 1 << (-child.head) # <<<<<<<<<<<<<< + * s.sent[head].l_kids |= 1 << s.sent[child].head # <<<<<<<<<<<<<< * * */ - __pyx_v_head->l_kids = (__pyx_v_head->l_kids | (1 << (-__pyx_v_child->head))); + __pyx_t_2 = __pyx_v_head; + (__pyx_v_s->sent[__pyx_t_2]).l_kids = ((__pyx_v_s->sent[__pyx_t_2]).l_kids | (1 << (__pyx_v_s->sent[__pyx_v_child]).head)); } __pyx_L3:; /* "spacy/syntax/_state.pyx":8 * * - * cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1: # <<<<<<<<<<<<<< - * child.head = head - child - * child.dep_tag = label + * cdef int add_dep(State *s, int head, int child, int label) except -1: # <<<<<<<<<<<<<< + * s.sent[child].head = head - child + * s.sent[child].dep_tag = label */ /* function exit code */ @@ -2392,14 +2394,13 @@ static int __pyx_f_5spacy_6syntax_6_state_add_dep(CYTHON_UNUSED struct __pyx_t_5 /* "spacy/syntax/_state.pyx":19 * * - * cdef TokenC* pop_stack(State *s) except NULL: # <<<<<<<<<<<<<< + * cdef int pop_stack(State *s) except -1: # <<<<<<<<<<<<<< * assert s.stack_len >= 1 - * cdef TokenC* top = s.stack[0] + * s.stack_len -= 1 */ -static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_pop_stack(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_top; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; +static int __pyx_f_5spacy_6syntax_6_state_pop_stack(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s) { + int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; @@ -2410,9 +2411,9 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_pop_ /* "spacy/syntax/_state.pyx":20 * - * cdef TokenC* pop_stack(State *s) except NULL: + * cdef int pop_stack(State *s) except -1: * assert s.stack_len >= 1 # <<<<<<<<<<<<<< - * cdef TokenC* top = s.stack[0] + * s.stack_len -= 1 * s.stack -= 1 */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -2425,61 +2426,44 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_pop_ #endif /* "spacy/syntax/_state.pyx":21 - * cdef TokenC* pop_stack(State *s) except NULL: + * cdef int pop_stack(State *s) except -1: * assert s.stack_len >= 1 - * cdef TokenC* top = s.stack[0] # <<<<<<<<<<<<<< - * s.stack -= 1 - * s.stack_len -= 1 - */ - __pyx_v_top = (__pyx_v_s->stack[0]); - - /* "spacy/syntax/_state.pyx":22 - * assert s.stack_len >= 1 - * cdef TokenC* top = s.stack[0] - * s.stack -= 1 # <<<<<<<<<<<<<< - * s.stack_len -= 1 - * return top - */ - __pyx_v_s->stack = (__pyx_v_s->stack - 1); - - /* "spacy/syntax/_state.pyx":23 - * cdef TokenC* top = s.stack[0] - * s.stack -= 1 * s.stack_len -= 1 # <<<<<<<<<<<<<< - * return top + * s.stack -= 1 * */ __pyx_v_s->stack_len = (__pyx_v_s->stack_len - 1); - /* "spacy/syntax/_state.pyx":24 - * s.stack -= 1 + /* "spacy/syntax/_state.pyx":22 + * assert s.stack_len >= 1 * s.stack_len -= 1 - * return top # <<<<<<<<<<<<<< + * s.stack -= 1 # <<<<<<<<<<<<<< * * */ - __pyx_r = __pyx_v_top; - goto __pyx_L0; + __pyx_v_s->stack = (__pyx_v_s->stack - 1); /* "spacy/syntax/_state.pyx":19 * * - * cdef TokenC* pop_stack(State *s) except NULL: # <<<<<<<<<<<<<< + * cdef int pop_stack(State *s) except -1: # <<<<<<<<<<<<<< * assert s.stack_len >= 1 - * cdef TokenC* top = s.stack[0] + * s.stack_len -= 1 */ /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("spacy.syntax._state.pop_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __pyx_r = -1; __pyx_L0:; __Pyx_TraceReturn(Py_None); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "spacy/syntax/_state.pyx":27 +/* "spacy/syntax/_state.pyx":25 * * * cdef int push_stack(State *s) except -1: # <<<<<<<<<<<<<< @@ -2490,58 +2474,60 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_pop_ static int __pyx_f_5spacy_6syntax_6_state_push_stack(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s) { int __pyx_r; __Pyx_RefNannyDeclarations + int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("push_stack", 0); - __Pyx_TraceCall("push_stack", __pyx_f[1], 27); + __Pyx_TraceCall("push_stack", __pyx_f[1], 25); - /* "spacy/syntax/_state.pyx":28 + /* "spacy/syntax/_state.pyx":26 * * cdef int push_stack(State *s) except -1: * assert s.i < s.sent_len # <<<<<<<<<<<<<< * s.stack += 1 - * s.stack[0] = &s.sent[s.i] + * s.stack[0] = s.i */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_s->i < __pyx_v_s->sent_len) != 0))) { PyErr_SetNone(PyExc_AssertionError); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "spacy/syntax/_state.pyx":29 + /* "spacy/syntax/_state.pyx":27 * cdef int push_stack(State *s) except -1: * assert s.i < s.sent_len * s.stack += 1 # <<<<<<<<<<<<<< - * s.stack[0] = &s.sent[s.i] + * s.stack[0] = s.i * s.stack_len += 1 */ __pyx_v_s->stack = (__pyx_v_s->stack + 1); - /* "spacy/syntax/_state.pyx":30 + /* "spacy/syntax/_state.pyx":28 * assert s.i < s.sent_len * s.stack += 1 - * s.stack[0] = &s.sent[s.i] # <<<<<<<<<<<<<< + * s.stack[0] = s.i # <<<<<<<<<<<<<< * s.stack_len += 1 * s.i += 1 */ - (__pyx_v_s->stack[0]) = (&(__pyx_v_s->sent[__pyx_v_s->i])); + __pyx_t_1 = __pyx_v_s->i; + (__pyx_v_s->stack[0]) = __pyx_t_1; - /* "spacy/syntax/_state.pyx":31 + /* "spacy/syntax/_state.pyx":29 * s.stack += 1 - * s.stack[0] = &s.sent[s.i] + * s.stack[0] = s.i * s.stack_len += 1 # <<<<<<<<<<<<<< * s.i += 1 * */ __pyx_v_s->stack_len = (__pyx_v_s->stack_len + 1); - /* "spacy/syntax/_state.pyx":32 - * s.stack[0] = &s.sent[s.i] + /* "spacy/syntax/_state.pyx":30 + * s.stack[0] = s.i * s.stack_len += 1 * s.i += 1 # <<<<<<<<<<<<<< * @@ -2549,7 +2535,7 @@ static int __pyx_f_5spacy_6syntax_6_state_push_stack(struct __pyx_t_5spacy_6synt */ __pyx_v_s->i = (__pyx_v_s->i + 1); - /* "spacy/syntax/_state.pyx":27 + /* "spacy/syntax/_state.pyx":25 * * * cdef int push_stack(State *s) except -1: # <<<<<<<<<<<<<< @@ -2569,102 +2555,77 @@ static int __pyx_f_5spacy_6syntax_6_state_push_stack(struct __pyx_t_5spacy_6synt return __pyx_r; } -/* "spacy/syntax/_state.pyx":35 +/* "spacy/syntax/_state.pyx":33 * * - * cdef int children_in_buffer(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int children_in_buffer(const State *s, int head, list gold) except -1: # <<<<<<<<<<<<<< * # Golds holds an array of head offsets --- the head of word i is i - golds[i] * # Iterate over the tokens of the queue, and check whether their gold head is */ -static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_target, PyObject *__pyx_v_gold) { +static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, int __pyx_v_head, PyObject *__pyx_v_gold) { int __pyx_v_i; int __pyx_v_n; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_buff_word; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_buff_head; - int __pyx_v_buff_word_head_offset; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("children_in_buffer", 0); - __Pyx_TraceCall("children_in_buffer", __pyx_f[1], 35); + __Pyx_TraceCall("children_in_buffer", __pyx_f[1], 33); - /* "spacy/syntax/_state.pyx":40 + /* "spacy/syntax/_state.pyx":38 * # our target * cdef int i * cdef int n = 0 # <<<<<<<<<<<<<< - * cdef TokenC* buff_word - * cdef TokenC* buff_head + * for i in range(s.i, s.sent_len): + * if gold[i] == head: */ __pyx_v_n = 0; - /* "spacy/syntax/_state.pyx":44 - * cdef TokenC* buff_head - * cdef int buff_word_head_offset + /* "spacy/syntax/_state.pyx":39 + * cdef int i + * cdef int n = 0 * for i in range(s.i, s.sent_len): # <<<<<<<<<<<<<< - * buff_word = &s.sent[i] - * buff_word_head_offset = gold[i] + * if gold[i] == head: + * n += 1 */ __pyx_t_1 = __pyx_v_s->sent_len; for (__pyx_t_2 = __pyx_v_s->i; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "spacy/syntax/_state.pyx":45 - * cdef int buff_word_head_offset + /* "spacy/syntax/_state.pyx":40 + * cdef int n = 0 * for i in range(s.i, s.sent_len): - * buff_word = &s.sent[i] # <<<<<<<<<<<<<< - * buff_word_head_offset = gold[i] - * buff_head = buff_word + buff_word_head_offset - */ - __pyx_v_buff_word = (&(__pyx_v_s->sent[__pyx_v_i])); - - /* "spacy/syntax/_state.pyx":46 - * for i in range(s.i, s.sent_len): - * buff_word = &s.sent[i] - * buff_word_head_offset = gold[i] # <<<<<<<<<<<<<< - * buff_head = buff_word + buff_word_head_offset - * if buff_head == target: - */ - if (unlikely(__pyx_v_gold == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_buff_word_head_offset = __pyx_t_4; - - /* "spacy/syntax/_state.pyx":47 - * buff_word = &s.sent[i] - * buff_word_head_offset = gold[i] - * buff_head = buff_word + buff_word_head_offset # <<<<<<<<<<<<<< - * if buff_head == target: - * n += 1 - */ - __pyx_v_buff_head = (__pyx_v_buff_word + __pyx_v_buff_word_head_offset); - - /* "spacy/syntax/_state.pyx":48 - * buff_word_head_offset = gold[i] - * buff_head = buff_word + buff_word_head_offset - * if buff_head == target: # <<<<<<<<<<<<<< + * if gold[i] == head: # <<<<<<<<<<<<<< * n += 1 * return n */ - __pyx_t_5 = ((__pyx_v_buff_head == __pyx_v_target) != 0); - if (__pyx_t_5) { + if (unlikely(__pyx_v_gold == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { - /* "spacy/syntax/_state.pyx":49 - * buff_head = buff_word + buff_word_head_offset - * if buff_head == target: + /* "spacy/syntax/_state.pyx":41 + * for i in range(s.i, s.sent_len): + * if gold[i] == head: * n += 1 # <<<<<<<<<<<<<< * return n * @@ -2675,8 +2636,8 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spa __pyx_L5:; } - /* "spacy/syntax/_state.pyx":50 - * if buff_head == target: + /* "spacy/syntax/_state.pyx":42 + * if gold[i] == head: * n += 1 * return n # <<<<<<<<<<<<<< * @@ -2685,10 +2646,10 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spa __pyx_r = __pyx_v_n; goto __pyx_L0; - /* "spacy/syntax/_state.pyx":35 + /* "spacy/syntax/_state.pyx":33 * * - * cdef int children_in_buffer(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int children_in_buffer(const State *s, int head, list gold) except -1: # <<<<<<<<<<<<<< * # Golds holds an array of head offsets --- the head of word i is i - golds[i] * # Iterate over the tokens of the queue, and check whether their gold head is */ @@ -2696,6 +2657,8 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spa /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("spacy.syntax._state.children_in_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -2704,17 +2667,15 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_buffer(struct __pyx_t_5spa return __pyx_r; } -/* "spacy/syntax/_state.pyx":53 +/* "spacy/syntax/_state.pyx":45 * * - * cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * cdef int target_idx = get_idx(s, target) - * cdef int target_head_idx = target_idx + gold[target_idx] + * cdef int head_in_buffer(const State *s, const int child, list gold) except -1: # <<<<<<<<<<<<<< + * return gold[child] >= s.i + * */ -static int __pyx_f_5spacy_6syntax_6_state_head_in_buffer(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_target, PyObject *__pyx_v_gold) { - int __pyx_v_target_idx; - int __pyx_v_target_head_idx; +static int __pyx_f_5spacy_6syntax_6_state_head_in_buffer(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, int const __pyx_v_child, PyObject *__pyx_v_gold) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2726,56 +2687,37 @@ static int __pyx_f_5spacy_6syntax_6_state_head_in_buffer(struct __pyx_t_5spacy_6 int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("head_in_buffer", 0); - __Pyx_TraceCall("head_in_buffer", __pyx_f[1], 53); + __Pyx_TraceCall("head_in_buffer", __pyx_f[1], 45); - /* "spacy/syntax/_state.pyx":54 + /* "spacy/syntax/_state.pyx":46 + * + * cdef int head_in_buffer(const State *s, const int child, list gold) except -1: + * return gold[child] >= s.i # <<<<<<<<<<<<<< * - * cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1: - * cdef int target_idx = get_idx(s, target) # <<<<<<<<<<<<<< - * cdef int target_head_idx = target_idx + gold[target_idx] - * return target_head_idx >= s.i - */ - __pyx_v_target_idx = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_v_target); - - /* "spacy/syntax/_state.pyx":55 - * cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1: - * cdef int target_idx = get_idx(s, target) - * cdef int target_head_idx = target_idx + gold[target_idx] # <<<<<<<<<<<<<< - * return target_head_idx >= s.i * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_target_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_gold == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_target_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_child, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_s->i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_target_head_idx = __pyx_t_4; - - /* "spacy/syntax/_state.pyx":56 - * cdef int target_idx = get_idx(s, target) - * cdef int target_head_idx = target_idx + gold[target_idx] - * return target_head_idx >= s.i # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = (__pyx_v_target_head_idx >= __pyx_v_s->i); + __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "spacy/syntax/_state.pyx":53 + /* "spacy/syntax/_state.pyx":45 * * - * cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * cdef int target_idx = get_idx(s, target) - * cdef int target_head_idx = target_idx + gold[target_idx] + * cdef int head_in_buffer(const State *s, const int child, list gold) except -1: # <<<<<<<<<<<<<< + * return gold[child] >= s.i + * */ /* function exit code */ @@ -2791,136 +2733,91 @@ static int __pyx_f_5spacy_6syntax_6_state_head_in_buffer(struct __pyx_t_5spacy_6 return __pyx_r; } -/* "spacy/syntax/_state.pyx":59 +/* "spacy/syntax/_state.pyx":49 * * - * cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * if s.stack_len == 0: - * return 0 + * cdef int children_in_stack(const State *s, const int head, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int i + * cdef int n = 0 */ -static int __pyx_f_5spacy_6syntax_6_state_children_in_stack(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_target, PyObject *__pyx_v_gold) { +static int __pyx_f_5spacy_6syntax_6_state_children_in_stack(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, int const __pyx_v_head, PyObject *__pyx_v_gold) { int __pyx_v_i; int __pyx_v_n; - struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_stack_word; - struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_stack_word_head; - int __pyx_v_stack_word_head_offset; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("children_in_stack", 0); - __Pyx_TraceCall("children_in_stack", __pyx_f[1], 59); + __Pyx_TraceCall("children_in_stack", __pyx_f[1], 49); - /* "spacy/syntax/_state.pyx":60 - * - * cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1: - * if s.stack_len == 0: # <<<<<<<<<<<<<< - * return 0 - * cdef int i - */ - __pyx_t_1 = ((__pyx_v_s->stack_len == 0) != 0); - if (__pyx_t_1) { - - /* "spacy/syntax/_state.pyx":61 - * cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1: - * if s.stack_len == 0: - * return 0 # <<<<<<<<<<<<<< - * cdef int i - * cdef int n = 0 - */ - __pyx_r = 0; - goto __pyx_L0; - } - - /* "spacy/syntax/_state.pyx":63 - * return 0 + /* "spacy/syntax/_state.pyx":51 + * cdef int children_in_stack(const State *s, const int head, list gold) except -1: * cdef int i * cdef int n = 0 # <<<<<<<<<<<<<< - * cdef const TokenC* stack_word - * cdef const TokenC* stack_word_head + * for i in range(s.stack_len): + * if gold[s.stack[-i]] == head: */ __pyx_v_n = 0; - /* "spacy/syntax/_state.pyx":67 - * cdef const TokenC* stack_word_head - * cdef int stack_word_head_offset + /* "spacy/syntax/_state.pyx":52 + * cdef int i + * cdef int n = 0 * for i in range(s.stack_len): # <<<<<<<<<<<<<< - * stack_word = (s.stack - i)[0] - * stack_word_head_offset = gold[get_idx(s, stack_word)] - */ - __pyx_t_2 = __pyx_v_s->stack_len; - for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { - __pyx_v_i = __pyx_t_3; - - /* "spacy/syntax/_state.pyx":68 - * cdef int stack_word_head_offset - * for i in range(s.stack_len): - * stack_word = (s.stack - i)[0] # <<<<<<<<<<<<<< - * stack_word_head_offset = gold[get_idx(s, stack_word)] - * stack_word_head = (s.stack + stack_word_head_offset)[0] - */ - __pyx_v_stack_word = ((__pyx_v_s->stack - __pyx_v_i)[0]); - - /* "spacy/syntax/_state.pyx":69 - * for i in range(s.stack_len): - * stack_word = (s.stack - i)[0] - * stack_word_head_offset = gold[get_idx(s, stack_word)] # <<<<<<<<<<<<<< - * stack_word_head = (s.stack + stack_word_head_offset)[0] - * if stack_word_head == target: - */ - if (unlikely(__pyx_v_gold == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_4 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_v_stack_word); - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_stack_word_head_offset = __pyx_t_4; - - /* "spacy/syntax/_state.pyx":70 - * stack_word = (s.stack - i)[0] - * stack_word_head_offset = gold[get_idx(s, stack_word)] - * stack_word_head = (s.stack + stack_word_head_offset)[0] # <<<<<<<<<<<<<< - * if stack_word_head == target: + * if gold[s.stack[-i]] == head: * n += 1 */ - __pyx_v_stack_word_head = ((__pyx_v_s->stack + __pyx_v_stack_word_head_offset)[0]); + __pyx_t_1 = __pyx_v_s->stack_len; + for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { + __pyx_v_i = __pyx_t_2; - /* "spacy/syntax/_state.pyx":71 - * stack_word_head_offset = gold[get_idx(s, stack_word)] - * stack_word_head = (s.stack + stack_word_head_offset)[0] - * if stack_word_head == target: # <<<<<<<<<<<<<< + /* "spacy/syntax/_state.pyx":53 + * cdef int n = 0 + * for i in range(s.stack_len): + * if gold[s.stack[-i]] == head: # <<<<<<<<<<<<<< * n += 1 * return n */ - __pyx_t_1 = ((__pyx_v_stack_word_head == __pyx_v_target) != 0); - if (__pyx_t_1) { + if (unlikely(__pyx_v_gold == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = (__pyx_v_s->stack[(-__pyx_v_i)]); + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__pyx_t_7) { - /* "spacy/syntax/_state.pyx":72 - * stack_word_head = (s.stack + stack_word_head_offset)[0] - * if stack_word_head == target: + /* "spacy/syntax/_state.pyx":54 + * for i in range(s.stack_len): + * if gold[s.stack[-i]] == head: * n += 1 # <<<<<<<<<<<<<< * return n * */ __pyx_v_n = (__pyx_v_n + 1); - goto __pyx_L6; + goto __pyx_L5; } - __pyx_L6:; + __pyx_L5:; } - /* "spacy/syntax/_state.pyx":73 - * if stack_word_head == target: + /* "spacy/syntax/_state.pyx":55 + * if gold[s.stack[-i]] == head: * n += 1 * return n # <<<<<<<<<<<<<< * @@ -2929,17 +2826,19 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_stack(struct __pyx_t_5spac __pyx_r = __pyx_v_n; goto __pyx_L0; - /* "spacy/syntax/_state.pyx":59 + /* "spacy/syntax/_state.pyx":49 * * - * cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * if s.stack_len == 0: - * return 0 + * cdef int children_in_stack(const State *s, const int head, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int i + * cdef int n = 0 */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("spacy.syntax._state.children_in_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -2948,103 +2847,67 @@ static int __pyx_f_5spacy_6syntax_6_state_children_in_stack(struct __pyx_t_5spac return __pyx_r; } -/* "spacy/syntax/_state.pyx":76 +/* "spacy/syntax/_state.pyx":58 * * - * cdef int head_in_stack(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * if s.stack_len == 0: - * return 0 + * cdef int head_in_stack(const State *s, const int child, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int i + * for i in range(s.stack_len): */ -static int __pyx_f_5spacy_6syntax_6_state_head_in_stack(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_target, PyObject *__pyx_v_gold) { - int __pyx_v_head_offset; - struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_target_head; +static int __pyx_f_5spacy_6syntax_6_state_head_in_stack(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, int const __pyx_v_child, PyObject *__pyx_v_gold) { int __pyx_v_i; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("head_in_stack", 0); - __Pyx_TraceCall("head_in_stack", __pyx_f[1], 76); + __Pyx_TraceCall("head_in_stack", __pyx_f[1], 58); - /* "spacy/syntax/_state.pyx":77 - * - * cdef int head_in_stack(const State *s, const TokenC* target, list gold) except -1: - * if s.stack_len == 0: # <<<<<<<<<<<<<< - * return 0 - * cdef int head_offset = gold[get_idx(s, target)] - */ - __pyx_t_1 = ((__pyx_v_s->stack_len == 0) != 0); - if (__pyx_t_1) { - - /* "spacy/syntax/_state.pyx":78 - * cdef int head_in_stack(const State *s, const TokenC* target, list gold) except -1: - * if s.stack_len == 0: - * return 0 # <<<<<<<<<<<<<< - * cdef int head_offset = gold[get_idx(s, target)] - * cdef const TokenC* target_head = target + head_offset - */ - __pyx_r = 0; - goto __pyx_L0; - } - - /* "spacy/syntax/_state.pyx":79 - * if s.stack_len == 0: - * return 0 - * cdef int head_offset = gold[get_idx(s, target)] # <<<<<<<<<<<<<< - * cdef const TokenC* target_head = target + head_offset - * cdef int i - */ - if (unlikely(__pyx_v_gold == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_2 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_v_target); - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_t_2, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_head_offset = __pyx_t_2; - - /* "spacy/syntax/_state.pyx":80 - * return 0 - * cdef int head_offset = gold[get_idx(s, target)] - * cdef const TokenC* target_head = target + head_offset # <<<<<<<<<<<<<< - * cdef int i - * for i in range(s.stack_len): - */ - __pyx_v_target_head = (__pyx_v_target + __pyx_v_head_offset); - - /* "spacy/syntax/_state.pyx":82 - * cdef const TokenC* target_head = target + head_offset + /* "spacy/syntax/_state.pyx":60 + * cdef int head_in_stack(const State *s, const int child, list gold) except -1: * cdef int i * for i in range(s.stack_len): # <<<<<<<<<<<<<< - * if target_head == (s.stack - i)[0]: + * if gold[child] == s.stack[-i]: * return 1 */ - __pyx_t_2 = __pyx_v_s->stack_len; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; + __pyx_t_1 = __pyx_v_s->stack_len; + for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { + __pyx_v_i = __pyx_t_2; - /* "spacy/syntax/_state.pyx":83 + /* "spacy/syntax/_state.pyx":61 * cdef int i * for i in range(s.stack_len): - * if target_head == (s.stack - i)[0]: # <<<<<<<<<<<<<< + * if gold[child] == s.stack[-i]: # <<<<<<<<<<<<<< * return 1 * return 0 */ - __pyx_t_1 = ((__pyx_v_target_head == ((__pyx_v_s->stack - __pyx_v_i)[0])) != 0); - if (__pyx_t_1) { + if (unlikely(__pyx_v_gold == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_child, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_s->stack[(-__pyx_v_i)])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__pyx_t_6) { - /* "spacy/syntax/_state.pyx":84 + /* "spacy/syntax/_state.pyx":62 * for i in range(s.stack_len): - * if target_head == (s.stack - i)[0]: + * if gold[child] == s.stack[-i]: * return 1 # <<<<<<<<<<<<<< * return 0 * @@ -3054,8 +2917,8 @@ static int __pyx_f_5spacy_6syntax_6_state_head_in_stack(struct __pyx_t_5spacy_6s } } - /* "spacy/syntax/_state.pyx":85 - * if target_head == (s.stack - i)[0]: + /* "spacy/syntax/_state.pyx":63 + * if gold[child] == s.stack[-i]: * return 1 * return 0 # <<<<<<<<<<<<<< * @@ -3064,17 +2927,19 @@ static int __pyx_f_5spacy_6syntax_6_state_head_in_stack(struct __pyx_t_5spacy_6s __pyx_r = 0; goto __pyx_L0; - /* "spacy/syntax/_state.pyx":76 + /* "spacy/syntax/_state.pyx":58 * * - * cdef int head_in_stack(const State *s, const TokenC* target, list gold) except -1: # <<<<<<<<<<<<<< - * if s.stack_len == 0: - * return 0 + * cdef int head_in_stack(const State *s, const int child, list gold) except -1: # <<<<<<<<<<<<<< + * cdef int i + * for i in range(s.stack_len): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("spacy.syntax._state.head_in_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -3083,74 +2948,74 @@ static int __pyx_f_5spacy_6syntax_6_state_head_in_stack(struct __pyx_t_5spacy_6s return __pyx_r; } -/* "spacy/syntax/_state.pyx":88 +/* "spacy/syntax/_state.pyx":66 * * - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil: # <<<<<<<<<<<<<< + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil: # <<<<<<<<<<<<<< * cdef uint32_t kids = head.l_kids * if kids == 0: */ -static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_left(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_head, int __pyx_v_idx) { +static struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_f_5spacy_6syntax_6_state_get_left(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_head, int const __pyx_v_idx) { uint32_t __pyx_v_kids; int __pyx_v_offset; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_child; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_child; + struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_r; uint32_t __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pyx":89 + /* "spacy/syntax/_state.pyx":67 * - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil: + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil: * cdef uint32_t kids = head.l_kids # <<<<<<<<<<<<<< * if kids == 0: - * return s.sent - 1 + * return NULL */ __pyx_t_1 = __pyx_v_head->l_kids; __pyx_v_kids = __pyx_t_1; - /* "spacy/syntax/_state.pyx":90 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil: + /* "spacy/syntax/_state.pyx":68 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil: * cdef uint32_t kids = head.l_kids * if kids == 0: # <<<<<<<<<<<<<< - * return s.sent - 1 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) */ __pyx_t_2 = ((__pyx_v_kids == 0) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pyx":91 + /* "spacy/syntax/_state.pyx":69 * cdef uint32_t kids = head.l_kids * if kids == 0: - * return s.sent - 1 # <<<<<<<<<<<<<< + * return NULL # <<<<<<<<<<<<<< * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head - offset + * cdef const TokenC* child = head - offset */ - __pyx_r = (__pyx_v_s->sent - 1); + __pyx_r = NULL; goto __pyx_L0; } - /* "spacy/syntax/_state.pyx":92 + /* "spacy/syntax/_state.pyx":70 * if kids == 0: - * return s.sent - 1 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) # <<<<<<<<<<<<<< - * cdef TokenC* child = head - offset + * cdef const TokenC* child = head - offset * if child >= s.sent: */ __pyx_v_offset = __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(__pyx_v_kids, __pyx_v_idx); - /* "spacy/syntax/_state.pyx":93 - * return s.sent - 1 + /* "spacy/syntax/_state.pyx":71 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head - offset # <<<<<<<<<<<<<< + * cdef const TokenC* child = head - offset # <<<<<<<<<<<<<< * if child >= s.sent: * return child */ __pyx_v_child = (__pyx_v_head - __pyx_v_offset); - /* "spacy/syntax/_state.pyx":94 + /* "spacy/syntax/_state.pyx":72 * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head - offset + * cdef const TokenC* child = head - offset * if child >= s.sent: # <<<<<<<<<<<<<< * return child * else: @@ -3158,8 +3023,8 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ __pyx_t_2 = ((__pyx_v_child >= __pyx_v_s->sent) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pyx":95 - * cdef TokenC* child = head - offset + /* "spacy/syntax/_state.pyx":73 + * cdef const TokenC* child = head - offset * if child >= s.sent: * return child # <<<<<<<<<<<<<< * else: @@ -3170,7 +3035,7 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ } /*else*/ { - /* "spacy/syntax/_state.pyx":97 + /* "spacy/syntax/_state.pyx":75 * return child * else: * return s.sent - 1 # <<<<<<<<<<<<<< @@ -3181,10 +3046,10 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ goto __pyx_L0; } - /* "spacy/syntax/_state.pyx":88 + /* "spacy/syntax/_state.pyx":66 * * - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil: # <<<<<<<<<<<<<< + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil: # <<<<<<<<<<<<<< * cdef uint32_t kids = head.l_kids * if kids == 0: */ @@ -3194,74 +3059,74 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ return __pyx_r; } -/* "spacy/syntax/_state.pyx":100 +/* "spacy/syntax/_state.pyx":78 * * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil: # <<<<<<<<<<<<<< + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil: # <<<<<<<<<<<<<< * cdef uint32_t kids = head.r_kids * if kids == 0: */ -static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_right(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_head, int __pyx_v_idx) { +static struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_f_5spacy_6syntax_6_state_get_right(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_head, int const __pyx_v_idx) { uint32_t __pyx_v_kids; int __pyx_v_offset; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_child; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_child; + struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_r; uint32_t __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pyx":101 + /* "spacy/syntax/_state.pyx":79 * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil: + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil: * cdef uint32_t kids = head.r_kids # <<<<<<<<<<<<<< * if kids == 0: - * return s.sent - 1 + * return NULL */ __pyx_t_1 = __pyx_v_head->r_kids; __pyx_v_kids = __pyx_t_1; - /* "spacy/syntax/_state.pyx":102 - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil: + /* "spacy/syntax/_state.pyx":80 + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil: * cdef uint32_t kids = head.r_kids * if kids == 0: # <<<<<<<<<<<<<< - * return s.sent - 1 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) */ __pyx_t_2 = ((__pyx_v_kids == 0) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pyx":103 + /* "spacy/syntax/_state.pyx":81 * cdef uint32_t kids = head.r_kids * if kids == 0: - * return s.sent - 1 # <<<<<<<<<<<<<< + * return NULL # <<<<<<<<<<<<<< * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head + offset + * cdef const TokenC* child = head + offset */ - __pyx_r = (__pyx_v_s->sent - 1); + __pyx_r = NULL; goto __pyx_L0; } - /* "spacy/syntax/_state.pyx":104 + /* "spacy/syntax/_state.pyx":82 * if kids == 0: - * return s.sent - 1 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) # <<<<<<<<<<<<<< - * cdef TokenC* child = head + offset + * cdef const TokenC* child = head + offset * if child < (s.sent + s.sent_len): */ __pyx_v_offset = __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(__pyx_v_kids, __pyx_v_idx); - /* "spacy/syntax/_state.pyx":105 - * return s.sent - 1 + /* "spacy/syntax/_state.pyx":83 + * return NULL * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head + offset # <<<<<<<<<<<<<< + * cdef const TokenC* child = head + offset # <<<<<<<<<<<<<< * if child < (s.sent + s.sent_len): * return child */ __pyx_v_child = (__pyx_v_head + __pyx_v_offset); - /* "spacy/syntax/_state.pyx":106 + /* "spacy/syntax/_state.pyx":84 * cdef int offset = _nth_significant_bit(kids, idx) - * cdef TokenC* child = head + offset + * cdef const TokenC* child = head + offset * if child < (s.sent + s.sent_len): # <<<<<<<<<<<<<< * return child * else: @@ -3269,8 +3134,8 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ __pyx_t_2 = ((__pyx_v_child < (__pyx_v_s->sent + __pyx_v_s->sent_len)) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pyx":107 - * cdef TokenC* child = head + offset + /* "spacy/syntax/_state.pyx":85 + * cdef const TokenC* child = head + offset * if child < (s.sent + s.sent_len): * return child # <<<<<<<<<<<<<< * else: @@ -3281,7 +3146,7 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ } /*else*/ { - /* "spacy/syntax/_state.pyx":109 + /* "spacy/syntax/_state.pyx":87 * return child * else: * return s.sent - 1 # <<<<<<<<<<<<<< @@ -3292,10 +3157,10 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ goto __pyx_L0; } - /* "spacy/syntax/_state.pyx":100 + /* "spacy/syntax/_state.pyx":78 * * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil: # <<<<<<<<<<<<<< + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil: # <<<<<<<<<<<<<< * cdef uint32_t kids = head.r_kids * if kids == 0: */ @@ -3305,7 +3170,7 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ return __pyx_r; } -/* "spacy/syntax/_state.pyx":115 +/* "spacy/syntax/_state.pyx":93 * * * cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL: # <<<<<<<<<<<<<< @@ -3316,8 +3181,7 @@ static struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_state_init_state(struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem, struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_sent, int const __pyx_v_sent_length) { int __pyx_v_padded_len; struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_v_eol_token; - CYTHON_UNUSED long __pyx_v_i; + long __pyx_v_i; struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_r; __Pyx_RefNannyDeclarations void *__pyx_t_1; @@ -3327,95 +3191,93 @@ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_sta int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("init_state", 0); - __Pyx_TraceCall("init_state", __pyx_f[1], 115); + __Pyx_TraceCall("init_state", __pyx_f[1], 93); - /* "spacy/syntax/_state.pyx":116 + /* "spacy/syntax/_state.pyx":94 * * cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL: * cdef int padded_len = sent_length + PADDING + PADDING # <<<<<<<<<<<<<< * cdef State* s = mem.alloc(1, sizeof(State)) - * s.stack = mem.alloc(padded_len, sizeof(TokenC*)) + * s.stack = mem.alloc(padded_len, sizeof(int)) */ __pyx_v_padded_len = ((__pyx_v_sent_length + 5) + 5); - /* "spacy/syntax/_state.pyx":117 + /* "spacy/syntax/_state.pyx":95 * cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL: * cdef int padded_len = sent_length + PADDING + PADDING * cdef State* s = mem.alloc(1, sizeof(State)) # <<<<<<<<<<<<<< - * s.stack = mem.alloc(padded_len, sizeof(TokenC*)) - * cdef TokenC* eol_token = sent - 1 + * s.stack = mem.alloc(padded_len, sizeof(int)) + * for i in range(PADDING): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_mem->__pyx_vtab)->alloc(__pyx_v_mem, 1, (sizeof(struct __pyx_t_5spacy_6syntax_6_state_State))); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_mem->__pyx_vtab)->alloc(__pyx_v_mem, 1, (sizeof(struct __pyx_t_5spacy_6syntax_6_state_State))); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s = ((struct __pyx_t_5spacy_6syntax_6_state_State *)__pyx_t_1); - /* "spacy/syntax/_state.pyx":118 + /* "spacy/syntax/_state.pyx":96 * cdef int padded_len = sent_length + PADDING + PADDING * cdef State* s = mem.alloc(1, sizeof(State)) - * s.stack = mem.alloc(padded_len, sizeof(TokenC*)) # <<<<<<<<<<<<<< - * cdef TokenC* eol_token = sent - 1 + * s.stack = mem.alloc(padded_len, sizeof(int)) # <<<<<<<<<<<<<< * for i in range(PADDING): + * s.stack[i] = -1 */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_mem->__pyx_vtab)->alloc(__pyx_v_mem, __pyx_v_padded_len, (sizeof(struct __pyx_t_5spacy_6tokens_TokenC *))); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_s->stack = ((struct __pyx_t_5spacy_6tokens_TokenC **)__pyx_t_1); + __pyx_t_1 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_mem->__pyx_vtab)->alloc(__pyx_v_mem, __pyx_v_padded_len, (sizeof(int))); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_s->stack = ((int *)__pyx_t_1); - /* "spacy/syntax/_state.pyx":119 + /* "spacy/syntax/_state.pyx":97 * cdef State* s = mem.alloc(1, sizeof(State)) - * s.stack = mem.alloc(padded_len, sizeof(TokenC*)) - * cdef TokenC* eol_token = sent - 1 # <<<<<<<<<<<<<< - * for i in range(PADDING): - * # sent should be padded, with a suitable sentinel token here - */ - __pyx_v_eol_token = (__pyx_v_sent - 1); - - /* "spacy/syntax/_state.pyx":120 - * s.stack = mem.alloc(padded_len, sizeof(TokenC*)) - * cdef TokenC* eol_token = sent - 1 + * s.stack = mem.alloc(padded_len, sizeof(int)) * for i in range(PADDING): # <<<<<<<<<<<<<< - * # sent should be padded, with a suitable sentinel token here - * s.stack[0] = eol_token + * s.stack[i] = -1 + * s.stack += (PADDING - 1) */ for (__pyx_t_2 = 0; __pyx_t_2 < 5; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "spacy/syntax/_state.pyx":122 + /* "spacy/syntax/_state.pyx":98 + * s.stack = mem.alloc(padded_len, sizeof(int)) * for i in range(PADDING): - * # sent should be padded, with a suitable sentinel token here - * s.stack[0] = eol_token # <<<<<<<<<<<<<< - * s.stack += 1 - * s.stack[0] = eol_token + * s.stack[i] = -1 # <<<<<<<<<<<<<< + * s.stack += (PADDING - 1) + * assert s.stack[0] == -1 */ - (__pyx_v_s->stack[0]) = __pyx_v_eol_token; - - /* "spacy/syntax/_state.pyx":123 - * # sent should be padded, with a suitable sentinel token here - * s.stack[0] = eol_token - * s.stack += 1 # <<<<<<<<<<<<<< - * s.stack[0] = eol_token - * s.sent = sent - */ - __pyx_v_s->stack = (__pyx_v_s->stack + 1); + (__pyx_v_s->stack[__pyx_v_i]) = -1; } - /* "spacy/syntax/_state.pyx":124 - * s.stack[0] = eol_token - * s.stack += 1 - * s.stack[0] = eol_token # <<<<<<<<<<<<<< + /* "spacy/syntax/_state.pyx":99 + * for i in range(PADDING): + * s.stack[i] = -1 + * s.stack += (PADDING - 1) # <<<<<<<<<<<<<< + * assert s.stack[0] == -1 + * s.sent = sent + */ + __pyx_v_s->stack = (__pyx_v_s->stack + 4); + + /* "spacy/syntax/_state.pyx":100 + * s.stack[i] = -1 + * s.stack += (PADDING - 1) + * assert s.stack[0] == -1 # <<<<<<<<<<<<<< * s.sent = sent * s.stack_len = 0 */ - (__pyx_v_s->stack[0]) = __pyx_v_eol_token; + #ifndef CYTHON_WITHOUT_ASSERTIONS + if (unlikely(!Py_OptimizeFlag)) { + if (unlikely(!(((__pyx_v_s->stack[0]) == -1) != 0))) { + PyErr_SetNone(PyExc_AssertionError); + {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif - /* "spacy/syntax/_state.pyx":125 - * s.stack += 1 - * s.stack[0] = eol_token + /* "spacy/syntax/_state.pyx":101 + * s.stack += (PADDING - 1) + * assert s.stack[0] == -1 * s.sent = sent # <<<<<<<<<<<<<< * s.stack_len = 0 * s.i = 0 */ __pyx_v_s->sent = __pyx_v_sent; - /* "spacy/syntax/_state.pyx":126 - * s.stack[0] = eol_token + /* "spacy/syntax/_state.pyx":102 + * assert s.stack[0] == -1 * s.sent = sent * s.stack_len = 0 # <<<<<<<<<<<<<< * s.i = 0 @@ -3423,7 +3285,7 @@ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_sta */ __pyx_v_s->stack_len = 0; - /* "spacy/syntax/_state.pyx":127 + /* "spacy/syntax/_state.pyx":103 * s.sent = sent * s.stack_len = 0 * s.i = 0 # <<<<<<<<<<<<<< @@ -3432,7 +3294,7 @@ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_sta */ __pyx_v_s->i = 0; - /* "spacy/syntax/_state.pyx":128 + /* "spacy/syntax/_state.pyx":104 * s.stack_len = 0 * s.i = 0 * s.sent_len = sent_length # <<<<<<<<<<<<<< @@ -3440,7 +3302,7 @@ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_sta */ __pyx_v_s->sent_len = __pyx_v_sent_length; - /* "spacy/syntax/_state.pyx":129 + /* "spacy/syntax/_state.pyx":105 * s.i = 0 * s.sent_len = sent_length * return s # <<<<<<<<<<<<<< @@ -3448,7 +3310,7 @@ static struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_f_5spacy_6syntax_6_sta __pyx_r = __pyx_v_s; goto __pyx_L0; - /* "spacy/syntax/_state.pyx":115 + /* "spacy/syntax/_state.pyx":93 * * * cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL: # <<<<<<<<<<<<<< @@ -3572,8 +3434,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { @@ -3583,33 +3445,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta /* "spacy/syntax/_state.pxd":36 * * cdef inline TokenC* get_n1(const State* s) nogil: - * if s.i < (s.sent_len - 1): # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL * else: */ - __pyx_t_1 = ((__pyx_v_s->i < (__pyx_v_s->sent_len - 1)) != 0); + __pyx_t_1 = (((__pyx_v_s->i + 1) >= __pyx_v_s->sent_len) != 0); if (__pyx_t_1) { /* "spacy/syntax/_state.pxd":37 * cdef inline TokenC* get_n1(const State* s) nogil: - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] # <<<<<<<<<<<<<< + * if (s.i+1) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< * else: - * return s.sent - 1 + * return &s.sent[s.i+1] */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); + __pyx_r = NULL; goto __pyx_L0; } /*else*/ { /* "spacy/syntax/_state.pxd":39 - * return &s.sent[s.i+1] + * return NULL * else: - * return s.sent - 1 # <<<<<<<<<<<<<< + * return &s.sent[s.i+1] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->sent - 1); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); goto __pyx_L0; } @@ -3617,8 +3479,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * if s.i < (s.sent_len - 1): - * return &s.sent[s.i+1] + * if (s.i+1) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -3630,29 +3492,53 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; /* "spacy/syntax/_state.pxd":43 * * cdef inline TokenC* get_n2(const State* s) nogil: - * return &s.sent[s.i+2] # <<<<<<<<<<<<<< + * if (s.i + 2) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 2) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":44 + * cdef inline TokenC* get_n2(const State* s) nogil: + * if (s.i + 2) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+2] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":46 + * return NULL + * else: + * return &s.sent[s.i+2] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); + goto __pyx_L0; + } /* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -3660,32 +3546,32 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":46 +/* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":47 + /* "spacy/syntax/_state.pxd":50 * * cdef inline TokenC* get_s0(const State *s) nogil: - * return s.stack[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[0]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->stack[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[0])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":46 + /* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ @@ -3694,43 +3580,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":50 +/* "spacy/syntax/_state.pxd":53 * * * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 + * return &s.sent[s.stack[-1]] */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s1; struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":52 + /* "spacy/syntax/_state.pxd":55 * cdef inline TokenC* get_s1(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 # <<<<<<<<<<<<<< - * return s1[0] - * - */ - __pyx_v_s1 = (__pyx_v_s->stack - 1); - - /* "spacy/syntax/_state.pxd":53 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - * return s1[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[-1]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s1[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-1])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":50 + /* "spacy/syntax/_state.pxd":53 * * * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 + * return &s.sent[s.stack[-1]] */ /* function exit code */ @@ -3738,43 +3614,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":56 +/* "spacy/syntax/_state.pxd":58 * * * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-2]] */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s2; struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":58 + /* "spacy/syntax/_state.pxd":60 * cdef inline TokenC* get_s2(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 # <<<<<<<<<<<<<< - * return s2[0] + * return &s.sent[s.stack[-2]] # <<<<<<<<<<<<<< * + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil */ - __pyx_v_s2 = (__pyx_v_s->stack - 2); - - /* "spacy/syntax/_state.pxd":59 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 - * return s2[0] # <<<<<<<<<<<<<< - * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil - */ - __pyx_r = (__pyx_v_s2[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-2])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":56 + /* "spacy/syntax/_state.pxd":58 * * * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-2]] */ /* function exit code */ @@ -3782,8 +3648,8 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":64 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil +/* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -3793,7 +3659,7 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":65 + /* "spacy/syntax/_state.pxd":67 * * cdef inline bint at_eol(const State *s) nogil: * return s.i >= s.sent_len # <<<<<<<<<<<<<< @@ -3803,8 +3669,8 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s __pyx_r = (__pyx_v_s->i >= __pyx_v_s->sent_len); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":64 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil + /* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -3816,7 +3682,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s return __pyx_r; } -/* "spacy/syntax/_state.pxd":68 +/* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -3827,7 +3693,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":69 + /* "spacy/syntax/_state.pxd":71 * * cdef inline bint is_final(const State *s) nogil: * return at_eol(s) # The stack will be attached to root anyway # <<<<<<<<<<<<<< @@ -3837,7 +3703,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ __pyx_r = __pyx_f_5spacy_6syntax_6_state_at_eol(__pyx_v_s); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":68 + /* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -3850,7 +3716,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ return __pyx_r; } -/* "spacy/syntax/_state.pxd":81 +/* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -3858,52 +3724,74 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ * for i in range(32): */ -static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, CYTHON_UNUSED int __pyx_v_n) { +static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, int __pyx_v_n) { int __pyx_v_i; uint32_t __pyx_r; int __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pxd":83 + /* "spacy/syntax/_state.pxd":85 * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: * cdef int i * for i in range(32): # <<<<<<<<<<<<<< * if bits & (1 << i): - * return i + * n -= 1 */ for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; - /* "spacy/syntax/_state.pxd":84 + /* "spacy/syntax/_state.pxd":86 * cdef int i * for i in range(32): * if bits & (1 << i): # <<<<<<<<<<<<<< - * return i - * return 0 + * n -= 1 + * if n < 1: */ __pyx_t_2 = ((__pyx_v_bits & (1 << __pyx_v_i)) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pxd":85 + /* "spacy/syntax/_state.pxd":87 * for i in range(32): * if bits & (1 << i): - * return i # <<<<<<<<<<<<<< + * n -= 1 # <<<<<<<<<<<<<< + * if n < 1: + * return i + */ + __pyx_v_n = (__pyx_v_n - 1); + + /* "spacy/syntax/_state.pxd":88 + * if bits & (1 << i): + * n -= 1 + * if n < 1: # <<<<<<<<<<<<<< + * return i * return 0 */ - __pyx_r = __pyx_v_i; - goto __pyx_L0; + __pyx_t_2 = ((__pyx_v_n < 1) != 0); + if (__pyx_t_2) { + + /* "spacy/syntax/_state.pxd":89 + * n -= 1 + * if n < 1: + * return i # <<<<<<<<<<<<<< + * return 0 + */ + __pyx_r = __pyx_v_i; + goto __pyx_L0; + } + goto __pyx_L5; } + __pyx_L5:; } - /* "spacy/syntax/_state.pxd":86 - * if bits & (1 << i): - * return i + /* "spacy/syntax/_state.pxd":90 + * if n < 1: + * return i * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; - /* "spacy/syntax/_state.pxd":81 + /* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -6310,7 +6198,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; @@ -6482,15 +6370,15 @@ PyMODINIT_FUNC PyInit__state(void) /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ - if (__Pyx_ExportFunction("add_dep", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_add_dep, "int (struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("pop_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_pop_stack, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("add_dep", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_add_dep, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , int const , int const )") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("pop_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_pop_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("push_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_push_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("get_right", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_get_right, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("get_left", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_get_left, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("children_in_buffer", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_children_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("head_in_buffer", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_head_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("children_in_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_children_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ExportFunction("head_in_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_head_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("get_right", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_get_right, "struct __pyx_t_5spacy_6tokens_TokenC const *(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const )") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("get_left", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_get_left, "struct __pyx_t_5spacy_6tokens_TokenC const *(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, int const )") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("children_in_buffer", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_children_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("head_in_buffer", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_head_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("children_in_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_children_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ExportFunction("head_in_stack", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_head_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ExportFunction("init_state", (void (*)(void))__pyx_f_5spacy_6syntax_6_state_init_state, "struct __pyx_t_5spacy_6syntax_6_state_State *(struct __pyx_obj_5cymem_5cymem_Pool *, struct __pyx_t_5spacy_6tokens_TokenC *, int const )") < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Type init code ---*/ /*--- Type import code ---*/ diff --git a/spacy/syntax/_state.pxd b/spacy/syntax/_state.pxd index a5532ac1a..595fd2289 100644 --- a/spacy/syntax/_state.pxd +++ b/spacy/syntax/_state.pxd @@ -7,15 +7,16 @@ from ..tokens cimport TokenC cdef struct State: TokenC* sent + int* stack int i int sent_len int stack_len -cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1 +cdef int add_dep(const State *s, const int head, const int child, const int label) except -1 -cdef TokenC* pop_stack(State *s) except NULL +cdef int pop_stack(State *s) except -1 cdef int push_stack(State *s) except -1 @@ -32,33 +33,35 @@ cdef inline TokenC* get_n0(const State* s) nogil: cdef inline TokenC* get_n1(const State* s) nogil: - if s.i < (s.sent_len - 1): - return &s.sent[s.i+1] + if (s.i+1) >= s.sent_len: + return NULL else: - return s.sent - 1 + return &s.sent[s.i+1] cdef inline TokenC* get_n2(const State* s) nogil: - return &s.sent[s.i+2] + if (s.i + 2) >= s.sent_len: + return NULL + else: + return &s.sent[s.i+2] cdef inline TokenC* get_s0(const State *s) nogil: - return s.stack[0] + return &s.sent[s.stack[0]] cdef inline TokenC* get_s1(const State *s) nogil: # Rely on our padding to ensure we don't go out of bounds here - cdef TokenC** s1 = s.stack - 1 - return s1[0] + return &s.sent[s.stack[-1]] cdef inline TokenC* get_s2(const State *s) nogil: # Rely on our padding to ensure we don't go out of bounds here - cdef TokenC** s2 = s.stack - 2 - return s2[0] + return &s.sent[s.stack[-2]] -cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil -cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil +cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil + +cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil cdef inline bint at_eol(const State *s) nogil: return s.i >= s.sent_len @@ -68,10 +71,10 @@ cdef inline bint is_final(const State *s) nogil: return at_eol(s) # The stack will be attached to root anyway -cdef int children_in_buffer(const State *s, const TokenC* target, list gold) except -1 -cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1 -cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1 -cdef int head_in_stack(const State *s, const TokenC*, list gold) except -1 +cdef int children_in_buffer(const State *s, const int head, list gold) except -1 +cdef int head_in_buffer(const State *s, const int child, list gold) except -1 +cdef int children_in_stack(const State *s, const int head, list gold) except -1 +cdef int head_in_stack(const State *s, const int child, list gold) except -1 cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL @@ -81,5 +84,7 @@ cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: cdef int i for i in range(32): if bits & (1 << i): - return i + n -= 1 + if n < 1: + return i return 0 diff --git a/spacy/syntax/_state.pyx b/spacy/syntax/_state.pyx index 9e38d24ba..bf978b7d4 100644 --- a/spacy/syntax/_state.pyx +++ b/spacy/syntax/_state.pyx @@ -5,104 +5,82 @@ from cymem.cymem cimport Pool from ..lexeme cimport EMPTY_LEXEME -cdef int add_dep(State *s, TokenC* head, TokenC* child, int label) except -1: - child.head = head - child - child.dep_tag = label +cdef int add_dep(State *s, int head, int child, int label) except -1: + s.sent[child].head = head - child + s.sent[child].dep_tag = label # Keep a bit-vector tracking child dependencies. If a word has a child at # offset i from it, set that bit (tracking left and right separately) if child > head: - head.r_kids |= 1 << child.head + s.sent[head].r_kids |= 1 << (-s.sent[child].head) else: - head.l_kids |= 1 << (-child.head) + s.sent[head].l_kids |= 1 << s.sent[child].head -cdef TokenC* pop_stack(State *s) except NULL: +cdef int pop_stack(State *s) except -1: assert s.stack_len >= 1 - cdef TokenC* top = s.stack[0] - s.stack -= 1 s.stack_len -= 1 - return top + s.stack -= 1 cdef int push_stack(State *s) except -1: assert s.i < s.sent_len s.stack += 1 - s.stack[0] = &s.sent[s.i] + s.stack[0] = s.i s.stack_len += 1 s.i += 1 -cdef int children_in_buffer(const State *s, const TokenC* target, list gold) except -1: +cdef int children_in_buffer(const State *s, int head, list gold) except -1: # Golds holds an array of head offsets --- the head of word i is i - golds[i] # Iterate over the tokens of the queue, and check whether their gold head is # our target cdef int i cdef int n = 0 - cdef TokenC* buff_word - cdef TokenC* buff_head - cdef int buff_word_head_offset for i in range(s.i, s.sent_len): - buff_word = &s.sent[i] - buff_word_head_offset = gold[i] - buff_head = buff_word + buff_word_head_offset - if buff_head == target: + if gold[i] == head: n += 1 return n -cdef int head_in_buffer(const State *s, const TokenC* target, list gold) except -1: - cdef int target_idx = get_idx(s, target) - cdef int target_head_idx = target_idx + gold[target_idx] - return target_head_idx >= s.i +cdef int head_in_buffer(const State *s, const int child, list gold) except -1: + return gold[child] >= s.i -cdef int children_in_stack(const State *s, const TokenC* target, list gold) except -1: - if s.stack_len == 0: - return 0 +cdef int children_in_stack(const State *s, const int head, list gold) except -1: cdef int i cdef int n = 0 - cdef const TokenC* stack_word - cdef const TokenC* stack_word_head - cdef int stack_word_head_offset for i in range(s.stack_len): - stack_word = (s.stack - i)[0] - stack_word_head_offset = gold[get_idx(s, stack_word)] - stack_word_head = (s.stack + stack_word_head_offset)[0] - if stack_word_head == target: + if gold[s.stack[-i]] == head: n += 1 return n -cdef int head_in_stack(const State *s, const TokenC* target, list gold) except -1: - if s.stack_len == 0: - return 0 - cdef int head_offset = gold[get_idx(s, target)] - cdef const TokenC* target_head = target + head_offset +cdef int head_in_stack(const State *s, const int child, list gold) except -1: cdef int i for i in range(s.stack_len): - if target_head == (s.stack - i)[0]: + if gold[child] == s.stack[-i]: return 1 return 0 -cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil: +cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil: cdef uint32_t kids = head.l_kids if kids == 0: - return s.sent - 1 + return NULL cdef int offset = _nth_significant_bit(kids, idx) - cdef TokenC* child = head - offset + cdef const TokenC* child = head - offset if child >= s.sent: return child else: return s.sent - 1 -cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil: +cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil: cdef uint32_t kids = head.r_kids if kids == 0: - return s.sent - 1 + return NULL cdef int offset = _nth_significant_bit(kids, idx) - cdef TokenC* child = head + offset + cdef const TokenC* child = head + offset if child < (s.sent + s.sent_len): return child else: @@ -115,13 +93,11 @@ DEF PADDING = 5 cdef State* init_state(Pool mem, TokenC* sent, const int sent_length) except NULL: cdef int padded_len = sent_length + PADDING + PADDING cdef State* s = mem.alloc(1, sizeof(State)) - s.stack = mem.alloc(padded_len, sizeof(TokenC*)) - cdef TokenC* eol_token = sent - 1 + s.stack = mem.alloc(padded_len, sizeof(int)) for i in range(PADDING): - # sent should be padded, with a suitable sentinel token here - s.stack[0] = eol_token - s.stack += 1 - s.stack[0] = eol_token + s.stack[i] = -1 + s.stack += (PADDING - 1) + assert s.stack[0] == -1 s.sent = sent s.stack_len = 0 s.i = 0 diff --git a/spacy/syntax/arc_eager.cpp b/spacy/syntax/arc_eager.cpp index fc27a5073..25a6c19e5 100644 --- a/spacy/syntax/arc_eager.cpp +++ b/spacy/syntax/arc_eager.cpp @@ -519,7 +519,7 @@ typedef uint32_t __pyx_t_5thinc_8typedefs_count_t; */ typedef uint32_t __pyx_t_5thinc_8typedefs_time_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":723 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":723 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -528,7 +528,7 @@ typedef uint32_t __pyx_t_5thinc_8typedefs_time_t; */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":724 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":724 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -537,7 +537,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":725 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -546,7 +546,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":726 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -555,7 +555,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":730 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":730 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -564,7 +564,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":731 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":731 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -573,7 +573,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":732 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -582,7 +582,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":733 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -591,7 +591,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":737 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":737 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -600,7 +600,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":738 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":738 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -609,7 +609,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":747 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":747 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -618,7 +618,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":748 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":748 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -627,7 +627,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":749 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -636,7 +636,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":751 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -645,7 +645,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":752 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":752 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -654,7 +654,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":753 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -663,7 +663,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":755 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -672,7 +672,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":756 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":756 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -681,7 +681,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":758 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -690,7 +690,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":759 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":759 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -699,7 +699,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":760 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -810,7 +810,7 @@ struct __pyx_obj_5spacy_6tokens_Tokens; struct __pyx_obj_5spacy_6tokens_Token; struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":762 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -819,7 +819,7 @@ struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":763 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":763 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -828,7 +828,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":764 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -837,7 +837,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":766 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1249,12 +1249,12 @@ struct __pyx_t_5spacy_6syntax_6_state_State; * * * cdef struct State: # <<<<<<<<<<<<<< - * TokenC** stack * TokenC* sent + * int* stack */ struct __pyx_t_5spacy_6syntax_6_state_State { - struct __pyx_t_5spacy_6tokens_TokenC **stack; struct __pyx_t_5spacy_6tokens_TokenC *sent; + int *stack; int i; int sent_len; int stack_len; @@ -1784,7 +1784,7 @@ struct __pyx_vtabstruct_5spacy_6tokens_Tokens { static struct __pyx_vtabstruct_5spacy_6tokens_Tokens *__pyx_vtabptr_5spacy_6tokens_Tokens; -/* "spacy/syntax/arc_eager.pyx":77 +/* "spacy/syntax/arc_eager.pyx":69 * * * cdef class TransitionSystem: # <<<<<<<<<<<<<< @@ -2392,8 +2392,8 @@ static PyTypeObject *__pyx_ptype_5spacy_6tokens_Tokens = 0; static PyTypeObject *__pyx_ptype_5spacy_6tokens_Token = 0; /* Module declarations from 'spacy.syntax._state' */ -static int (*__pyx_f_5spacy_6syntax_6_state_add_dep)(struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, struct __pyx_t_5spacy_6tokens_TokenC *, int); /*proto*/ -static struct __pyx_t_5spacy_6tokens_TokenC *(*__pyx_f_5spacy_6syntax_6_state_pop_stack)(struct __pyx_t_5spacy_6syntax_6_state_State *); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_add_dep)(struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , int const , int const ); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_pop_stack)(struct __pyx_t_5spacy_6syntax_6_state_State *); /*proto*/ static int (*__pyx_f_5spacy_6syntax_6_state_push_stack)(struct __pyx_t_5spacy_6syntax_6_state_State *); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_has_head(struct __pyx_t_5spacy_6tokens_TokenC const *); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_get_idx(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *); /*proto*/ @@ -2401,10 +2401,10 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_5spacy_6syntax_6_state_State const *); /*proto*/ -static int (*__pyx_f_5spacy_6syntax_6_state_children_in_buffer)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *); /*proto*/ -static int (*__pyx_f_5spacy_6syntax_6_state_head_in_buffer)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *); /*proto*/ -static int (*__pyx_f_5spacy_6syntax_6_state_children_in_stack)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *); /*proto*/ -static int (*__pyx_f_5spacy_6syntax_6_state_head_in_stack)(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_children_in_buffer)(struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_head_in_buffer)(struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_children_in_stack)(struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *); /*proto*/ +static int (*__pyx_f_5spacy_6syntax_6_state_head_in_stack)(struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *); /*proto*/ /* Module declarations from 'spacy.syntax.arc_eager' */ static PyTypeObject *__pyx_ptype_5spacy_6syntax_9arc_eager_TransitionSystem = 0; @@ -2416,7 +2416,6 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6syntax_6_state_State const *, PyObject *); /*proto*/ static int __pyx_f_5spacy_6syntax_9arc_eager__left_cost(struct __pyx_t_5spacy_6syntax_6_state_State const *, PyObject *); /*proto*/ static int __pyx_f_5spacy_6syntax_9arc_eager__reduce_cost(struct __pyx_t_5spacy_6syntax_6_state_State const *, PyObject *); /*proto*/ -static int __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "spacy.syntax.arc_eager" int __pyx_module_is_main_spacy__syntax__arc_eager = 0; @@ -2444,14 +2443,11 @@ static char __pyx_k_h[] = "h"; static char __pyx_k_i[] = "i"; static char __pyx_k_l[] = "l"; static char __pyx_k_q[] = "q"; -static char __pyx_k_N0[] = "N0:"; -static char __pyx_k_S0[] = "S0:"; static char __pyx_k_Zd[] = "Zd"; static char __pyx_k_Zf[] = "Zf"; static char __pyx_k_Zg[] = "Zg"; static char __pyx_k_end[] = "end"; static char __pyx_k_pop[] = "pop"; -static char __pyx_k_Head[] = "Head:"; static char __pyx_k_ROOT[] = "ROOT"; static char __pyx_k_file[] = "file"; static char __pyx_k_main[] = "__main__"; @@ -2459,10 +2455,6 @@ static char __pyx_k_test[] = "__test__"; static char __pyx_k_index[] = "index"; static char __pyx_k_print[] = "print"; static char __pyx_k_range[] = "range"; -static char __pyx_k_c_in_b[] = "c. in b."; -static char __pyx_k_c_in_s[] = "c. in s."; -static char __pyx_k_h_in_b[] = "h. in b."; -static char __pyx_k_h_in_s[] = "h. in s."; static char __pyx_k_import[] = "__import__"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; @@ -2480,21 +2472,14 @@ static char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran static char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; -static PyObject *__pyx_kp_s_Head; -static PyObject *__pyx_kp_s_N0; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_ROOT; static PyObject *__pyx_n_s_RuntimeError; -static PyObject *__pyx_kp_s_S0; static PyObject *__pyx_n_s_StandardError; static PyObject *__pyx_kp_s_Unknown_Move; static PyObject *__pyx_n_s_ValueError; -static PyObject *__pyx_kp_s_c_in_b; -static PyObject *__pyx_kp_s_c_in_s; static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_file; -static PyObject *__pyx_kp_s_h_in_b; -static PyObject *__pyx_kp_s_h_in_s; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_index; static PyObject *__pyx_n_s_left_labels; @@ -2716,7 +2701,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 * cdef int _shift_cost(const State* s, list gold) except -1: * assert not at_eol(s) # <<<<<<<<<<<<<< * cost = 0 - * cost += head_in_stack(s, get_n0(s), gold) + * cost += head_in_stack(s, s.i, gold) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { @@ -2731,8 +2716,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 * cdef int _shift_cost(const State* s, list gold) except -1: * assert not at_eol(s) * cost = 0 # <<<<<<<<<<<<<< - * cost += head_in_stack(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) + * cost += head_in_stack(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) */ __Pyx_INCREF(__pyx_int_0); __pyx_v_cost = __pyx_int_0; @@ -2740,11 +2725,11 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 /* "spacy/syntax/arc_eager.pyx":38 * assert not at_eol(s) * cost = 0 - * cost += head_in_stack(s, get_n0(s), gold) # <<<<<<<<<<<<<< - * cost += children_in_stack(s, get_n0(s), gold) + * cost += head_in_stack(s, s.i, gold) # <<<<<<<<<<<<<< + * cost += children_in_stack(s, s.i, gold) * return cost */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_v_s->i, __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2755,12 +2740,12 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 /* "spacy/syntax/arc_eager.pyx":39 * cost = 0 - * cost += head_in_stack(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) # <<<<<<<<<<<<<< + * cost += head_in_stack(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) # <<<<<<<<<<<<<< * return cost * */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_v_s->i, __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2770,8 +2755,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 __pyx_t_2 = 0; /* "spacy/syntax/arc_eager.pyx":40 - * cost += head_in_stack(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) + * cost += head_in_stack(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) * return cost # <<<<<<<<<<<<<< * * @@ -2806,18 +2791,18 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(struct __pyx_t_5spacy_6 * * cdef int _right_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< * assert s.stack_len >= 1 - * cdef int s0_idx = get_idx(s, get_s0(s)) + * cost = 0 */ static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, PyObject *__pyx_v_gold) { - CYTHON_UNUSED int __pyx_v_s0_idx; PyObject *__pyx_v_cost = NULL; int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -2829,8 +2814,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6 * * cdef int _right_cost(const State* s, list gold) except -1: * assert s.stack_len >= 1 # <<<<<<<<<<<<<< - * cdef int s0_idx = get_idx(s, get_s0(s)) * cost = 0 + * if gold[s.i] == s.stack[0]: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { @@ -2844,102 +2829,104 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6 /* "spacy/syntax/arc_eager.pyx":45 * cdef int _right_cost(const State* s, list gold) except -1: * assert s.stack_len >= 1 - * cdef int s0_idx = get_idx(s, get_s0(s)) # <<<<<<<<<<<<<< - * cost = 0 - * if _gold_dep(s, get_s0(s), get_n0(s), gold): - */ - __pyx_v_s0_idx = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s)); - - /* "spacy/syntax/arc_eager.pyx":46 - * assert s.stack_len >= 1 - * cdef int s0_idx = get_idx(s, get_s0(s)) * cost = 0 # <<<<<<<<<<<<<< - * if _gold_dep(s, get_s0(s), get_n0(s), gold): + * if gold[s.i] == s.stack[0]: * return cost */ __Pyx_INCREF(__pyx_int_0); __pyx_v_cost = __pyx_int_0; - /* "spacy/syntax/arc_eager.pyx":47 - * cdef int s0_idx = get_idx(s, get_s0(s)) + /* "spacy/syntax/arc_eager.pyx":46 + * assert s.stack_len >= 1 * cost = 0 - * if _gold_dep(s, get_s0(s), get_n0(s), gold): # <<<<<<<<<<<<<< + * if gold[s.i] == s.stack[0]: # <<<<<<<<<<<<<< * return cost - * cost += head_in_buffer(s, get_n0(s), gold) + * cost += head_in_buffer(s, s.i, gold) */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { + if (unlikely(__pyx_v_gold == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_s->stack[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { - /* "spacy/syntax/arc_eager.pyx":48 + /* "spacy/syntax/arc_eager.pyx":47 * cost = 0 - * if _gold_dep(s, get_s0(s), get_n0(s), gold): + * if gold[s.i] == s.stack[0]: * return cost # <<<<<<<<<<<<<< - * cost += head_in_buffer(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) + * cost += head_in_buffer(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_5; goto __pyx_L0; } - /* "spacy/syntax/arc_eager.pyx":49 - * if _gold_dep(s, get_s0(s), get_n0(s), gold): + /* "spacy/syntax/arc_eager.pyx":48 + * if gold[s.i] == s.stack[0]: * return cost - * cost += head_in_buffer(s, get_n0(s), gold) # <<<<<<<<<<<<<< - * cost += children_in_stack(s, get_n0(s), gold) - * cost += head_in_stack(s, get_n0(s), gold) + * cost += head_in_buffer(s, s.i, gold) # <<<<<<<<<<<<<< + * cost += children_in_stack(s, s.i, gold) + * cost += head_in_stack(s, s.i, gold) */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, __pyx_v_s->i, __pyx_v_gold); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_2); + __pyx_t_2 = 0; - /* "spacy/syntax/arc_eager.pyx":50 + /* "spacy/syntax/arc_eager.pyx":49 * return cost - * cost += head_in_buffer(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) # <<<<<<<<<<<<<< - * cost += head_in_stack(s, get_n0(s), gold) + * cost += head_in_buffer(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) # <<<<<<<<<<<<<< + * cost += head_in_stack(s, s.i, gold) * return cost */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_v_s->i, __pyx_v_gold); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_3); __pyx_t_3 = 0; - /* "spacy/syntax/arc_eager.pyx":51 - * cost += head_in_buffer(s, get_n0(s), gold) - * cost += children_in_stack(s, get_n0(s), gold) - * cost += head_in_stack(s, get_n0(s), gold) # <<<<<<<<<<<<<< + /* "spacy/syntax/arc_eager.pyx":50 + * cost += head_in_buffer(s, s.i, gold) + * cost += children_in_stack(s, s.i, gold) + * cost += head_in_stack(s, s.i, gold) # <<<<<<<<<<<<<< * return cost * */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_v_s->i, __pyx_v_gold); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_2); + __pyx_t_2 = 0; - /* "spacy/syntax/arc_eager.pyx":52 - * cost += children_in_stack(s, get_n0(s), gold) - * cost += head_in_stack(s, get_n0(s), gold) + /* "spacy/syntax/arc_eager.pyx":51 + * cost += children_in_stack(s, s.i, gold) + * cost += head_in_stack(s, s.i, gold) * return cost # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_5; goto __pyx_L0; /* "spacy/syntax/arc_eager.pyx":43 @@ -2947,13 +2934,14 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6 * * cdef int _right_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< * assert s.stack_len >= 1 - * cdef int s0_idx = get_idx(s, get_s0(s)) + * cost = 0 */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("spacy.syntax.arc_eager._right_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -2963,7 +2951,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__right_cost(struct __pyx_t_5spacy_6 return __pyx_r; } -/* "spacy/syntax/arc_eager.pyx":55 +/* "spacy/syntax/arc_eager.pyx":54 * * * cdef int _left_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< @@ -2975,110 +2963,122 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__left_cost(struct __pyx_t_5spacy_6s PyObject *__pyx_v_cost = NULL; int __pyx_r; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_left_cost", 0); - __Pyx_TraceCall("_left_cost", __pyx_f[0], 55); + __Pyx_TraceCall("_left_cost", __pyx_f[0], 54); - /* "spacy/syntax/arc_eager.pyx":56 + /* "spacy/syntax/arc_eager.pyx":55 * * cdef int _left_cost(const State* s, list gold) except -1: * assert s.stack_len >= 1 # <<<<<<<<<<<<<< * cost = 0 - * if _gold_dep(s, get_n0(s), get_s0(s), gold): + * if gold[s.stack[0]] == s.i: */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_s->stack_len >= 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "spacy/syntax/arc_eager.pyx":57 + /* "spacy/syntax/arc_eager.pyx":56 * cdef int _left_cost(const State* s, list gold) except -1: * assert s.stack_len >= 1 * cost = 0 # <<<<<<<<<<<<<< - * if _gold_dep(s, get_n0(s), get_s0(s), gold): + * if gold[s.stack[0]] == s.i: * return cost */ __Pyx_INCREF(__pyx_int_0); __pyx_v_cost = __pyx_int_0; - /* "spacy/syntax/arc_eager.pyx":58 + /* "spacy/syntax/arc_eager.pyx":57 * assert s.stack_len >= 1 * cost = 0 - * if _gold_dep(s, get_n0(s), get_s0(s), gold): # <<<<<<<<<<<<<< + * if gold[s.stack[0]] == s.i: # <<<<<<<<<<<<<< * return cost * */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { + if (unlikely(__pyx_v_gold == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold, (__pyx_v_s->stack[0]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_s->i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { - /* "spacy/syntax/arc_eager.pyx":59 + /* "spacy/syntax/arc_eager.pyx":58 * cost = 0 - * if _gold_dep(s, get_n0(s), get_s0(s), gold): + * if gold[s.stack[0]] == s.i: * return cost # <<<<<<<<<<<<<< * - * cost += head_in_buffer(s, get_s0(s), gold) + * cost += head_in_buffer(s, s.stack[0], gold) */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_5; goto __pyx_L0; } - /* "spacy/syntax/arc_eager.pyx":61 + /* "spacy/syntax/arc_eager.pyx":60 * return cost * - * cost += head_in_buffer(s, get_s0(s), gold) # <<<<<<<<<<<<<< - * cost += children_in_buffer(s, get_s0(s), gold) + * cost += head_in_buffer(s, s.stack[0], gold) # <<<<<<<<<<<<<< + * cost += children_in_buffer(s, s.stack[0], gold) * return cost */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_gold); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_2); + __pyx_t_2 = 0; - /* "spacy/syntax/arc_eager.pyx":62 + /* "spacy/syntax/arc_eager.pyx":61 * - * cost += head_in_buffer(s, get_s0(s), gold) - * cost += children_in_buffer(s, get_s0(s), gold) # <<<<<<<<<<<<<< + * cost += head_in_buffer(s, s.stack[0], gold) + * cost += children_in_buffer(s, s.stack[0], gold) # <<<<<<<<<<<<<< * return cost * */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_gold); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_cost, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_cost, __pyx_t_3); __pyx_t_3 = 0; - /* "spacy/syntax/arc_eager.pyx":63 - * cost += head_in_buffer(s, get_s0(s), gold) - * cost += children_in_buffer(s, get_s0(s), gold) + /* "spacy/syntax/arc_eager.pyx":62 + * cost += head_in_buffer(s, s.stack[0], gold) + * cost += children_in_buffer(s, s.stack[0], gold) * return cost # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_cost); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "spacy/syntax/arc_eager.pyx":55 + /* "spacy/syntax/arc_eager.pyx":54 * * * cdef int _left_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< @@ -3088,8 +3088,9 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__left_cost(struct __pyx_t_5spacy_6s /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("spacy.syntax.arc_eager._left_cost", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -3099,11 +3100,11 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__left_cost(struct __pyx_t_5spacy_6s return __pyx_r; } -/* "spacy/syntax/arc_eager.pyx":66 +/* "spacy/syntax/arc_eager.pyx":65 * * * cdef int _reduce_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< - * return children_in_buffer(s, get_s0(s), gold) + * return children_in_buffer(s, s.stack[0], gold) * */ @@ -3116,24 +3117,24 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__reduce_cost(struct __pyx_t_5spacy_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("_reduce_cost", 0); - __Pyx_TraceCall("_reduce_cost", __pyx_f[0], 66); - - /* "spacy/syntax/arc_eager.pyx":67 - * - * cdef int _reduce_cost(const State* s, list gold) except -1: - * return children_in_buffer(s, get_s0(s), gold) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = __pyx_t_1; - goto __pyx_L0; + __Pyx_TraceCall("_reduce_cost", __pyx_f[0], 65); /* "spacy/syntax/arc_eager.pyx":66 * + * cdef int _reduce_cost(const State* s, list gold) except -1: + * return children_in_buffer(s, s.stack[0], gold) # <<<<<<<<<<<<<< + * + * + */ + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_gold); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = __pyx_t_1; + goto __pyx_L0; + + /* "spacy/syntax/arc_eager.pyx":65 + * * * cdef int _reduce_cost(const State* s, list gold) except -1: # <<<<<<<<<<<<<< - * return children_in_buffer(s, get_s0(s), gold) + * return children_in_buffer(s, s.stack[0], gold) * */ @@ -3148,98 +3149,6 @@ static int __pyx_f_5spacy_6syntax_9arc_eager__reduce_cost(struct __pyx_t_5spacy_ } /* "spacy/syntax/arc_eager.pyx":70 - * - * - * cdef int _gold_dep(const State* s, const TokenC* head, const TokenC* child, # <<<<<<<<<<<<<< - * list gold_offsets) except -1: - * cdef int head_idx = get_idx(s, head) - */ - -static int __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_head, struct __pyx_t_5spacy_6tokens_TokenC const *__pyx_v_child, PyObject *__pyx_v_gold_offsets) { - int __pyx_v_head_idx; - int __pyx_v_child_idx; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_TraceDeclarations - __Pyx_RefNannySetupContext("_gold_dep", 0); - __Pyx_TraceCall("_gold_dep", __pyx_f[0], 70); - - /* "spacy/syntax/arc_eager.pyx":72 - * cdef int _gold_dep(const State* s, const TokenC* head, const TokenC* child, - * list gold_offsets) except -1: - * cdef int head_idx = get_idx(s, head) # <<<<<<<<<<<<<< - * cdef int child_idx = get_idx(s, child) - * return child_idx + gold_offsets[child_idx] == head_idx - */ - __pyx_v_head_idx = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_v_head); - - /* "spacy/syntax/arc_eager.pyx":73 - * list gold_offsets) except -1: - * cdef int head_idx = get_idx(s, head) - * cdef int child_idx = get_idx(s, child) # <<<<<<<<<<<<<< - * return child_idx + gold_offsets[child_idx] == head_idx - * - */ - __pyx_v_child_idx = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_v_child); - - /* "spacy/syntax/arc_eager.pyx":74 - * cdef int head_idx = get_idx(s, head) - * cdef int child_idx = get_idx(s, child) - * return child_idx + gold_offsets[child_idx] == head_idx # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_child_idx); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__pyx_v_gold_offsets == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_offsets, __pyx_v_child_idx, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_head_idx); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - goto __pyx_L0; - - /* "spacy/syntax/arc_eager.pyx":70 - * - * - * cdef int _gold_dep(const State* s, const TokenC* head, const TokenC* child, # <<<<<<<<<<<<<< - * list gold_offsets) except -1: - * cdef int head_idx = get_idx(s, head) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("spacy.syntax.arc_eager._gold_dep", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "spacy/syntax/arc_eager.pyx":78 * * cdef class TransitionSystem: * def __init__(self, list left_labels, list right_labels): # <<<<<<<<<<<<<< @@ -3278,11 +3187,11 @@ static int __pyx_pw_5spacy_6syntax_9arc_eager_16TransitionSystem_1__init__(PyObj case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_right_labels)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3295,14 +3204,14 @@ static int __pyx_pw_5spacy_6syntax_9arc_eager_16TransitionSystem_1__init__(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("spacy.syntax.arc_eager.TransitionSystem.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_labels), (&PyList_Type), 1, "left_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_labels), (&PyList_Type), 1, "right_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_left_labels), (&PyList_Type), 1, "left_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right_labels), (&PyList_Type), 1, "right_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(((struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self), __pyx_v_left_labels, __pyx_v_right_labels); /* function exit code */ @@ -3335,16 +3244,16 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 78); + __Pyx_TraceCall("__init__", __pyx_f[0], 70); - /* "spacy/syntax/arc_eager.pyx":79 + /* "spacy/syntax/arc_eager.pyx":71 * cdef class TransitionSystem: * def __init__(self, list left_labels, list right_labels): * self.mem = Pool() # <<<<<<<<<<<<<< * if 'ROOT' in right_labels: * right_labels.pop(right_labels.index('ROOT')) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->mem); @@ -3352,18 +3261,18 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct __pyx_v_self->mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/arc_eager.pyx":80 + /* "spacy/syntax/arc_eager.pyx":72 * def __init__(self, list left_labels, list right_labels): * self.mem = Pool() * if 'ROOT' in right_labels: # <<<<<<<<<<<<<< * right_labels.pop(right_labels.index('ROOT')) * if 'ROOT' in left_labels: */ - __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_n_s_ROOT, __pyx_v_right_labels, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_n_s_ROOT, __pyx_v_right_labels, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "spacy/syntax/arc_eager.pyx":81 + /* "spacy/syntax/arc_eager.pyx":73 * self.mem = Pool() * if 'ROOT' in right_labels: * right_labels.pop(right_labels.index('ROOT')) # <<<<<<<<<<<<<< @@ -3372,34 +3281,34 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_right_labels == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "pop"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_labels, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_right_labels, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyList_PopIndex(__pyx_v_right_labels, __pyx_t_5, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyList_PopIndex(__pyx_v_right_labels, __pyx_t_5, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; - /* "spacy/syntax/arc_eager.pyx":82 + /* "spacy/syntax/arc_eager.pyx":74 * if 'ROOT' in right_labels: * right_labels.pop(right_labels.index('ROOT')) * if 'ROOT' in left_labels: # <<<<<<<<<<<<<< * left_labels.pop(left_labels.index('ROOT')) * self.n_moves = 2 + len(left_labels) + len(right_labels) */ - __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_n_s_ROOT, __pyx_v_left_labels, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = (__Pyx_PySequence_Contains(__pyx_n_s_ROOT, __pyx_v_left_labels, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "spacy/syntax/arc_eager.pyx":83 + /* "spacy/syntax/arc_eager.pyx":75 * right_labels.pop(right_labels.index('ROOT')) * if 'ROOT' in left_labels: * left_labels.pop(left_labels.index('ROOT')) # <<<<<<<<<<<<<< @@ -3408,23 +3317,23 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_left_labels == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "pop"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_labels, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_left_labels, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_left_labels, __pyx_t_5, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_left_labels, __pyx_t_5, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4; } __pyx_L4:; - /* "spacy/syntax/arc_eager.pyx":84 + /* "spacy/syntax/arc_eager.pyx":76 * if 'ROOT' in left_labels: * left_labels.pop(left_labels.index('ROOT')) * self.n_moves = 2 + len(left_labels) + len(right_labels) # <<<<<<<<<<<<<< @@ -3433,27 +3342,27 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_left_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_left_labels); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_left_labels); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__pyx_v_right_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_6 = PyList_GET_SIZE(__pyx_v_right_labels); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_right_labels); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->n_moves = ((2 + __pyx_t_5) + __pyx_t_6); - /* "spacy/syntax/arc_eager.pyx":85 + /* "spacy/syntax/arc_eager.pyx":77 * left_labels.pop(left_labels.index('ROOT')) * self.n_moves = 2 + len(left_labels) + len(right_labels) * moves = self.mem.alloc(self.n_moves, sizeof(Transition)) # <<<<<<<<<<<<<< * cdef int i = 0 * moves[i].move = SHIFT */ - __pyx_t_7 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_self->mem->__pyx_vtab)->alloc(__pyx_v_self->mem, __pyx_v_self->n_moves, (sizeof(struct __pyx_t_5spacy_6syntax_9arc_eager_Transition))); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((struct __pyx_vtabstruct_5cymem_5cymem_Pool *)__pyx_v_self->mem->__pyx_vtab)->alloc(__pyx_v_self->mem, __pyx_v_self->n_moves, (sizeof(struct __pyx_t_5spacy_6syntax_9arc_eager_Transition))); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_moves = ((struct __pyx_t_5spacy_6syntax_9arc_eager_Transition *)__pyx_t_7); - /* "spacy/syntax/arc_eager.pyx":86 + /* "spacy/syntax/arc_eager.pyx":78 * self.n_moves = 2 + len(left_labels) + len(right_labels) * moves = self.mem.alloc(self.n_moves, sizeof(Transition)) * cdef int i = 0 # <<<<<<<<<<<<<< @@ -3462,7 +3371,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_i = 0; - /* "spacy/syntax/arc_eager.pyx":87 + /* "spacy/syntax/arc_eager.pyx":79 * moves = self.mem.alloc(self.n_moves, sizeof(Transition)) * cdef int i = 0 * moves[i].move = SHIFT # <<<<<<<<<<<<<< @@ -3471,7 +3380,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).move = __pyx_e_5spacy_6syntax_9arc_eager_SHIFT; - /* "spacy/syntax/arc_eager.pyx":88 + /* "spacy/syntax/arc_eager.pyx":80 * cdef int i = 0 * moves[i].move = SHIFT * moves[i].label = 0 # <<<<<<<<<<<<<< @@ -3480,7 +3389,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).label = 0; - /* "spacy/syntax/arc_eager.pyx":89 + /* "spacy/syntax/arc_eager.pyx":81 * moves[i].move = SHIFT * moves[i].label = 0 * i += 1 # <<<<<<<<<<<<<< @@ -3489,7 +3398,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "spacy/syntax/arc_eager.pyx":90 + /* "spacy/syntax/arc_eager.pyx":82 * moves[i].label = 0 * i += 1 * moves[i].move = REDUCE # <<<<<<<<<<<<<< @@ -3498,7 +3407,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).move = __pyx_e_5spacy_6syntax_9arc_eager_REDUCE; - /* "spacy/syntax/arc_eager.pyx":91 + /* "spacy/syntax/arc_eager.pyx":83 * i += 1 * moves[i].move = REDUCE * moves[i].label = 0 # <<<<<<<<<<<<<< @@ -3507,7 +3416,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).label = 0; - /* "spacy/syntax/arc_eager.pyx":92 + /* "spacy/syntax/arc_eager.pyx":84 * moves[i].move = REDUCE * moves[i].label = 0 * i += 1 # <<<<<<<<<<<<<< @@ -3516,23 +3425,23 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "spacy/syntax/arc_eager.pyx":93 + /* "spacy/syntax/arc_eager.pyx":85 * moves[i].label = 0 * i += 1 * self.label_ids = {'ROOT': 0} # <<<<<<<<<<<<<< * cdef int label_id * for label_str in left_labels: */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ROOT, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ROOT, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->label_ids); __Pyx_DECREF(__pyx_v_self->label_ids); __pyx_v_self->label_ids = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/arc_eager.pyx":95 + /* "spacy/syntax/arc_eager.pyx":87 * self.label_ids = {'ROOT': 0} * cdef int label_id * for label_str in left_labels: # <<<<<<<<<<<<<< @@ -3541,20 +3450,20 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_left_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_left_labels; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_label_str, __pyx_t_4); __pyx_t_4 = 0; - /* "spacy/syntax/arc_eager.pyx":96 + /* "spacy/syntax/arc_eager.pyx":88 * cdef int label_id * for label_str in left_labels: * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) # <<<<<<<<<<<<<< @@ -3563,26 +3472,26 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_self->label_ids == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "setdefault"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __pyx_v_self->label_ids; __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyDict_Size(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyDict_Size(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyDict_SetDefault(__pyx_v_self->label_ids, __pyx_v_label_str, __pyx_t_4, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyDict_SetDefault(__pyx_v_self->label_ids, __pyx_v_label_str, __pyx_t_4, -1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_label_id = __pyx_t_9; - /* "spacy/syntax/arc_eager.pyx":97 + /* "spacy/syntax/arc_eager.pyx":89 * for label_str in left_labels: * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) * moves[i].move = LEFT # <<<<<<<<<<<<<< @@ -3591,7 +3500,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).move = __pyx_e_5spacy_6syntax_9arc_eager_LEFT; - /* "spacy/syntax/arc_eager.pyx":98 + /* "spacy/syntax/arc_eager.pyx":90 * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) * moves[i].move = LEFT * moves[i].label = label_id # <<<<<<<<<<<<<< @@ -3600,7 +3509,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).label = __pyx_v_label_id; - /* "spacy/syntax/arc_eager.pyx":99 + /* "spacy/syntax/arc_eager.pyx":91 * moves[i].move = LEFT * moves[i].label = label_id * i += 1 # <<<<<<<<<<<<<< @@ -3609,7 +3518,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "spacy/syntax/arc_eager.pyx":95 + /* "spacy/syntax/arc_eager.pyx":87 * self.label_ids = {'ROOT': 0} * cdef int label_id * for label_str in left_labels: # <<<<<<<<<<<<<< @@ -3619,7 +3528,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/arc_eager.pyx":100 + /* "spacy/syntax/arc_eager.pyx":92 * moves[i].label = label_id * i += 1 * for label_str in right_labels: # <<<<<<<<<<<<<< @@ -3628,20 +3537,20 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_right_labels == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_v_right_labels; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_label_str, __pyx_t_8); __pyx_t_8 = 0; - /* "spacy/syntax/arc_eager.pyx":101 + /* "spacy/syntax/arc_eager.pyx":93 * i += 1 * for label_str in right_labels: * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) # <<<<<<<<<<<<<< @@ -3650,26 +3559,26 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ if (unlikely(__pyx_v_self->label_ids == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "setdefault"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = __pyx_v_self->label_ids; __Pyx_INCREF(__pyx_t_8); if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = PyDict_Size(__pyx_t_8); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyDict_Size(__pyx_t_8); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyDict_SetDefault(__pyx_v_self->label_ids, __pyx_v_label_str, __pyx_t_8, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyDict_SetDefault(__pyx_v_self->label_ids, __pyx_v_label_str, __pyx_t_8, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_label_id = __pyx_t_9; - /* "spacy/syntax/arc_eager.pyx":102 + /* "spacy/syntax/arc_eager.pyx":94 * for label_str in right_labels: * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) * moves[i].move = RIGHT # <<<<<<<<<<<<<< @@ -3678,7 +3587,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).move = __pyx_e_5spacy_6syntax_9arc_eager_RIGHT; - /* "spacy/syntax/arc_eager.pyx":103 + /* "spacy/syntax/arc_eager.pyx":95 * label_id = self.label_ids.setdefault(label_str, len(self.label_ids)) * moves[i].move = RIGHT * moves[i].label = label_id # <<<<<<<<<<<<<< @@ -3687,7 +3596,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ (__pyx_v_moves[__pyx_v_i]).label = __pyx_v_label_id; - /* "spacy/syntax/arc_eager.pyx":104 + /* "spacy/syntax/arc_eager.pyx":96 * moves[i].move = RIGHT * moves[i].label = label_id * i += 1 # <<<<<<<<<<<<<< @@ -3696,7 +3605,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "spacy/syntax/arc_eager.pyx":100 + /* "spacy/syntax/arc_eager.pyx":92 * moves[i].label = label_id * i += 1 * for label_str in right_labels: # <<<<<<<<<<<<<< @@ -3706,7 +3615,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/arc_eager.pyx":105 + /* "spacy/syntax/arc_eager.pyx":97 * moves[i].label = label_id * i += 1 * self._moves = moves # <<<<<<<<<<<<<< @@ -3715,7 +3624,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct */ __pyx_v_self->_moves = __pyx_v_moves; - /* "spacy/syntax/arc_eager.pyx":78 + /* "spacy/syntax/arc_eager.pyx":70 * * cdef class TransitionSystem: * def __init__(self, list left_labels, list right_labels): # <<<<<<<<<<<<<< @@ -3739,7 +3648,7 @@ static int __pyx_pf_5spacy_6syntax_9arc_eager_16TransitionSystem___init__(struct return __pyx_r; } -/* "spacy/syntax/arc_eager.pyx":107 +/* "spacy/syntax/arc_eager.pyx":99 * self._moves = moves * * cdef int transition(self, State *s, const int clas) except -1: # <<<<<<<<<<<<<< @@ -3752,17 +3661,16 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("transition", 0); - __Pyx_TraceCall("transition", __pyx_f[0], 107); + __Pyx_TraceCall("transition", __pyx_f[0], 99); - /* "spacy/syntax/arc_eager.pyx":108 + /* "spacy/syntax/arc_eager.pyx":100 * * cdef int transition(self, State *s, const int clas) except -1: * cdef const Transition* t = &self._moves[clas] # <<<<<<<<<<<<<< @@ -3771,8 +3679,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc */ __pyx_v_t = (&(__pyx_v_self->_moves[__pyx_v_clas])); - /* "spacy/syntax/arc_eager.pyx":117 - * add_dep(s, get_s0(s), get_n0(s), t.label) + /* "spacy/syntax/arc_eager.pyx":109 + * add_dep(s, s.stack[0], s.i, t.label) * push_stack(s) * elif t.move == REDUCE: # <<<<<<<<<<<<<< * pop_stack(s) @@ -3780,7 +3688,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc */ switch (__pyx_v_t->move) { - /* "spacy/syntax/arc_eager.pyx":109 + /* "spacy/syntax/arc_eager.pyx":101 * cdef int transition(self, State *s, const int clas) except -1: * cdef const Transition* t = &self._moves[clas] * if t.move == SHIFT: # <<<<<<<<<<<<<< @@ -3789,74 +3697,74 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc */ case __pyx_e_5spacy_6syntax_9arc_eager_SHIFT: - /* "spacy/syntax/arc_eager.pyx":110 + /* "spacy/syntax/arc_eager.pyx":102 * cdef const Transition* t = &self._moves[clas] * if t.move == SHIFT: * push_stack(s) # <<<<<<<<<<<<<< * elif t.move == LEFT: - * add_dep(s, get_n0(s), get_s0(s), t.label) + * add_dep(s, s.i, s.stack[0], t.label) */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_push_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_push_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; - /* "spacy/syntax/arc_eager.pyx":111 + /* "spacy/syntax/arc_eager.pyx":103 * if t.move == SHIFT: * push_stack(s) * elif t.move == LEFT: # <<<<<<<<<<<<<< - * add_dep(s, get_n0(s), get_s0(s), t.label) + * add_dep(s, s.i, s.stack[0], t.label) * pop_stack(s) */ case __pyx_e_5spacy_6syntax_9arc_eager_LEFT: - /* "spacy/syntax/arc_eager.pyx":112 + /* "spacy/syntax/arc_eager.pyx":104 * push_stack(s) * elif t.move == LEFT: - * add_dep(s, get_n0(s), get_s0(s), t.label) # <<<<<<<<<<<<<< + * add_dep(s, s.i, s.stack[0], t.label) # <<<<<<<<<<<<<< * pop_stack(s) * elif t.move == RIGHT: */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_add_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_t->label); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_add_dep(__pyx_v_s, __pyx_v_s->i, (__pyx_v_s->stack[0]), __pyx_v_t->label); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/arc_eager.pyx":113 + /* "spacy/syntax/arc_eager.pyx":105 * elif t.move == LEFT: - * add_dep(s, get_n0(s), get_s0(s), t.label) + * add_dep(s, s.i, s.stack[0], t.label) * pop_stack(s) # <<<<<<<<<<<<<< * elif t.move == RIGHT: - * add_dep(s, get_s0(s), get_n0(s), t.label) + * add_dep(s, s.stack[0], s.i, t.label) */ - __pyx_t_2 = __pyx_f_5spacy_6syntax_6_state_pop_stack(__pyx_v_s); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_pop_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; - /* "spacy/syntax/arc_eager.pyx":114 - * add_dep(s, get_n0(s), get_s0(s), t.label) + /* "spacy/syntax/arc_eager.pyx":106 + * add_dep(s, s.i, s.stack[0], t.label) * pop_stack(s) * elif t.move == RIGHT: # <<<<<<<<<<<<<< - * add_dep(s, get_s0(s), get_n0(s), t.label) + * add_dep(s, s.stack[0], s.i, t.label) * push_stack(s) */ case __pyx_e_5spacy_6syntax_9arc_eager_RIGHT: - /* "spacy/syntax/arc_eager.pyx":115 + /* "spacy/syntax/arc_eager.pyx":107 * pop_stack(s) * elif t.move == RIGHT: - * add_dep(s, get_s0(s), get_n0(s), t.label) # <<<<<<<<<<<<<< + * add_dep(s, s.stack[0], s.i, t.label) # <<<<<<<<<<<<<< * push_stack(s) * elif t.move == REDUCE: */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_add_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_t->label); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_add_dep(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_s->i, __pyx_v_t->label); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/arc_eager.pyx":116 + /* "spacy/syntax/arc_eager.pyx":108 * elif t.move == RIGHT: - * add_dep(s, get_s0(s), get_n0(s), t.label) + * add_dep(s, s.stack[0], s.i, t.label) * push_stack(s) # <<<<<<<<<<<<<< * elif t.move == REDUCE: * pop_stack(s) */ - __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_push_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_push_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; - /* "spacy/syntax/arc_eager.pyx":117 - * add_dep(s, get_s0(s), get_n0(s), t.label) + /* "spacy/syntax/arc_eager.pyx":109 + * add_dep(s, s.stack[0], s.i, t.label) * push_stack(s) * elif t.move == REDUCE: # <<<<<<<<<<<<<< * pop_stack(s) @@ -3864,41 +3772,41 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc */ case __pyx_e_5spacy_6syntax_9arc_eager_REDUCE: - /* "spacy/syntax/arc_eager.pyx":118 + /* "spacy/syntax/arc_eager.pyx":110 * push_stack(s) * elif t.move == REDUCE: * pop_stack(s) # <<<<<<<<<<<<<< * else: * raise StandardError(t.move) */ - __pyx_t_2 = __pyx_f_5spacy_6syntax_6_state_pop_stack(__pyx_v_s); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6_state_pop_stack(__pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; default: - /* "spacy/syntax/arc_eager.pyx":120 + /* "spacy/syntax/arc_eager.pyx":112 * pop_stack(s) * else: * raise StandardError(t.move) # <<<<<<<<<<<<<< * * cdef int best_valid(self, const weight_t* scores, const State* s) except -1: */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t->move); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_t->move); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_StandardError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_StandardError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_Raise(__pyx_t_2, 0, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - /* "spacy/syntax/arc_eager.pyx":107 + /* "spacy/syntax/arc_eager.pyx":99 * self._moves = moves * * cdef int transition(self, State *s, const int clas) except -1: # <<<<<<<<<<<<<< @@ -3910,8 +3818,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("spacy.syntax.arc_eager.TransitionSystem.transition", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -3920,7 +3828,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition(struc return __pyx_r; } -/* "spacy/syntax/arc_eager.pyx":122 +/* "spacy/syntax/arc_eager.pyx":114 * raise StandardError(t.move) * * cdef int best_valid(self, const weight_t* scores, const State* s) except -1: # <<<<<<<<<<<<<< @@ -3941,9 +3849,9 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc int __pyx_t_4; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("best_valid", 0); - __Pyx_TraceCall("best_valid", __pyx_f[0], 122); + __Pyx_TraceCall("best_valid", __pyx_f[0], 114); - /* "spacy/syntax/arc_eager.pyx":124 + /* "spacy/syntax/arc_eager.pyx":116 * cdef int best_valid(self, const weight_t* scores, const State* s) except -1: * cdef bint[N_MOVES] valid * valid[SHIFT] = _can_shift(s) # <<<<<<<<<<<<<< @@ -3952,7 +3860,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ (__pyx_v_valid[__pyx_e_5spacy_6syntax_9arc_eager_SHIFT]) = __pyx_f_5spacy_6syntax_9arc_eager__can_shift(__pyx_v_s); - /* "spacy/syntax/arc_eager.pyx":125 + /* "spacy/syntax/arc_eager.pyx":117 * cdef bint[N_MOVES] valid * valid[SHIFT] = _can_shift(s) * valid[LEFT] = _can_left(s) # <<<<<<<<<<<<<< @@ -3961,7 +3869,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ (__pyx_v_valid[__pyx_e_5spacy_6syntax_9arc_eager_LEFT]) = __pyx_f_5spacy_6syntax_9arc_eager__can_left(__pyx_v_s); - /* "spacy/syntax/arc_eager.pyx":126 + /* "spacy/syntax/arc_eager.pyx":118 * valid[SHIFT] = _can_shift(s) * valid[LEFT] = _can_left(s) * valid[RIGHT] = _can_right(s) # <<<<<<<<<<<<<< @@ -3970,7 +3878,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ (__pyx_v_valid[__pyx_e_5spacy_6syntax_9arc_eager_RIGHT]) = __pyx_f_5spacy_6syntax_9arc_eager__can_right(__pyx_v_s); - /* "spacy/syntax/arc_eager.pyx":127 + /* "spacy/syntax/arc_eager.pyx":119 * valid[LEFT] = _can_left(s) * valid[RIGHT] = _can_right(s) * valid[REDUCE] = _can_reduce(s) # <<<<<<<<<<<<<< @@ -3979,7 +3887,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ (__pyx_v_valid[__pyx_e_5spacy_6syntax_9arc_eager_REDUCE]) = __pyx_f_5spacy_6syntax_9arc_eager__can_reduce(__pyx_v_s); - /* "spacy/syntax/arc_eager.pyx":129 + /* "spacy/syntax/arc_eager.pyx":121 * valid[REDUCE] = _can_reduce(s) * * cdef int best = -1 # <<<<<<<<<<<<<< @@ -3988,7 +3896,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ __pyx_v_best = -1; - /* "spacy/syntax/arc_eager.pyx":130 + /* "spacy/syntax/arc_eager.pyx":122 * * cdef int best = -1 * cdef weight_t score = -90000 # <<<<<<<<<<<<<< @@ -3997,7 +3905,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ __pyx_v_score = -90000.0; - /* "spacy/syntax/arc_eager.pyx":132 + /* "spacy/syntax/arc_eager.pyx":124 * cdef weight_t score = -90000 * cdef int i * for i in range(self.n_moves): # <<<<<<<<<<<<<< @@ -4008,7 +3916,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "spacy/syntax/arc_eager.pyx":133 + /* "spacy/syntax/arc_eager.pyx":125 * cdef int i * for i in range(self.n_moves): * if valid[self._moves[i].move] and scores[i] > score: # <<<<<<<<<<<<<< @@ -4026,7 +3934,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc __pyx_L6_bool_binop_done:; if (__pyx_t_3) { - /* "spacy/syntax/arc_eager.pyx":134 + /* "spacy/syntax/arc_eager.pyx":126 * for i in range(self.n_moves): * if valid[self._moves[i].move] and scores[i] > score: * best = i # <<<<<<<<<<<<<< @@ -4035,7 +3943,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc */ __pyx_v_best = __pyx_v_i; - /* "spacy/syntax/arc_eager.pyx":135 + /* "spacy/syntax/arc_eager.pyx":127 * if valid[self._moves[i].move] and scores[i] > score: * best = i * score = scores[i] # <<<<<<<<<<<<<< @@ -4048,7 +3956,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc __pyx_L5:; } - /* "spacy/syntax/arc_eager.pyx":136 + /* "spacy/syntax/arc_eager.pyx":128 * best = i * score = scores[i] * return best # <<<<<<<<<<<<<< @@ -4058,7 +3966,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc __pyx_r = __pyx_v_best; goto __pyx_L0; - /* "spacy/syntax/arc_eager.pyx":122 + /* "spacy/syntax/arc_eager.pyx":114 * raise StandardError(t.move) * * cdef int best_valid(self, const weight_t* scores, const State* s) except -1: # <<<<<<<<<<<<<< @@ -4073,7 +3981,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid(struc return __pyx_r; } -/* "spacy/syntax/arc_eager.pyx":138 +/* "spacy/syntax/arc_eager.pyx":130 * return best * * cdef int best_gold(self, const weight_t* scores, const State* s, # <<<<<<<<<<<<<< @@ -4102,50 +4010,52 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("best_gold", 0); - __Pyx_TraceCall("best_gold", __pyx_f[0], 138); + __Pyx_TraceCall("best_gold", __pyx_f[0], 130); - /* "spacy/syntax/arc_eager.pyx":140 + /* "spacy/syntax/arc_eager.pyx":132 * cdef int best_gold(self, const weight_t* scores, const State* s, * list gold_heads, list label_strings) except -1: * gold_labels = [self.label_ids[label_str] for label_str in label_strings] # <<<<<<<<<<<<<< * cdef int[N_MOVES] unl_costs * unl_costs[SHIFT] = _shift_cost(s, gold_heads) if _can_shift(s) else -1 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_label_strings == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = __pyx_v_label_strings; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XDECREF_SET(__pyx_v_label_str, __pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_v_self->label_ids == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->label_ids, __pyx_v_label_str); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->label_ids, __pyx_v_label_str); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_gold_labels = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/arc_eager.pyx":142 + /* "spacy/syntax/arc_eager.pyx":134 * gold_labels = [self.label_ids[label_str] for label_str in label_strings] * cdef int[N_MOVES] unl_costs * unl_costs[SHIFT] = _shift_cost(s, gold_heads) if _can_shift(s) else -1 # <<<<<<<<<<<<<< @@ -4153,14 +4063,14 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct * unl_costs[RIGHT] = _right_cost(s, gold_heads) if _can_right(s) else -1 */ if ((__pyx_f_5spacy_6syntax_9arc_eager__can_shift(__pyx_v_s) != 0)) { - __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__shift_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = -1; } (__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_SHIFT]) = __pyx_t_5; - /* "spacy/syntax/arc_eager.pyx":143 + /* "spacy/syntax/arc_eager.pyx":135 * cdef int[N_MOVES] unl_costs * unl_costs[SHIFT] = _shift_cost(s, gold_heads) if _can_shift(s) else -1 * unl_costs[LEFT] = _left_cost(s, gold_heads) if _can_left(s) else -1 # <<<<<<<<<<<<<< @@ -4168,14 +4078,14 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct * unl_costs[REDUCE] = _reduce_cost(s, gold_heads) if _can_reduce(s) else -1 */ if ((__pyx_f_5spacy_6syntax_9arc_eager__can_left(__pyx_v_s) != 0)) { - __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__left_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__left_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = -1; } (__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_LEFT]) = __pyx_t_5; - /* "spacy/syntax/arc_eager.pyx":144 + /* "spacy/syntax/arc_eager.pyx":136 * unl_costs[SHIFT] = _shift_cost(s, gold_heads) if _can_shift(s) else -1 * unl_costs[LEFT] = _left_cost(s, gold_heads) if _can_left(s) else -1 * unl_costs[RIGHT] = _right_cost(s, gold_heads) if _can_right(s) else -1 # <<<<<<<<<<<<<< @@ -4183,14 +4093,14 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct * */ if ((__pyx_f_5spacy_6syntax_9arc_eager__can_right(__pyx_v_s) != 0)) { - __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__right_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__right_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = -1; } (__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_RIGHT]) = __pyx_t_5; - /* "spacy/syntax/arc_eager.pyx":145 + /* "spacy/syntax/arc_eager.pyx":137 * unl_costs[LEFT] = _left_cost(s, gold_heads) if _can_left(s) else -1 * unl_costs[RIGHT] = _right_cost(s, gold_heads) if _can_right(s) else -1 * unl_costs[REDUCE] = _reduce_cost(s, gold_heads) if _can_reduce(s) else -1 # <<<<<<<<<<<<<< @@ -4198,14 +4108,14 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct * cdef int cost */ if ((__pyx_f_5spacy_6syntax_9arc_eager__can_reduce(__pyx_v_s) != 0)) { - __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__reduce_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_5spacy_6syntax_9arc_eager__reduce_cost(__pyx_v_s, __pyx_v_gold_heads); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = -1; } (__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_REDUCE]) = __pyx_t_5; - /* "spacy/syntax/arc_eager.pyx":150 + /* "spacy/syntax/arc_eager.pyx":142 * cdef int move * cdef int label * cdef int best = -1 # <<<<<<<<<<<<<< @@ -4214,7 +4124,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct */ __pyx_v_best = -1; - /* "spacy/syntax/arc_eager.pyx":151 + /* "spacy/syntax/arc_eager.pyx":143 * cdef int label * cdef int best = -1 * cdef weight_t score = -9000 # <<<<<<<<<<<<<< @@ -4223,7 +4133,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct */ __pyx_v_score = -9000.0; - /* "spacy/syntax/arc_eager.pyx":153 + /* "spacy/syntax/arc_eager.pyx":145 * cdef weight_t score = -9000 * cdef int i * for i in range(self.n_moves): # <<<<<<<<<<<<<< @@ -4234,7 +4144,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "spacy/syntax/arc_eager.pyx":154 + /* "spacy/syntax/arc_eager.pyx":146 * cdef int i * for i in range(self.n_moves): * move = self._moves[i].move # <<<<<<<<<<<<<< @@ -4244,7 +4154,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __pyx_t_7 = (__pyx_v_self->_moves[__pyx_v_i]).move; __pyx_v_move = __pyx_t_7; - /* "spacy/syntax/arc_eager.pyx":155 + /* "spacy/syntax/arc_eager.pyx":147 * for i in range(self.n_moves): * move = self._moves[i].move * label = self._moves[i].label # <<<<<<<<<<<<<< @@ -4254,7 +4164,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __pyx_t_7 = (__pyx_v_self->_moves[__pyx_v_i]).label; __pyx_v_label = __pyx_t_7; - /* "spacy/syntax/arc_eager.pyx":156 + /* "spacy/syntax/arc_eager.pyx":148 * move = self._moves[i].move * label = self._moves[i].label * if unl_costs[move] == 0: # <<<<<<<<<<<<<< @@ -4264,16 +4174,16 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __pyx_t_8 = (((__pyx_v_unl_costs[__pyx_v_move]) == 0) != 0); if (__pyx_t_8) { - /* "spacy/syntax/arc_eager.pyx":164 + /* "spacy/syntax/arc_eager.pyx":156 * else: * cost = 0 * elif move == RIGHT: # <<<<<<<<<<<<<< - * if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): + * if gold_heads[s.i] == s.stack[0]: * cost = label != gold_labels[s.i] */ switch (__pyx_v_move) { - /* "spacy/syntax/arc_eager.pyx":157 + /* "spacy/syntax/arc_eager.pyx":149 * label = self._moves[i].label * if unl_costs[move] == 0: * if move == SHIFT or move == REDUCE: # <<<<<<<<<<<<<< @@ -4283,112 +4193,133 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct case __pyx_e_5spacy_6syntax_9arc_eager_SHIFT: case __pyx_e_5spacy_6syntax_9arc_eager_REDUCE: - /* "spacy/syntax/arc_eager.pyx":158 + /* "spacy/syntax/arc_eager.pyx":150 * if unl_costs[move] == 0: * if move == SHIFT or move == REDUCE: * cost = 0 # <<<<<<<<<<<<<< * elif move == LEFT: - * if _gold_dep(s, get_n0(s), get_s0(s), gold_heads): + * if gold_heads[s.stack[0]] == s.i: */ __pyx_v_cost = 0; break; - /* "spacy/syntax/arc_eager.pyx":159 + /* "spacy/syntax/arc_eager.pyx":151 * if move == SHIFT or move == REDUCE: * cost = 0 * elif move == LEFT: # <<<<<<<<<<<<<< - * if _gold_dep(s, get_n0(s), get_s0(s), gold_heads): - * cost = label != gold_labels[get_idx(s, get_s0(s))] + * if gold_heads[s.stack[0]] == s.i: + * cost = label != gold_labels[s.stack[0]] */ case __pyx_e_5spacy_6syntax_9arc_eager_LEFT: - /* "spacy/syntax/arc_eager.pyx":160 + /* "spacy/syntax/arc_eager.pyx":152 * cost = 0 * elif move == LEFT: - * if _gold_dep(s, get_n0(s), get_s0(s), gold_heads): # <<<<<<<<<<<<<< - * cost = label != gold_labels[get_idx(s, get_s0(s))] + * if gold_heads[s.stack[0]] == s.i: # <<<<<<<<<<<<<< + * cost = label != gold_labels[s.stack[0]] * else: */ - __pyx_t_7 = __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = (__pyx_t_7 != 0); + if (unlikely(__pyx_v_gold_heads == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, (__pyx_v_s->stack[0]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_s->i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { - /* "spacy/syntax/arc_eager.pyx":161 + /* "spacy/syntax/arc_eager.pyx":153 * elif move == LEFT: - * if _gold_dep(s, get_n0(s), get_s0(s), gold_heads): - * cost = label != gold_labels[get_idx(s, get_s0(s))] # <<<<<<<<<<<<<< + * if gold_heads[s.stack[0]] == s.i: + * cost = label != gold_labels[s.stack[0]] # <<<<<<<<<<<<<< * else: * cost = 0 */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_label); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s)); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, __pyx_t_7, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_label); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, (__pyx_v_s->stack[0]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cost = __pyx_t_7; goto __pyx_L8; } /*else*/ { - /* "spacy/syntax/arc_eager.pyx":163 - * cost = label != gold_labels[get_idx(s, get_s0(s))] + /* "spacy/syntax/arc_eager.pyx":155 + * cost = label != gold_labels[s.stack[0]] * else: * cost = 0 # <<<<<<<<<<<<<< * elif move == RIGHT: - * if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): + * if gold_heads[s.i] == s.stack[0]: */ __pyx_v_cost = 0; } __pyx_L8:; break; - /* "spacy/syntax/arc_eager.pyx":164 + /* "spacy/syntax/arc_eager.pyx":156 * else: * cost = 0 * elif move == RIGHT: # <<<<<<<<<<<<<< - * if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): + * if gold_heads[s.i] == s.stack[0]: * cost = label != gold_labels[s.i] */ case __pyx_e_5spacy_6syntax_9arc_eager_RIGHT: - /* "spacy/syntax/arc_eager.pyx":165 + /* "spacy/syntax/arc_eager.pyx":157 * cost = 0 * elif move == RIGHT: - * if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): # <<<<<<<<<<<<<< + * if gold_heads[s.i] == s.stack[0]: # <<<<<<<<<<<<<< * cost = label != gold_labels[s.i] * else: */ - __pyx_t_7 = __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = (__pyx_t_7 != 0); + if (unlikely(__pyx_v_gold_heads == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_s->stack[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_8) { - /* "spacy/syntax/arc_eager.pyx":166 + /* "spacy/syntax/arc_eager.pyx":158 * elif move == RIGHT: - * if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): + * if gold_heads[s.i] == s.stack[0]: * cost = label != gold_labels[s.i] # <<<<<<<<<<<<<< * else: * cost = 0 */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_label); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_label); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cost = __pyx_t_7; goto __pyx_L9; } /*else*/ { - /* "spacy/syntax/arc_eager.pyx":168 + /* "spacy/syntax/arc_eager.pyx":160 * cost = label != gold_labels[s.i] * else: * cost = 0 # <<<<<<<<<<<<<< @@ -4401,22 +4332,22 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct break; default: - /* "spacy/syntax/arc_eager.pyx":170 + /* "spacy/syntax/arc_eager.pyx":162 * cost = 0 * else: * raise StandardError("Unknown Move") # <<<<<<<<<<<<<< * if cost == 0 and (best == -1 or scores[i] > score): * best = i */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_StandardError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_StandardError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} break; } - /* "spacy/syntax/arc_eager.pyx":171 + /* "spacy/syntax/arc_eager.pyx":163 * else: * raise StandardError("Unknown Move") * if cost == 0 and (best == -1 or scores[i] > score): # <<<<<<<<<<<<<< @@ -4440,7 +4371,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __pyx_L11_bool_binop_done:; if (__pyx_t_8) { - /* "spacy/syntax/arc_eager.pyx":172 + /* "spacy/syntax/arc_eager.pyx":164 * raise StandardError("Unknown Move") * if cost == 0 and (best == -1 or scores[i] > score): * best = i # <<<<<<<<<<<<<< @@ -4449,7 +4380,7 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct */ __pyx_v_best = __pyx_v_i; - /* "spacy/syntax/arc_eager.pyx":173 + /* "spacy/syntax/arc_eager.pyx":165 * if cost == 0 and (best == -1 or scores[i] > score): * best = i * score = scores[i] # <<<<<<<<<<<<<< @@ -4465,360 +4396,193 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __pyx_L7:; } - /* "spacy/syntax/arc_eager.pyx":175 + /* "spacy/syntax/arc_eager.pyx":167 * score = scores[i] * * if best < 0: # <<<<<<<<<<<<<< - * for i in range(self.n_moves): - * if self._moves[i].move == LEFT: + * print unl_costs[SHIFT], unl_costs[REDUCE], unl_costs[LEFT], unl_costs[RIGHT] + * print s.stack_len */ __pyx_t_8 = ((__pyx_v_best < 0) != 0); if (__pyx_t_8) { - /* "spacy/syntax/arc_eager.pyx":176 + /* "spacy/syntax/arc_eager.pyx":168 * * if best < 0: - * for i in range(self.n_moves): # <<<<<<<<<<<<<< - * if self._moves[i].move == LEFT: - * print self._moves[i].label, + * print unl_costs[SHIFT], unl_costs[REDUCE], unl_costs[LEFT], unl_costs[RIGHT] # <<<<<<<<<<<<<< + * print s.stack_len + * print has_head(get_s0(s)) */ - __pyx_t_5 = __pyx_v_self->n_moves; - for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { - __pyx_v_i = __pyx_t_6; + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_SHIFT])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_REDUCE])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_LEFT])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_RIGHT])); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_4 = 0; + __pyx_t_10 = 0; + if (__Pyx_Print(0, __pyx_t_11, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":177 + /* "spacy/syntax/arc_eager.pyx":169 * if best < 0: - * for i in range(self.n_moves): - * if self._moves[i].move == LEFT: # <<<<<<<<<<<<<< - * print self._moves[i].label, - * print + * print unl_costs[SHIFT], unl_costs[REDUCE], unl_costs[LEFT], unl_costs[RIGHT] + * print s.stack_len # <<<<<<<<<<<<<< + * print has_head(get_s0(s)) + * print s.sent[s.stack[0]].head */ - __pyx_t_8 = (((__pyx_v_self->_moves[__pyx_v_i]).move == __pyx_e_5spacy_6syntax_9arc_eager_LEFT) != 0); - if (__pyx_t_8) { + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_s->stack_len); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":178 - * for i in range(self.n_moves): - * if self._moves[i].move == LEFT: - * print self._moves[i].label, # <<<<<<<<<<<<<< - * print - * print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":170 + * print unl_costs[SHIFT], unl_costs[REDUCE], unl_costs[LEFT], unl_costs[RIGHT] + * print s.stack_len + * print has_head(get_s0(s)) # <<<<<<<<<<<<<< + * print s.sent[s.stack[0]].head + * print s.stack[0], s.i */ - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_moves[__pyx_v_i]).label); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - goto __pyx_L17; - } - __pyx_L17:; - } + __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_f_5spacy_6syntax_6_state_has_head(__pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":179 - * if self._moves[i].move == LEFT: - * print self._moves[i].label, - * print # <<<<<<<<<<<<<< - * print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) - * print gold_labels[get_idx(s, get_s0(s))] + /* "spacy/syntax/arc_eager.pyx":171 + * print s.stack_len + * print has_head(get_s0(s)) + * print s.sent[s.stack[0]].head # <<<<<<<<<<<<<< + * print s.stack[0], s.i + * print gold_heads[s.stack[0]], gold_heads[s.i] */ - if (__Pyx_Print(0, __pyx_empty_tuple, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_s->sent[(__pyx_v_s->stack[0])]).head); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":180 - * print self._moves[i].label, - * print - * print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) # <<<<<<<<<<<<<< - * print gold_labels[get_idx(s, get_s0(s))] - * print unl_costs[LEFT] + /* "spacy/syntax/arc_eager.pyx":172 + * print has_head(get_s0(s)) + * print s.sent[s.stack[0]].head + * print s.stack[0], s.i # <<<<<<<<<<<<<< + * print gold_heads[s.stack[0]], gold_heads[s.i] + * print gold_labels[s.i] */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_9arc_eager__gold_dep(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_s->stack[0])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_s->i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); + __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_11 = 0; + __pyx_t_10 = 0; + if (__Pyx_Print(0, __pyx_t_4, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "spacy/syntax/arc_eager.pyx":181 - * print - * print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) - * print gold_labels[get_idx(s, get_s0(s))] # <<<<<<<<<<<<<< - * print unl_costs[LEFT] - * print "S0:" - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s)); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "spacy/syntax/arc_eager.pyx":182 - * print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) - * print gold_labels[get_idx(s, get_s0(s))] - * print unl_costs[LEFT] # <<<<<<<<<<<<<< - * print "S0:" - * print "Head:", gold_heads[get_idx(s, get_s0(s))] - */ - __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_unl_costs[__pyx_e_5spacy_6syntax_9arc_eager_LEFT])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PrintOne(0, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "spacy/syntax/arc_eager.pyx":183 - * print gold_labels[get_idx(s, get_s0(s))] - * print unl_costs[LEFT] - * print "S0:" # <<<<<<<<<<<<<< - * print "Head:", gold_heads[get_idx(s, get_s0(s))] - * print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) - */ - if (__Pyx_PrintOne(0, __pyx_kp_s_S0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "spacy/syntax/arc_eager.pyx":184 - * print unl_costs[LEFT] - * print "S0:" - * print "Head:", gold_heads[get_idx(s, get_s0(s))] # <<<<<<<<<<<<<< - * print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":173 + * print s.sent[s.stack[0]].head + * print s.stack[0], s.i + * print gold_heads[s.stack[0]], gold_heads[s.i] # <<<<<<<<<<<<<< + * print gold_labels[s.i] + * print children_in_buffer(s, s.stack[0], gold_heads) */ if (unlikely(__pyx_v_gold_heads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s)); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_kp_s_Head); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_Head); - __Pyx_GIVEREF(__pyx_kp_s_Head); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "spacy/syntax/arc_eager.pyx":185 - * print "S0:" - * print "Head:", gold_heads[get_idx(s, get_s0(s))] - * print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) # <<<<<<<<<<<<<< - * print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s_h_in_b); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_in_b); - __Pyx_GIVEREF(__pyx_kp_s_h_in_b); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "spacy/syntax/arc_eager.pyx":186 - * print "Head:", gold_heads[get_idx(s, get_s0(s))] - * print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) # <<<<<<<<<<<<<< - * print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_kp_s_c_in_b); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_c_in_b); - __Pyx_GIVEREF(__pyx_kp_s_c_in_b); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "spacy/syntax/arc_eager.pyx":187 - * print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) # <<<<<<<<<<<<<< - * print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) - * print "N0:" - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s_h_in_s); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_in_s); - __Pyx_GIVEREF(__pyx_kp_s_h_in_s); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "spacy/syntax/arc_eager.pyx":188 - * print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) # <<<<<<<<<<<<<< - * print "N0:" - * print "Head:", gold_heads[get_idx(s, get_n0(s))] - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_kp_s_c_in_s); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_c_in_s); - __Pyx_GIVEREF(__pyx_kp_s_c_in_s); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "spacy/syntax/arc_eager.pyx":189 - * print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) - * print "N0:" # <<<<<<<<<<<<<< - * print "Head:", gold_heads[get_idx(s, get_n0(s))] - * print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) - */ - if (__Pyx_PrintOne(0, __pyx_kp_s_N0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "spacy/syntax/arc_eager.pyx":190 - * print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) - * print "N0:" - * print "Head:", gold_heads[get_idx(s, get_n0(s))] # <<<<<<<<<<<<<< - * print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) - */ + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, (__pyx_v_s->stack[0]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_gold_heads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s)); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s_Head); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_Head); - __Pyx_GIVEREF(__pyx_kp_s_Head); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_10 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10); + __Pyx_GIVEREF(__pyx_t_10); + __pyx_t_4 = 0; + __pyx_t_10 = 0; + if (__Pyx_Print(0, __pyx_t_11, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":191 - * print "N0:" - * print "Head:", gold_heads[get_idx(s, get_n0(s))] - * print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) # <<<<<<<<<<<<<< - * print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":174 + * print s.stack[0], s.i + * print gold_heads[s.stack[0]], gold_heads[s.i] + * print gold_labels[s.i] # <<<<<<<<<<<<<< + * print children_in_buffer(s, s.stack[0], gold_heads) + * print head_in_buffer(s, s.stack[0], gold_heads) */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_kp_s_h_in_b); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_h_in_b); - __Pyx_GIVEREF(__pyx_kp_s_h_in_b); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_11 = __Pyx_GetItemInt_List(__pyx_v_gold_labels, __pyx_v_s->i, int const , 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":192 - * print "Head:", gold_heads[get_idx(s, get_n0(s))] - * print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) # <<<<<<<<<<<<<< - * print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) - */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s_c_in_b); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_c_in_b); - __Pyx_GIVEREF(__pyx_kp_s_c_in_b); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "spacy/syntax/arc_eager.pyx":193 - * print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) - * print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) # <<<<<<<<<<<<<< - * print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":175 + * print gold_heads[s.stack[0]], gold_heads[s.i] + * print gold_labels[s.i] + * print children_in_buffer(s, s.stack[0], gold_heads) # <<<<<<<<<<<<<< + * print head_in_buffer(s, s.stack[0], gold_heads) * raise StandardError */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_kp_s_h_in_s); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_h_in_s); - __Pyx_GIVEREF(__pyx_kp_s_h_in_s); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - if (__Pyx_Print(0, __pyx_t_1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_buffer(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":194 - * print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) - * print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) # <<<<<<<<<<<<<< + /* "spacy/syntax/arc_eager.pyx":176 + * print gold_labels[s.i] + * print children_in_buffer(s, s.stack[0], gold_heads) + * print head_in_buffer(s, s.stack[0], gold_heads) # <<<<<<<<<<<<<< * raise StandardError * return best */ - __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_children_in_stack(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_n0(__pyx_v_s), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_kp_s_c_in_s); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_c_in_s); - __Pyx_GIVEREF(__pyx_kp_s_c_in_s); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - if (__Pyx_Print(0, __pyx_t_2, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_f_5spacy_6syntax_6_state_head_in_buffer(__pyx_v_s, (__pyx_v_s->stack[0]), __pyx_v_gold_heads); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + if (__Pyx_PrintOne(0, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "spacy/syntax/arc_eager.pyx":195 - * print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) - * print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":177 + * print children_in_buffer(s, s.stack[0], gold_heads) + * print head_in_buffer(s, s.stack[0], gold_heads) * raise StandardError # <<<<<<<<<<<<<< * return best */ __Pyx_Raise(__pyx_builtin_StandardError, 0, 0, 0); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "spacy/syntax/arc_eager.pyx":196 - * print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) + /* "spacy/syntax/arc_eager.pyx":178 + * print head_in_buffer(s, s.stack[0], gold_heads) * raise StandardError * return best # <<<<<<<<<<<<<< */ __pyx_r = __pyx_v_best; goto __pyx_L0; - /* "spacy/syntax/arc_eager.pyx":138 + /* "spacy/syntax/arc_eager.pyx":130 * return best * * cdef int best_gold(self, const weight_t* scores, const State* s, # <<<<<<<<<<<<<< @@ -4831,6 +4595,8 @@ static int __pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold(struct __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("spacy.syntax.arc_eager.TransitionSystem.best_gold", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -4997,29 +4763,53 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] - * + * if (s.i+1) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; /* "spacy/syntax/_state.pxd":36 * * cdef inline TokenC* get_n1(const State* s) nogil: - * return &s.sent[s.i+1] # <<<<<<<<<<<<<< + * if (s.i+1) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 1) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":37 + * cdef inline TokenC* get_n1(const State* s) nogil: + * if (s.i+1) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+1] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":39 + * return NULL + * else: + * return &s.sent[s.i+1] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); + goto __pyx_L0; + } /* "spacy/syntax/_state.pxd":35 * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] - * + * if (s.i+1) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -5027,33 +4817,57 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":39 +/* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; - /* "spacy/syntax/_state.pxd":40 + /* "spacy/syntax/_state.pxd":43 * * cdef inline TokenC* get_n2(const State* s) nogil: - * return &s.sent[s.i+2] # <<<<<<<<<<<<<< + * if (s.i + 2) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 2) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":44 + * cdef inline TokenC* get_n2(const State* s) nogil: + * if (s.i + 2) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+2] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":46 + * return NULL + * else: + * return &s.sent[s.i+2] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); + goto __pyx_L0; + } - /* "spacy/syntax/_state.pxd":39 + /* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -5061,32 +4875,32 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":43 +/* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":44 + /* "spacy/syntax/_state.pxd":50 * * cdef inline TokenC* get_s0(const State *s) nogil: - * return s.stack[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[0]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->stack[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[0])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":43 + /* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ @@ -5095,87 +4909,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":47 - * - * - * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - */ - -static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s1; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - - /* "spacy/syntax/_state.pxd":49 - * cdef inline TokenC* get_s1(const State *s) nogil: - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 # <<<<<<<<<<<<<< - * return s1[0] - * - */ - __pyx_v_s1 = (__pyx_v_s->stack - 1); - - /* "spacy/syntax/_state.pxd":50 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - * return s1[0] # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = (__pyx_v_s1[0]); - goto __pyx_L0; - - /* "spacy/syntax/_state.pxd":47 - * - * - * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - */ - - /* function exit code */ - __pyx_L0:; - return __pyx_r; -} - /* "spacy/syntax/_state.pxd":53 * * - * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-1]] */ -static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s2; +static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; /* "spacy/syntax/_state.pxd":55 - * cdef inline TokenC* get_s2(const State *s) nogil: + * cdef inline TokenC* get_s1(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 # <<<<<<<<<<<<<< - * return s2[0] + * return &s.sent[s.stack[-1]] # <<<<<<<<<<<<<< + * * */ - __pyx_v_s2 = (__pyx_v_s->stack - 2); - - /* "spacy/syntax/_state.pxd":56 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 - * return s2[0] # <<<<<<<<<<<<<< - * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil - */ - __pyx_r = (__pyx_v_s2[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-1])])); goto __pyx_L0; /* "spacy/syntax/_state.pxd":53 * * - * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-1]] */ /* function exit code */ @@ -5183,8 +4943,42 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":61 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil +/* "spacy/syntax/_state.pxd":58 + * + * + * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] + */ + +static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { + struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + + /* "spacy/syntax/_state.pxd":60 + * cdef inline TokenC* get_s2(const State *s) nogil: + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] # <<<<<<<<<<<<<< + * + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil + */ + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-2])])); + goto __pyx_L0; + + /* "spacy/syntax/_state.pxd":58 + * + * + * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -5194,7 +4988,7 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":62 + /* "spacy/syntax/_state.pxd":67 * * cdef inline bint at_eol(const State *s) nogil: * return s.i >= s.sent_len # <<<<<<<<<<<<<< @@ -5204,8 +4998,8 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s __pyx_r = (__pyx_v_s->i >= __pyx_v_s->sent_len); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":61 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil + /* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -5217,7 +5011,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s return __pyx_r; } -/* "spacy/syntax/_state.pxd":65 +/* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -5228,7 +5022,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":66 + /* "spacy/syntax/_state.pxd":71 * * cdef inline bint is_final(const State *s) nogil: * return at_eol(s) # The stack will be attached to root anyway # <<<<<<<<<<<<<< @@ -5238,7 +5032,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ __pyx_r = __pyx_f_5spacy_6syntax_6_state_at_eol(__pyx_v_s); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":65 + /* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -5251,7 +5045,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ return __pyx_r; } -/* "spacy/syntax/_state.pxd":78 +/* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -5259,52 +5053,74 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ * for i in range(32): */ -static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, CYTHON_UNUSED int __pyx_v_n) { +static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, int __pyx_v_n) { int __pyx_v_i; uint32_t __pyx_r; int __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pxd":80 + /* "spacy/syntax/_state.pxd":85 * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: * cdef int i * for i in range(32): # <<<<<<<<<<<<<< * if bits & (1 << i): - * return i + * n -= 1 */ for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; - /* "spacy/syntax/_state.pxd":81 + /* "spacy/syntax/_state.pxd":86 * cdef int i * for i in range(32): * if bits & (1 << i): # <<<<<<<<<<<<<< - * return i - * return 0 + * n -= 1 + * if n < 1: */ __pyx_t_2 = ((__pyx_v_bits & (1 << __pyx_v_i)) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pxd":82 + /* "spacy/syntax/_state.pxd":87 * for i in range(32): * if bits & (1 << i): - * return i # <<<<<<<<<<<<<< + * n -= 1 # <<<<<<<<<<<<<< + * if n < 1: + * return i + */ + __pyx_v_n = (__pyx_v_n - 1); + + /* "spacy/syntax/_state.pxd":88 + * if bits & (1 << i): + * n -= 1 + * if n < 1: # <<<<<<<<<<<<<< + * return i * return 0 */ - __pyx_r = __pyx_v_i; - goto __pyx_L0; + __pyx_t_2 = ((__pyx_v_n < 1) != 0); + if (__pyx_t_2) { + + /* "spacy/syntax/_state.pxd":89 + * n -= 1 + * if n < 1: + * return i # <<<<<<<<<<<<<< + * return 0 + */ + __pyx_r = __pyx_v_i; + goto __pyx_L0; + } + goto __pyx_L5; } + __pyx_L5:; } - /* "spacy/syntax/_state.pxd":83 - * if bits & (1 << i): - * return i + /* "spacy/syntax/_state.pxd":90 + * if n < 1: + * return i * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; - /* "spacy/syntax/_state.pxd":78 + /* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -5317,7 +5133,7 @@ static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bi return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -5369,7 +5185,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __Pyx_TraceCall("__getbuffer__", __pyx_f[2], 194); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":200 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":200 * # of flags * * if info == NULL: return # <<<<<<<<<<<<<< @@ -5382,7 +5198,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L0; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":203 * * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -5391,7 +5207,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_endian_detector = 1; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":204 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":204 * cdef int copy_shape, i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -5400,7 +5216,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":206 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -5409,7 +5225,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":208 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":208 * ndim = PyArray_NDIM(self) * * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -5419,7 +5235,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":209 * * if sizeof(npy_intp) != sizeof(Py_ssize_t): * copy_shape = 1 # <<<<<<<<<<<<<< @@ -5431,7 +5247,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":211 * copy_shape = 1 * else: * copy_shape = 0 # <<<<<<<<<<<<<< @@ -5442,7 +5258,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L4:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":213 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":213 * copy_shape = 0 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5456,7 +5272,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L6_bool_binop_done; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":214 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -5468,7 +5284,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -5482,7 +5298,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":217 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< @@ -5496,7 +5312,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P goto __pyx_L9_bool_binop_done; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":218 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< @@ -5508,7 +5324,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":219 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":219 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -5522,7 +5338,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P {__pyx_filename = __pyx_f[2]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":221 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -5531,7 +5347,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":222 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -5540,7 +5356,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->ndim = __pyx_v_ndim; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":223 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":223 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if copy_shape: # <<<<<<<<<<<<<< @@ -5550,7 +5366,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = (__pyx_v_copy_shape != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":226 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) # <<<<<<<<<<<<<< @@ -5559,7 +5375,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->strides = ((Py_ssize_t *)malloc((((sizeof(Py_ssize_t)) * ((size_t)__pyx_v_ndim)) * 2))); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":227 * # This is allocated as one block, strides first. * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -5568,7 +5384,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":228 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":228 * info.strides = stdlib.malloc(sizeof(Py_ssize_t) * ndim * 2) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -5579,7 +5395,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":229 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -5588,7 +5404,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":230 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -5601,7 +5417,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":232 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -5610,7 +5426,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":233 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -5621,7 +5437,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L11:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":234 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":234 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -5630,7 +5446,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->suboffsets = NULL; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":235 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -5639,7 +5455,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":236 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -5648,7 +5464,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":239 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< @@ -5657,7 +5473,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_f = NULL; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":240 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":240 * cdef int t * cdef char* f = NULL * cdef dtype descr = self.descr # <<<<<<<<<<<<<< @@ -5669,7 +5485,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":244 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":244 * cdef int offset * * cdef bint hasfields = PyDataType_HASFIELDS(descr) # <<<<<<<<<<<<<< @@ -5678,7 +5494,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_hasfields = PyDataType_HASFIELDS(__pyx_v_descr); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":246 * cdef bint hasfields = PyDataType_HASFIELDS(descr) * * if not hasfields and not copy_shape: # <<<<<<<<<<<<<< @@ -5696,7 +5512,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_L15_bool_binop_done:; if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":248 * if not hasfields and not copy_shape: * # do not call releasebuffer * info.obj = None # <<<<<<<<<<<<<< @@ -5712,7 +5528,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":251 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":251 * else: * # need to call releasebuffer * info.obj = self # <<<<<<<<<<<<<< @@ -5727,7 +5543,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L14:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":253 * info.obj = self * * if not hasfields: # <<<<<<<<<<<<<< @@ -5737,7 +5553,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_1 = ((!(__pyx_v_hasfields != 0)) != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":254 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":254 * * if not hasfields: * t = descr.type_num # <<<<<<<<<<<<<< @@ -5747,7 +5563,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":255 * if not hasfields: * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -5767,7 +5583,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } __pyx_L20_next_or:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":256 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -5785,7 +5601,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_L19_bool_binop_done:; if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -5799,7 +5615,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P {__pyx_filename = __pyx_f[2]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< @@ -5808,7 +5624,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ switch (__pyx_v_t) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -5819,7 +5635,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_b; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":259 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< @@ -5830,7 +5646,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_B; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":260 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< @@ -5841,7 +5657,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_h; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":261 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< @@ -5852,7 +5668,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_H; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":262 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< @@ -5863,7 +5679,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_i; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":263 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< @@ -5874,7 +5690,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_I; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":264 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< @@ -5885,7 +5701,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_l; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< @@ -5896,7 +5712,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_L; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< @@ -5907,7 +5723,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_q; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":267 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< @@ -5918,7 +5734,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_Q; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< @@ -5929,7 +5745,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_f; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":269 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< @@ -5940,7 +5756,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_d; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< @@ -5951,7 +5767,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_g; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< @@ -5962,7 +5778,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_Zf; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< @@ -5973,7 +5789,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_Zd; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":273 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< @@ -5984,7 +5800,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_v_f = __pyx_k_Zg; break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< @@ -5996,7 +5812,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; default: - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -6022,7 +5838,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P break; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":277 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -6031,7 +5847,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->format = __pyx_v_f; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -6043,7 +5859,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * return * else: * info.format = stdlib.malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -6052,7 +5868,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_info->format = ((char *)malloc(255)); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":281 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":281 * else: * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -6061,7 +5877,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ (__pyx_v_info->format[0]) = '^'; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":282 * info.format = stdlib.malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -6070,7 +5886,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P */ __pyx_v_offset = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< @@ -6080,7 +5896,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P __pyx_t_7 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 255), (&__pyx_v_offset)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f = __pyx_t_7; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< @@ -6090,7 +5906,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P (__pyx_v_f[0]) = '\x00'; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":194 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -6123,7 +5939,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -6149,7 +5965,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __Pyx_RefNannySetupContext("__releasebuffer__", 0); __Pyx_TraceCall("__releasebuffer__", __pyx_f[2], 288); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -6159,7 +5975,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * stdlib.free(info.format) # <<<<<<<<<<<<<< @@ -6171,7 +5987,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s } __pyx_L3:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * if PyArray_HASFIELDS(self): * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -6181,7 +5997,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 * stdlib.free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * stdlib.free(info.strides) # <<<<<<<<<<<<<< @@ -6193,7 +6009,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s } __pyx_L4:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":288 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -6206,7 +6022,7 @@ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_s __Pyx_RefNannyFinishContext(); } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -6225,7 +6041,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 768); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":769 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":769 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -6239,7 +6055,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":768 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -6259,7 +6075,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -6278,7 +6094,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 771); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":772 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":772 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -6292,7 +6108,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":771 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -6312,7 +6128,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -6331,7 +6147,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 774); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":775 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -6345,7 +6161,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":774 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -6365,7 +6181,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -6384,7 +6200,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 777); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -6398,7 +6214,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -6418,7 +6234,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -6437,7 +6253,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 780); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":781 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -6451,7 +6267,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":780 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -6471,7 +6287,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -6505,7 +6321,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_RefNannySetupContext("_util_dtypestring", 0); __Pyx_TraceCall("_util_dtypestring", __pyx_f[2], 783); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 * cdef int delta_offset * cdef tuple i * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -6514,7 +6330,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_endian_detector = 1; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 * cdef tuple i * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -6523,7 +6339,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -6545,7 +6361,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":795 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -6558,7 +6374,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":796 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -6597,7 +6413,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":798 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -6614,7 +6430,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (__pyx_t_6) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< @@ -6628,7 +6444,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -6648,7 +6464,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L8_next_or:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -6666,7 +6482,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_L7_bool_binop_done:; if (__pyx_t_6) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -6680,7 +6496,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx {__pyx_filename = __pyx_f[2]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -6696,7 +6512,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":814 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -6705,7 +6521,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ (__pyx_v_f[0]) = 120; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -6714,7 +6530,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx */ __pyx_v_f = (__pyx_v_f + 1); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -6725,7 +6541,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":818 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -6735,7 +6551,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":820 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -6745,7 +6561,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< @@ -6757,7 +6573,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -6767,7 +6583,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (__pyx_t_6) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< @@ -6781,7 +6597,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx {__pyx_filename = __pyx_f[2]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":826 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< @@ -6799,7 +6615,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< @@ -6817,7 +6633,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< @@ -6835,7 +6651,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":829 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< @@ -6853,7 +6669,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< @@ -6871,7 +6687,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< @@ -6889,7 +6705,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":832 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< @@ -6907,7 +6723,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< @@ -6925,7 +6741,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< @@ -6943,7 +6759,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":835 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< @@ -6961,7 +6777,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< @@ -6979,7 +6795,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< @@ -6997,7 +6813,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< @@ -7015,7 +6831,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":839 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< @@ -7035,7 +6851,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< @@ -7055,7 +6871,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":841 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< @@ -7075,7 +6891,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx goto __pyx_L15; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< @@ -7094,7 +6910,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":844 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -7117,7 +6933,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L15:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":845 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -7129,7 +6945,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":849 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -7141,7 +6957,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __pyx_L13:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":794 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -7151,7 +6967,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":850 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -7161,7 +6977,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx __pyx_r = __pyx_v_f; goto __pyx_L0; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -7187,7 +7003,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx return __pyx_r; } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -7204,7 +7020,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __Pyx_RefNannySetupContext("set_array_base", 0); __Pyx_TraceCall("set_array_base", __pyx_f[2], 966); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":968 * cdef inline void set_array_base(ndarray arr, object base): * cdef PyObject* baseptr * if base is None: # <<<<<<<<<<<<<< @@ -7215,7 +7031,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":969 * cdef PyObject* baseptr * if base is None: * baseptr = NULL # <<<<<<<<<<<<<< @@ -7227,7 +7043,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":971 * baseptr = NULL * else: * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< @@ -7236,7 +7052,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":972 * else: * Py_INCREF(base) # important to do this before decref below! * baseptr = base # <<<<<<<<<<<<<< @@ -7247,7 +7063,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a } __pyx_L3:; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":973 * Py_INCREF(base) # important to do this before decref below! * baseptr = base * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< @@ -7256,7 +7072,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_XDECREF(__pyx_v_arr->base); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":974 * baseptr = base * Py_XDECREF(arr.base) * arr.base = baseptr # <<<<<<<<<<<<<< @@ -7265,7 +7081,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_v_arr->base = __pyx_v_baseptr; - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":966 * * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -7278,7 +7094,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __Pyx_RefNannyFinishContext(); } -/* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 +/* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -7294,7 +7110,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __Pyx_RefNannySetupContext("get_array_base", 0); __Pyx_TraceCall("get_array_base", __pyx_f[2], 976); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":977 * * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: # <<<<<<<<<<<<<< @@ -7304,7 +7120,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); if (__pyx_t_1) { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":978 * cdef inline object get_array_base(ndarray arr): * if arr.base is NULL: * return None # <<<<<<<<<<<<<< @@ -7318,7 +7134,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py } /*else*/ { - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":980 * return None * else: * return arr.base # <<<<<<<<<<<<<< @@ -7329,7 +7145,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py goto __pyx_L0; } - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":976 * arr.base = baseptr * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -7821,21 +7637,14 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_kp_s_Head, __pyx_k_Head, sizeof(__pyx_k_Head), 0, 0, 1, 0}, - {&__pyx_kp_s_N0, __pyx_k_N0, sizeof(__pyx_k_N0), 0, 0, 1, 0}, {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_ROOT, __pyx_k_ROOT, sizeof(__pyx_k_ROOT), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_kp_s_S0, __pyx_k_S0, sizeof(__pyx_k_S0), 0, 0, 1, 0}, {&__pyx_n_s_StandardError, __pyx_k_StandardError, sizeof(__pyx_k_StandardError), 0, 0, 1, 1}, {&__pyx_kp_s_Unknown_Move, __pyx_k_Unknown_Move, sizeof(__pyx_k_Unknown_Move), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_kp_s_c_in_b, __pyx_k_c_in_b, sizeof(__pyx_k_c_in_b), 0, 0, 1, 0}, - {&__pyx_kp_s_c_in_s, __pyx_k_c_in_s, sizeof(__pyx_k_c_in_s), 0, 0, 1, 0}, {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, - {&__pyx_kp_s_h_in_b, __pyx_k_h_in_b, sizeof(__pyx_k_h_in_b), 0, 0, 1, 0}, - {&__pyx_kp_s_h_in_s, __pyx_k_h_in_s, sizeof(__pyx_k_h_in_s), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_n_s_left_labels, __pyx_k_left_labels, sizeof(__pyx_k_left_labels), 0, 0, 1, 1}, @@ -7853,8 +7662,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_StandardError = __Pyx_GetBuiltinName(__pyx_n_s_StandardError); if (!__pyx_builtin_StandardError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_StandardError = __Pyx_GetBuiltinName(__pyx_n_s_StandardError); if (!__pyx_builtin_StandardError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; @@ -7866,40 +7675,40 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "spacy/syntax/arc_eager.pyx":81 + /* "spacy/syntax/arc_eager.pyx":73 * self.mem = Pool() * if 'ROOT' in right_labels: * right_labels.pop(right_labels.index('ROOT')) # <<<<<<<<<<<<<< * if 'ROOT' in left_labels: * left_labels.pop(left_labels.index('ROOT')) */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ROOT); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ROOT); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "spacy/syntax/arc_eager.pyx":83 + /* "spacy/syntax/arc_eager.pyx":75 * right_labels.pop(right_labels.index('ROOT')) * if 'ROOT' in left_labels: * left_labels.pop(left_labels.index('ROOT')) # <<<<<<<<<<<<<< * self.n_moves = 2 + len(left_labels) + len(right_labels) * moves = self.mem.alloc(self.n_moves, sizeof(Transition)) */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ROOT); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_n_s_ROOT); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "spacy/syntax/arc_eager.pyx":170 + /* "spacy/syntax/arc_eager.pyx":162 * cost = 0 * else: * raise StandardError("Unknown Move") # <<<<<<<<<<<<<< * if cost == 0 and (best == -1 or scores[i] > score): * best = i */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Unknown_Move); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_Unknown_Move); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":215 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< @@ -7910,7 +7719,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":219 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":219 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< @@ -7921,7 +7730,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":257 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -7932,7 +7741,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":799 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< @@ -7943,7 +7752,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":803 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< @@ -7954,7 +7763,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* ".env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 + /* "../../.env/lib/python2.7/site-packages/Cython/Includes/numpy/__init__.pxd":823 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< @@ -8066,10 +7875,10 @@ PyMODINIT_FUNC PyInit_arc_eager(void) __pyx_vtable_5spacy_6syntax_9arc_eager_TransitionSystem.best_valid = (int (*)(struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem *, __pyx_t_5thinc_8typedefs_weight_t const *, struct __pyx_t_5spacy_6syntax_6_state_State const *))__pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_valid; __pyx_vtable_5spacy_6syntax_9arc_eager_TransitionSystem.best_gold = (int (*)(struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem *, __pyx_t_5thinc_8typedefs_weight_t const *, struct __pyx_t_5spacy_6syntax_6_state_State const *, PyObject *, PyObject *))__pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_best_gold; __pyx_vtable_5spacy_6syntax_9arc_eager_TransitionSystem.transition = (int (*)(struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem *, struct __pyx_t_5spacy_6syntax_6_state_State *, int const ))__pyx_f_5spacy_6syntax_9arc_eager_16TransitionSystem_transition; - if (PyType_Ready(&__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem.tp_dict, __pyx_vtabptr_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttrString(__pyx_m, "TransitionSystem", (PyObject *)&__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem.tp_dict, __pyx_vtabptr_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "TransitionSystem", (PyObject *)&__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5spacy_6syntax_9arc_eager_TransitionSystem = &__pyx_type_5spacy_6syntax_9arc_eager_TransitionSystem; /*--- Type import code ---*/ __pyx_ptype_5cymem_5cymem_Pool = __Pyx_ImportType("cymem.cymem", "Pool", sizeof(struct __pyx_obj_5cymem_5cymem_Pool), 1); if (unlikely(!__pyx_ptype_5cymem_5cymem_Pool)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -8125,13 +7934,13 @@ PyMODINIT_FUNC PyInit_arc_eager(void) if (__Pyx_ImportFunction(__pyx_t_2, "hash64", (void (**)(void))&__pyx_f_10murmurhash_4mrmr_hash64, "uint64_t (void *, int, uint64_t)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_ImportModule("spacy.syntax._state"); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "add_dep", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_add_dep, "int (struct __pyx_t_5spacy_6syntax_6_state_State *, struct __pyx_t_5spacy_6tokens_TokenC *, struct __pyx_t_5spacy_6tokens_TokenC *, int)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "pop_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_pop_stack, "struct __pyx_t_5spacy_6tokens_TokenC *(struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "add_dep", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_add_dep, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , int const , int const )") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "pop_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_pop_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_ImportFunction(__pyx_t_3, "push_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_push_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "children_in_buffer", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_children_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "head_in_buffer", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_head_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "children_in_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_children_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_ImportFunction(__pyx_t_3, "head_in_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_head_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, struct __pyx_t_5spacy_6tokens_TokenC const *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "children_in_buffer", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_children_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "head_in_buffer", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_head_in_buffer, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "children_in_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_children_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_ImportFunction(__pyx_t_3, "head_in_stack", (void (**)(void))&__pyx_f_5spacy_6syntax_6_state_head_in_stack, "int (struct __pyx_t_5spacy_6syntax_6_state_State const *, int const , PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*--- Execution code ---*/ diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index 1f6c44972..b69dd5346 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -35,43 +35,35 @@ cdef inline bint _can_reduce(const State* s) nogil: cdef int _shift_cost(const State* s, list gold) except -1: assert not at_eol(s) cost = 0 - cost += head_in_stack(s, get_n0(s), gold) - cost += children_in_stack(s, get_n0(s), gold) + cost += head_in_stack(s, s.i, gold) + cost += children_in_stack(s, s.i, gold) return cost cdef int _right_cost(const State* s, list gold) except -1: assert s.stack_len >= 1 - cdef int s0_idx = get_idx(s, get_s0(s)) cost = 0 - if _gold_dep(s, get_s0(s), get_n0(s), gold): + if gold[s.i] == s.stack[0]: return cost - cost += head_in_buffer(s, get_n0(s), gold) - cost += children_in_stack(s, get_n0(s), gold) - cost += head_in_stack(s, get_n0(s), gold) + cost += head_in_buffer(s, s.i, gold) + cost += children_in_stack(s, s.i, gold) + cost += head_in_stack(s, s.i, gold) return cost cdef int _left_cost(const State* s, list gold) except -1: assert s.stack_len >= 1 cost = 0 - if _gold_dep(s, get_n0(s), get_s0(s), gold): + if gold[s.stack[0]] == s.i: return cost - cost += head_in_buffer(s, get_s0(s), gold) - cost += children_in_buffer(s, get_s0(s), gold) + cost += head_in_buffer(s, s.stack[0], gold) + cost += children_in_buffer(s, s.stack[0], gold) return cost cdef int _reduce_cost(const State* s, list gold) except -1: - return children_in_buffer(s, get_s0(s), gold) - - -cdef int _gold_dep(const State* s, const TokenC* head, const TokenC* child, - list gold_offsets) except -1: - cdef int head_idx = get_idx(s, head) - cdef int child_idx = get_idx(s, child) - return child_idx + gold_offsets[child_idx] == head_idx + return children_in_buffer(s, s.stack[0], gold) cdef class TransitionSystem: @@ -109,10 +101,10 @@ cdef class TransitionSystem: if t.move == SHIFT: push_stack(s) elif t.move == LEFT: - add_dep(s, get_n0(s), get_s0(s), t.label) + add_dep(s, s.i, s.stack[0], t.label) pop_stack(s) elif t.move == RIGHT: - add_dep(s, get_s0(s), get_n0(s), t.label) + add_dep(s, s.stack[0], s.i, t.label) push_stack(s) elif t.move == REDUCE: pop_stack(s) @@ -157,12 +149,12 @@ cdef class TransitionSystem: if move == SHIFT or move == REDUCE: cost = 0 elif move == LEFT: - if _gold_dep(s, get_n0(s), get_s0(s), gold_heads): - cost = label != gold_labels[get_idx(s, get_s0(s))] + if gold_heads[s.stack[0]] == s.i: + cost = label != gold_labels[s.stack[0]] else: cost = 0 elif move == RIGHT: - if _gold_dep(s, get_s0(s), get_n0(s), gold_heads): + if gold_heads[s.i] == s.stack[0]: cost = label != gold_labels[s.i] else: cost = 0 @@ -173,24 +165,14 @@ cdef class TransitionSystem: score = scores[i] if best < 0: - for i in range(self.n_moves): - if self._moves[i].move == LEFT: - print self._moves[i].label, - print - print _gold_dep(s, get_n0(s), get_s0(s), gold_heads) - print gold_labels[get_idx(s, get_s0(s))] - print unl_costs[LEFT] - print "S0:" - print "Head:", gold_heads[get_idx(s, get_s0(s))] - print "h. in b.", head_in_buffer(s, get_s0(s), gold_heads) - print "c. in b.", children_in_buffer(s, get_s0(s), gold_heads) - print "h. in s.", head_in_stack(s, get_s0(s), gold_heads) - print "c. in s.", children_in_stack(s, get_s0(s), gold_heads) - print "N0:" - print "Head:", gold_heads[get_idx(s, get_n0(s))] - print "h. in b.", head_in_buffer(s, get_n0(s), gold_heads) - print "c. in b.", children_in_buffer(s, get_n0(s), gold_heads) - print "h. in s.", head_in_stack(s, get_n0(s), gold_heads) - print "c. in s.", children_in_stack(s, get_n0(s), gold_heads) + print unl_costs[SHIFT], unl_costs[REDUCE], unl_costs[LEFT], unl_costs[RIGHT] + print s.stack_len + print has_head(get_s0(s)) + print s.sent[s.stack[0]].head + print s.stack[0], s.i + print gold_heads[s.stack[0]], gold_heads[s.i] + print gold_labels[s.i] + print children_in_buffer(s, s.stack[0], gold_heads) + print head_in_buffer(s, s.stack[0], gold_heads) raise StandardError return best diff --git a/spacy/syntax/parser.cpp b/spacy/syntax/parser.cpp index 1815374fb..3279eaa03 100644 --- a/spacy/syntax/parser.cpp +++ b/spacy/syntax/parser.cpp @@ -1251,12 +1251,12 @@ struct __pyx_t_5spacy_6syntax_6_state_State; * * * cdef struct State: # <<<<<<<<<<<<<< - * TokenC** stack * TokenC* sent + * int* stack */ struct __pyx_t_5spacy_6syntax_6_state_State { - struct __pyx_t_5spacy_6tokens_TokenC **stack; struct __pyx_t_5spacy_6tokens_TokenC *sent; + int *stack; int i; int sent_len; int stack_len; @@ -1915,7 +1915,7 @@ struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem { static struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *__pyx_vtabptr_5spacy_6syntax_9arc_eager_TransitionSystem; -/* "spacy/syntax/parser.pyx":57 +/* "spacy/syntax/parser.pyx":54 * * * cdef class GreedyParser: # <<<<<<<<<<<<<< @@ -2215,6 +2215,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); +static int __Pyx_Print(PyObject*, PyObject *, int); +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* __pyx_print = 0; +static PyObject* __pyx_print_kwargs = 0; +#endif + +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); + #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) @@ -2513,6 +2521,7 @@ static int (*__pyx_f_5spacy_6syntax_15_parse_features_fill_context)(__pyx_t_5thi /* Module declarations from 'spacy.syntax.parser' */ static PyTypeObject *__pyx_ptype_5spacy_6syntax_6parser_GreedyParser = 0; +static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spacy_6syntax_6_state_State *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "spacy.syntax.parser" int __pyx_module_is_main_spacy__syntax__parser = 0; @@ -2551,7 +2560,9 @@ static char __pyx_k__2[] = "|"; static char __pyx_k__9[] = ""; static char __pyx_k_os[] = "os"; static char __pyx_k_EOL[] = "EOL"; +static char __pyx_k_end[] = "end"; static char __pyx_k_val[] = "val"; +static char __pyx_k_file[] = "file"; static char __pyx_k_join[] = "join"; static char __pyx_k_json[] = "json"; static char __pyx_k_load[] = "load"; @@ -2566,6 +2577,7 @@ static char __pyx_k_isdir[] = "isdir"; static char __pyx_k_model[] = "model"; static char __pyx_k_parse[] = "parse"; static char __pyx_k_pjoin[] = "pjoin"; +static char __pyx_k_print[] = "print"; static char __pyx_k_range[] = "range"; static char __pyx_k_Config[] = "Config"; static char __pyx_k_config[] = "config"; @@ -2612,8 +2624,10 @@ static PyObject *__pyx_kp_u__2; static PyObject *__pyx_n_s__9; static PyObject *__pyx_n_s_arc_eager; static PyObject *__pyx_n_u_config; +static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_exists; static PyObject *__pyx_n_s_features; +static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_get_templates; static PyObject *__pyx_n_s_gold_heads; static PyObject *__pyx_n_s_gold_labels; @@ -2635,6 +2649,7 @@ static PyObject *__pyx_n_s_parse; static PyObject *__pyx_n_s_parse_features; static PyObject *__pyx_n_s_path; static PyObject *__pyx_n_s_pjoin; +static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_random; static PyObject *__pyx_n_s_range; @@ -2661,7 +2676,7 @@ static PyObject *__pyx_tuple__12; static PyObject *__pyx_codeobj__11; static PyObject *__pyx_codeobj__13; -/* "spacy/syntax/parser.pyx":39 +/* "spacy/syntax/parser.pyx":36 * * DEBUG = False * def set_debug(val): # <<<<<<<<<<<<<< @@ -2691,18 +2706,18 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_set_debug(CYTHON_UNUSED PyObjec int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("set_debug", 0); - __Pyx_TraceCall("set_debug", __pyx_f[0], 39); + __Pyx_TraceCall("set_debug", __pyx_f[0], 36); - /* "spacy/syntax/parser.pyx":41 + /* "spacy/syntax/parser.pyx":38 * def set_debug(val): * global DEBUG * DEBUG = val # <<<<<<<<<<<<<< * * */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, __pyx_v_val) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":39 + /* "spacy/syntax/parser.pyx":36 * * DEBUG = False * def set_debug(val): # <<<<<<<<<<<<<< @@ -2723,12 +2738,12 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_set_debug(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "spacy/syntax/parser.pyx":44 +/* "spacy/syntax/parser.pyx":41 * * * cdef unicode print_state(State* s, list words): # <<<<<<<<<<<<<< * words = list(words) + ['EOL'] - * top = words[get_idx(s, get_s0(s))] + * top = words[s.stack[0]] */ static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_s, PyObject *__pyx_v_words) { @@ -2741,95 +2756,92 @@ static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spac PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - long __pyx_t_5; + long __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("print_state", 0); - __Pyx_TraceCall("print_state", __pyx_f[0], 44); + __Pyx_TraceCall("print_state", __pyx_f[0], 41); __Pyx_INCREF(__pyx_v_words); - /* "spacy/syntax/parser.pyx":45 + /* "spacy/syntax/parser.pyx":42 * * cdef unicode print_state(State* s, list words): * words = list(words) + ['EOL'] # <<<<<<<<<<<<<< - * top = words[get_idx(s, get_s0(s))] - * second = words[get_idx(s, get_s1(s))] + * top = words[s.stack[0]] + * second = words[s.stack[-1]] */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_words); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_words); __Pyx_GIVEREF(__pyx_v_words); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_EOL); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_EOL); __Pyx_GIVEREF(__pyx_n_u_EOL); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_words, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":46 + /* "spacy/syntax/parser.pyx":43 * cdef unicode print_state(State* s, list words): * words = list(words) + ['EOL'] - * top = words[get_idx(s, get_s0(s))] # <<<<<<<<<<<<<< - * second = words[get_idx(s, get_s1(s))] + * top = words[s.stack[0]] # <<<<<<<<<<<<<< + * second = words[s.stack[-1]] * n0 = words[s.i] */ - __pyx_t_4 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s0(__pyx_v_s)); - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, (__pyx_v_s->stack[0]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_top = __pyx_t_3; __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":47 + /* "spacy/syntax/parser.pyx":44 * words = list(words) + ['EOL'] - * top = words[get_idx(s, get_s0(s))] - * second = words[get_idx(s, get_s1(s))] # <<<<<<<<<<<<<< + * top = words[s.stack[0]] + * second = words[s.stack[-1]] # <<<<<<<<<<<<<< * n0 = words[s.i] * n1 = words[s.i + 1] */ - __pyx_t_4 = __pyx_f_5spacy_6syntax_6_state_get_idx(__pyx_v_s, __pyx_f_5spacy_6syntax_6_state_get_s1(__pyx_v_s)); - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, (__pyx_v_s->stack[-1]), int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_second = __pyx_t_3; __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":48 - * top = words[get_idx(s, get_s0(s))] - * second = words[get_idx(s, get_s1(s))] + /* "spacy/syntax/parser.pyx":45 + * top = words[s.stack[0]] + * second = words[s.stack[-1]] * n0 = words[s.i] # <<<<<<<<<<<<<< * n1 = words[s.i + 1] * return ' '.join((second, top, '|', n0, n1)) */ - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_v_s->i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_v_s->i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_n0 = __pyx_t_3; __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":49 - * second = words[get_idx(s, get_s1(s))] + /* "spacy/syntax/parser.pyx":46 + * second = words[s.stack[-1]] * n0 = words[s.i] * n1 = words[s.i + 1] # <<<<<<<<<<<<<< * return ' '.join((second, top, '|', n0, n1)) * */ - __pyx_t_5 = (__pyx_v_s->i + 1); - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = (__pyx_v_s->i + 1); + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_words, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_n1 = __pyx_t_3; __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":50 + /* "spacy/syntax/parser.pyx":47 * n0 = words[s.i] * n1 = words[s.i + 1] * return ' '.join((second, top, '|', n0, n1)) # <<<<<<<<<<<<<< @@ -2837,7 +2849,7 @@ static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spac * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_second); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_second); @@ -2854,19 +2866,19 @@ static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spac __Pyx_INCREF(__pyx_v_n1); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_n1); __Pyx_GIVEREF(__pyx_v_n1); - __pyx_t_1 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "spacy/syntax/parser.pyx":44 + /* "spacy/syntax/parser.pyx":41 * * * cdef unicode print_state(State* s, list words): # <<<<<<<<<<<<<< * words = list(words) + ['EOL'] - * top = words[get_idx(s, get_s0(s))] + * top = words[s.stack[0]] */ /* function exit code */ @@ -2888,7 +2900,7 @@ static PyObject *__pyx_f_5spacy_6syntax_6parser_print_state(struct __pyx_t_5spac return __pyx_r; } -/* "spacy/syntax/parser.pyx":53 +/* "spacy/syntax/parser.pyx":50 * * * def get_templates(name): # <<<<<<<<<<<<<< @@ -2920,9 +2932,9 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_2get_templates(CYTHON_UNUSED Py int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("get_templates", 0); - __Pyx_TraceCall("get_templates", __pyx_f[0], 53); + __Pyx_TraceCall("get_templates", __pyx_f[0], 50); - /* "spacy/syntax/parser.pyx":54 + /* "spacy/syntax/parser.pyx":51 * * def get_templates(name): * return _parse_features.arc_eager # <<<<<<<<<<<<<< @@ -2930,16 +2942,16 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_2get_templates(CYTHON_UNUSED Py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_features); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_parse_features); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arc_eager); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arc_eager); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "spacy/syntax/parser.pyx":53 + /* "spacy/syntax/parser.pyx":50 * * * def get_templates(name): # <<<<<<<<<<<<<< @@ -2960,7 +2972,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_2get_templates(CYTHON_UNUSED Py return __pyx_r; } -/* "spacy/syntax/parser.pyx":58 +/* "spacy/syntax/parser.pyx":55 * * cdef class GreedyParser: * def __init__(self, model_dir): # <<<<<<<<<<<<<< @@ -2996,7 +3008,7 @@ static int __pyx_pw_5spacy_6syntax_6parser_12GreedyParser_1__init__(PyObject *__ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -3007,7 +3019,7 @@ static int __pyx_pw_5spacy_6syntax_6parser_12GreedyParser_1__init__(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("spacy.syntax.parser.GreedyParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3037,9 +3049,9 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 58); + __Pyx_TraceCall("__init__", __pyx_f[0], 55); - /* "spacy/syntax/parser.pyx":59 + /* "spacy/syntax/parser.pyx":56 * cdef class GreedyParser: * def __init__(self, model_dir): * assert os.path.exists(model_dir) and os.path.isdir(model_dir) # <<<<<<<<<<<<<< @@ -3048,12 +3060,12 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -3067,33 +3079,33 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_model_dir); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_model_dir); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_model_dir); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_model_dir); __Pyx_GIVEREF(__pyx_v_model_dir); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L3_bool_binop_done; } - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isdir); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isdir); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -3107,41 +3119,41 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } } if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_model_dir); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_model_dir); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_model_dir); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_model_dir); __Pyx_GIVEREF(__pyx_v_model_dir); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L3_bool_binop_done:; if (unlikely(!__pyx_t_1)) { PyErr_SetNone(PyExc_AssertionError); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif - /* "spacy/syntax/parser.pyx":60 + /* "spacy/syntax/parser.pyx":57 * def __init__(self, model_dir): * assert os.path.exists(model_dir) and os.path.isdir(model_dir) * self.cfg = Config.read(model_dir, 'config') # <<<<<<<<<<<<<< * self.extractor = Extractor(get_templates(self.cfg.features)) * self.moves = TransitionSystem(self.cfg.left_labels, self.cfg.right_labels) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Config); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Config); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -3156,7 +3168,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_t_7 = 1; } } - __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL; @@ -3167,7 +3179,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __Pyx_INCREF(__pyx_n_u_config); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_n_u_config); __Pyx_GIVEREF(__pyx_n_u_config); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3177,16 +3189,16 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_v_self->cfg = __pyx_t_2; __pyx_t_2 = 0; - /* "spacy/syntax/parser.pyx":61 + /* "spacy/syntax/parser.pyx":58 * assert os.path.exists(model_dir) and os.path.isdir(model_dir) * self.cfg = Config.read(model_dir, 'config') * self.extractor = Extractor(get_templates(self.cfg.features)) # <<<<<<<<<<<<<< * self.moves = TransitionSystem(self.cfg.left_labels, self.cfg.right_labels) * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_templates); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_templates); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_features); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_features); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3199,27 +3211,27 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } } if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL; PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5thinc_8features_Extractor)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5thinc_8features_Extractor)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -3228,18 +3240,18 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_v_self->extractor = ((struct __pyx_obj_5thinc_8features_Extractor *)__pyx_t_2); __pyx_t_2 = 0; - /* "spacy/syntax/parser.pyx":62 + /* "spacy/syntax/parser.pyx":59 * self.cfg = Config.read(model_dir, 'config') * self.extractor = Extractor(get_templates(self.cfg.features)) * self.moves = TransitionSystem(self.cfg.left_labels, self.cfg.right_labels) # <<<<<<<<<<<<<< * - * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ) + * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ + 10000) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_left_labels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_left_labels); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_right_labels); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->cfg, __pyx_n_s_right_labels); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3247,7 +3259,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5spacy_6syntax_9arc_eager_TransitionSystem)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5spacy_6syntax_9arc_eager_TransitionSystem)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -3256,18 +3268,18 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_v_self->moves = ((struct __pyx_obj_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_t_4); __pyx_t_4 = 0; - /* "spacy/syntax/parser.pyx":64 + /* "spacy/syntax/parser.pyx":61 * self.moves = TransitionSystem(self.cfg.left_labels, self.cfg.right_labels) * - * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ) # <<<<<<<<<<<<<< + * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ + 10000) # <<<<<<<<<<<<<< * if os.path.exists(pjoin(model_dir, 'model')): * self.model.load(pjoin(model_dir, 'model')) */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->moves->n_moves); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->moves->n_moves); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->extractor->n_templ); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_self->extractor->n_templ + 10000)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -3275,7 +3287,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __Pyx_GIVEREF(__pyx_t_8); __pyx_t_4 = 0; __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5thinc_7learner_LinearModel)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5thinc_7learner_LinearModel)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_8); @@ -3284,22 +3296,22 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_v_self->model = ((struct __pyx_obj_5thinc_7learner_LinearModel *)__pyx_t_8); __pyx_t_8 = 0; - /* "spacy/syntax/parser.pyx":65 + /* "spacy/syntax/parser.pyx":62 * - * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ) + * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ + 10000) * if os.path.exists(pjoin(model_dir, 'model')): # <<<<<<<<<<<<<< * self.model.load(pjoin(model_dir, 'model')) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pjoin); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pjoin); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; __pyx_t_7 = 0; @@ -3313,7 +3325,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_t_7 = 1; } } - __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_3) { PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = NULL; @@ -3324,7 +3336,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __Pyx_INCREF(__pyx_n_u_model); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_n_u_model); __Pyx_GIVEREF(__pyx_n_u_model); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -3339,35 +3351,35 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } } if (!__pyx_t_5) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_8); } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { - /* "spacy/syntax/parser.pyx":66 - * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ) + /* "spacy/syntax/parser.pyx":63 + * self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ + 10000) * if os.path.exists(pjoin(model_dir, 'model')): * self.model.load(pjoin(model_dir, 'model')) # <<<<<<<<<<<<<< * * cpdef int parse(self, Tokens tokens) except -1: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->model), __pyx_n_s_load); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->model), __pyx_n_s_load); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pjoin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pjoin); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -3381,7 +3393,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __pyx_t_7 = 1; } } - __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_5) { PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = NULL; @@ -3392,7 +3404,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ __Pyx_INCREF(__pyx_n_u_model); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_n_u_model); __Pyx_GIVEREF(__pyx_n_u_model); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3407,17 +3419,17 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } } if (!__pyx_t_4) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_8); } else { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL; PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -3427,7 +3439,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ } __pyx_L5:; - /* "spacy/syntax/parser.pyx":58 + /* "spacy/syntax/parser.pyx":55 * * cdef class GreedyParser: * def __init__(self, model_dir): # <<<<<<<<<<<<<< @@ -3453,7 +3465,7 @@ static int __pyx_pf_5spacy_6syntax_6parser_12GreedyParser___init__(struct __pyx_ return __pyx_r; } -/* "spacy/syntax/parser.pyx":68 +/* "spacy/syntax/parser.pyx":65 * self.model.load(pjoin(model_dir, 'model')) * * cpdef int parse(self, Tokens tokens) except -1: # <<<<<<<<<<<<<< @@ -3465,7 +3477,7 @@ static PyObject *__pyx_pw_5spacy_6syntax_6parser_12GreedyParser_3parse(PyObject static int __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(struct __pyx_obj_5spacy_6syntax_6parser_GreedyParser *__pyx_v_self, struct __pyx_obj_5spacy_6tokens_Tokens *__pyx_v_tokens, int __pyx_skip_dispatch) { struct __pyx_t_5thinc_8features_Feature *__pyx_v_feats; __pyx_t_5thinc_8typedefs_weight_t const *__pyx_v_scores; - __pyx_t_5thinc_8typedefs_atom_t __pyx_v_context[50]; + __pyx_t_5thinc_8typedefs_atom_t __pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE]; int __pyx_v_n_feats; struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem = 0; struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_state; @@ -3487,12 +3499,12 @@ static int __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("parse", 0); - __Pyx_TraceCall("parse", __pyx_f[0], 68); + __Pyx_TraceCall("parse", __pyx_f[0], 65); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5spacy_6syntax_6parser_12GreedyParser_3parse)) { __Pyx_INCREF(__pyx_t_1); @@ -3507,21 +3519,21 @@ static int __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(struct __pyx_obj_ } } if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(((PyObject *)__pyx_v_tokens)); PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_tokens)); __Pyx_GIVEREF(((PyObject *)__pyx_v_tokens)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -3530,29 +3542,29 @@ static int __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "spacy/syntax/parser.pyx":75 + /* "spacy/syntax/parser.pyx":72 * cdef atom_t[CONTEXT_SIZE] context * cdef int n_feats * cdef Pool mem = Pool() # <<<<<<<<<<<<<< * cdef State* state = init_state(mem, tokens.data, tokens.length) * while not is_final(state): */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/parser.pyx":76 + /* "spacy/syntax/parser.pyx":73 * cdef int n_feats * cdef Pool mem = Pool() * cdef State* state = init_state(mem, tokens.data, tokens.length) # <<<<<<<<<<<<<< * while not is_final(state): * fill_context(context, state) # TODO */ - __pyx_t_7 = __pyx_f_5spacy_6syntax_6_state_init_state(__pyx_v_mem, __pyx_v_tokens->data, __pyx_v_tokens->length); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_f_5spacy_6syntax_6_state_init_state(__pyx_v_mem, __pyx_v_tokens->data, __pyx_v_tokens->length); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_state = __pyx_t_7; - /* "spacy/syntax/parser.pyx":77 + /* "spacy/syntax/parser.pyx":74 * cdef Pool mem = Pool() * cdef State* state = init_state(mem, tokens.data, tokens.length) * while not is_final(state): # <<<<<<<<<<<<<< @@ -3563,56 +3575,56 @@ static int __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(struct __pyx_obj_ __pyx_t_8 = ((!(__pyx_f_5spacy_6syntax_6_state_is_final(__pyx_v_state) != 0)) != 0); if (!__pyx_t_8) break; - /* "spacy/syntax/parser.pyx":78 + /* "spacy/syntax/parser.pyx":75 * cdef State* state = init_state(mem, tokens.data, tokens.length) * while not is_final(state): * fill_context(context, state) # TODO # <<<<<<<<<<<<<< * feats = self.extractor.get_feats(context, &n_feats) * scores = self.model.get_scores(feats, n_feats) */ - __pyx_t_6 = __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_v_context, __pyx_v_state); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_v_context, __pyx_v_state); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":79 + /* "spacy/syntax/parser.pyx":76 * while not is_final(state): * fill_context(context, state) # TODO * feats = self.extractor.get_feats(context, &n_feats) # <<<<<<<<<<<<<< * scores = self.model.get_scores(feats, n_feats) * */ - __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_8features_Extractor *)__pyx_v_self->extractor->__pyx_vtab)->get_feats(__pyx_v_self->extractor, __pyx_v_context, (&__pyx_v_n_feats)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_8features_Extractor *)__pyx_v_self->extractor->__pyx_vtab)->get_feats(__pyx_v_self->extractor, __pyx_v_context, (&__pyx_v_n_feats)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_feats = __pyx_t_9; - /* "spacy/syntax/parser.pyx":80 + /* "spacy/syntax/parser.pyx":77 * fill_context(context, state) # TODO * feats = self.extractor.get_feats(context, &n_feats) * scores = self.model.get_scores(feats, n_feats) # <<<<<<<<<<<<<< * * guess = self.moves.best_valid(scores, state) */ - __pyx_t_10 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->get_scores(__pyx_v_self->model, __pyx_v_feats, __pyx_v_n_feats); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->get_scores(__pyx_v_self->model, __pyx_v_feats, __pyx_v_n_feats); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_scores = __pyx_t_10; - /* "spacy/syntax/parser.pyx":82 + /* "spacy/syntax/parser.pyx":79 * scores = self.model.get_scores(feats, n_feats) * * guess = self.moves.best_valid(scores, state) # <<<<<<<<<<<<<< * * self.moves.transition(state, guess) */ - __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_valid(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_valid(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_guess = __pyx_t_6; - /* "spacy/syntax/parser.pyx":84 + /* "spacy/syntax/parser.pyx":81 * guess = self.moves.best_valid(scores, state) * * self.moves.transition(state, guess) # <<<<<<<<<<<<<< * # TODO output * */ - __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->transition(__pyx_v_self->moves, __pyx_v_state, __pyx_v_guess); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->transition(__pyx_v_self->moves, __pyx_v_state, __pyx_v_guess); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "spacy/syntax/parser.pyx":68 + /* "spacy/syntax/parser.pyx":65 * self.model.load(pjoin(model_dir, 'model')) * * cpdef int parse(self, Tokens tokens) except -1: # <<<<<<<<<<<<<< @@ -3647,7 +3659,7 @@ static PyObject *__pyx_pw_5spacy_6syntax_6parser_12GreedyParser_3parse(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_Tokens, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_Tokens, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_5spacy_6syntax_6parser_12GreedyParser_2parse(((struct __pyx_obj_5spacy_6syntax_6parser_GreedyParser *)__pyx_v_self), ((struct __pyx_obj_5spacy_6tokens_Tokens *)__pyx_v_tokens)); /* function exit code */ @@ -3669,10 +3681,10 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_2parse(struct __ int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("parse", 0); - __Pyx_TraceCall("parse", __pyx_f[0], 68); + __Pyx_TraceCall("parse", __pyx_f[0], 65); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(__pyx_v_self, __pyx_v_tokens, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse(__pyx_v_self, __pyx_v_tokens, 1); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -3690,7 +3702,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_2parse(struct __ return __pyx_r; } -/* "spacy/syntax/parser.pyx":87 +/* "spacy/syntax/parser.pyx":84 * # TODO output * * def train_sent(self, Tokens tokens, list gold_heads, list gold_labels): # <<<<<<<<<<<<<< @@ -3731,16 +3743,16 @@ static PyObject *__pyx_pw_5spacy_6syntax_6parser_12GreedyParser_5train_sent(PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gold_heads)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_gold_labels)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "train_sent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "train_sent") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3755,15 +3767,15 @@ static PyObject *__pyx_pw_5spacy_6syntax_6parser_12GreedyParser_5train_sent(PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("train_sent", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("spacy.syntax.parser.GreedyParser.train_sent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_Tokens, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gold_heads), (&PyList_Type), 1, "gold_heads", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gold_labels), (&PyList_Type), 1, "gold_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tokens), __pyx_ptype_5spacy_6tokens_Tokens, 1, "tokens", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gold_heads), (&PyList_Type), 1, "gold_heads", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gold_labels), (&PyList_Type), 1, "gold_labels", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(((struct __pyx_obj_5spacy_6syntax_6parser_GreedyParser *)__pyx_v_self), __pyx_v_tokens, __pyx_v_gold_heads, __pyx_v_gold_labels); /* function exit code */ @@ -3779,10 +3791,10 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru struct __pyx_t_5thinc_8features_Feature *__pyx_v_feats; __pyx_t_5thinc_8typedefs_weight_t *__pyx_v_scores; int __pyx_v_n_feats; - __pyx_t_5thinc_8typedefs_atom_t __pyx_v_context[50]; + __pyx_t_5thinc_8typedefs_atom_t __pyx_v_context[__pyx_e_5spacy_6syntax_15_parse_features_CONTEXT_SIZE]; struct __pyx_obj_5cymem_5cymem_Pool *__pyx_v_mem = 0; struct __pyx_t_5spacy_6syntax_6_state_State *__pyx_v_state; - CYTHON_UNUSED PyObject *__pyx_v_words = NULL; + PyObject *__pyx_v_words = NULL; int __pyx_v_guess; int __pyx_v_best; PyObject *__pyx_v_counts = NULL; @@ -3807,62 +3819,62 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru int __pyx_clineno = 0; __Pyx_TraceDeclarations __Pyx_RefNannySetupContext("train_sent", 0); - __Pyx_TraceCall("train_sent", __pyx_f[0], 87); + __Pyx_TraceCall("train_sent", __pyx_f[0], 84); - /* "spacy/syntax/parser.pyx":94 + /* "spacy/syntax/parser.pyx":91 * cdef int n_feats * cdef atom_t[CONTEXT_SIZE] context * cdef Pool mem = Pool() # <<<<<<<<<<<<<< * cdef State* state = init_state(mem, tokens.data, tokens.length) * words = [t.string for t in tokens] */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5cymem_5cymem_Pool)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = ((struct __pyx_obj_5cymem_5cymem_Pool *)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/parser.pyx":95 + /* "spacy/syntax/parser.pyx":92 * cdef atom_t[CONTEXT_SIZE] context * cdef Pool mem = Pool() * cdef State* state = init_state(mem, tokens.data, tokens.length) # <<<<<<<<<<<<<< * words = [t.string for t in tokens] - * while not is_final(state): + * if DEBUG: */ - __pyx_t_2 = __pyx_f_5spacy_6syntax_6_state_init_state(__pyx_v_mem, __pyx_v_tokens->data, __pyx_v_tokens->length); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_5spacy_6syntax_6_state_init_state(__pyx_v_mem, __pyx_v_tokens->data, __pyx_v_tokens->length); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_state = __pyx_t_2; - /* "spacy/syntax/parser.pyx":96 + /* "spacy/syntax/parser.pyx":93 * cdef Pool mem = Pool() * cdef State* state = init_state(mem, tokens.data, tokens.length) * words = [t.string for t in tokens] # <<<<<<<<<<<<<< - * while not is_final(state): - * fill_context(context, state) + * if DEBUG: + * print words */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_tokens))) || PyTuple_CheckExact(((PyObject *)__pyx_v_tokens))) { __pyx_t_3 = ((PyObject *)__pyx_v_tokens); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(((PyObject *)__pyx_v_tokens)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } } else { @@ -3871,7 +3883,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -3879,102 +3891,164 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru } __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_string); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_string); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_words = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "spacy/syntax/parser.pyx":97 + /* "spacy/syntax/parser.pyx":94 * cdef State* state = init_state(mem, tokens.data, tokens.length) * words = [t.string for t in tokens] + * if DEBUG: # <<<<<<<<<<<<<< + * print words + * print gold_heads + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "spacy/syntax/parser.pyx":95 + * words = [t.string for t in tokens] + * if DEBUG: + * print words # <<<<<<<<<<<<<< + * print gold_heads + * while not is_final(state): + */ + if (__Pyx_PrintOne(0, __pyx_v_words) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "spacy/syntax/parser.pyx":96 + * if DEBUG: + * print words + * print gold_heads # <<<<<<<<<<<<<< + * while not is_final(state): + * if DEBUG: + */ + if (__Pyx_PrintOne(0, __pyx_v_gold_heads) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "spacy/syntax/parser.pyx":97 + * print words + * print gold_heads * while not is_final(state): # <<<<<<<<<<<<<< - * fill_context(context, state) - * feats = self.extractor.get_feats(context, &n_feats) + * if DEBUG: + * print print_state(state, words) */ while (1) { __pyx_t_7 = ((!(__pyx_f_5spacy_6syntax_6_state_is_final(__pyx_v_state) != 0)) != 0); if (!__pyx_t_7) break; /* "spacy/syntax/parser.pyx":98 - * words = [t.string for t in tokens] + * print gold_heads * while not is_final(state): + * if DEBUG: # <<<<<<<<<<<<<< + * print print_state(state, words) + * fill_context(context, state) + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_7) { + + /* "spacy/syntax/parser.pyx":99 + * while not is_final(state): + * if DEBUG: + * print print_state(state, words) # <<<<<<<<<<<<<< + * fill_context(context, state) + * feats = self.extractor.get_feats(context, &n_feats) + */ + __pyx_t_1 = __pyx_f_5spacy_6syntax_6parser_print_state(__pyx_v_state, __pyx_v_words); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (__Pyx_PrintOne(0, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L8; + } + __pyx_L8:; + + /* "spacy/syntax/parser.pyx":100 + * if DEBUG: + * print print_state(state, words) * fill_context(context, state) # <<<<<<<<<<<<<< * feats = self.extractor.get_feats(context, &n_feats) * scores = self.model.get_scores(feats, n_feats) */ - __pyx_t_8 = __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_v_context, __pyx_v_state); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __pyx_f_5spacy_6syntax_15_parse_features_fill_context(__pyx_v_context, __pyx_v_state); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":99 - * while not is_final(state): + /* "spacy/syntax/parser.pyx":101 + * print print_state(state, words) * fill_context(context, state) * feats = self.extractor.get_feats(context, &n_feats) # <<<<<<<<<<<<<< * scores = self.model.get_scores(feats, n_feats) * guess = self.moves.best_valid(scores, state) */ - __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_8features_Extractor *)__pyx_v_self->extractor->__pyx_vtab)->get_feats(__pyx_v_self->extractor, __pyx_v_context, (&__pyx_v_n_feats)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = ((struct __pyx_vtabstruct_5thinc_8features_Extractor *)__pyx_v_self->extractor->__pyx_vtab)->get_feats(__pyx_v_self->extractor, __pyx_v_context, (&__pyx_v_n_feats)); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_feats = __pyx_t_9; - /* "spacy/syntax/parser.pyx":100 + /* "spacy/syntax/parser.pyx":102 * fill_context(context, state) * feats = self.extractor.get_feats(context, &n_feats) * scores = self.model.get_scores(feats, n_feats) # <<<<<<<<<<<<<< * guess = self.moves.best_valid(scores, state) * best = self.moves.best_gold(scores, state, gold_heads, gold_labels) */ - __pyx_t_10 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->get_scores(__pyx_v_self->model, __pyx_v_feats, __pyx_v_n_feats); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->get_scores(__pyx_v_self->model, __pyx_v_feats, __pyx_v_n_feats); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_scores = __pyx_t_10; - /* "spacy/syntax/parser.pyx":101 + /* "spacy/syntax/parser.pyx":103 * feats = self.extractor.get_feats(context, &n_feats) * scores = self.model.get_scores(feats, n_feats) * guess = self.moves.best_valid(scores, state) # <<<<<<<<<<<<<< * best = self.moves.best_gold(scores, state, gold_heads, gold_labels) * counts = {guess: {}, best: {}} */ - __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_valid(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_valid(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_guess = __pyx_t_8; - /* "spacy/syntax/parser.pyx":102 + /* "spacy/syntax/parser.pyx":104 * scores = self.model.get_scores(feats, n_feats) * guess = self.moves.best_valid(scores, state) * best = self.moves.best_gold(scores, state, gold_heads, gold_labels) # <<<<<<<<<<<<<< * counts = {guess: {}, best: {}} * if guess != best: */ - __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_gold(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state, __pyx_v_gold_heads, __pyx_v_gold_labels); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->best_gold(__pyx_v_self->moves, __pyx_v_scores, __pyx_v_state, __pyx_v_gold_heads, __pyx_v_gold_labels); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_best = __pyx_t_8; - /* "spacy/syntax/parser.pyx":103 + /* "spacy/syntax/parser.pyx":105 * guess = self.moves.best_valid(scores, state) * best = self.moves.best_gold(scores, state, gold_heads, gold_labels) * counts = {guess: {}, best: {}} # <<<<<<<<<<<<<< * if guess != best: * count_feats(counts[guess], feats, n_feats, -1) */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_guess); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_guess); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_best); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_best); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_counts, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "spacy/syntax/parser.pyx":104 + /* "spacy/syntax/parser.pyx":106 * best = self.moves.best_gold(scores, state, gold_heads, gold_labels) * counts = {guess: {}, best: {}} * if guess != best: # <<<<<<<<<<<<<< @@ -3984,108 +4058,108 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru __pyx_t_7 = ((__pyx_v_guess != __pyx_v_best) != 0); if (__pyx_t_7) { - /* "spacy/syntax/parser.pyx":105 + /* "spacy/syntax/parser.pyx":107 * counts = {guess: {}, best: {}} * if guess != best: * count_feats(counts[guess], feats, n_feats, -1) # <<<<<<<<<<<<<< * count_feats(counts[best], feats, n_feats, 1) * self.model.update(counts) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_guess); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_guess); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_counts, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_counts, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = __pyx_f_5thinc_8features_count_feats(((PyObject*)__pyx_t_3), __pyx_v_feats, __pyx_v_n_feats, -1.0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __pyx_f_5thinc_8features_count_feats(((PyObject*)__pyx_t_3), __pyx_v_feats, __pyx_v_n_feats, -1.0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "spacy/syntax/parser.pyx":106 + /* "spacy/syntax/parser.pyx":108 * if guess != best: * count_feats(counts[guess], feats, n_feats, -1) * count_feats(counts[best], feats, n_feats, 1) # <<<<<<<<<<<<<< * self.model.update(counts) * self.moves.transition(state, guess) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_best); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_best); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_counts, __pyx_t_3); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_counts, __pyx_t_3); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_8 = __pyx_f_5thinc_8features_count_feats(((PyObject*)__pyx_t_1), __pyx_v_feats, __pyx_v_n_feats, 1.0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __pyx_f_5thinc_8features_count_feats(((PyObject*)__pyx_t_1), __pyx_v_feats, __pyx_v_n_feats, 1.0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L7; + goto __pyx_L9; } - __pyx_L7:; + __pyx_L9:; - /* "spacy/syntax/parser.pyx":107 + /* "spacy/syntax/parser.pyx":109 * count_feats(counts[guess], feats, n_feats, -1) * count_feats(counts[best], feats, n_feats, 1) * self.model.update(counts) # <<<<<<<<<<<<<< * self.moves.transition(state, guess) * cdef int i */ - __pyx_t_8 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->update(__pyx_v_self->model, __pyx_v_counts, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((struct __pyx_vtabstruct_5thinc_7learner_LinearModel *)__pyx_v_self->model->__pyx_vtab)->update(__pyx_v_self->model, __pyx_v_counts, 0); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":108 + /* "spacy/syntax/parser.pyx":110 * count_feats(counts[best], feats, n_feats, 1) * self.model.update(counts) * self.moves.transition(state, guess) # <<<<<<<<<<<<<< * cdef int i * n_corr = 0 */ - __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->transition(__pyx_v_self->moves, __pyx_v_state, __pyx_v_guess); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((struct __pyx_vtabstruct_5spacy_6syntax_9arc_eager_TransitionSystem *)__pyx_v_self->moves->__pyx_vtab)->transition(__pyx_v_self->moves, __pyx_v_state, __pyx_v_guess); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "spacy/syntax/parser.pyx":110 + /* "spacy/syntax/parser.pyx":112 * self.moves.transition(state, guess) * cdef int i * n_corr = 0 # <<<<<<<<<<<<<< * for i in range(tokens.length): - * n_corr += state.sent[i].head == gold_heads[i] + * n_corr += (i + state.sent[i].head) == gold_heads[i] */ __Pyx_INCREF(__pyx_int_0); __pyx_v_n_corr = __pyx_int_0; - /* "spacy/syntax/parser.pyx":111 + /* "spacy/syntax/parser.pyx":113 * cdef int i * n_corr = 0 * for i in range(tokens.length): # <<<<<<<<<<<<<< - * n_corr += state.sent[i].head == gold_heads[i] + * n_corr += (i + state.sent[i].head) == gold_heads[i] * return n_corr */ __pyx_t_8 = __pyx_v_tokens->length; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_8; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; - /* "spacy/syntax/parser.pyx":112 + /* "spacy/syntax/parser.pyx":114 * n_corr = 0 * for i in range(tokens.length): - * n_corr += state.sent[i].head == gold_heads[i] # <<<<<<<<<<<<<< + * n_corr += (i + state.sent[i].head) == gold_heads[i] # <<<<<<<<<<<<<< * return n_corr */ - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_state->sent[__pyx_v_i]).head); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_i + (__pyx_v_state->sent[__pyx_v_i]).head)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_gold_heads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_gold_heads, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_n_corr, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_n_corr, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_n_corr, __pyx_t_3); __pyx_t_3 = 0; } - /* "spacy/syntax/parser.pyx":113 + /* "spacy/syntax/parser.pyx":115 * for i in range(tokens.length): - * n_corr += state.sent[i].head == gold_heads[i] + * n_corr += (i + state.sent[i].head) == gold_heads[i] * return n_corr # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); @@ -4093,7 +4167,7 @@ static PyObject *__pyx_pf_5spacy_6syntax_6parser_12GreedyParser_4train_sent(stru __pyx_r = __pyx_v_n_corr; goto __pyx_L0; - /* "spacy/syntax/parser.pyx":87 + /* "spacy/syntax/parser.pyx":84 * # TODO output * * def train_sent(self, Tokens tokens, list gold_heads, list gold_labels): # <<<<<<<<<<<<<< @@ -4266,29 +4340,53 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] - * + * if (s.i+1) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; /* "spacy/syntax/_state.pxd":36 * * cdef inline TokenC* get_n1(const State* s) nogil: - * return &s.sent[s.i+1] # <<<<<<<<<<<<<< + * if (s.i+1) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 1) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":37 + * cdef inline TokenC* get_n1(const State* s) nogil: + * if (s.i+1) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+1] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":39 + * return NULL + * else: + * return &s.sent[s.i+1] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 1)])); + goto __pyx_L0; + } /* "spacy/syntax/_state.pxd":35 * * * cdef inline TokenC* get_n1(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+1] - * + * if (s.i+1) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -4296,33 +4394,57 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":39 +/* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_n2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + int __pyx_t_1; - /* "spacy/syntax/_state.pxd":40 + /* "spacy/syntax/_state.pxd":43 * * cdef inline TokenC* get_n2(const State* s) nogil: - * return &s.sent[s.i+2] # <<<<<<<<<<<<<< + * if (s.i + 2) >= s.sent_len: # <<<<<<<<<<<<<< + * return NULL + * else: + */ + __pyx_t_1 = (((__pyx_v_s->i + 2) >= __pyx_v_s->sent_len) != 0); + if (__pyx_t_1) { + + /* "spacy/syntax/_state.pxd":44 + * cdef inline TokenC* get_n2(const State* s) nogil: + * if (s.i + 2) >= s.sent_len: + * return NULL # <<<<<<<<<<<<<< + * else: + * return &s.sent[s.i+2] + */ + __pyx_r = NULL; + goto __pyx_L0; + } + /*else*/ { + + /* "spacy/syntax/_state.pxd":46 + * return NULL + * else: + * return &s.sent[s.i+2] # <<<<<<<<<<<<<< * * */ - __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); - goto __pyx_L0; + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->i + 2)])); + goto __pyx_L0; + } - /* "spacy/syntax/_state.pxd":39 + /* "spacy/syntax/_state.pxd":42 * * * cdef inline TokenC* get_n2(const State* s) nogil: # <<<<<<<<<<<<<< - * return &s.sent[s.i+2] - * + * if (s.i + 2) >= s.sent_len: + * return NULL */ /* function exit code */ @@ -4330,32 +4452,32 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":43 +/* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s0(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - /* "spacy/syntax/_state.pxd":44 + /* "spacy/syntax/_state.pxd":50 * * cdef inline TokenC* get_s0(const State *s) nogil: - * return s.stack[0] # <<<<<<<<<<<<<< + * return &s.sent[s.stack[0]] # <<<<<<<<<<<<<< * * */ - __pyx_r = (__pyx_v_s->stack[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[0])])); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":43 + /* "spacy/syntax/_state.pxd":49 * * * cdef inline TokenC* get_s0(const State *s) nogil: # <<<<<<<<<<<<<< - * return s.stack[0] + * return &s.sent[s.stack[0]] * */ @@ -4364,87 +4486,33 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":47 - * - * - * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - */ - -static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s1; - struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; - - /* "spacy/syntax/_state.pxd":49 - * cdef inline TokenC* get_s1(const State *s) nogil: - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 # <<<<<<<<<<<<<< - * return s1[0] - * - */ - __pyx_v_s1 = (__pyx_v_s->stack - 1); - - /* "spacy/syntax/_state.pxd":50 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - * return s1[0] # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = (__pyx_v_s1[0]); - goto __pyx_L0; - - /* "spacy/syntax/_state.pxd":47 - * - * - * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s1 = s.stack - 1 - */ - - /* function exit code */ - __pyx_L0:; - return __pyx_r; -} - /* "spacy/syntax/_state.pxd":53 * * - * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-1]] */ -static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { - struct __pyx_t_5spacy_6tokens_TokenC **__pyx_v_s2; +static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s1(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; /* "spacy/syntax/_state.pxd":55 - * cdef inline TokenC* get_s2(const State *s) nogil: + * cdef inline TokenC* get_s1(const State *s) nogil: * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 # <<<<<<<<<<<<<< - * return s2[0] + * return &s.sent[s.stack[-1]] # <<<<<<<<<<<<<< + * * */ - __pyx_v_s2 = (__pyx_v_s->stack - 2); - - /* "spacy/syntax/_state.pxd":56 - * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 - * return s2[0] # <<<<<<<<<<<<<< - * - * cdef TokenC* get_right(State* s, TokenC* head, int idx) nogil - */ - __pyx_r = (__pyx_v_s2[0]); + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-1])])); goto __pyx_L0; /* "spacy/syntax/_state.pxd":53 * * - * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * cdef inline TokenC* get_s1(const State *s) nogil: # <<<<<<<<<<<<<< * # Rely on our padding to ensure we don't go out of bounds here - * cdef TokenC** s2 = s.stack - 2 + * return &s.sent[s.stack[-1]] */ /* function exit code */ @@ -4452,8 +4520,42 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta return __pyx_r; } -/* "spacy/syntax/_state.pxd":61 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil +/* "spacy/syntax/_state.pxd":58 + * + * + * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] + */ + +static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6syntax_6_state_get_s2(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { + struct __pyx_t_5spacy_6tokens_TokenC *__pyx_r; + + /* "spacy/syntax/_state.pxd":60 + * cdef inline TokenC* get_s2(const State *s) nogil: + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] # <<<<<<<<<<<<<< + * + * cdef const TokenC* get_right(const State* s, const TokenC* head, const int idx) nogil + */ + __pyx_r = (&(__pyx_v_s->sent[(__pyx_v_s->stack[-2])])); + goto __pyx_L0; + + /* "spacy/syntax/_state.pxd":58 + * + * + * cdef inline TokenC* get_s2(const State *s) nogil: # <<<<<<<<<<<<<< + * # Rely on our padding to ensure we don't go out of bounds here + * return &s.sent[s.stack[-2]] + */ + + /* function exit code */ + __pyx_L0:; + return __pyx_r; +} + +/* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -4463,7 +4565,7 @@ static CYTHON_INLINE struct __pyx_t_5spacy_6tokens_TokenC *__pyx_f_5spacy_6synta static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":62 + /* "spacy/syntax/_state.pxd":67 * * cdef inline bint at_eol(const State *s) nogil: * return s.i >= s.sent_len # <<<<<<<<<<<<<< @@ -4473,8 +4575,8 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s __pyx_r = (__pyx_v_s->i >= __pyx_v_s->sent_len); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":61 - * cdef TokenC* get_left(State* s, TokenC* head, int idx) nogil + /* "spacy/syntax/_state.pxd":66 + * cdef const TokenC* get_left(const State* s, const TokenC* head, const int idx) nogil * * cdef inline bint at_eol(const State *s) nogil: # <<<<<<<<<<<<<< * return s.i >= s.sent_len @@ -4486,7 +4588,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s return __pyx_r; } -/* "spacy/syntax/_state.pxd":65 +/* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -4497,7 +4599,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_at_eol(struct __pyx_t_5s static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_5spacy_6syntax_6_state_State const *__pyx_v_s) { int __pyx_r; - /* "spacy/syntax/_state.pxd":66 + /* "spacy/syntax/_state.pxd":71 * * cdef inline bint is_final(const State *s) nogil: * return at_eol(s) # The stack will be attached to root anyway # <<<<<<<<<<<<<< @@ -4507,7 +4609,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ __pyx_r = __pyx_f_5spacy_6syntax_6_state_at_eol(__pyx_v_s); goto __pyx_L0; - /* "spacy/syntax/_state.pxd":65 + /* "spacy/syntax/_state.pxd":70 * * * cdef inline bint is_final(const State *s) nogil: # <<<<<<<<<<<<<< @@ -4520,7 +4622,7 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ return __pyx_r; } -/* "spacy/syntax/_state.pxd":78 +/* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -4528,52 +4630,74 @@ static CYTHON_INLINE int __pyx_f_5spacy_6syntax_6_state_is_final(struct __pyx_t_ * for i in range(32): */ -static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, CYTHON_UNUSED int __pyx_v_n) { +static CYTHON_INLINE uint32_t __pyx_f_5spacy_6syntax_6_state__nth_significant_bit(uint32_t __pyx_v_bits, int __pyx_v_n) { int __pyx_v_i; uint32_t __pyx_r; int __pyx_t_1; int __pyx_t_2; - /* "spacy/syntax/_state.pxd":80 + /* "spacy/syntax/_state.pxd":85 * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: * cdef int i * for i in range(32): # <<<<<<<<<<<<<< * if bits & (1 << i): - * return i + * n -= 1 */ for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; - /* "spacy/syntax/_state.pxd":81 + /* "spacy/syntax/_state.pxd":86 * cdef int i * for i in range(32): * if bits & (1 << i): # <<<<<<<<<<<<<< - * return i - * return 0 + * n -= 1 + * if n < 1: */ __pyx_t_2 = ((__pyx_v_bits & (1 << __pyx_v_i)) != 0); if (__pyx_t_2) { - /* "spacy/syntax/_state.pxd":82 + /* "spacy/syntax/_state.pxd":87 * for i in range(32): * if bits & (1 << i): - * return i # <<<<<<<<<<<<<< + * n -= 1 # <<<<<<<<<<<<<< + * if n < 1: + * return i + */ + __pyx_v_n = (__pyx_v_n - 1); + + /* "spacy/syntax/_state.pxd":88 + * if bits & (1 << i): + * n -= 1 + * if n < 1: # <<<<<<<<<<<<<< + * return i * return 0 */ - __pyx_r = __pyx_v_i; - goto __pyx_L0; + __pyx_t_2 = ((__pyx_v_n < 1) != 0); + if (__pyx_t_2) { + + /* "spacy/syntax/_state.pxd":89 + * n -= 1 + * if n < 1: + * return i # <<<<<<<<<<<<<< + * return 0 + */ + __pyx_r = __pyx_v_i; + goto __pyx_L0; + } + goto __pyx_L5; } + __pyx_L5:; } - /* "spacy/syntax/_state.pxd":83 - * if bits & (1 << i): - * return i + /* "spacy/syntax/_state.pxd":90 + * if n < 1: + * return i * return 0 # <<<<<<<<<<<<<< */ __pyx_r = 0; goto __pyx_L0; - /* "spacy/syntax/_state.pxd":78 + /* "spacy/syntax/_state.pxd":83 * * * cdef inline uint32_t _nth_significant_bit(uint32_t bits, int n) nogil: # <<<<<<<<<<<<<< @@ -7120,8 +7244,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 1}, {&__pyx_n_s_arc_eager, __pyx_k_arc_eager, sizeof(__pyx_k_arc_eager), 0, 0, 1, 1}, {&__pyx_n_u_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 1, 0, 1}, + {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1}, {&__pyx_n_s_features, __pyx_k_features, sizeof(__pyx_k_features), 0, 0, 1, 1}, + {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_get_templates, __pyx_k_get_templates, sizeof(__pyx_k_get_templates), 0, 0, 1, 1}, {&__pyx_n_s_gold_heads, __pyx_k_gold_heads, sizeof(__pyx_k_gold_heads), 0, 0, 1, 1}, {&__pyx_n_s_gold_labels, __pyx_k_gold_labels, sizeof(__pyx_k_gold_labels), 0, 0, 1, 1}, @@ -7143,6 +7269,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_parse_features, __pyx_k_parse_features, sizeof(__pyx_k_parse_features), 0, 0, 1, 1}, {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, {&__pyx_n_s_pjoin, __pyx_k_pjoin, sizeof(__pyx_k_pjoin), 0, 0, 1, 1}, + {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, @@ -7160,7 +7287,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; @@ -7238,29 +7365,29 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "spacy/syntax/parser.pyx":39 + /* "spacy/syntax/parser.pyx":36 * * DEBUG = False * def set_debug(val): # <<<<<<<<<<<<<< * global DEBUG * DEBUG = val */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_val); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_set_debug, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_set_debug, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":53 + /* "spacy/syntax/parser.pyx":50 * * * def get_templates(name): # <<<<<<<<<<<<<< * return _parse_features.arc_eager * */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_name); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_get_templates, 53, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_matt_repos_spaCy_spacy_sy, __pyx_n_s_get_templates, 50, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -7364,10 +7491,10 @@ PyMODINIT_FUNC PyInit_parser(void) /*--- Type init code ---*/ __pyx_vtabptr_5spacy_6syntax_6parser_GreedyParser = &__pyx_vtable_5spacy_6syntax_6parser_GreedyParser; __pyx_vtable_5spacy_6syntax_6parser_GreedyParser.parse = (int (*)(struct __pyx_obj_5spacy_6syntax_6parser_GreedyParser *, struct __pyx_obj_5spacy_6tokens_Tokens *, int __pyx_skip_dispatch))__pyx_f_5spacy_6syntax_6parser_12GreedyParser_parse; - if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_5spacy_6syntax_6parser_GreedyParser.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_6parser_GreedyParser.tp_dict, __pyx_vtabptr_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyObject_SetAttrString(__pyx_m, "GreedyParser", (PyObject *)&__pyx_type_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_5spacy_6syntax_6parser_GreedyParser.tp_dict, __pyx_vtabptr_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "GreedyParser", (PyObject *)&__pyx_type_5spacy_6syntax_6parser_GreedyParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5spacy_6syntax_6parser_GreedyParser = &__pyx_type_5spacy_6syntax_6parser_GreedyParser; /*--- Type import code ---*/ __pyx_ptype_5cymem_5cymem_Pool = __Pyx_ImportType("cymem.cymem", "Pool", sizeof(struct __pyx_obj_5cymem_5cymem_Pool), 1); if (unlikely(!__pyx_ptype_5cymem_5cymem_Pool)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -7546,37 +7673,37 @@ PyMODINIT_FUNC PyInit_parser(void) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "spacy/syntax/parser.pyx":38 + /* "spacy/syntax/parser.pyx":35 * * * DEBUG = False # <<<<<<<<<<<<<< * def set_debug(val): * global DEBUG */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "spacy/syntax/parser.pyx":39 + /* "spacy/syntax/parser.pyx":36 * * DEBUG = False * def set_debug(val): # <<<<<<<<<<<<<< * global DEBUG * DEBUG = val */ - __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_1set_debug, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_1set_debug, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_debug, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_debug, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "spacy/syntax/parser.pyx":53 + /* "spacy/syntax/parser.pyx":50 * * * def get_templates(name): # <<<<<<<<<<<<<< * return _parse_features.arc_eager * */ - __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_3get_templates, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_5spacy_6syntax_6parser_3get_templates, NULL, __pyx_n_s_spacy_syntax_parser); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_templates, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_templates, __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "spacy/syntax/parser.pyx":1 @@ -8728,6 +8855,147 @@ raise_neg_overflow: return (int) -1; } +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} +#else +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!__pyx_print)) { + __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); + if (!__pyx_print) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!__pyx_print_kwargs)) { + __pyx_print_kwargs = PyDict_New(); + if (unlikely(!__pyx_print_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = __pyx_print_kwargs; + } + result = PyObject_Call(__pyx_print, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != __pyx_print_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} +#else +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} +#endif + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 4078b93b5..d24d72ec7 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -32,9 +32,6 @@ from . import _parse_features from ._parse_features cimport fill_context, CONTEXT_SIZE -DEF CONTEXT_SIZE = 50 - - DEBUG = False def set_debug(val): global DEBUG @@ -43,8 +40,8 @@ def set_debug(val): cdef unicode print_state(State* s, list words): words = list(words) + ['EOL'] - top = words[get_idx(s, get_s0(s))] - second = words[get_idx(s, get_s1(s))] + top = words[s.stack[0]] + second = words[s.stack[-1]] n0 = words[s.i] n1 = words[s.i + 1] return ' '.join((second, top, '|', n0, n1)) @@ -61,7 +58,7 @@ cdef class GreedyParser: self.extractor = Extractor(get_templates(self.cfg.features)) self.moves = TransitionSystem(self.cfg.left_labels, self.cfg.right_labels) - self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ) + self.model = LinearModel(self.moves.n_moves, self.extractor.n_templ + 10000) if os.path.exists(pjoin(model_dir, 'model')): self.model.load(pjoin(model_dir, 'model')) @@ -94,7 +91,12 @@ cdef class GreedyParser: cdef Pool mem = Pool() cdef State* state = init_state(mem, tokens.data, tokens.length) words = [t.string for t in tokens] + if DEBUG: + print words + print gold_heads while not is_final(state): + if DEBUG: + print print_state(state, words) fill_context(context, state) feats = self.extractor.get_feats(context, &n_feats) scores = self.model.get_scores(feats, n_feats) @@ -109,5 +111,5 @@ cdef class GreedyParser: cdef int i n_corr = 0 for i in range(tokens.length): - n_corr += state.sent[i].head == gold_heads[i] + n_corr += (i + state.sent[i].head) == gold_heads[i] return n_corr