mirror of https://github.com/explosion/spaCy.git
* Fix bug in distance feature
This commit is contained in:
parent
abd07c067a
commit
f7c8069e65
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue