mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Remove unused code
This commit is contained in:
parent
1da29a7146
commit
f24f9b4b7b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user