NAME
Lingua::LO::Transform::Data - Helper module to keep common read-only data
FUNCTION
Provides a few functions that return regular expressions for matching and extracting parts from Lao syllables. Instead of hardcoding these expressions as strings, they are constructed from ragments at runtime, trading maintainability for a small one-time initialization cost.
Also holds common read-only data such as vowel classifications.
You will probably not want to use this module on its own. If you do, see the other Lingua::LO::Transform modules for examples.
FUNCTIONS
get_sylre_basic
Returns a basic regexp that can match a Lao syllable. It consists of a bunch of alternations and will thus return the first possible match which is neither guaranteed to be the longest nor the appropriate one in a longer sequence of characters. It is useful as a building block and for verifying syllables though.
get_sylre_full
In addition to the matching done by get_sylre_basic, this one makes sure matches are either followed by another complete syllable, a blank, the end of string/line or some non-Lao character. This ensures correct matching of ambiguous syllable boundaries where the core consonant of a following syllable could also be an end consonant of the current one.
get_sylre_named
The expression returned is the same as for get_sylre_full but also includes named captures that upon a successful match allow to get the syllable's parts from %+
.