akshaynagpal / w2n

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

Edge case: twothousand #77

Open thomasf1 opened 1 year ago

thomasf1 commented 1 year ago

There is a small bug, I´d not necessarily expect for the package to get it right, but maybe it would be good to throw an error if there are strings in there it doesn´t understand...

print(w2n.word_to_num('twothousand and one'))
1
print(w2n.word_to_num('two thousand and one'))
2001

Thanks for the package :)