Lingua::EN::Words2Nums is a perl module that can parse a wide variety of English text and deduce the number it represents. For example, it can convert "five million, one thousand and sixteen" to 5001016, and "twenty-seventh" to 27.
Lingua::EN::Words2Nums is available from CPAN, is
packaged for Debian in the liblingua-en-words2nums package, and has a
git repository at git://git.kitenet.net/words2nums
News
liblingua-en-words2nums-perl 0.17 released with these changes
- Use debhelper v7; rules file minimisation.
liblingua-en-words2nums-perl 0.16 released with these changes
- The repository has moved from svn to git.
- Minor improvement to debian/rules clean.
liblingua-en-words2nums-perl 0.15 released with these changes
- Update url to the web site.
- Current standards-version (no real changes).
- Fix unicode error in man page.
- Fix lintian warning about rules file.
The book Advanced Perl Programming has a section on using Lingua::EN::Words2Nums. I don't own the book so I've not been able to read the whole thing.