Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.
The SpellChecker behavior is controlled by the SpellCheckerConfig object. You can adjust performance thresholds, toggle features, and fine-tune algorithm sensitivity through nested configuration classes.
Usage
The easiest way to configure the spell checker is using ConfigPresets with the SpellCheckerBuilder.
from myspellchecker.core.builder import SpellCheckerBuilder, ConfigPresets# Use a presetchecker = ( SpellCheckerBuilder() .with_config(ConfigPresets.ACCURATE) .build())# Customize specific options on top of a presetconfig = ConfigPresets.DEFAULTconfig.max_suggestions = 10checker = ( SpellCheckerBuilder() .with_config(config) .with_phonetic(False) # Override phonetic setting .build())
Configuration Presets
Preset
Description
ConfigPresets.DEFAULT
Balanced configuration suitable for most use cases.
ConfigPresets.FAST
Optimized for speed. Disables context checking and reduces search depth.
ConfigPresets.ACCURATE
Optimized for quality. Max edit distance 3, strict thresholds.
Sensitive thresholds that catch more potential errors. May increase false positives. Suitable for formal documents.
Configuration Profiles
For environment-specific configurations, use get_profile() which returns fully-configured SpellCheckerConfig objects tuned for specific use cases.
from myspellchecker.core.config import get_profile# Use a profile directlyconfig = get_profile("production")# Available profilesconfig = get_profile("development") # Fast iteration, minimal validationconfig = get_profile("production") # Balanced accuracy and performance (default)config = get_profile("testing") # Deterministic, reproducible resultsconfig = get_profile("fast") # Maximum speed, reduced accuracyconfig = get_profile("accurate") # Maximum accuracy, slower performance
Profile
POS Tagger
Context
NER
Semantic
Zawgyi
Key Tuning
development
rule_based
Off
Off
Off
On
Small caches, prefix_length=5
production
viterbi
On
On
Refinement
On
Standard caches, prefix_length=7
testing
rule_based
On
On
Off
On
Small caches for determinism
fast
rule_based
Off
Off
Off
Off
max_edit_distance=1, count_threshold=200
accurate
viterbi
On
On
Proactive
On
max_edit_distance=3, beam_width=100, large caches
ConfigPresets (from SpellCheckerBuilder) and get_profile() are separate configuration systems. Presets are simpler toggles; profiles provide fully-tuned configurations including SymSpell, N-gram, POS tagger, and provider settings.
Configuration Files
You can load configuration from a YAML file instead of code. This is useful for deploying the spell checker in different environments.Load Order:
Explicit path loaded via ConfigLoader().load(config_file="path/to/config.yml").
myspellchecker.yaml, myspellchecker.yml, or myspellchecker.json in the current directory.
~/.config/myspellchecker/myspellchecker.yaml, myspellchecker.yml, or myspellchecker.json (User global config).
Maximum edit distance for suggestions (1-3). Higher values find more suggestions but are slower.
int
default:"5"
Maximum number of correction suggestions to return per error.
int
default:"100000"
Maximum input text length in characters. Prevents resource exhaustion on very large inputs.
bool
default:"True"
Enable phonetic matching (Myanmar Soundex-like) for finding sound-alike corrections.
bool
default:"True"
Enable N-gram context validation for detecting real-word errors.
bool
default:"True"
Enable Named Entity Recognition heuristics to skip proper names.
bool
default:"True"
Enable algorithmic syllable structure checks.
str
default:"myword"
Word segmentation engine: "myword", "crf", or "transformer".
str | None
default:"None"
Custom model name or path for transformer word segmentation. Only used when word_engine="transformer". Defaults to chuuhtetnaing/myanmar-text-segmentation-model.
int
default:"-1"
Device for transformer word segmentation inference. -1 for CPU, 0+ for GPU index. Only used when word_engine="transformer".
bool
default:"False"
Silently use empty provider if database not found (instead of raising error).
Provider caching and query configuration (cache size, timeout).
AlgorithmCacheConfig
Unified cache size configuration for all algorithm lookup caches.
RankerConfig
Suggestion ranking weights and strategy selection.
FrequencyGuardConfig
Centralized frequency thresholds that suppress false positives across validators (colloquial, homophone, N-gram, semantic).
CompoundResolverConfig
Compound word synthesis and broken compound detection settings.
ReduplicationConfig
Reduplication validation settings for AABB/ABAB patterns.
NeuralRerankerConfig
Neural suggestion re-ranking model configuration (MLP with ONNX).
BrokenCompoundStrategyConfig
Broken compound detection strategy thresholds and confidence.
TokenRefinementConfig
Token boundary refinement scoring (exposes hidden errors in merged tokens).
NERConfig
default:"None"
NER model configuration. When provided with enabled=True, uses specified NER model.
SymSpell Settings
Controlled via the symspell attribute (SymSpellConfig).
Hide SymSpellConfig fields
int
default:"10"
Prefix length for indexing. Lower = smaller index but slower lookups.
int
default:"50"
Minimum frequency for a word to be considered valid.
int
default:"15"
Max word length for compound segmentation.
int
default:"3"
Suggestions per word in compound check.
int
default:"25"
Beam width for compound segmentation dynamic programming.
int
default:"4096"
LRU cache size for edit distance calculations.
float
default:"0.4"
Weight for phonetic similarity bonus in suggestion ranking.
bool
default:"False"
Skip SymSpell initialization (for POS-only use cases).
int
default:"100"
Minimum frequency to consider a word “known” for SymSpell lookups.
bool
default:"True"
Use Myanmar-weighted edit distance for better Myanmar-specific scoring.
bool
default:"True"
Enable syllable-aware edit distance.
bool
default:"True"
Enable Myanmar variant candidate generation.
int
default:"20"
Maximum Myanmar variant candidates per lookup (1-100).
int
default:"5"
Maximum suggestions for compound queries.
float
default:"10000.0"
Denominator for frequency bonus calculation.
Context & N-gram Settings
Controlled via the ngram_context attribute (NgramContextConfig).
Show NgramContextConfig fields
float
default:"0.0001"
Probability below which a bigram is flagged as suspicious.
float
default:"0.0001"
Probability below which a trigram is flagged as suspicious.
float
default:"0.0001"
Probability below which a 4-gram is flagged as suspicious.
float
default:"0.0001"
Probability below which a 5-gram is flagged as suspicious.
float
default:"0.001"
Probability threshold for right context to rescue a word.
float
default:"0.6"
Weight for edit distance in scoring context candidates.
float
default:"0.4"
Weight for probability in scoring context candidates.
int
default:"2"
Max edit distance for context-based corrections.
int
default:"50"
Max candidates to evaluate in context search.
bool
default:"True"
Enable probability smoothing for sparse N-gram data.
str
default:"stupid_backoff"
Smoothing strategy: "none", "stupid_backoff", or "add_k".
float
default:"0.4"
Weight for Stupid Backoff smoothing.
float
default:"0.0"
Add-k smoothing constant (used when smoothing_strategy="add_k").
int
default:"5"
Maximum context-aware suggestions.
float
default:"0.2"
Weight for POS influence in scoring.
float
default:"500000000.0"
Denominator for unigram probability estimation.
int
default:"5"
Minimum frequency for a word to be considered valid in unseen contexts.
Phonetic Settings
Controlled via the phonetic attribute (PhoneticConfig).
Show PhoneticConfig fields
int
default:"10"
Maximum length for phonetic codes.
float
default:"0.001"
Threshold for unseen phonetic suggestions.
float
default:"0.01"
Threshold for phonetic improvement.
float
default:"100.0"
Improvement ratio for phonetic suggestions.
float
default:"0.85"
Minimum similarity to bypass edit-distance cap.
int
default:"1"
Extra edit distance allowed for high-similarity phonetic candidates.
Semantic Model Settings
Controlled via the semantic attribute (SemanticConfig). Requires a trained model.
Show SemanticConfig fields
str | None
default:"None"
Path to your trained ONNX model file.
str | None
default:"None"
Path to tokenizer files or HuggingFace tokenizer directory.
int
default:"0"
Number of threads for ONNX inference (CPU only). 0 = auto-detect (use all available cores, recommended).
int
default:"5"
Top-K predictions for semantic suggestions.
int
default:"10"
Top-K tokens to check for semantic errors.
bool
default:"True"
Enable semantic refinement in error detection.
bool
default:"False"
Enable proactive AI-powered error scanning.
float
default:"0.85"
Confidence threshold for proactive error detection (0.0-1.0).
float
default:"0.3"
Confidence threshold for semantic scoring in suggestion ranking.
bool
default:"False"
Force PyTorch backend instead of ONNX Runtime.
str
default:"cpu"
Device for model inference ("cpu" or "cuda:0"). PyTorch only.
bool
default:"True"
Validate that loaded model has MLM architecture on load.
bool
default:"True"
Enable Myanmar word-aligned masking for BPE tokenizers.
float | None
default:"None"
Override for automatic logit scale detection. Set to a positive float to manually control logit normalization.
float
default:"0.5"
Minimum ratio of Myanmar characters in text to enable semantic checking.
Proactive Semantic Scanning
When enabled, the spell checker will proactively scan sentences for semantic errors using a language model (XLM-RoBERTa, mDeBERTa, etc.). This can detect errors that traditional dictionary-based methods miss.
Enable detection of incorrectly split compound words.
float
default:"0.85"
Confidence for medial confusion (ျ vs ြ) errors.
float
default:"0.9"
Confidence for orthography validation errors.
float
default:"0.5"
Confidence for tone validation errors.
float
default:"0.9"
Confidence for syntactic validation errors.
float
default:"0.85"
Confidence for POS sequence validation errors.
bool
default:"False"
Enable per-strategy timing instrumentation.
bool
default:"False"
Enable debug logging for individual validation strategies.
Provider Settings
Controlled via the provider_config attribute (ProviderConfig).
Parameter
Default
Description
cache_size
1024
LRU cache size for database queries.
pool_min_size
1
Minimum connections in pool.
pool_max_size
5
Maximum connections in pool (smaller is better for SQLite).
pool_timeout
5.0
Connection checkout timeout in seconds.
pool_max_connection_age
3600.0
Max connection age before recreation (seconds).
Connection Pooling
Connection pooling manages SQLite database connections for better resource control and production safety. The library uses connection pooling by default to ensure robust production behavior.Benefits:
Resource control with hard connection limits
Connection health monitoring and automatic recreation
Observability through pool statistics
Graceful degradation under load
Pool size recommendations:
Keep pool_max_size small (2-5) to reduce lock contention
Set pool_min_size=1 for most cases
Larger pools (>10) degrade performance due to lock contention
Example configurations:
from myspellchecker.core.config import SpellCheckerConfig, ProviderConfig# Default configurationconfig = SpellCheckerConfig( provider_config=ProviderConfig( pool_min_size=1, pool_max_size=5, ))# High-concurrency configurationconfig = SpellCheckerConfig( provider_config=ProviderConfig( pool_min_size=2, pool_max_size=10, # May impact performance ))# Custom timeout and connection ageconfig = SpellCheckerConfig( provider_config=ProviderConfig( pool_timeout=10.0, # Wait up to 10s for connection pool_max_connection_age=7200.0, # Recreate after 2 hours ))
Performance characteristics:
Pooling adds ~30-50% overhead compared to direct connections
Overhead comes from queue operations, locking, and health checks
Trade-off: Performance vs. resource control and production safety
See tests/test_connection_pool.py for comprehensive test coverage
Joint Segmentation-Tagging Settings
The joint parameter accepts a JointConfig object for unified word segmentation and POS tagging.
Controlled via the frequency_guards attribute (FrequencyGuardConfig). Centralized thresholds that suppress false positives across validators.
Parameter
Default
Description
colloquial_high_freq_suppression
100000
Suppress colloquial info for words above this frequency.
homophone_high_freq
1000
Apply stricter homophone ratio above this frequency.
homophone_high_freq_ratio
50.0
Improvement ratio required for high-frequency homophone words.
ngram_high_freq_guard
5000
Suppress N-gram false positives for words above this frequency.
semantic_high_freq_protection
50000
Apply high-frequency logit diff threshold above this frequency.
Compound Resolver Settings
Controlled via the compound_resolver attribute (CompoundResolverConfig). Handles compound word synthesis for OOV recovery.
Parameter
Default
Description
min_morpheme_frequency
10
Minimum frequency per morpheme.
max_parts
4
Maximum compound splits (2-8).
cache_size
1024
LRU cache entries.
base_confidence
0.85
Base confidence score for compound matches.
high_freq_boost
0.05
Confidence boost if min morpheme frequency >= 100.
medium_freq_boost
0.03
Confidence boost if min morpheme frequency >= 50.
extra_parts_penalty
0.05
Confidence penalty per extra part beyond 2.
Reduplication Settings
Controlled via the reduplication attribute (ReduplicationConfig). Validates Myanmar reduplication patterns (AABB, ABAB, rhyme).
Parameter
Default
Description
min_base_frequency
5
Minimum base word frequency for validation.
cache_size
1024
LRU cache entries.
pattern_confidence_ab
0.90
Confidence for AB simple doubling (e.g., ခဏခဏ).
pattern_confidence_aabb
0.85
Confidence for AABB syllable doubling (e.g., သေသေချာချာ).
pattern_confidence_abab
0.85
Confidence for ABAB word repeat.
pattern_confidence_rhyme
0.95
Confidence for rhyme reduplication patterns.
Neural Reranker Settings
Controlled via the neural_reranker attribute (NeuralRerankerConfig). MLP-based suggestion re-ranking using ONNX.
Parameter
Default
Description
enabled
False
Enable neural reranking (requires trained model).
model_path
None
Path to ONNX reranker model.
stats_path
None
Path to normalization statistics JSON.
confidence_gap_threshold
0.15
Skip reranking when top-2 confidence gap exceeds this.
max_candidates
20
Maximum candidates to score per error.
Broken Compound Strategy Settings
Controlled via the broken_compound_strategy attribute (BrokenCompoundStrategyConfig). Tunes the validation strategy that detects incorrectly split compound words.
Parameter
Default
Description
rare_threshold
2000
Frequency below which a word is considered rare.
compound_min_frequency
5000
Minimum compound frequency to flag broken compound.
compound_ratio
5.0
Minimum ratio of compound_freq / rare_word_freq.
confidence
0.8
Default confidence for broken compound errors.
both_high_freq
5000
Frequency guard for multi-syllable both-high compounds.
min_compound_len
4
Minimum compound length for both-high-freq guard.
Token Refinement Settings
Controlled via the token_refinement attribute (TokenRefinementConfig). Tunes the validation-time token-lattice refinement pass that exposes hidden error spans in merged tokens (e.g., particle attachment, negation attachment).
Parameter
Default
Description
suffix_score_boost
0.85
Score boost when suffix matches a known form.
known_part_score
1.35
Score for known dictionary parts.
unknown_long_part_penalty
0.45
Penalty for unknown long parts.
split_complexity_penalty
0.30
Penalty for complex multi-part splits.
bigram_scale
120000.0
Scaling factor for bigram probability contribution.
min_token_len
3
Minimum token length for refinement candidates.
keep_if_freq_at_least
2000
Keep token if frequency is at least this value.
min_score_gain
0.55
Minimum score improvement to accept a split.
lattice_max_paths
2
Maximum lattice paths to consider.
syllable_split_min_token_len
4
Minimum token length for syllable-level splitting.
syllable_split_max_syllables
6
Maximum syllables for syllable-level splitting.
Integrated Features
The following features are automatically integrated into the validation pipeline. Most are enabled by default and work transparently.
Particle Typo Detection
Automatically detects common Myanmar particle typos using PARTICLE_TYPO_PATTERNS. Examples:
တယ → တယ် (statement ending, missing asat)
နဲ → နဲ့ (with, missing tone)
သလာ → သလား (question, missing tone)
These patterns have 0.90-0.95 confidence and are checked during context validation.
Medial Confusion Detection
Catches context-aware ျ vs ြ medial confusion using MEDIAL_CONFUSION_PATTERNS. For example:
ကြီး vs ကျီး (big vs crow)
ပြု vs ပျု (do vs -)
Morphology OOV Recovery
For out-of-vocabulary (OOV) words, the system attempts to recover the root by stripping common suffixes:
Verb suffixes: သည်, ခဲ့, မည်, နေ, etc.
Noun suffixes: များ, တို့, etc.
This improves suggestion quality for inflected forms.
POS Sequence Validation
Uses ViterbiTagger output to detect invalid POS sequences:
V-V (consecutive verbs without particles)
P-P (consecutive particles)
Invalid tag sequences defined in INVALID_POS_SEQUENCES
Question Detection
Identifies sentence types (question/statement) and validates question particle usage:
Detects question words: ဘာ, ဘယ်, ဘယ်လို, etc.
Validates question particles: လား, လဲ, သလဲ, etc.
Unified Suggestion Ranking
Suggestions from different sources are ranked using UnifiedRanker with source-specific weights:
Source
Weight
Priority
particle_typo
1.2
Highest
semantic
1.15
High
context
1.15
High
medial_confusion
1.1
Medium-High
medial_swap
1.0
Base
question_structure
1.0
Base
symspell
1.0
Base
compound
0.95
Medium
morphology
0.9
Medium
morpheme
0.85
Medium-Low
pos_sequence
0.85
Medium-Low
Tone Disambiguation
The ToneDisambiguator provides context-aware correction for commonly confused Myanmar tone marks. Available via:
from myspellchecker.text.tone import ToneDisambiguatordisambiguator = ToneDisambiguator()corrections = disambiguator.check_sentence(["word1", "word2", ...])
Handles ambiguous words like:
သား (son, disambiguated by family context patterns)
ငါ (I/me vs ငါး fish, detects missing visarga in numeral contexts)
ပဲ (only vs bean)
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"mySpellChecker","colors":{"primary":"#111111","light":"#333333","dark":"#111111"},"logo":{"light":"https://mintcdn.com/myspellchecker/MqPD6_sFrZlCiMn2/images/logo-light.svg?fit=max\u0026auto=format\u0026n=MqPD6_sFrZlCiMn2\u0026q=85\u0026s=2f5c3307bfdab1b6e50b8881cb69b909","dark":"https://mintcdn.com/myspellchecker/MqPD6_sFrZlCiMn2/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=MqPD6_sFrZlCiMn2\u0026q=85\u0026s=a66a22088d8face9010d978615a94587"},"favicon":"/images/favicon.svg","navbar":{"links":[{"href":"https://github.com/thettwe/myspellchecker","label":"GitHub"}],"primary":{"type":"button","label":"Get Started","href":"/guides/quickstart"}},"footer":{"socials":{"github":"https://github.com/thettwe/myspellchecker"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"myspellchecker","hasAudioNarration":false,"actualSubdomain":"myspellchecker","customDomains":["docs.myspellchecker.com"],"gitSource":{"type":"github","owner":"thettwe","repo":"myspellchecker-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae9484da0daa1d41e025b84:success","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"Reference","count":54},{"language":"default","tag":"Docs","count":47},{"language":"default","tag":"Development","count":9},{"language":"default","tag":"Data Pipeline Internals","count":8},{"language":"default","tag":"Text Processing","count":8},{"language":"default","tag":"Spelling \u0026 Text Checking","count":8},{"language":"default","tag":"Spelling Algorithms","count":7},{"language":"default","tag":"Segmentation \u0026 Tagging","count":7},{"language":"default","tag":"Architecture","count":7},{"language":"default","tag":"Context \u0026 Grammar Algorithms","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"core/configuration","slug":"/core/configuration","pageMetadata":{"title":"Configuration","description":"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.","href":"/core/configuration"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`SpellChecker`}),` behavior is controlled by the `,_jsx(_components.code,{children:`SpellCheckerConfig`}),` object. You can adjust performance thresholds, toggle features, and fine-tune algorithm sensitivity through nested configuration classes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage`,children:`Usage`}),`\n`,_jsxs(_components.p,{children:[`The easiest way to configure the spell checker is using `,_jsx(_components.code,{children:`ConfigPresets`}),` with the `,_jsx(_components.code,{children:`SpellCheckerBuilder`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.core.builder `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerBuilder, ConfigPresets`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Use a preset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`checker `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerBuilder()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .with_config(ConfigPresets.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ACCURATE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .build()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Customize specific options on top of a preset`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ConfigPresets.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`DEFAULT`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config.max_suggestions `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`checker `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerBuilder()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .with_config(config)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .with_phonetic(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Override phonetic setting`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .build()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-presets`,children:`Configuration Presets`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Preset`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ConfigPresets.DEFAULT`})}),_jsx(_components.td,{children:`Balanced configuration suitable for most use cases.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ConfigPresets.FAST`})}),_jsx(_components.td,{children:`Optimized for speed. Disables context checking and reduces search depth.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ConfigPresets.ACCURATE`})}),_jsx(_components.td,{children:`Optimized for quality. Max edit distance 3, strict thresholds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ConfigPresets.MINIMAL`})}),_jsx(_components.td,{children:`Dictionary-only checking. Disables phonetic, context, NER, and rule-based validation. Lowest resource usage.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ConfigPresets.STRICT`})}),_jsx(_components.td,{children:`Sensitive thresholds that catch more potential errors. May increase false positives. Suitable for formal documents.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-profiles`,children:`Configuration Profiles`}),`\n`,_jsxs(_components.p,{children:[`For environment-specific configurations, use `,_jsx(_components.code,{children:`get_profile()`}),` which returns fully-configured `,_jsx(_components.code,{children:`SpellCheckerConfig`}),` objects tuned for specific use cases.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.core.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Use a profile directly`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Available profiles`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"development\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Fast iteration, minimal validation`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Balanced accuracy and performance (default)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"testing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Deterministic, reproducible results`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fast\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Maximum speed, reduced accuracy`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` get_profile(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"accurate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Maximum accuracy, slower performance`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Profile`}),_jsx(_components.th,{children:`POS Tagger`}),_jsx(_components.th,{children:`Context`}),_jsx(_components.th,{children:`NER`}),_jsx(_components.th,{children:`Semantic`}),_jsx(_components.th,{children:`Zawgyi`}),_jsx(_components.th,{children:`Key Tuning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`development`})}),_jsx(_components.td,{children:`rule_based`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`On`}),_jsxs(_components.td,{children:[`Small caches, `,_jsx(_components.code,{children:`prefix_length=5`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`production`})}),_jsx(_components.td,{children:`viterbi`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`Refinement`}),_jsx(_components.td,{children:`On`}),_jsxs(_components.td,{children:[`Standard caches, `,_jsx(_components.code,{children:`prefix_length=7`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`testing`})}),_jsx(_components.td,{children:`rule_based`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`Small caches for determinism`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fast`})}),_jsx(_components.td,{children:`rule_based`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`Off`}),_jsx(_components.td,{children:`Off`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`max_edit_distance=1`}),`, `,_jsx(_components.code,{children:`count_threshold=200`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accurate`})}),_jsx(_components.td,{children:`viterbi`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`On`}),_jsx(_components.td,{children:`Proactive`}),_jsx(_components.td,{children:`On`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`max_edit_distance=3`}),`, `,_jsx(_components.code,{children:`beam_width=100`}),`, large caches`]})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ConfigPresets`}),` (from `,_jsx(_components.code,{children:`SpellCheckerBuilder`}),`) and `,_jsx(_components.code,{children:`get_profile()`}),` are `,_jsx(_components.strong,{children:`separate configuration systems`}),`. Presets are simpler toggles; profiles provide fully-tuned configurations including SymSpell, N-gram, POS tagger, and provider settings.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-files`,children:`Configuration Files`}),`\n`,_jsx(_components.p,{children:`You can load configuration from a YAML file instead of code. This is useful for deploying the spell checker in different environments.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Load Order:`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Explicit path loaded via `,_jsx(_components.code,{children:`ConfigLoader().load(config_file=\"path/to/config.yml\")`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`myspellchecker.yaml`}),`, `,_jsx(_components.code,{children:`myspellchecker.yml`}),`, or `,_jsx(_components.code,{children:`myspellchecker.json`}),` in the current directory.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`~/.config/myspellchecker/myspellchecker.yaml`}),`, `,_jsx(_components.code,{children:`myspellchecker.yml`}),`, or `,_jsx(_components.code,{children:`myspellchecker.json`}),` (User global config).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsxs(_components.strong,{children:[`Example `,_jsx(_components.code,{children:`myspellchecker.yaml`}),`:`]})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`preset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`accurate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`max_suggestions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`use_phonetic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`symspell`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` prefix_length`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-parameters`,children:`Configuration Parameters`}),`\n`,_jsx(Heading,{level:`3`,id:`general-settings`,children:`General Settings`}),`\n`,_jsx(ResponseField,{name:`max_edit_distance`,type:`int`,default:`2`,id:`param-max-edit-distance`,children:_jsx(_components.p,{children:`Maximum edit distance for suggestions (1-3). Higher values find more suggestions but are slower.`})}),`\n`,_jsx(ResponseField,{name:`max_suggestions`,type:`int`,default:`5`,id:`param-max-suggestions`,children:_jsx(_components.p,{children:`Maximum number of correction suggestions to return per error.`})}),`\n`,_jsx(ResponseField,{name:`max_text_length`,type:`int`,default:`100000`,id:`param-max-text-length`,children:_jsx(_components.p,{children:`Maximum input text length in characters. Prevents resource exhaustion on very large inputs.`})}),`\n`,_jsx(ResponseField,{name:`use_phonetic`,type:`bool`,default:`True`,id:`param-use-phonetic`,children:_jsx(_components.p,{children:`Enable phonetic matching (Myanmar Soundex-like) for finding sound-alike corrections.`})}),`\n`,_jsx(ResponseField,{name:`use_context_checker`,type:`bool`,default:`True`,id:`param-use-context-checker`,children:_jsx(_components.p,{children:`Enable N-gram context validation for detecting real-word errors.`})}),`\n`,_jsx(ResponseField,{name:`use_ner`,type:`bool`,default:`True`,id:`param-use-ner`,children:_jsx(_components.p,{children:`Enable Named Entity Recognition heuristics to skip proper names.`})}),`\n`,_jsx(ResponseField,{name:`use_rule_based_validation`,type:`bool`,default:`True`,id:`param-use-rule-based-validation`,children:_jsx(_components.p,{children:`Enable algorithmic syllable structure checks.`})}),`\n`,_jsx(ResponseField,{name:`word_engine`,type:`str`,default:`myword`,id:`param-word-engine`,children:_jsxs(_components.p,{children:[`Word segmentation engine: `,_jsx(_components.code,{children:`\"myword\"`}),`, `,_jsx(_components.code,{children:`\"crf\"`}),`, or `,_jsx(_components.code,{children:`\"transformer\"`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`seg_model`,type:`str | None`,default:`None`,id:`param-seg-model`,children:_jsxs(_components.p,{children:[`Custom model name or path for transformer word segmentation. Only used when `,_jsx(_components.code,{children:`word_engine=\"transformer\"`}),`. Defaults to `,_jsx(_components.code,{children:`chuuhtetnaing/myanmar-text-segmentation-model`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`seg_device`,type:`int`,default:`-1`,id:`param-seg-device`,children:_jsxs(_components.p,{children:[`Device for transformer word segmentation inference. `,_jsx(_components.code,{children:`-1`}),` for CPU, `,_jsx(_components.code,{children:`0+`}),` for GPU index. Only used when `,_jsx(_components.code,{children:`word_engine=\"transformer\"`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`fallback_to_empty_provider`,type:`bool`,default:`False`,id:`param-fallback-to-empty-provider`,children:_jsx(_components.p,{children:`Silently use empty provider if database not found (instead of raising error).`})}),`\n`,_jsx(Heading,{level:`3`,id:`nested-configuration-objects`,children:`Nested Configuration Objects`}),`\n`,_jsx(ResponseField,{name:`symspell`,type:`SymSpellConfig`,id:`param-symspell`,children:_jsx(_components.p,{children:`SymSpell algorithm configuration (edit distance, prefix length, beam width).`})}),`\n`,_jsx(ResponseField,{name:`ngram_context`,type:`NgramContextConfig`,id:`param-ngram-context`,children:_jsx(_components.p,{children:`N-gram context checker configuration (thresholds, smoothing, scoring weights).`})}),`\n`,_jsx(ResponseField,{name:`phonetic`,type:`PhoneticConfig`,id:`param-phonetic`,children:_jsx(_components.p,{children:`Phonetic matching configuration (code length, suggestion thresholds).`})}),`\n`,_jsx(ResponseField,{name:`semantic`,type:`SemanticConfig`,id:`param-semantic`,children:_jsx(_components.p,{children:`Semantic model configuration (model path, tokenizer, inference settings).`})}),`\n`,_jsx(ResponseField,{name:`pos_tagger`,type:`POSTaggerConfig`,id:`param-pos-tagger`,children:_jsx(_components.p,{children:`POS tagger configuration (tagger type, model name, device).`})}),`\n`,_jsx(ResponseField,{name:`joint`,type:`JointConfig`,id:`param-joint`,children:_jsx(_components.p,{children:`Joint segmentation-tagging configuration (beam width, emission weight).`})}),`\n`,_jsx(ResponseField,{name:`validation`,type:`ValidationConfig`,id:`param-validation`,children:_jsx(_components.p,{children:`Validation behavior configuration (confidence thresholds, feature toggles).`})}),`\n`,_jsx(ResponseField,{name:`provider_config`,type:`ProviderConfig`,id:`param-provider-config`,children:_jsx(_components.p,{children:`Provider caching and query configuration (cache size, timeout).`})}),`\n`,_jsx(ResponseField,{name:`cache`,type:`AlgorithmCacheConfig`,id:`param-cache`,children:_jsx(_components.p,{children:`Unified cache size configuration for all algorithm lookup caches.`})}),`\n`,_jsx(ResponseField,{name:`ranker`,type:`RankerConfig`,id:`param-ranker`,children:_jsx(_components.p,{children:`Suggestion ranking weights and strategy selection.`})}),`\n`,_jsx(ResponseField,{name:`frequency_guards`,type:`FrequencyGuardConfig`,id:`param-frequency-guards`,children:_jsx(_components.p,{children:`Centralized frequency thresholds that suppress false positives across validators (colloquial, homophone, N-gram, semantic).`})}),`\n`,_jsx(ResponseField,{name:`compound_resolver`,type:`CompoundResolverConfig`,id:`param-compound-resolver`,children:_jsx(_components.p,{children:`Compound word synthesis and broken compound detection settings.`})}),`\n`,_jsx(ResponseField,{name:`reduplication`,type:`ReduplicationConfig`,id:`param-reduplication`,children:_jsx(_components.p,{children:`Reduplication validation settings for AABB/ABAB patterns.`})}),`\n`,_jsx(ResponseField,{name:`neural_reranker`,type:`NeuralRerankerConfig`,id:`param-neural-reranker`,children:_jsx(_components.p,{children:`Neural suggestion re-ranking model configuration (MLP with ONNX).`})}),`\n`,_jsx(ResponseField,{name:`broken_compound_strategy`,type:`BrokenCompoundStrategyConfig`,id:`param-broken-compound-strategy`,children:_jsx(_components.p,{children:`Broken compound detection strategy thresholds and confidence.`})}),`\n`,_jsx(ResponseField,{name:`token_refinement`,type:`TokenRefinementConfig`,id:`param-token-refinement`,children:_jsx(_components.p,{children:`Token boundary refinement scoring (exposes hidden errors in merged tokens).`})}),`\n`,_jsx(ResponseField,{name:`ner`,type:`NERConfig`,default:`None`,id:`param-ner`,children:_jsxs(_components.p,{children:[`NER model configuration. When provided with `,_jsx(_components.code,{children:`enabled=True`}),`, uses specified NER model.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`symspell-settings`,children:`SymSpell Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`symspell`}),` attribute (`,_jsx(_components.code,{children:`SymSpellConfig`}),`).`]}),`\n`,_jsxs(Expandable,{title:`SymSpellConfig fields`,defaultOpen:true,children:[_jsx(ResponseField,{name:`prefix_length`,type:`int`,default:`10`,id:`param-prefix-length`,children:_jsx(_components.p,{children:`Prefix length for indexing. Lower = smaller index but slower lookups.`})}),_jsx(ResponseField,{name:`count_threshold`,type:`int`,default:`50`,id:`param-count-threshold`,children:_jsx(_components.p,{children:`Minimum frequency for a word to be considered valid.`})}),_jsx(ResponseField,{name:`max_word_length`,type:`int`,default:`15`,id:`param-max-word-length`,children:_jsx(_components.p,{children:`Max word length for compound segmentation.`})}),_jsx(ResponseField,{name:`compound_lookup_count`,type:`int`,default:`3`,id:`param-compound-lookup-count`,children:_jsx(_components.p,{children:`Suggestions per word in compound check.`})}),_jsx(ResponseField,{name:`beam_width`,type:`int`,default:`25`,id:`param-beam-width`,children:_jsx(_components.p,{children:`Beam width for compound segmentation dynamic programming.`})}),_jsx(ResponseField,{name:`damerau_cache_size`,type:`int`,default:`4096`,id:`param-damerau-cache-size`,children:_jsx(_components.p,{children:`LRU cache size for edit distance calculations.`})}),_jsx(ResponseField,{name:`phonetic_bonus_weight`,type:`float`,default:`0.4`,id:`param-phonetic-bonus-weight`,children:_jsx(_components.p,{children:`Weight for phonetic similarity bonus in suggestion ranking.`})}),_jsx(ResponseField,{name:`skip_init`,type:`bool`,default:`False`,id:`param-skip-init`,children:_jsx(_components.p,{children:`Skip SymSpell initialization (for POS-only use cases).`})}),_jsx(ResponseField,{name:`known_word_frequency_threshold`,type:`int`,default:`100`,id:`param-known-word-frequency-threshold`,children:_jsx(_components.p,{children:`Minimum frequency to consider a word “known” for SymSpell lookups.`})}),_jsx(ResponseField,{name:`use_weighted_distance`,type:`bool`,default:`True`,id:`param-use-weighted-distance`,children:_jsx(_components.p,{children:`Use Myanmar-weighted edit distance for better Myanmar-specific scoring.`})}),_jsx(ResponseField,{name:`use_syllable_distance`,type:`bool`,default:`True`,id:`param-use-syllable-distance`,children:_jsx(_components.p,{children:`Enable syllable-aware edit distance.`})}),_jsx(ResponseField,{name:`use_myanmar_variants`,type:`bool`,default:`True`,id:`param-use-myanmar-variants`,children:_jsx(_components.p,{children:`Enable Myanmar variant candidate generation.`})}),_jsx(ResponseField,{name:`myanmar_variant_max_candidates`,type:`int`,default:`20`,id:`param-myanmar-variant-max-candidates`,children:_jsx(_components.p,{children:`Maximum Myanmar variant candidates per lookup (1-100).`})}),_jsx(ResponseField,{name:`compound_max_suggestions`,type:`int`,default:`5`,id:`param-compound-max-suggestions`,children:_jsx(_components.p,{children:`Maximum suggestions for compound queries.`})}),_jsx(ResponseField,{name:`frequency_denominator`,type:`float`,default:`10000.0`,id:`param-frequency-denominator`,children:_jsx(_components.p,{children:`Denominator for frequency bonus calculation.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`context-\u0026-n-gram-settings`,children:`Context \u0026 N-gram Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`ngram_context`}),` attribute (`,_jsx(_components.code,{children:`NgramContextConfig`}),`).`]}),`\n`,_jsxs(Expandable,{title:`NgramContextConfig fields`,children:[_jsx(ResponseField,{name:`bigram_threshold`,type:`float`,default:`0.0001`,id:`param-bigram-threshold`,children:_jsx(_components.p,{children:`Probability below which a bigram is flagged as suspicious.`})}),_jsx(ResponseField,{name:`trigram_threshold`,type:`float`,default:`0.0001`,id:`param-trigram-threshold`,children:_jsx(_components.p,{children:`Probability below which a trigram is flagged as suspicious.`})}),_jsx(ResponseField,{name:`fourgram_threshold`,type:`float`,default:`0.0001`,id:`param-fourgram-threshold`,children:_jsx(_components.p,{children:`Probability below which a 4-gram is flagged as suspicious.`})}),_jsx(ResponseField,{name:`fivegram_threshold`,type:`float`,default:`0.0001`,id:`param-fivegram-threshold`,children:_jsx(_components.p,{children:`Probability below which a 5-gram is flagged as suspicious.`})}),_jsx(ResponseField,{name:`right_context_threshold`,type:`float`,default:`0.001`,id:`param-right-context-threshold`,children:_jsx(_components.p,{children:`Probability threshold for right context to rescue a word.`})}),_jsx(ResponseField,{name:`edit_distance_weight`,type:`float`,default:`0.6`,id:`param-edit-distance-weight`,children:_jsx(_components.p,{children:`Weight for edit distance in scoring context candidates.`})}),_jsx(ResponseField,{name:`probability_weight`,type:`float`,default:`0.4`,id:`param-probability-weight`,children:_jsx(_components.p,{children:`Weight for probability in scoring context candidates.`})}),_jsx(ResponseField,{name:`edit_distance`,type:`int`,default:`2`,id:`param-edit-distance`,children:_jsx(_components.p,{children:`Max edit distance for context-based corrections.`})}),_jsx(ResponseField,{name:`candidate_limit`,type:`int`,default:`50`,id:`param-candidate-limit`,children:_jsx(_components.p,{children:`Max candidates to evaluate in context search.`})}),_jsx(ResponseField,{name:`use_smoothing`,type:`bool`,default:`True`,id:`param-use-smoothing`,children:_jsx(_components.p,{children:`Enable probability smoothing for sparse N-gram data.`})}),_jsx(ResponseField,{name:`smoothing_strategy`,type:`str`,default:`stupid_backoff`,id:`param-smoothing-strategy`,children:_jsxs(_components.p,{children:[`Smoothing strategy: `,_jsx(_components.code,{children:`\"none\"`}),`, `,_jsx(_components.code,{children:`\"stupid_backoff\"`}),`, or `,_jsx(_components.code,{children:`\"add_k\"`}),`.`]})}),_jsx(ResponseField,{name:`backoff_weight`,type:`float`,default:`0.4`,id:`param-backoff-weight`,children:_jsx(_components.p,{children:`Weight for Stupid Backoff smoothing.`})}),_jsx(ResponseField,{name:`add_k_smoothing`,type:`float`,default:`0.0`,id:`param-add-k-smoothing`,children:_jsxs(_components.p,{children:[`Add-k smoothing constant (used when `,_jsx(_components.code,{children:`smoothing_strategy=\"add_k\"`}),`).`]})}),_jsx(ResponseField,{name:`max_suggestions`,type:`int`,default:`5`,id:`param-max-suggestions-1`,children:_jsx(_components.p,{children:`Maximum context-aware suggestions.`})}),_jsx(ResponseField,{name:`pos_score_weight`,type:`float`,default:`0.2`,id:`param-pos-score-weight`,children:_jsx(_components.p,{children:`Weight for POS influence in scoring.`})}),_jsx(ResponseField,{name:`unigram_denominator`,type:`float`,default:`500000000.0`,id:`param-unigram-denominator`,children:_jsx(_components.p,{children:`Denominator for unigram probability estimation.`})}),_jsx(ResponseField,{name:`min_unigram_threshold`,type:`int`,default:`5`,id:`param-min-unigram-threshold`,children:_jsx(_components.p,{children:`Minimum frequency for a word to be considered valid in unseen contexts.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`phonetic-settings`,children:`Phonetic Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`phonetic`}),` attribute (`,_jsx(_components.code,{children:`PhoneticConfig`}),`).`]}),`\n`,_jsxs(Expandable,{title:`PhoneticConfig fields`,children:[_jsx(ResponseField,{name:`max_code_length`,type:`int`,default:`10`,id:`param-max-code-length`,children:_jsx(_components.p,{children:`Maximum length for phonetic codes.`})}),_jsx(ResponseField,{name:`suggestion_threshold_unseen`,type:`float`,default:`0.001`,id:`param-suggestion-threshold-unseen`,children:_jsx(_components.p,{children:`Threshold for unseen phonetic suggestions.`})}),_jsx(ResponseField,{name:`suggestion_threshold_improvement`,type:`float`,default:`0.01`,id:`param-suggestion-threshold-improvement`,children:_jsx(_components.p,{children:`Threshold for phonetic improvement.`})}),_jsx(ResponseField,{name:`suggestion_improvement_ratio`,type:`float`,default:`100.0`,id:`param-suggestion-improvement-ratio`,children:_jsx(_components.p,{children:`Improvement ratio for phonetic suggestions.`})}),_jsx(ResponseField,{name:`phonetic_bypass_threshold`,type:`float`,default:`0.85`,id:`param-phonetic-bypass-threshold`,children:_jsx(_components.p,{children:`Minimum similarity to bypass edit-distance cap.`})}),_jsx(ResponseField,{name:`phonetic_extra_distance`,type:`int`,default:`1`,id:`param-phonetic-extra-distance`,children:_jsx(_components.p,{children:`Extra edit distance allowed for high-similarity phonetic candidates.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`semantic-model-settings`,children:`Semantic Model Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`semantic`}),` attribute (`,_jsx(_components.code,{children:`SemanticConfig`}),`). Requires a `,_jsx(_components.a,{href:`/guides/training`,children:`trained model`}),`.`]}),`\n`,_jsxs(Expandable,{title:`SemanticConfig fields`,children:[_jsx(ResponseField,{name:`model_path`,type:`str | None`,default:`None`,id:`param-model-path`,children:_jsx(_components.p,{children:`Path to your trained ONNX model file.`})}),_jsx(ResponseField,{name:`tokenizer_path`,type:`str | None`,default:`None`,id:`param-tokenizer-path`,children:_jsx(_components.p,{children:`Path to tokenizer files or HuggingFace tokenizer directory.`})}),_jsx(ResponseField,{name:`num_threads`,type:`int`,default:`0`,id:`param-num-threads`,children:_jsx(_components.p,{children:`Number of threads for ONNX inference (CPU only). 0 = auto-detect (use all available cores, recommended).`})}),_jsx(ResponseField,{name:`predict_top_k`,type:`int`,default:`5`,id:`param-predict-top-k`,children:_jsx(_components.p,{children:`Top-K predictions for semantic suggestions.`})}),_jsx(ResponseField,{name:`check_top_k`,type:`int`,default:`10`,id:`param-check-top-k`,children:_jsx(_components.p,{children:`Top-K tokens to check for semantic errors.`})}),_jsx(ResponseField,{name:`use_semantic_refinement`,type:`bool`,default:`True`,id:`param-use-semantic-refinement`,children:_jsx(_components.p,{children:`Enable semantic refinement in error detection.`})}),_jsx(ResponseField,{name:`use_proactive_scanning`,type:`bool`,default:`False`,id:`param-use-proactive-scanning`,children:_jsx(_components.p,{children:`Enable proactive AI-powered error scanning.`})}),_jsx(ResponseField,{name:`proactive_confidence_threshold`,type:`float`,default:`0.85`,id:`param-proactive-confidence-threshold`,children:_jsx(_components.p,{children:`Confidence threshold for proactive error detection (0.0-1.0).`})}),_jsx(ResponseField,{name:`scoring_confidence_threshold`,type:`float`,default:`0.3`,id:`param-scoring-confidence-threshold`,children:_jsx(_components.p,{children:`Confidence threshold for semantic scoring in suggestion ranking.`})}),_jsx(ResponseField,{name:`use_pytorch`,type:`bool`,default:`False`,id:`param-use-pytorch`,children:_jsx(_components.p,{children:`Force PyTorch backend instead of ONNX Runtime.`})}),_jsx(ResponseField,{name:`device`,type:`str`,default:`cpu`,id:`param-device`,children:_jsxs(_components.p,{children:[`Device for model inference (`,_jsx(_components.code,{children:`\"cpu\"`}),` or `,_jsx(_components.code,{children:`\"cuda:0\"`}),`). PyTorch only.`]})}),_jsx(ResponseField,{name:`validate_model_architecture`,type:`bool`,default:`True`,id:`param-validate-model-architecture`,children:_jsx(_components.p,{children:`Validate that loaded model has MLM architecture on load.`})}),_jsx(ResponseField,{name:`word_alignment_enabled`,type:`bool`,default:`True`,id:`param-word-alignment-enabled`,children:_jsx(_components.p,{children:`Enable Myanmar word-aligned masking for BPE tokenizers.`})}),_jsx(ResponseField,{name:`logit_scale`,type:`float | None`,default:`None`,id:`param-logit-scale`,children:_jsx(_components.p,{children:`Override for automatic logit scale detection. Set to a positive float to manually control logit normalization.`})}),_jsx(ResponseField,{name:`myanmar_text_ratio_threshold`,type:`float`,default:`0.5`,id:`param-myanmar-text-ratio-threshold`,children:_jsx(_components.p,{children:`Minimum ratio of Myanmar characters in text to enable semantic checking.`})})]}),`\n`,_jsx(Heading,{level:`4`,id:`proactive-semantic-scanning`,children:`Proactive Semantic Scanning`}),`\n`,_jsx(_components.p,{children:`When enabled, the spell checker will proactively scan sentences for semantic errors using a language model (XLM-RoBERTa, mDeBERTa, etc.). This can detect errors that traditional dictionary-based methods miss.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.core.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig, SemanticConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` semantic`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`SemanticConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` use_proactive_scanning`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` proactive_confidence_threshold`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Higher = fewer false positives`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note`}),`: Proactive scanning requires a trained model and may increase processing time.`]}),`\n`,_jsx(Heading,{level:`3`,id:`pos-tagger-settings`,children:`POS Tagger Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`pos_tagger`}),` attribute (`,_jsx(_components.code,{children:`POSTaggerConfig`}),`).`]}),`\n`,_jsxs(Expandable,{title:`POSTaggerConfig fields`,children:[_jsx(ResponseField,{name:`tagger_type`,type:`str`,default:`rule_based`,id:`param-tagger-type`,children:_jsxs(_components.p,{children:[`Backend type: `,_jsx(_components.code,{children:`\"rule_based\"`}),`, `,_jsx(_components.code,{children:`\"transformer\"`}),`, `,_jsx(_components.code,{children:`\"viterbi\"`}),`, or `,_jsx(_components.code,{children:`\"custom\"`}),`.`]})}),_jsx(ResponseField,{name:`model_name`,type:`str | None`,default:`None`,id:`param-model-name`,children:_jsxs(_components.p,{children:[`HuggingFace model ID (for `,_jsx(_components.code,{children:`transformer`}),` type).`]})}),_jsx(ResponseField,{name:`device`,type:`int`,default:`-1`,id:`param-device-1`,children:_jsxs(_components.p,{children:[`Device ID: `,_jsx(_components.code,{children:`-1`}),` for CPU, `,_jsx(_components.code,{children:`0+`}),` for GPU index.`]})}),_jsx(ResponseField,{name:`batch_size`,type:`int`,default:`32`,id:`param-batch-size`,children:_jsx(_components.p,{children:`Batch size for transformer inference.`})}),_jsx(ResponseField,{name:`use_morphology_fallback`,type:`bool`,default:`True`,id:`param-use-morphology-fallback`,children:_jsx(_components.p,{children:`Use morphology analyzer for OOV words.`})}),_jsx(ResponseField,{name:`cache_size`,type:`int`,default:`10000`,id:`param-cache-size`,children:_jsx(_components.p,{children:`LRU cache size for rule-based tagger.`})}),_jsx(ResponseField,{name:`beam_width`,type:`int`,default:`10`,id:`param-beam-width-1`,children:_jsx(_components.p,{children:`Beam width for Viterbi decoding.`})}),_jsx(ResponseField,{name:`emission_weight`,type:`float`,default:`1.2`,id:`param-emission-weight`,children:_jsx(_components.p,{children:`Emission probability weight for Viterbi.`})}),_jsx(ResponseField,{name:`min_prob`,type:`float`,default:`1e-10`,id:`param-min-prob`,children:_jsx(_components.p,{children:`Minimum probability threshold to prevent underflow.`})}),_jsx(ResponseField,{name:`hmm_params_path`,type:`str | None`,default:`None`,id:`param-hmm-params-path`,children:_jsx(_components.p,{children:`Path to precomputed HMM parameters JSON for Viterbi tagger.`})}),_jsx(ResponseField,{name:`unknown_tag`,type:`str`,default:`UNK`,id:`param-unknown-tag`,children:_jsx(_components.p,{children:`Tag assigned to completely unknown words.`})}),_jsx(ResponseField,{name:`use_fp16`,type:`bool`,default:`True`,id:`param-use-fp16`,children:_jsx(_components.p,{children:`Use float16 on GPU for transformer tagger (approximately 2x throughput).`})}),_jsx(ResponseField,{name:`use_torch_compile`,type:`bool`,default:`False`,id:`param-use-torch-compile`,children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`torch.compile()`}),` JIT optimization for transformer tagger.`]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`validation-\u0026-error-detection-settings`,children:`Validation \u0026 Error Detection Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`validation`}),` attribute (`,_jsx(_components.code,{children:`ValidationConfig`}),`).`]}),`\n`,_jsxs(Expandable,{title:`ValidationConfig fields`,children:[_jsx(ResponseField,{name:`syllable_error_confidence`,type:`float`,default:`1.0`,id:`param-syllable-error-confidence`,children:_jsx(_components.p,{children:`Confidence score for syllable errors.`})}),_jsx(ResponseField,{name:`word_error_confidence`,type:`float`,default:`0.8`,id:`param-word-error-confidence`,children:_jsx(_components.p,{children:`Confidence score for word errors.`})}),_jsx(ResponseField,{name:`use_zawgyi_detection`,type:`bool`,default:`True`,id:`param-use-zawgyi-detection`,children:_jsx(_components.p,{children:`Enable Zawgyi encoding detection.`})}),_jsx(ResponseField,{name:`use_zawgyi_conversion`,type:`bool`,default:`True`,id:`param-use-zawgyi-conversion`,children:_jsx(_components.p,{children:`Enable automatic Zawgyi to Unicode conversion.`})}),_jsx(ResponseField,{name:`zawgyi_confidence_threshold`,type:`float`,default:`0.95`,id:`param-zawgyi-confidence-threshold`,children:_jsx(_components.p,{children:`Confidence threshold for Zawgyi detection.`})}),_jsx(ResponseField,{name:`strict_validation`,type:`bool`,default:`True`,id:`param-strict-validation`,children:_jsx(_components.p,{children:`Enable strict validation rules.`})}),_jsx(ResponseField,{name:`colloquial_strictness`,type:`str`,default:`lenient`,id:`param-colloquial-strictness`,children:_jsxs(_components.p,{children:[`Strictness for colloquial variants: `,_jsx(_components.code,{children:`\"strict\"`}),`, `,_jsx(_components.code,{children:`\"lenient\"`}),`, or `,_jsx(_components.code,{children:`\"off\"`}),`.`]})}),_jsx(ResponseField,{name:`allow_extended_myanmar`,type:`bool`,default:`False`,id:`param-allow-extended-myanmar`,children:_jsx(_components.p,{children:`Allow Extended Myanmar characters for non-Burmese scripts (Shan, Mon, Karen).`})}),_jsx(ResponseField,{name:`raise_on_strategy_error`,type:`bool`,default:`False`,id:`param-raise-on-strategy-error`,children:_jsx(_components.p,{children:`Re-raise exceptions from validation strategies (useful for debugging).`})}),_jsx(ResponseField,{name:`homophone_confidence`,type:`float`,default:`0.8`,id:`param-homophone-confidence`,children:_jsx(_components.p,{children:`Confidence for homophone validation strategy.`})}),_jsx(ResponseField,{name:`homophone_improvement_ratio`,type:`float`,default:`5.0`,id:`param-homophone-improvement-ratio`,children:_jsx(_components.p,{children:`Minimum probability improvement ratio for homophones.`})}),_jsx(ResponseField,{name:`homophone_min_probability`,type:`float`,default:`0.001`,id:`param-homophone-min-probability`,children:_jsx(_components.p,{children:`Minimum N-gram probability threshold for homophone suggestions.`})}),_jsx(ResponseField,{name:`homophone_high_freq_threshold`,type:`int`,default:`1000`,id:`param-homophone-high-freq-threshold`,children:_jsx(_components.p,{children:`Word frequency above which stricter ratio applies.`})}),_jsx(ResponseField,{name:`homophone_high_freq_improvement_ratio`,type:`float`,default:`50.0`,id:`param-homophone-high-freq-improvement-ratio`,children:_jsx(_components.p,{children:`Improvement ratio required for high-frequency words.`})}),_jsx(ResponseField,{name:`semantic_min_word_length`,type:`int`,default:`2`,id:`param-semantic-min-word-length`,children:_jsx(_components.p,{children:`Minimum word length for semantic validation.`})}),_jsx(ResponseField,{name:`use_homophone_detection`,type:`bool`,default:`True`,id:`param-use-homophone-detection`,children:_jsx(_components.p,{children:`Enable homophone detection in validation pipeline.`})}),_jsx(ResponseField,{name:`use_orthography_validation`,type:`bool`,default:`True`,id:`param-use-orthography-validation`,children:_jsx(_components.p,{children:`Enable orthography validation in validation pipeline.`})}),_jsx(ResponseField,{name:`use_confusable_semantic`,type:`bool`,default:`False`,id:`param-use-confusable-semantic`,children:_jsx(_components.p,{children:`Enable MLM-enhanced confusable detection (requires semantic model).`})}),_jsx(ResponseField,{name:`use_reduplication_validation`,type:`bool`,default:`True`,id:`param-use-reduplication-validation`,children:_jsx(_components.p,{children:`Enable reduplication pattern validation (AABB/ABAB).`})}),_jsx(ResponseField,{name:`use_compound_synthesis`,type:`bool`,default:`True`,id:`param-use-compound-synthesis`,children:_jsx(_components.p,{children:`Enable compound word synthesis for OOV recovery.`})}),_jsx(ResponseField,{name:`use_broken_compound_detection`,type:`bool`,default:`True`,id:`param-use-broken-compound-detection`,children:_jsx(_components.p,{children:`Enable detection of incorrectly split compound words.`})}),_jsx(ResponseField,{name:`medial_confusion_confidence`,type:`float`,default:`0.85`,id:`param-medial-confusion-confidence`,children:_jsx(_components.p,{children:`Confidence for medial confusion (ျ vs ြ) errors.`})}),_jsx(ResponseField,{name:`orthography_confidence`,type:`float`,default:`0.9`,id:`param-orthography-confidence`,children:_jsx(_components.p,{children:`Confidence for orthography validation errors.`})}),_jsx(ResponseField,{name:`tone_validation_confidence`,type:`float`,default:`0.5`,id:`param-tone-validation-confidence`,children:_jsx(_components.p,{children:`Confidence for tone validation errors.`})}),_jsx(ResponseField,{name:`syntactic_validation_confidence`,type:`float`,default:`0.9`,id:`param-syntactic-validation-confidence`,children:_jsx(_components.p,{children:`Confidence for syntactic validation errors.`})}),_jsx(ResponseField,{name:`pos_sequence_confidence`,type:`float`,default:`0.85`,id:`param-pos-sequence-confidence`,children:_jsx(_components.p,{children:`Confidence for POS sequence validation errors.`})}),_jsx(ResponseField,{name:`enable_strategy_timing`,type:`bool`,default:`False`,id:`param-enable-strategy-timing`,children:_jsx(_components.p,{children:`Enable per-strategy timing instrumentation.`})}),_jsx(ResponseField,{name:`enable_strategy_debug`,type:`bool`,default:`False`,id:`param-enable-strategy-debug`,children:_jsx(_components.p,{children:`Enable debug logging for individual validation strategies.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`provider-settings`,children:`Provider Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`provider_config`}),` attribute (`,_jsx(_components.code,{children:`ProviderConfig`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cache_size`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1024`})}),_jsx(_components.td,{children:`LRU cache size for database queries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pool_min_size`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:`Minimum connections in pool.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pool_max_size`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})}),_jsx(_components.td,{children:`Maximum connections in pool (smaller is better for SQLite).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pool_timeout`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5.0`})}),_jsx(_components.td,{children:`Connection checkout timeout in seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pool_max_connection_age`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3600.0`})}),_jsx(_components.td,{children:`Max connection age before recreation (seconds).`})]})]})]}),`\n`,_jsx(Heading,{level:`4`,id:`connection-pooling`,children:`Connection Pooling`}),`\n`,_jsx(_components.p,{children:`Connection pooling manages SQLite database connections for better resource control and production safety. The library uses connection pooling by default to ensure robust production behavior.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Benefits`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Resource control with hard connection limits`}),`\n`,_jsx(_components.li,{children:`Connection health monitoring and automatic recreation`}),`\n`,_jsx(_components.li,{children:`Observability through pool statistics`}),`\n`,_jsx(_components.li,{children:`Graceful degradation under load`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Pool size recommendations`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Keep `,_jsx(_components.code,{children:`pool_max_size`}),` small (2-5) to reduce lock contention`]}),`\n`,_jsxs(_components.li,{children:[`Set `,_jsx(_components.code,{children:`pool_min_size=1`}),` for most cases`]}),`\n`,_jsx(_components.li,{children:`Larger pools (>10) degrade performance due to lock contention`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example configurations`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`25`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.core.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig, ProviderConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Default configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` provider_config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ProviderConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_min_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_max_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# High-concurrency configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` provider_config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ProviderConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_min_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_max_size`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# May impact performance`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Custom timeout and connection age`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` provider_config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ProviderConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Wait up to 10s for connection`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` pool_max_connection_age`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`7200.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Recreate after 2 hours`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Performance characteristics`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Pooling adds ~30-50% overhead compared to direct connections`}),`\n`,_jsx(_components.li,{children:`Overhead comes from queue operations, locking, and health checks`}),`\n`,_jsx(_components.li,{children:`Trade-off: Performance vs. resource control and production safety`}),`\n`,_jsxs(_components.li,{children:[`See `,_jsx(_components.code,{children:`tests/test_connection_pool.py`}),` for comprehensive test coverage`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`joint-segmentation-tagging-settings`,children:`Joint Segmentation-Tagging Settings`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`joint`}),` parameter accepts a `,_jsx(_components.code,{children:`JointConfig`}),` object for unified word segmentation and POS tagging.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.core.config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig, JointConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SpellCheckerConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` joint`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`JointConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` enabled`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` beam_width`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enabled`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsx(_components.td,{children:`Enable joint segmentation-tagging mode.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`beam_width`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`15`})}),_jsx(_components.td,{children:`Number of hypotheses to keep per position.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_word_length`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`20`})}),_jsx(_components.td,{children:`Maximum word length in characters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`emission_weight`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1.2`})}),_jsx(_components.td,{children:`Weight for P(tag|word) emission probabilities.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`word_score_weight`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1.0`})}),_jsx(_components.td,{children:`Weight for word N-gram language model scores.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_prob`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1e-10`})}),_jsx(_components.td,{children:`Minimum probability for smoothing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`use_morphology_fallback`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`True`})}),_jsx(_components.td,{children:`Use morphology for OOV word tag guessing.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/algorithms/segmentation#joint-segmentation-and-pos-tagging`,children:`Segmentation - Joint Mode`}),` for detailed usage.`]}),`\n`,_jsx(Heading,{level:`3`,id:`frequency-guard-settings`,children:`Frequency Guard Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`frequency_guards`}),` attribute (`,_jsx(_components.code,{children:`FrequencyGuardConfig`}),`). Centralized thresholds that suppress false positives across validators.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`colloquial_high_freq_suppression`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`100000`})}),_jsx(_components.td,{children:`Suppress colloquial info for words above this frequency.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`homophone_high_freq`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1000`})}),_jsx(_components.td,{children:`Apply stricter homophone ratio above this frequency.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`homophone_high_freq_ratio`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`50.0`})}),_jsx(_components.td,{children:`Improvement ratio required for high-frequency homophone words.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ngram_high_freq_guard`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5000`})}),_jsx(_components.td,{children:`Suppress N-gram false positives for words above this frequency.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`semantic_high_freq_protection`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`50000`})}),_jsx(_components.td,{children:`Apply high-frequency logit diff threshold above this frequency.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`compound-resolver-settings`,children:`Compound Resolver Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`compound_resolver`}),` attribute (`,_jsx(_components.code,{children:`CompoundResolverConfig`}),`). Handles compound word synthesis for OOV recovery.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_morpheme_frequency`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10`})}),_jsx(_components.td,{children:`Minimum frequency per morpheme.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_parts`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4`})}),_jsx(_components.td,{children:`Maximum compound splits (2-8).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cache_size`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1024`})}),_jsx(_components.td,{children:`LRU cache entries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`base_confidence`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.85`})}),_jsx(_components.td,{children:`Base confidence score for compound matches.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`high_freq_boost`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.05`})}),_jsx(_components.td,{children:`Confidence boost if min morpheme frequency >= 100.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`medium_freq_boost`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.03`})}),_jsx(_components.td,{children:`Confidence boost if min morpheme frequency >= 50.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`extra_parts_penalty`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.05`})}),_jsx(_components.td,{children:`Confidence penalty per extra part beyond 2.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`reduplication-settings`,children:`Reduplication Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`reduplication`}),` attribute (`,_jsx(_components.code,{children:`ReduplicationConfig`}),`). Validates Myanmar reduplication patterns (AABB, ABAB, rhyme).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_base_frequency`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})}),_jsx(_components.td,{children:`Minimum base word frequency for validation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cache_size`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1024`})}),_jsx(_components.td,{children:`LRU cache entries.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pattern_confidence_ab`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.90`})}),_jsx(_components.td,{children:`Confidence for AB simple doubling (e.g., ခဏခဏ).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pattern_confidence_aabb`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.85`})}),_jsx(_components.td,{children:`Confidence for AABB syllable doubling (e.g., သေသေချာချာ).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pattern_confidence_abab`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.85`})}),_jsx(_components.td,{children:`Confidence for ABAB word repeat.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pattern_confidence_rhyme`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.95`})}),_jsx(_components.td,{children:`Confidence for rhyme reduplication patterns.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`neural-reranker-settings`,children:`Neural Reranker Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`neural_reranker`}),` attribute (`,_jsx(_components.code,{children:`NeuralRerankerConfig`}),`). MLP-based suggestion re-ranking using ONNX.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enabled`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsx(_components.td,{children:`Enable neural reranking (requires trained model).`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model_path`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Path to ONNX reranker model.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stats_path`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Path to normalization statistics JSON.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`confidence_gap_threshold`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.15`})}),_jsx(_components.td,{children:`Skip reranking when top-2 confidence gap exceeds this.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_candidates`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`20`})}),_jsx(_components.td,{children:`Maximum candidates to score per error.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`broken-compound-strategy-settings`,children:`Broken Compound Strategy Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`broken_compound_strategy`}),` attribute (`,_jsx(_components.code,{children:`BrokenCompoundStrategyConfig`}),`). Tunes the validation strategy that detects incorrectly split compound words.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rare_threshold`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2000`})}),_jsx(_components.td,{children:`Frequency below which a word is considered rare.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`compound_min_frequency`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5000`})}),_jsx(_components.td,{children:`Minimum compound frequency to flag broken compound.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`compound_ratio`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5.0`})}),_jsx(_components.td,{children:`Minimum ratio of compound_freq / rare_word_freq.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`confidence`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.8`})}),_jsx(_components.td,{children:`Default confidence for broken compound errors.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`both_high_freq`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5000`})}),_jsx(_components.td,{children:`Frequency guard for multi-syllable both-high compounds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_compound_len`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4`})}),_jsx(_components.td,{children:`Minimum compound length for both-high-freq guard.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`token-refinement-settings`,children:`Token Refinement Settings`}),`\n`,_jsxs(_components.p,{children:[`Controlled via the `,_jsx(_components.code,{children:`token_refinement`}),` attribute (`,_jsx(_components.code,{children:`TokenRefinementConfig`}),`). Tunes the validation-time token-lattice refinement pass that exposes hidden error spans in merged tokens (e.g., particle attachment, negation attachment).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`suffix_score_boost`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.85`})}),_jsx(_components.td,{children:`Score boost when suffix matches a known form.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`known_part_score`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1.35`})}),_jsx(_components.td,{children:`Score for known dictionary parts.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unknown_long_part_penalty`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.45`})}),_jsx(_components.td,{children:`Penalty for unknown long parts.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`split_complexity_penalty`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.30`})}),_jsx(_components.td,{children:`Penalty for complex multi-part splits.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`bigram_scale`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`120000.0`})}),_jsx(_components.td,{children:`Scaling factor for bigram probability contribution.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_token_len`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsx(_components.td,{children:`Minimum token length for refinement candidates.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`keep_if_freq_at_least`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2000`})}),_jsx(_components.td,{children:`Keep token if frequency is at least this value.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_score_gain`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.55`})}),_jsx(_components.td,{children:`Minimum score improvement to accept a split.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lattice_max_paths`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:`Maximum lattice paths to consider.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`syllable_split_min_token_len`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4`})}),_jsx(_components.td,{children:`Minimum token length for syllable-level splitting.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`syllable_split_max_syllables`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`6`})}),_jsx(_components.td,{children:`Maximum syllables for syllable-level splitting.`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`integrated-features`,children:`Integrated Features`}),`\n`,_jsx(_components.p,{children:`The following features are automatically integrated into the validation pipeline. Most are enabled by default and work transparently.`}),`\n`,_jsx(Heading,{level:`3`,id:`particle-typo-detection`,children:`Particle Typo Detection`}),`\n`,_jsxs(_components.p,{children:[`Automatically detects common Myanmar particle typos using `,_jsx(_components.code,{children:`PARTICLE_TYPO_PATTERNS`}),`. Examples:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`တယ`}),` → `,_jsx(_components.code,{children:`တယ်`}),` (statement ending, missing asat)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`နဲ`}),` → `,_jsx(_components.code,{children:`နဲ့`}),` (with, missing tone)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`သလာ`}),` → `,_jsx(_components.code,{children:`သလား`}),` (question, missing tone)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`These patterns have 0.90-0.95 confidence and are checked during context validation.`}),`\n`,_jsx(Heading,{level:`3`,id:`medial-confusion-detection`,children:`Medial Confusion Detection`}),`\n`,_jsxs(_components.p,{children:[`Catches context-aware ျ vs ြ medial confusion using `,_jsx(_components.code,{children:`MEDIAL_CONFUSION_PATTERNS`}),`. For example:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ကြီး`}),` vs `,_jsx(_components.code,{children:`ကျီး`}),` (big vs crow)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ပြု`}),` vs `,_jsx(_components.code,{children:`ပျု`}),` (do vs -)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`morphology-oov-recovery`,children:`Morphology OOV Recovery`}),`\n`,_jsx(_components.p,{children:`For out-of-vocabulary (OOV) words, the system attempts to recover the root by stripping common suffixes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Verb suffixes: `,_jsx(_components.code,{children:`သည်`}),`, `,_jsx(_components.code,{children:`ခဲ့`}),`, `,_jsx(_components.code,{children:`မည်`}),`, `,_jsx(_components.code,{children:`နေ`}),`, etc.`]}),`\n`,_jsxs(_components.li,{children:[`Noun suffixes: `,_jsx(_components.code,{children:`များ`}),`, `,_jsx(_components.code,{children:`တို့`}),`, etc.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This improves suggestion quality for inflected forms.`}),`\n`,_jsx(Heading,{level:`3`,id:`pos-sequence-validation`,children:`POS Sequence Validation`}),`\n`,_jsx(_components.p,{children:`Uses ViterbiTagger output to detect invalid POS sequences:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`V-V (consecutive verbs without particles)`}),`\n`,_jsx(_components.li,{children:`P-P (consecutive particles)`}),`\n`,_jsxs(_components.li,{children:[`Invalid tag sequences defined in `,_jsx(_components.code,{children:`INVALID_POS_SEQUENCES`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`question-detection`,children:`Question Detection`}),`\n`,_jsx(_components.p,{children:`Identifies sentence types (question/statement) and validates question particle usage:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Detects question words: `,_jsx(_components.code,{children:`ဘာ`}),`, `,_jsx(_components.code,{children:`ဘယ်`}),`, `,_jsx(_components.code,{children:`ဘယ်လို`}),`, etc.`]}),`\n`,_jsxs(_components.li,{children:[`Validates question particles: `,_jsx(_components.code,{children:`လား`}),`, `,_jsx(_components.code,{children:`လဲ`}),`, `,_jsx(_components.code,{children:`သလဲ`}),`, etc.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`unified-suggestion-ranking`,children:`Unified Suggestion Ranking`}),`\n`,_jsxs(_components.p,{children:[`Suggestions from different sources are ranked using `,_jsx(_components.code,{children:`UnifiedRanker`}),` with source-specific weights:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Source`}),_jsx(_components.th,{children:`Weight`}),_jsx(_components.th,{children:`Priority`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`particle_typo`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.2`}),_jsx(_components.td,{children:`Highest`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`semantic`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.15`}),_jsx(_components.td,{children:`High`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`context`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.15`}),_jsx(_components.td,{children:`High`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`medial_confusion`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.1`}),_jsx(_components.td,{children:`Medium-High`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`medial_swap`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.0`}),_jsx(_components.td,{children:`Base`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`question_structure`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.0`}),_jsx(_components.td,{children:`Base`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`symspell`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.0`}),_jsx(_components.td,{children:`Base`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`compound`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.95`}),_jsx(_components.td,{children:`Medium`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`morphology`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.9`}),_jsx(_components.td,{children:`Medium`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`morpheme`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.85`}),_jsx(_components.td,{children:`Medium-Low`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pos_sequence`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0.85`}),_jsx(_components.td,{children:`Medium-Low`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`tone-disambiguation`,children:`Tone Disambiguation`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`ToneDisambiguator`}),` provides context-aware correction for commonly confused Myanmar tone marks. Available via:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` myspellchecker.text.tone `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ToneDisambiguator`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`disambiguator `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ToneDisambiguator()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`corrections `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` disambiguator.check_sentence([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"word1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"word2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Handles ambiguous words like:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`သား`}),` (son, disambiguated by family context patterns)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ငါ`}),` (I/me vs `,_jsx(_components.code,{children:`ငါး`}),` fish, detects missing visarga in numeral contexts)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ပဲ`}),` (only vs bean)`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Configuration","description":"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.","href":"/core/configuration"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Usage","slug":"usage","depth":2,"children":[]},{"title":"Configuration Presets","slug":"configuration-presets","depth":2,"children":[]},{"title":"Configuration Profiles","slug":"configuration-profiles","depth":2,"children":[]},{"title":"Configuration Files","slug":"configuration-files","depth":2,"children":[]},{"title":"Configuration Parameters","slug":"configuration-parameters","depth":2,"children":[{"title":"General Settings","slug":"general-settings","depth":3,"children":[]},{"title":"Nested Configuration Objects","slug":"nested-configuration-objects","depth":3,"children":[]},{"title":"SymSpell Settings","slug":"symspell-settings","depth":3,"children":[]},{"title":"Context \u0026 N-gram Settings","slug":"context-\u0026-n-gram-settings","depth":3,"children":[]},{"title":"Phonetic Settings","slug":"phonetic-settings","depth":3,"children":[]},{"title":"Semantic Model Settings","slug":"semantic-model-settings","depth":3,"children":[]},{"title":"Proactive Semantic Scanning","slug":"proactive-semantic-scanning","depth":4,"children":[]},{"title":"POS Tagger Settings","slug":"pos-tagger-settings","depth":3,"children":[]},{"title":"Validation \u0026 Error Detection Settings","slug":"validation-\u0026-error-detection-settings","depth":3,"children":[]},{"title":"Provider Settings","slug":"provider-settings","depth":3,"children":[]},{"title":"Connection Pooling","slug":"connection-pooling","depth":4,"children":[]},{"title":"Joint Segmentation-Tagging Settings","slug":"joint-segmentation-tagging-settings","depth":3,"children":[]},{"title":"Frequency Guard Settings","slug":"frequency-guard-settings","depth":3,"children":[]},{"title":"Compound Resolver Settings","slug":"compound-resolver-settings","depth":3,"children":[]},{"title":"Reduplication Settings","slug":"reduplication-settings","depth":3,"children":[]},{"title":"Neural Reranker Settings","slug":"neural-reranker-settings","depth":3,"children":[]},{"title":"Broken Compound Strategy Settings","slug":"broken-compound-strategy-settings","depth":3,"children":[]},{"title":"Token Refinement Settings","slug":"token-refinement-settings","depth":3,"children":[]}]},{"title":"Integrated Features","slug":"integrated-features","depth":2,"children":[{"title":"Particle Typo Detection","slug":"particle-typo-detection","depth":3,"children":[]},{"title":"Medial Confusion Detection","slug":"medial-confusion-detection","depth":3,"children":[]},{"title":"Morphology OOV Recovery","slug":"morphology-oov-recovery","depth":3,"children":[]},{"title":"POS Sequence Validation","slug":"pos-sequence-validation","depth":3,"children":[]},{"title":"Question Detection","slug":"question-detection","depth":3,"children":[]},{"title":"Unified Suggestion Ranking","slug":"unified-suggestion-ranking","depth":3,"children":[]},{"title":"Tone Disambiguation","slug":"tone-disambiguation","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"myspellchecker","siteName":"mySpellChecker","title":"Configuration - mySpellChecker","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-29T09:32:45.223Z","originalFileLocation":"core/configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\">\u003cmeta data-mint-head name=\"application-name\" content=\"mySpellChecker\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Configuration - mySpellChecker\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"mySpellChecker\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.myspellchecker.com/core/configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://myspellchecker.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Configuration\u0026amp;description=Configure+SpellChecker+behavior+with+SpellCheckerConfig%2C+including+presets%2C+thresholds%2C+and+algorithm+settings.\u0026amp;theme=5c86bda59764775171e5d6df\u0026amp;signature=562271709c3cb633b6bdf0c1c09d9b0bb49c7c8f85151dab5d9d54febbf65b7d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Configuration - mySpellChecker\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://myspellchecker.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Configuration\u0026amp;description=Configure+SpellChecker+behavior+with+SpellCheckerConfig%2C+including+presets%2C+thresholds%2C+and+algorithm+settings.\u0026amp;theme=5c86bda59764775171e5d6df\u0026amp;signature=562271709c3cb633b6bdf0c1c09d9b0bb49c7c8f85151dab5d9d54febbf65b7d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/myspellchecker/idInwLc1JtahnQAV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"mySpellChecker\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#111111\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.myspellchecker.com/core/configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/core/configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.myspellchecker.com/#organization\",\"name\":\"mySpellChecker\",\"url\":\"https://docs.myspellchecker.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/myspellchecker/MqPD6_sFrZlCiMn2/images/logo-light.svg?fit=max\u0026auto=format\u0026n=MqPD6_sFrZlCiMn2\u0026q=85\u0026s=2f5c3307bfdab1b6e50b8881cb69b909\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.myspellchecker.com#website\",\"name\":\"mySpellChecker\",\"url\":\"https://docs.myspellchecker.com\",\"publisher\":{\"@id\":\"https://docs.myspellchecker.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.myspellchecker.com/core/configuration#webpage\",\"url\":\"https://docs.myspellchecker.com/core/configuration\",\"name\":\"Configuration\",\"description\":\"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\",\"dateModified\":\"2026-03-29T09:32:45.223Z\",\"isPartOf\":{\"@id\":\"https://docs.myspellchecker.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.myspellchecker.com/core/configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.myspellchecker.com/core/configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.myspellchecker.com/api-reference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configuration\",\"item\":\"https://docs.myspellchecker.com/core/configuration\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.myspellchecker.com/core/configuration#article\",\"headline\":\"Configuration\",\"name\":\"Configuration\",\"description\":\"Configure SpellChecker behavior with SpellCheckerConfig, including presets, thresholds, and algorithm settings.\",\"url\":\"https://docs.myspellchecker.com/core/configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.myspellchecker.com/core/configuration#webpage\"},\"dateModified\":\"2026-03-29T09:32:45.223Z\",\"publisher\":{\"@id\":\"https://docs.myspellchecker.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.myspellchecker.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"mySpellChecker\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"mySpellChecker\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/core/configuration.md","siteName":"mySpellChecker","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction"}]},{"tab":"Reference","groups":[{"group":"API Reference","pages":[{"title":"Overview","href":"/api-reference"},{"title":"SpellChecker API","description":"The SpellChecker class is the main entry point for the library.","href":"/core/spellchecker"},{"title":"Configuration","href":"/core/configuration"},{"title":"Provider Capabilities Matrix","description":"This document describes the capabilities of each DictionaryProvider implementation.","href":"/api-reference/provider-capabilities"},{"title":"Tokenizers API","href":"/api-reference/tokenizers"}]},{"group":"Core Internals","pages":[{"title":"Overview","href":"/core/index"},{"title":"Syllable Validation","href":"/core/syllable-validation"},{"title":"Word Validation","href":"/core/word-validation"},{"title":"Semantic Training Pipeline","href":"/core/training"},{"title":"Algorithm Factory","href":"/guides/algorithm-factory"},{"title":"I/O Utilities","href":"/guides/io-utilities"}]},{"group":"Spelling Algorithms","pages":[{"title":"Overview","href":"/algorithms/index"},{"title":"SymSpell Algorithm","href":"/algorithms/symspell"},{"title":"Edit Distance Algorithms","href":"/algorithms/edit-distance"},{"title":"Suggestion Ranking","href":"/algorithms/suggestion-ranking"},{"title":"Neural Reranker","href":"/algorithms/neural-reranker"},{"title":"Suggestion Strategy","href":"/algorithms/suggestion-strategy"},{"title":"Morpheme \u0026 Medial Suggestions","href":"/algorithms/morpheme-suggestion"}]},{"group":"Context \u0026 Grammar Algorithms","pages":[{"title":"N-gram Algorithm","href":"/algorithms/ngram"},{"title":"Context-Aware \u0026 Grammar Validation","href":"/algorithms/context-aware"},{"title":"Semantic Validation (MLM)","href":"/algorithms/semantic"},{"title":"Syntactic Grammar Validation","href":"/algorithms/grammar-rules"},{"title":"Tone Disambiguation","href":"/algorithms/tone-disambiguation"},{"title":"Named Entity Recognition (NER)","href":"/algorithms/ner"}]},{"group":"Segmentation \u0026 Tagging","pages":[{"title":"Segmentation","href":"/algorithms/segmentation"},{"title":"Syllable Segmentation Algorithm","href":"/algorithms/syllable-segmentation"},{"title":"Text Normalization","href":"/algorithms/normalization"},{"title":"Phonetic Matching","href":"/algorithms/phonetic"},{"title":"Viterbi Algorithm","href":"/algorithms/viterbi"},{"title":"POS Disambiguator","href":"/algorithms/pos-disambiguator"},{"title":"Joint Segment Tagger","href":"/algorithms/joint-segment-tagger"}]},{"group":"Architecture","pages":[{"title":"Overview","href":"/architecture/index"},{"title":"System Design","href":"/architecture/system-design"},{"title":"Validation Pipeline","href":"/architecture/validation-pipeline"},{"title":"Component Diagram","href":"/architecture/component-diagram"},{"title":"Data Flow","href":"/architecture/data-flow"},{"title":"Dependency Injection","href":"/architecture/dependency-injection"},{"title":"Extension Points","href":"/architecture/extension-points"}]},{"group":"CLI \u0026 Error Reference","pages":[{"title":"Overview","href":"/cli/index"},{"title":"Overview","href":"/reference/index"},{"title":"Error Types Reference","href":"/reference/error-types"},{"title":"Error Codes Reference","href":"/reference/error-codes"},{"title":"Rules System","href":"/reference/rules-system"}]},{"group":"Data Reference","pages":[{"title":"Constants Reference","href":"/reference/constants"},{"title":"Glossary","href":"/reference/glossary"},{"title":"Phonetic Data","href":"/reference/phonetic-data"}]},{"group":"Data Pipeline Internals","pages":[{"title":"Overview","href":"/core/data-pipeline"},{"title":"Database Schema","href":"/data-pipeline/database-schema"},{"title":"Schema Management","href":"/data-pipeline/schema-management"},{"title":"Dictionary Providers","href":"/data-pipeline/providers"},{"title":"Processing Stage","href":"/data-pipeline/processing"},{"title":"POS Inference Manager","href":"/data-pipeline/pos-inference"},{"title":"Segmentation Repair","href":"/data-pipeline/segmentation-repair"},{"title":"Pipeline Reporter","href":"/data-pipeline/pipeline-reporter"}]}]},{"tab":"Development","pages":[{"title":"Development","href":"/development"}]}]},"basePath":"","title":"Configuration - mySpellChecker","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}