From 06639dc4971e5c2435f4308df5b2b4b03fe0e437 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 20 Jul 2015 12:06:59 +0200 Subject: [PATCH] * Add length cap to word shape feature --- spacy/orth.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/orth.pyx b/spacy/orth.pyx index 17922b10c..b2273f665 100644 --- a/spacy/orth.pyx +++ b/spacy/orth.pyx @@ -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 = ""