I need to convert one
into 1
, two
into 2
and so on.
Is there a way to do this with a library or a class or anythi
I have just released a python module to PyPI called word2number for the exact purpose. https://github.com/akshaynagpal/w2n
Install it using:
pip install word2number
make sure your pip is updated to the latest version.
Usage:
from word2number import w2n
print w2n.word_to_num("two million three thousand nine hundred and eighty four")
2003984