Skip to main content
Syllable validation is the first layer in the pipeline. It checks Myanmar character sequences against structural rules before attempting more expensive word or context analysis.

Why Start from Syllables?

Myanmar has no spaces between words, so you can’t split text into words without a dictionary. But you can split it into syllables using regex alone. Since every word is made of one or more syllables, checking syllable structure first catches the majority of errors cheaply. Traditional spell checkers would try to segment text into words first, which is:
  1. Expensive computationally
  2. Error-prone on misspelled text
  3. Wasteful when obvious typos exist
mySpellChecker inverts this:
  1. Break text into syllables first (fast, deterministic)
  2. Validate syllables (catches 90%+ of typos immediately)
  3. Only assemble valid syllables into words for deeper checking

Syllable Anatomy

A Myanmar syllable follows this pattern:

Simple Syllables

Note: Tonal information is omitted from these transcriptions for simplicity. Standard Burmese has four tones (low, high, creaky, checked).

Complex Syllables (with Medials)

Medial order (Unicode canonical order, UTN #11):
Valid: ကြွ (ြ before ွ) | Invalid: ကွြ (wrong order)

Common Syllable Patterns

How It Works

1

Syllable Segmentation

Text is broken into syllables using Myanmar orthographic rules:
2

Rule-Based Validation

Each syllable is checked against 5 structural rules:Rule 1: Must start with consonant
Rule 2: Medials in correct order (Ya < Ra < Wa < Ha)
Rule 3: No duplicate medials
Rule 4: Vowel compatibility
Rule 5: Finals at end position
3

Dictionary Lookup

Valid syllable structures are checked against the syllable dictionary:

Stacked Consonants

Kinzi (special stacking with င):
Regular stacking (using virama ္):

Configuration

Enable/Disable Syllable Validation

Syllable Rule Configuration

Syllable Error Types

Invalid Structure

Syllable doesn’t follow Myanmar orthographic rules:

Unknown Syllable

Valid structure but not in dictionary:

Medial Confusion

Common error with similar-looking medials:

Performance Characteristics

Syllable validation is the fastest layer in the pipeline. Each syllable is validated independently with O(1) dictionary lookups, making it suitable for real-time typing feedback.

API Reference

Using SpellChecker for Syllable Validation

Note: Direct instantiation of SyllableValidator requires a DI container setup. For most use cases, use SpellChecker.check() instead.

SyllableRuleValidator

Common Patterns

Real-Time Validation

Syllable-Only Suggestions

Troubleshooting

Issue: Valid syllables marked as errors

Cause: Syllable not in dictionary Solution: Add to custom dictionary or update database:

Issue: Slow syllable validation

Cause: Missing Cython extensions Solution: Rebuild extensions:

Issue: Incorrect syllable segmentation

Cause: Complex stacked consonants or rare characters Solution: Use custom segmenter or report issue:

Next Steps