* Add length cap to distance feature

This commit is contained in:
Matthew Honnibal 2015-05-31 05:25:30 +02:00
parent fd596351ba
commit e77940565d
1 changed files with 1 additions and 1 deletions

View File

@ -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)