Open
Description
Currently, partially written numbers throw ValueError. It would be an interesting addition to handle such cases.
>> text2num('10 millions', 'fr')
ValueError: invalid literal for text2num: '10 millions'
Expected result:
10000000
Similarly, numbers represented as text also throw ValueError instead of being converted to int.
>>> text2num('10', 'fr')
ValueError: invalid literal for text2num: '10'
Expected result:
10