Skip to main content

Module autocorrect

Module autocorrect 

Source
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§

AutocorrectConfig
AutocorrectDecision
The result of AutocorrectEngine::decide over the in-memory Lexicon: the ranked candidates and a conservative replacement suggestion.
AutocorrectEngine
CandidateFeatures
CorrectionCandidate
CorrectionRequest
EditCost
FstCandidate
FstLexicon
FstLoanwordMatch
FstRepairedBaseline
FstSuggestOptions
FstSuggestResult
Lexicon
LexiconEntry
LexiconStats
LoanwordEntry
LoanwordLexicon
LoanwordMatch
LoanwordSearchOptions
LoanwordSuggestion
RomanRepair
RomanRepairOptions
RomanRepairedOutput

Enums§

CorrectionSource
FstCandidateSource
FstSuggestError
LexiconArtifactError
LoanwordArtifactError
LoanwordSuggestionKind
RomanRepairKind

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 input whose transliteration is a real lexicon word and differs from the untouched baseline. Mirrors super::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