The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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',
        hyphenate => 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.
hyphenate: separate runs of Lao syllables with hyphens if true. Otherwise, blanks are used.

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.