NAME
Lingua::Word2Num
VERSION
version 0.044
DESCRIPTION
Wrapper for text to number conversion modules of various languages in the Lingua:: hierarchy.
$Rev: 440 $
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.
SYNOPSIS
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.";
Functions Reference
- cardinal (positional)
-
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.
- known_langs
-
=> array ref list of known languages
List of all currently supported languages.
- new
-
Constructor.
- preprocess_code
-
Private.
EXPORT_OK
cardinal known_langs
AUTHOR
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
Copyright (C) PetaMem, s.r.o. 2004-present
LICENSE
Artistic license or BSD license.