Find lowercased forms of numeric words

This commit is contained in:
Kit 2018-01-08 03:25:08 +01:00
parent dba6adea65
commit 9bc524982e
No known key found for this signature in database
GPG Key ID: E9B25746C2EADBA0
7 changed files with 8 additions and 8 deletions

View File

@ -41,9 +41,9 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
if text in _ordinal_words:
if text.lower() in _ordinal_words:
return True
return False

View File

@ -20,7 +20,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
return False

View File

@ -31,7 +31,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
return False

View File

@ -27,7 +27,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
if text.count('-') == 1:
_, num = text.split('-')

View File

@ -30,7 +30,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
return False

View File

@ -28,7 +28,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
return False

View File

@ -25,7 +25,7 @@ def like_num(text):
num, denom = text.split('/')
if num.isdigit() and denom.isdigit():
return True
if text in _num_words:
if text.lower() in _num_words:
return True
return False