From f24f9b4b7b345ab516956917aa7b4b8308fc09a3 Mon Sep 17 00:00:00 2001 From: ines Date: Sun, 12 Mar 2017 13:48:40 +0100 Subject: [PATCH] Remove unused code --- spacy/orth.pyx | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/spacy/orth.pyx b/spacy/orth.pyx index 997f88d06..1a6ffee34 100644 --- a/spacy/orth.pyx +++ b/spacy/orth.pyx @@ -159,27 +159,3 @@ cpdef unicode word_shape(unicode string): if seq < 4: shape.append(shape_char) return ''.join(shape) - - -# Exceptions --- do not convert these -_uk_us_except = set([ - 'our', - 'ours', - 'four', - 'fours', - 'your', - 'yours', - 'hour', - 'hours', - 'course', - 'rise', -]) -def uk_to_usa(unicode string): - if not string.islower(): - return string - if string in _uk_us_except: - return string - our = re.compile(r'ours?$') - string = our.sub('or', string) - - return string