Best to try Google. Depending on your needs, something like this might do the trick: https://pypi.org/project/word2number/