lao-word-splitter
Version:
A utility to split Lao language sentences into individual words
26 lines (25 loc) • 1.01 kB
TypeScript
/**
* Main entry point for the Lao Word Splitter library.
* This file exports the main function for splitting Lao text into words.
*/
/**
* Splits a Lao language sentence into individual words.
* This is the main function that users of the library will interact with.
*
* @param sentence - The Lao text to be split into words
* @returns An array of words extracted from the input sentence
*
* @example
* ```typescript
* // Basic usage
* const words = splitLao("ສະບາຍດີ"); // Returns ["ສະ", "ບາຍ", "ດີ"]
*
* // Handling complex cases
* const complexWords = splitLao("ປະເທດລາວເປັນສິ່ງສວຍງາມ");
* // Returns ["ປະ", "ເທດ", "ລາວ", "ເປັນ", "ສິ່ງ", "ສວຍ", "ງາມ"]
*
* // Handling mixed content
* const mixedWords = splitLao("ພາສາລາວ 101"); // Returns ["ພາ", "ສາ", "ລາວ", "101"]
* ```
*/
export declare function splitLao(sentence: string): string[];