akshaynagpal / w2n

Convert number words (eg. twenty one) to numeric digits (21)
http://w2n.readthedocs.io
MIT License
167 stars 78 forks source link

Bug when number mix with other words #69

Open ycchhueannu opened 2 years ago

ycchhueannu commented 2 years ago

In my opinion the followings should not be treated as number.

>>> from word2number import w2n
>>> w2n.word_to_num('at least five million.')
5
>>> w2n.word_to_num('ten years later')
10
>>> w2n.word_to_num('two men and three women')
5
zmerpez commented 1 year ago

print(w2n.word_to_num('2 million')) 1000000