NAME

Lingua::IT::Hyphenate - Italian word hyphenation

SYNOPSIS

use Lingua::IT::Hyphenate qw( sillabe );

@syllabes = sillabe( @whatever );

DESCRIPTION

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.

AUTHOR

Aldo Calpini ( dada@perl.it ).