finnfiddle / words-to-numbers

JS library to convert textual words to numbers with optional fuzzy text matching
MIT License
248 stars 57 forks source link

Need to add a space at the end to make it work #11

Closed ibmua closed 7 years ago

ibmua commented 7 years ago

'digit one' will not work, but 'digit one ' will. Bug.

ibmua commented 7 years ago

I would also highly advice making turning 'a' into 1s optional.

ibmua commented 7 years ago

Also, stuff like one-thirty doesn't work. Should be 1 30, got 31. And one thirtieth gives the same thing, when it should really be 1/30.

ibmua commented 7 years ago

'thousand' / 'million' / 'billion' => 0

Incredible!

finnfiddle commented 7 years ago

sorry for the delay, I will be pushing a fix tomorrow. Completely refactored the whole library using ohm.js so now things will work much better

finnfiddle commented 7 years ago

fixed in fc621fed10c9aa2047059da35472de59f48351ee (v1.2.2 on npm) everything except for "one thirtieth". Im treating fractions as a feature and will get to them sometime in the near future. closing this issue because the bugs you found are now fixed. thanks for the feedback