Skip to main content
The text validator checks Myanmar text for structural correctness, catching invalid character ordering, encoding artifacts (Zawgyi remnants), doubled diacritics, and other issues that indicate malformed input rather than spelling errors.

Overview

ValidationIssue Enum

All validation issues are categorized using the ValidationIssue enum:

Core Functions

validate_word

Quick boolean validation check for a single word:

validate_text

Validates text and returns detailed issue information:

Validation Categories

Structural Validation

Checks Myanmar character structure rules using validate_text for detailed issues:

Encoding Detection

Detects legacy Zawgyi encoding:

Quality Filters

Detects low-quality or incomplete words:

Known Invalid Words

A curated list of ~50 verified invalid words that commonly appear in corpora:

Valid Pali/Sanskrit Endings

Whitelist of ~80 words with valid bare consonant endings (Pali/Sanskrit loanwords):

Extended Myanmar Detection

Detects Myanmar Extended-A and Extended-B characters:

Integration with SpellChecker

The validation module integrates with the main spell checker:

Data Pipeline Integration

Used in the data pipeline to filter corpus words:

Performance

Use Cases

Corpus Cleaning

Quality Reporting

See Also