mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-25 11:23:40 +03:00
* 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):
|
cpdef unicode word_shape(unicode string):
|
||||||
|
if len(string) >= 100:
|
||||||
|
return 'LONG'
|
||||||
length = len(string)
|
length = len(string)
|
||||||
shape = []
|
shape = []
|
||||||
last = ""
|
last = ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user