Skip to main content
Each error detected by the validation pipeline carries a string error_type that identifies the category of issue. Use these codes to filter, route, or display errors differently in your application.

Overview

mySpellChecker uses an ErrorType 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 in myspellchecker.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.
Common Causes:
  • 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.

Text-Level Detector Error Types

These error types are detected at the text level by the spell checker’s built-in detectors:

colloquial_contraction

Enum: ErrorType.COLLOQUIAL_CONTRACTION Colloquial contraction detected (informal shortening of words).

particle_confusion

Enum: ErrorType.PARTICLE_CONFUSION Particle confusion detected (wrong particle used in context).

ha_htoe_confusion

Enum: ErrorType.HA_HTOE_CONFUSION Ha-htoe (ှ) confusion detected (incorrect use of the aspirated ha-htoe marker).

dangling_particle

Enum: ErrorType.DANGLING_PARTICLE Dangling particle detected (particle without an associated content word).

dangling_word

Enum: ErrorType.DANGLING_WORD Dangling word detected (content word missing required particle or connector).

missing_conjunction

Enum: ErrorType.MISSING_CONJUNCTION Missing conjunction detected between clauses.

tense_mismatch

Enum: ErrorType.TENSE_MISMATCH Tense mismatch detected (inconsistent tense markers within a sentence).

register_mixing

Enum: ErrorType.REGISTER_MIXING Register mixing detected (formal and informal forms mixed inappropriately).

Grammar Checker Class-Level Error Types

These error types are returned by specific grammar checker classes:

negation_error

Enum: ErrorType.NEGATION_ERROR Negation structure error detected (incorrect negation pattern).

register_error

Enum: ErrorType.REGISTER_ERROR Register error detected (incorrect register usage for context).

merged_word

Enum: ErrorType.MERGED_WORD Merged word detected (two words incorrectly written as one).

aspect_error

Enum: ErrorType.ASPECT_ERROR Aspect marker error detected (incorrect aspect marking on verb).

classifier_error

Enum: ErrorType.CLASSIFIER_ERROR Classifier error detected (incorrect classifier used with noun).

compound_error

Enum: ErrorType.COMPOUND_ERROR Compound word error detected (incorrect compound word formation).

Orthography Error Types

These error types relate to Myanmar script orthography violations:

medial_order_error

Enum: ErrorType.MEDIAL_ORDER_ERROR Medial consonants are in the wrong order (e.g., ွ before ြ instead of ြ before ွ).

medial_compatibility_error

Enum: ErrorType.MEDIAL_COMPATIBILITY_ERROR Incompatible medial consonant combination detected.

vowel_after_asat

Enum: ErrorType.VOWEL_AFTER_ASAT Vowel sign placed after asat (virama), which is invalid in Myanmar script.

broken_virama

Enum: ErrorType.BROKEN_VIRAMA Broken virama (stacking marker) detected.

broken_stacking

Enum: ErrorType.BROKEN_STACKING Asat used instead of virama before a stacked consonant.

broken_compound

Enum: ErrorType.BROKEN_COMPOUND Compound word incorrectly split into separate parts.

leading_vowel_e

Enum: ErrorType.LEADING_VOWEL_E Zawgyi-style leading vowel-e (ေ) placed before consonant instead of after.

incomplete_stacking

Enum: ErrorType.INCOMPLETE_STACKING Virama is present but the expected stacked consonant is missing.

Syntactic/Semantic Error Types

confusable_error

Enum: ErrorType.CONFUSABLE_ERROR Confusable variant detected (a valid word used in the wrong context, e.g., homophones or near-homophones).

negation_sfp_mismatch

Enum: ErrorType.NEGATION_SFP_MISMATCH Negation with wrong sentence-final particle (e.g., using affirmative တယ် instead of ဘူး after negation prefix မ-).

merged_sfp_conjunction

Enum: ErrorType.MERGED_SFP_CONJUNCTION Sentence-final particle incorrectly merged with a conjunction (e.g., တယ်ပြီး instead of ပြီး).

aspect_adverb_conflict

Enum: ErrorType.ASPECT_ADVERB_CONFLICT Aspect-adverb conflict detected (e.g., habitual adverb used with specific-past marker).

Punctuation Error Types

duplicate_punctuation

Enum: ErrorType.DUPLICATE_PUNCTUATION Duplicate punctuation mark detected.

wrong_punctuation

Enum: ErrorType.WRONG_PUNCTUATION Wrong punctuation mark used.

missing_punctuation

Enum: ErrorType.MISSING_PUNCTUATION Missing required punctuation mark.

Additional Detection Errors

missing_asat

Enum: ErrorType.MISSING_ASAT Missing asat (virama) mark on a syllable that requires one.

particle_misuse

Enum: ErrorType.PARTICLE_MISUSE Semantically wrong particle usage detected via context analysis.

collocation_error

Enum: ErrorType.COLLOCATION_ERROR Wrong word partner in a fixed phrase or collocation.

Complete Error Type Reference

Core Errors

Specific Validator Errors

Validation Strategy Errors

Encoding Errors

Grammar Checker Errors

Text-Level Detector Errors

Grammar Checker Class-Level Errors

Orthography Errors

Syntactic/Semantic Errors

Punctuation Errors

AI Detection

Working with Errors

Checking for Errors

Filtering by Error Type

Localized Error Messages

Error Class Hierarchy

Next Steps