akshaynagpal / w2n

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

Error case: seven two five #45

Open JMante1 opened 4 years ago

JMante1 commented 4 years ago

For some reason when I put in seven two five it outputs 19 rather than 725 or an error.

bobbintb commented 4 years ago

Same here. It's not even that it adds up either. I tried "The Taking of Pelham One Two Three" and it returns 5.

I am using it for movie titles. It seems when the number words are separated by non-number words, it adds. Seven Brides for Seven Brothers 14

Thirteen Going on Thirty 43

If they are individualized (ie "seven two five" instead of "seven hundred and twenty five") it does something else entirely.

akshaynagpal commented 4 years ago

Thanks for pointing this out. I will look into this ASAP.