From fd596351bab847350f7abf29c04469814a2e902a Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 31 May 2015 05:24:33 +0200 Subject: [PATCH] * Fix valency features --- spacy/syntax/_parse_features.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/syntax/_parse_features.pyx b/spacy/syntax/_parse_features.pyx index 8b07db979..a16b3734c 100644 --- a/spacy/syntax/_parse_features.pyx +++ b/spacy/syntax/_parse_features.pyx @@ -88,11 +88,11 @@ cdef int fill_context(atom_t* context, State* state) except -1: context[dist] = state.stack[0] - state.i else: context[dist] = 0 - context[N0lv] = max(count_left_kids(get_n0(state)), 5) - context[S0lv] = max(count_left_kids(get_s0(state)), 5) - context[S0rv] = max(count_right_kids(get_s0(state)), 5) - context[S1lv] = max(count_left_kids(get_s1(state)), 5) - context[S1rv] = max(count_right_kids(get_s1(state)), 5) + context[N0lv] = min(count_left_kids(get_n0(state)), 5) + context[S0lv] = min(count_left_kids(get_s0(state)), 5) + context[S0rv] = min(count_right_kids(get_s0(state)), 5) + context[S1lv] = min(count_left_kids(get_s1(state)), 5) + context[S1rv] = min(count_right_kids(get_s1(state)), 5) context[S0_has_head] = 0 context[S1_has_head] = 0