Fix multi-line string of NUM_WORDS (resolves #759)

This commit is contained in:
Ines Montani 2017-01-20 15:11:31 +01:00
parent be26085277
commit 09ecc39b4e

View File

@ -108,11 +108,12 @@ cpdef bint like_url(unicode string):
# TODO: This should live in the language.orth
NUM_WORDS = set('zero one two three four five six seven eight nine ten'
'eleven twelve thirteen fourteen fifteen sixteen seventeen'
'eighteen nineteen twenty thirty forty fifty sixty seventy'
'eighty ninety hundred thousand million billion trillion'
'quadrillion gajillion bazillion'.split())
NUM_WORDS = set('''
zero one two three four five six seven eight nine ten eleven twelve thirteen
fourteen fifteen sixteen seventeen eighteen nineteen twenty thirty forty fifty
sixty seventy eighty ninety hundred thousand million billion trillion
quadrillion gajillion bazillion
'''.split())
cpdef bint like_number(unicode string):
string = string.replace(',', '')
string = string.replace('.', '')