* Refine word_shape feature, by trimming the max sequence length

This commit is contained in:
Matthew Honnibal 2014-11-07 04:41:29 +11:00
parent b4454cf036
commit 3cab1d9a29

View File

@ -146,7 +146,7 @@ def word_shape(string):
else: else:
seq = 0 seq = 0
last = shape_char last = shape_char
if seq < 5: if seq < 4:
shape.append(shape_char) shape.append(shape_char)
return ''.join(shape) return ''.join(shape)