NAME
Lingua::LO::Transform - Various Lao text processing functions
SYNOPSIS
use Lingua::LO::Transform;
use Data::Dumper;
use utf8;
my $laotr = Lingua::LO::Transform->new;
my @syllables = $laotr->split_to_syllables("ສະບາຍດີ"); # qw( ສະ ບາຍ ດີ )
print Dumper(\@syllables);
for my $syl (@syllables) {
my $clas = $laotr->analyze_syllable($syl);
printf "%s: %s\n", $clas->syllable, $clas->tone;
# ສະ: TONE_HIGH_STOP
# ບາຍ: TONE_LOW
# ດີ: TONE_LOW
}
DESCRIPTION
This module provides various functions for processing Lao text. Currently it can
METHODS =head2 EXPORT
new
new(option > value, ...)
The object constructor currently does nothing; there are no options. However, it is likely that there will be in future versions, therefore it is highly recommended to call methods as object methods so your code won't break when I introduce them.
split_to_syllables
my @syllables = $object->split_to_syllables($text);
Split Lao text into its syllables. Uses a regexp modelled after Phissamay, Dalaloy and Durrani: "Syllabification of Lao Script for Line Breaking". Takes as its only parameter a character string to split and returns a list of syllables.
analyze_syllable
my $classified = $object->analyze_syllable($syllable);
Returns a Lingua::LO::Transform::Analyze object that allows you to query various syllable properties such as core consonant, tone mark, vowel length and tone. See there for details.