Expand description
Runtime autocorrect primitives for Bangla text produced above Obadh.
This module implements the deterministic runtime shell for autocorrect: candidate generation, Bangla-aware edit scoring, and conservative ranking. Learned model weights can be added behind the same candidate/ranker boundary later without changing the transliteration hot path.
Structs§
- Autocorrect
Config - Autocorrect
Decision - The result of
AutocorrectEngine::decideover the in-memoryLexicon: the ranked candidates and a conservative replacement suggestion. - Autocorrect
Engine - Candidate
Features - Correction
Candidate - Correction
Request - Edit
Cost - FstCandidate
- FstLexicon
- FstLoanword
Match - FstRepaired
Baseline - FstSuggest
Options - FstSuggest
Result - Lexicon
- Lexicon
Entry - Lexicon
Stats - Loanword
Entry - Loanword
Lexicon - Loanword
Match - Loanword
Search Options - Loanword
Suggestion - Roman
Repair - Roman
Repair Options - Roman
Repaired Output
Enums§
- Correction
Source - FstCandidate
Source - FstSuggest
Error - Lexicon
Artifact Error - Loanword
Artifact Error - Loanword
Suggestion Kind - Roman
Repair Kind
Constants§
- AUTOCORRECT_
FEATURE_ DIM - DEFAULT_
FST_ MAX_ DISTANCE - DEFAULT_
FST_ PREFIX_ CANDIDATES - DEFAULT_
LOANWORD_ FUZZY_ CANDIDATES - DEFAULT_
ROMAN_ REPAIR_ BEAM_ SIZE - FST_
MAX_ LEVENSHTEIN_ DISTANCE - LOANWORD_
FUZZY_ MAX_ DISTANCE
Functions§
- build_
loanword_ bytes - default_
loanword_ fuzzy_ distance - is_
loanword_ key - key_
slip_ repaired_ outputs - Key-slip repaired baselines: single adjacent-key rewrites of
inputwhose transliteration is a real lexicon word and differs from the untouched baseline. Mirrorssuper::roman_repaired_outputs— the caller supplies only plumbing closures (transliterate,is_lexicon_word); every numeric parameter is baked into this module. - roman_
repair_ beam - roman_
repaired_ outputs - weighted_
edit_ distance