error_type that identifies the category of issue. Use these codes to filter, route, or display errors differently in your application.
Overview
mySpellChecker uses anErrorType enum to categorize detected errors. Each error type is a string value that describes the nature of the spelling or grammar issue.
Error Type Format
Error types are string constants defined inmyspellchecker.core.constants.ErrorType. Use them for filtering and handling specific error categories:
Core Error Types
invalid_syllable
Enum: ErrorType.SYLLABLE
Layer: Syllable (Layer 1)
The syllable does not follow valid Myanmar syllable structure rules or is not found in the syllable dictionary.
- Incorrect medial ordering (ွ before ြ)
- Missing consonant at start
- Invalid character combinations
- Unknown syllable not in dictionary
invalid_word
Enum: ErrorType.WORD
Layer: Word (Layer 2)
The word is not found in the dictionary, though its syllables may be individually valid.
grammar_error
Enum: ErrorType.GRAMMAR
Layer: Grammar (Layer 2.5)
General grammar rule violation detected by the grammar checking system.
Context Error Types
context_probability
Enum: ErrorType.CONTEXT_PROBABILITY
Layer: Context (Layer 3)
The word sequence has unusually low N-gram probability, indicating an unlikely or nonsensical combination.
semantic_error
Enum: ErrorType.SEMANTIC_ERROR
Layer: Context (Layer 3)
Semantic validation failure detected by the semantic checker (requires AI model).
Specific Error Types
particle_typo
Enum: ErrorType.PARTICLE_TYPO
Known particle typo pattern detected (e.g., တယ → တယ်).
medial_confusion
Enum: ErrorType.MEDIAL_CONFUSION
Likely confusion between similar-looking medials (ျ Ya-yit vs ြ Ya-pin).
colloquial_variant
Enum: ErrorType.COLLOQUIAL_VARIANT
Colloquial (informal) spelling detected in strict mode.
colloquial_info
Enum: ErrorType.COLLOQUIAL_INFO
Colloquial spelling detected in lenient mode (informational note, not an error).
question_structure
Enum: ErrorType.QUESTION_STRUCTURE
Question structure error detected (e.g., missing question particle).
syntax_error
Enum: ErrorType.SYNTAX_ERROR
General syntactic error detected by validation strategies.
homophone_error
Enum: ErrorType.HOMOPHONE_ERROR
Homophone-related error - words that sound alike but have different spellings.
tone_ambiguity
Enum: ErrorType.TONE_AMBIGUITY
Ambiguous tone mark usage detected.
pos_sequence_error
Enum: ErrorType.POS_SEQUENCE_ERROR
Invalid Part-of-Speech sequence detected (e.g., verb directly followed by verb without particle).
Grammar Checker Error Types
These error types are returned by specific grammar checkers:mixed_register
Enum: ErrorType.MIXED_REGISTER
Mixed formal/informal register detected (e.g., formal and colloquial forms mixed).
aspect_typo
Enum: ErrorType.ASPECT_TYPO
Aspect marker typo detected (e.g., ပြီ, ခဲ့, နေ).
invalid_sequence
Enum: ErrorType.INVALID_SEQUENCE
Invalid character sequence detected.
incomplete_aspect
Enum: ErrorType.INCOMPLETE_ASPECT
Incomplete aspect marking detected.
typo
Enum: ErrorType.TYPO
General typo detected by grammar rules.
agreement
Enum: ErrorType.AGREEMENT
Agreement error (e.g., subject-verb agreement).
compound_typo
Enum: ErrorType.COMPOUND_TYPO
Compound word typo detected.
incomplete_reduplication
Enum: ErrorType.INCOMPLETE_REDUPLICATION
Incomplete reduplication pattern detected.
classifier_typo
Enum: ErrorType.CLASSIFIER_TYPO
Classifier typo detected (e.g., ယေက် → ယောက်).
zawgyi_encoding
Enum: ErrorType.ZAWGYI_ENCODING
Zawgyi encoding detected in the input text. The text should be converted to Unicode before spell checking.
Complete Error Type Reference
| Enum Constant | String Value | Layer | Description |
|---|---|---|---|
SYLLABLE | "invalid_syllable" | 1 | Invalid syllable structure |
WORD | "invalid_word" | 2 | Invalid word |
GRAMMAR | "grammar_error" | 2.5 | Grammar rule violation |
CONTEXT_PROBABILITY | "context_probability" | 3 | Low N-gram probability |
SEMANTIC_ERROR | "semantic_error" | 3 | Semantic validation failure |
PARTICLE_TYPO | "particle_typo" | 1 | Particle typo |
MEDIAL_CONFUSION | "medial_confusion" | 1 | Medial confusion |
COLLOQUIAL_VARIANT | "colloquial_variant" | 2 | Colloquial (strict) |
COLLOQUIAL_INFO | "colloquial_info" | 2 | Colloquial (lenient) |
QUESTION_STRUCTURE | "question_structure" | 2.5 | Question structure error |
SYNTAX_ERROR | "syntax_error" | 2.5 | Syntax error |
HOMOPHONE_ERROR | "homophone_error" | 2.5 | Homophone error |
TONE_AMBIGUITY | "tone_ambiguity" | 2.5 | Tone ambiguity |
POS_SEQUENCE_ERROR | "pos_sequence_error" | 2.5 | Invalid POS sequence |
MIXED_REGISTER | "mixed_register" | 2.5 | Mixed register |
ASPECT_TYPO | "aspect_typo" | 2.5 | Aspect typo |
INVALID_SEQUENCE | "invalid_sequence" | 2.5 | Invalid sequence |
INCOMPLETE_ASPECT | "incomplete_aspect" | 2.5 | Incomplete aspect |
TYPO | "typo" | 2.5 | General typo |
AGREEMENT | "agreement" | 2.5 | Agreement error |
COMPOUND_TYPO | "compound_typo" | 2.5 | Compound typo |
INCOMPLETE_REDUPLICATION | "incomplete_reduplication" | 2.5 | Incomplete reduplication |
CLASSIFIER_TYPO | "classifier_typo" | 2.5 | Classifier typo |
ZAWGYI_ENCODING | "zawgyi_encoding" | 1 | Zawgyi encoding detected |
Working with Errors
Checking for Errors
Filtering by Error Type
Localized Error Messages
Error Class Hierarchy
Next Steps
- Error Types Details - Detailed error class documentation
- Troubleshooting - Common issues and solutions
- Configuration - Adjust validation settings