| Checker | Purpose | Error Types |
|---|---|---|
| AspectChecker | Verb aspect markers | Typos, invalid sequences |
| ClassifierChecker | Numeral classifiers | Typos, agreement errors |
| CompoundChecker | Compound words | Typos, malformed compounds |
| MergedWordChecker | Merged word detection | Segmenter merge errors |
| NegationChecker | Negation patterns | Typos, missing endings |
| ParticleChecker | Particle context validation | Particle misuse |
| TenseAgreementChecker | Tense-time agreement | Tense mismatch |
| RegisterChecker | 3-way register detection | Mixed register usage |
AspectChecker
Validates Myanmar verb aspect markers that modify verbs to express temporal, modal, and aspectual meanings.Aspect Categories
| Category | Markers | Meaning | Example |
|---|---|---|---|
| Completion | ပြီ, ပြီး | Action completed | သွားပြီ (went) |
| Progressive | နေ | Ongoing action | စားနေ (eating) |
| Habitual | တတ် | Habitual action | စားတတ် (eats habitually) |
| Resultative | ထား | Maintained state | ရေးထား (have written) |
| Directional | လာ, သွား | Motion direction | ပြန်လာ (come back) |
| Desiderative | ချင် | Desire/want | လာချင် (want to come) |
| Potential | နိုင်, ရ | Ability/possibility | လုပ်နိုင် (can do) |
| Immediate | လိုက် | Following action | လိုက်သွား (follow and go) |
| Experiential | ဖူး | Past experience | ရေးဖူး (have written before) |
Usage
ClassifierChecker
Validates Myanmar numeral + classifier patterns. Myanmar uses numeral classifiers similar to Chinese/Japanese.Pattern: Numeral + Classifier + Noun
| Numeral | Classifier | Noun | Meaning |
|---|---|---|---|
| သုံး | ယောက် | (person) | 3 people |
| ငါး | ကောင် | (animal) | 5 animals |
| နှစ် | အုပ် | (book) | 2 books |
| တစ် | လုံး | (round object) | 1 (round object) |
Usage
Classifier-Noun Agreement
CompoundChecker
Detects and validates Myanmar compound word formations.Compound Types
| Type | Pattern | Example | Result |
|---|---|---|---|
| Noun-Noun | N + N | ပန်း + ခြံ | ပန်းခြံ (flower garden) |
| Verb-Verb | V + V | စား + သောက် | စားသောက် (dine) |
| Reduplication | X + X | ဖြေး → | ဖြေးဖြေး (slowly) |
| Affixed | Prefix + Root | အ + လုပ် | အလုပ် (work) |
Usage
Analyze Compounds
MergedWordChecker
Detects words that the segmenter may have incorrectly merged from a particle + verb sequence into a single compound word.Problem
Myanmar word segmenters sometimes merge adjacent tokens when the concatenation forms a valid dictionary word:| Input | Intended | Segmented | Issue |
|---|---|---|---|
| သူက စားသောကြောင့် | သူ + က + စား + သောကြောင့် | သူ + ကစား + သောကြောင့် | ”က” + “စား” merged to “ကစား” (play) |
Detection Strategy
A merged word is flagged ONLY when ALL conditions hold:- The word is in the known ambiguous-merge set (e.g., “ကစား”)
- The preceding word is a NOUN or PRONOUN (POS: N, PRON)
- The following word is a clause-linking particle or verb-final marker
Configuration
The checker uses a conservative confidence of 0.80 since this is a heuristic that cannot be 100% certain without semantic understanding.NegationChecker
Validates Myanmar negation patterns. Myanmar negation follows specific structures.Negation Patterns
| Pattern | Structure | Example | Meaning |
|---|---|---|---|
| Standard | မ + verb + ဘူး | မသွားဘူး | don’t go |
| Polite | မ + verb + ပါဘူး | မသွားပါဘူး | politely don’t go |
| Prohibition | မ + verb + နဲ့ | မလုပ်နဲ့ | Don’t do! |
| Formal | မ + verb + ပါ | မရှိပါ | doesn’t exist (formal) |
Usage
Detect Negation Patterns
ParticleChecker
Validates Myanmar particle usage given verb and noun context. Myanmar particles (postpositions) must agree with the verb type and syntactic role of surrounding words.Common Misuse Patterns
| Pattern | Incorrect | Correct | Explanation |
|---|---|---|---|
| Motion verb + static locative | ကျောင်းမှာ သွားတယ် | ကျောင်းကို သွားတယ် | Use ကို/သို့ with motion verbs |
| Sequential ပြီ where ပြီး needed | စားပြီ သွားတယ် | စားပြီး သွားတယ် | ပြီး links sequential actions |
| Negation + affirmative ending | မသွားတယ် | မသွားဘူး | Negated sentences need ဘူး |
Features
- Particle confusion pair detection from YAML rules (
particle_contexts.yaml) - Verb-particle frame checking — validates verb+particle compatibility
- POS-tag-aware validation with fallback heuristics when tags unavailable
- Configurable confidence thresholds via
ParticleCheckerConfig
Usage
Singleton Access
YAML Configuration
Particle rules are defined inrules/particle_contexts.yaml:
TenseAgreementChecker
Validates that aspectual particles (sentence-final markers) agree with temporal adverbials in Myanmar sentences. When a temporal adverb indicates a specific tense, the sentence-final particle must match.Examples
| Status | Sentence | Explanation |
|---|---|---|
| Correct | မနေ့က သွားခဲ့တယ် | yesterday + past marker |
| Incorrect | မနေ့က သွားမယ် | yesterday + future marker |
| Correct | မနက်ဖြန် သွားမယ် | tomorrow + future marker |
| Incorrect | မနက်ဖြန် သွားခဲ့တယ် | tomorrow + past marker |
Usage
Checking Individual Words
YAML Configuration
Tense rules are defined inrules/tense_markers.yaml:
Configuration
RegisterChecker
Validates register consistency across three tiers: formal, polite, and colloquial. Myanmar has distinct register markers at the sentence-final position, and mixing registers within a sentence is a stylistic error.Three-Tier Register System
| Register | Sentence-Final Particles | Pronouns | Use Context |
|---|---|---|---|
| Formal | သည်, ၏ | သူသည် | Written prose, news, official documents |
| Polite | ပါတယ်, ပါမယ် | — | Respectful speech, customer service |
| Colloquial | တယ်, မယ် | သူ, ငါ | Casual conversation, informal writing |
Mixing Severity
| Combination | Severity | Confidence |
|---|---|---|
| Formal + Colloquial | High (strong mismatch) | 0.85 |
| Formal + Polite | Low (formality gap) | 0.65 |
| Polite + Colloquial | Medium | 0.75 |
Usage
Detect Sentence Register
Validate Register Consistency
Configuration
Integration with SpellChecker
All grammar checkers are automatically used when grammar checking is enabled:Error Types Summary
| Checker | Error Types |
|---|---|
| AspectChecker | aspect_typo, invalid_sequence, incomplete_aspect |
| ClassifierChecker | typo, agreement, missing, invalid_pattern |
| CompoundChecker | compound_typo, invalid_compound, incomplete_reduplication |
| MergedWordChecker | merged_word |
| NegationChecker | typo, missing_ending, invalid_pattern |
| ParticleChecker | particle_misuse |
| TenseAgreementChecker | tense_mismatch |
| RegisterChecker | register_error |
See Also
- Grammar Checking - Main grammar checking feature
- Grammar Engine - Rule engine internals
- POS Tagging - Part-of-speech tagging
- Loan Word Variants - Transliteration variant handling
- Rules System - YAML configuration files