View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Aldo Calpini > Lingua-IT-Hyphenate > Lingua::IT::Hyphenate



Annotate this POD

View/Report Bugs
Module Version: 0.14   Source  


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).

    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 ( ).

syntax highlighting: