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
Make use of the python package : WordToDigits
pip install wordtodigits
It can find numbers present in word form in a sentence and then convert them to the proper numeric format. Also takes care of the decimal part, if present. The word representation of numbers could be anywhere in the passage.
https://pypi.org/project/wordtodigits/