mirror of
https://github.com/explosion/spaCy.git
synced 2025-05-29 10:13:19 +03:00
Fix multi-line string of NUM_WORDS (resolves #759)
This commit is contained in:
parent
be26085277
commit
09ecc39b4e
|
@ -108,11 +108,12 @@ cpdef bint like_url(unicode string):
|
||||||
|
|
||||||
|
|
||||||
# TODO: This should live in the language.orth
|
# TODO: This should live in the language.orth
|
||||||
NUM_WORDS = set('zero one two three four five six seven eight nine ten'
|
NUM_WORDS = set('''
|
||||||
'eleven twelve thirteen fourteen fifteen sixteen seventeen'
|
zero one two three four five six seven eight nine ten eleven twelve thirteen
|
||||||
'eighteen nineteen twenty thirty forty fifty sixty seventy'
|
fourteen fifteen sixteen seventeen eighteen nineteen twenty thirty forty fifty
|
||||||
'eighty ninety hundred thousand million billion trillion'
|
sixty seventy eighty ninety hundred thousand million billion trillion
|
||||||
'quadrillion gajillion bazillion'.split())
|
quadrillion gajillion bazillion
|
||||||
|
'''.split())
|
||||||
cpdef bint like_number(unicode string):
|
cpdef bint like_number(unicode string):
|
||||||
string = string.replace(',', '')
|
string = string.replace(',', '')
|
||||||
string = string.replace('.', '')
|
string = string.replace('.', '')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user