mirror of https://github.com/explosion/spaCy.git
* Add length cap to word shape feature
This commit is contained in:
parent
128b6d9714
commit
06639dc497
|
@ -112,6 +112,8 @@ cpdef bint like_number(unicode string):
|
|||
|
||||
|
||||
cpdef unicode word_shape(unicode string):
|
||||
if len(string) >= 100:
|
||||
return 'LONG'
|
||||
length = len(string)
|
||||
shape = []
|
||||
last = ""
|
||||
|
|
Loading…
Reference in New Issue