akshaynagpal / w2n

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

Number combinations that don't make sense should throw exception #75

Open pandoman opened 1 year ago

pandoman commented 1 year ago

When you process a string of "numeric" text, w2n returns an incorrect value rather than throw an exception. For example, the string "ten thirty" (imho) should throw an exception because nobody (in the English speaking world) specifies a number using those words. This would be useful when processing a string that, for example, includes time and "ten thirty" should be considered two separate numbers.