I need a function to convert numbers like "twenty two" to 22.
I've to write it in spanish, and I'll probably write down (or search) the formal gramatic that defines the complete way to write down numbers and make a parser, however, as the complete code is in Python, I assumed there has to be an already existing library to do the magic, atleast in english.
Is there any known library that does this in a reasonable way? I don't need very big numbers, just zero to one million or so.