ICU
http://www-306.ibm.com/software/globalization/icu/index.jsp can convert 17 to "seventeen", but I don't know if they have implemented the reverse process, too.
If you can't find something predefined, you could write a parser (using SableCC, ANTLR etc). But to help you to find the best way, I would need some more background: How big are the numbers? Are they always formatted the same way, or not ("hundred" vs "one hundred" etc). Do you have only numbers or are they embedded in other text?
Landei