Lingua::Word2Num
version 0.0682
A wrapper for Lingua:XXX::word2num modules.
Lingua::Word2Num is a module for converting texts in their spoken language representation into numbers. This is wrapper for various Lingua::XXX::Word2Num modules. Input text must be in utf8 encoding.
For further information about various limitations see documentation for currently used package.
use Lingua::Word2Num; my $words = Lingua::Word2Num->new; # try to use czech module (Lingua::CES::Word2Num) for conversion to number my $number = $words->cardinal( 'ces', 'sto dvacet' ); # or procedural usage if you dislike OO my $number = Lingua::Word2Num::cardinal( 'ces', 'sto dvacet'); print $text || "sorry, can't convert this czech language text into number.";
1 string language 2 text text to convert => number converted number undef if the input string is not known
Conversion from a text in the specified language into a number.
=> array ref list of known languages
List of all currently supported languages.
Constructor.
Private.
cardinal known_langs
coding, maintenance, refactoring, extensions, specifications: Richard C. Jelinek <info@petamem.com> initial coding after specification by R. Jelinek: Vitor Serra Mori E<info@petamem.com>
Copyright (C) PetaMem, s.r.o. 2004-present
Artistic license or BSD license.
To install Lingua::Word2Num, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::Word2Num
CPAN shell
perl -MCPAN -e shell install Lingua::Word2Num
For more information on module installation, please visit the detailed CPAN module installation guide.