#nlp #myanmar #burmese

bin+lib myanmar_util

A collection of tools for processing Myanmar text including syllable breaking and other utilities

1 unstable release

Uses new Rust 2024

new 0.1.0 Apr 21, 2025

#1061 in Text processing

MIT license

12KB
188 lines

Myanmar Util

A collection of Rust utilities for processing Myanmar (Burmese) text.

Features

  • Syllable Breaking: Accurately breaks Myanmar text into syllables following linguistic rules
  • Command Line Interface: Easy-to-use CLI for text processing
  • Regular Expression Utilities: Special regex patterns designed for Myanmar text analysis

Installation

Add this to your Cargo.toml:

[dependencies]
myanmar_util = "0.1.0"

Or install the CLI tool:

cargo install myanmar_util

Usage

As a Library

use myanmar_util::{syllable_break, syllable_break_phoneme};

fn main() {
    // Break text into syllables
    let text = "မင်္ဂလာပါ";


    let syllable_text = syllable_break(&text, Some("|"))
    println!("{}", syllable_text);  // မင်္ဂ|လာ|ပါ

    let syllable_text = syllable_break_phoneme(&text, Some("|"))
    println!("{}", syllable_text);  // မင်|ဂ|လာ|ပါ

}

Command Line

# Break text into syllables with default separator (|)
myanmar_util syllablebreak -s "|" -i input.txt -o output.txt -t "M"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dependencies

~3.5–5MB
~91K SLoC