Skip to main content
Myanmar language is tonal, and tone marks (like , ) change the meaning of words completely. However, these marks are frequently omitted or misused in informal typing. The Tone Disambiguator module uses context to infer the correct tonal spelling when multiple valid dictionary words share the same base form.

The Problem

Consider the word သာ:
  1. သာ (Low tone): meaning “merely/pleasant”.
  2. သား (High tone): meaning “son”.
Or ငါ:
  1. ငါ (Low tone): Pronoun “I/Me”.
  2. ငါး (High tone): “Five” or “Fish”.
A standard spell checker might see ငါ as correct even in the sentence ငါ ကောင် (intended ငါး ကောင် - five animals), because ငါ is a valid word.

Solution: Context-Aware Disambiguation

mySpellChecker includes a rule-based disambiguator that looks at a 3-word window around ambiguous terms to decide the likely intended meaning.

Usage

The disambiguator is available as a utility:

Supported Ambiguity Patterns

The system currently handles several high-frequency ambiguous clusters:

Tone Mark Correction

Beyond ambiguous words, the module also detects missing or wrong tone marks for specific high-probability patterns:
  • Question Particle: သလာသလား (e.g., စားပြီးပြီသလာစားပြီးပြီသလား)
  • Numbers: သုံသုံး (Three)
  • Numbers/Wind: လေလေး (Four/wind, context-dependent and only in numeral contexts)

Configuration

The disambiguator is integrated into the main SpellChecker validation pipeline and configured via ToneConfig:
The default ambiguity patterns and tone mark corrections are hard-coded in the module. To customize them, provide your own mappings via the YAML-based grammar rules system using tone_rules.yaml.