Update entract_numbers_en to use the new functions.

This is in support of issues-1959.
pull/1977/head
Chris Rogers 2019-01-29 20:57:16 -05:00
parent f4723b1026
commit 690df0b1d3
1 changed files with 3 additions and 2 deletions

View File

@ -1250,8 +1250,9 @@ def extract_numbers_en(text, short_scale=True, ordinals=False):
Returns:
list: list of extracted numbers as floats
"""
return extract_numbers_generic(text, pronounce_number_en, extractnumber_en,
short_scale=short_scale, ordinals=ordinals)
text = convert_words_to_numbers(text, short_scale, ordinals)
numbers = re.findall("(?P<value>\d+(?:\.?\d+)?)", text)
return [float(number) for number in numbers]
def normalize_en(text, remove_articles):