Lingua::IT::Hyphenate - Italian word hyphenation
use Lingua::IT::Hyphenate qw( sillabe ); @syllabes = sillabe( @whatever );
The sillabe (italian for "syllabes") function, which can be exported to your main namespace, gets one or more text strings and returns an array of syllabes. Note that it destroys everything which is not considered part of a word (punctuation et alia); it leaves untouched numbers and the ' (single quote).
sillabe
print join("-", sillabe("salve, mondo!")); # returns: sal-ve-mon-do
The hyphenation algorithm doesn't take into account sequences of vowels for which there are no predictable rules (eg. it doesn't distinguish between italian "iato" and "dittongo"), so "aiuto" is hyphenated as "aiu-to" (instead of the correct "a-iu-to").
It's not complete, but at least it doesn't produce wrong results.
Aldo Calpini ( dada@perl.it ).
dada@perl.it
To install Lingua::IT::Hyphenate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::IT::Hyphenate
CPAN shell
perl -MCPAN -e shell install Lingua::IT::Hyphenate
For more information on module installation, please visit the detailed CPAN module installation guide.