diff --git a/spacy/syntax/_parse_features.pyx b/spacy/syntax/_parse_features.pyx index a16b3734c..adbaff05d 100644 --- a/spacy/syntax/_parse_features.pyx +++ b/spacy/syntax/_parse_features.pyx @@ -85,7 +85,7 @@ cdef int fill_context(atom_t* context, State* state) except -1: fill_token(&context[E0w], get_e0(state)) fill_token(&context[E1w], get_e1(state)) if state.stack_len >= 1: - context[dist] = state.stack[0] - state.i + context[dist] = min(state.stack[0] - state.i, 5) else: context[dist] = 0 context[N0lv] = min(count_left_kids(get_n0(state)), 5)