NAME

Lingua::LO::NLP::Romanize - Romanize Lao syllables

FUNCTION

This s a factory class for Lingua::LO::NLP::Romanize::*. Currently there is only Lingua::LO::NLP::Romanize::PCGN but other variants are planned.

SYNOPSIS

my $o = Lingua::LO::NLP::Romanize->new(
    variant => 'PCGN',
    hyphen => 1,
);

METHODS

new

See "SYNOPSIS" on how to use the constructor. Arguments supported are:

variant: standard according to which to romanize. "PCGN" is the only one currently implemented.
hyphen: separate runs of Lao syllables with hyphens. Set this to the character you would like to use as a hyphen - usually this will be the ASCII "hyphen minus" (U+002D) but it can be the unambiguous Unicode hyphen ("‐", U+2010), a slash or anything you like. As a special case, you can pass a 1 to use the ASCII version. If this argument is missing or undef, blanks are used. Syllables duplicated using "ໆ" are always joined with a hyphen: either the one you specify or the ASCII one.

romanize

romanize( $text )

Return the romanization of $text according to the standard passed to the constructor. Text is split up by "get_fragments" in Lingua::LO::NLP::Syllabify; Lao syllables are processed and everything else is passed through unchanged save for possible conversion of combining characters to a canonically equivalent form in "NFC" in Unicode::Normalize.

romanize_syllable

romanize_syllable( $syllable )

Return the romanization of a single $syllable according to the standard passed to the constructor. This is a virtual method that must be implemented by subclasses.