akshaynagpal / w2n

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

Fixing a lot of bugs, massive refactoring, added function to replace numbers in-place in sentences #67

Open TurqW opened 2 years ago

TurqW commented 2 years ago

numwords_to_sentences isn't perfect - it can't tell the difference between e.g. "one thousand, two hundred, and three" = 1203 and "four, seven, twelve, three" = "4, 7, 12, 3", currently the former would give "1203" and the latter would give "26". Good enough for my purposes, though, and considering the number of bugs in the old version...