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
liblingua-en-words2nums-perl 0.18 released with these changes
- Remove the PM_FILTER to support Windows. (rt.cpan.org #38101)
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.
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.