mirror of https://github.com/explosion/spaCy.git
* Add length cap to distance feature
This commit is contained in:
parent
fd596351ba
commit
e77940565d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue