Prevent the conversion of ints to floats>
This is in support of issues-1959. This continues the work of
returning the relevant text that corresponds to a number
parsed from a string.
@@ -253,7 +253,9 @@ def extractnumber_en_with_text(text, short_scale=True, ordinals=False):
# is this word already a number ?
if is_numeric(word):
- # if word.isdigit(): # doesn't work with decimals
+ if word.isdigit(): # doesn't work with decimals
+ val = int(word)
+ else:
val = float(word)
# is this word the name of a number ?
