From f7c8069e6546bbaaff3f86db3bac9d18239ee94e Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 10 Jun 2015 10:12:17 +0200 Subject: [PATCH] * Fix bug in distance feature --- spacy/syntax/_parse_features.pyx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacy/syntax/_parse_features.pyx b/spacy/syntax/_parse_features.pyx index aeb764e50..81c1b8dfc 100644 --- a/spacy/syntax/_parse_features.pyx +++ b/spacy/syntax/_parse_features.pyx @@ -79,12 +79,11 @@ cdef int fill_context(atom_t* ctxt, StateClass st) except -1: fill_token(&ctxt[P1w], st.safe_get(st.B(0)-1)) fill_token(&ctxt[P2w], st.safe_get(st.B(0)-2)) - # TODO fill_token(&ctxt[E0w], st.E_(0)) fill_token(&ctxt[E1w], st.E_(1)) if st.stack_depth() >= 1 and not st.eol(): - ctxt[dist] = min(st.S(0) - st.B(0), 5) # TODO: This is backwards!! + ctxt[dist] = min(st.B(0) - st.E(0), 5) else: ctxt[dist] = 0 ctxt[N0lv] = min(st.n_L(st.B(0)), 5)