myspellchecker 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- myspellchecker-1.0.0/LICENSE +21 -0
- myspellchecker-1.0.0/MANIFEST.in +21 -0
- myspellchecker-1.0.0/PKG-INFO +622 -0
- myspellchecker-1.0.0/README.md +528 -0
- myspellchecker-1.0.0/pyproject.toml +228 -0
- myspellchecker-1.0.0/setup.cfg +4 -0
- myspellchecker-1.0.0/setup.py +151 -0
- myspellchecker-1.0.0/src/myspellchecker/__init__.py +157 -0
- myspellchecker-1.0.0/src/myspellchecker/__main__.py +6 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/__init__.py +100 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_candidates.py +292 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_scoring.py +250 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_smoothing.py +368 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/cache.py +623 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/dedup.py +97 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/__init__.py +17 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance.py +446 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance_c.cpp +13382 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance_c.pyx +426 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/keyboard.py +157 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/factory.py +341 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/inference_backends.py +183 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/interfaces.py +158 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/joint_segment_tagger.py +571 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/medial_swap_strategy.py +370 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/morpheme_suggestion_strategy.py +240 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/neural_reranker.py +216 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/ngram_context_checker.py +1547 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_disambiguator.py +481 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_inference.py +512 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_base.py +276 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_factory.py +401 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_rule.py +306 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_transformer.py +910 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_viterbi.py +370 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/ranker.py +799 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/semantic_checker.py +1654 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/__init__.py +17 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/compound_strategy.py +165 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/context_strategy.py +218 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/morphology_strategy.py +142 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/symspell_strategy.py +118 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/suggestion_strategy.py +397 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/symspell.py +1414 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.cpp +17057 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.py +851 -0
- myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.pyx +572 -0
- myspellchecker-1.0.0/src/myspellchecker/cli.py +250 -0
- myspellchecker-1.0.0/src/myspellchecker/cli_completions.py +297 -0
- myspellchecker-1.0.0/src/myspellchecker/cli_formatters.py +205 -0
- myspellchecker-1.0.0/src/myspellchecker/cli_parser.py +754 -0
- myspellchecker-1.0.0/src/myspellchecker/cli_utils.py +111 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/__init__.py +20 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/build.py +265 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/check.py +179 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/completion.py +17 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/config_cmd.py +84 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/infer_pos.py +139 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/segment.py +70 -0
- myspellchecker-1.0.0/src/myspellchecker/commands/train.py +77 -0
- myspellchecker-1.0.0/src/myspellchecker/core/__init__.py +166 -0
- myspellchecker-1.0.0/src/myspellchecker/core/builder.py +588 -0
- myspellchecker-1.0.0/src/myspellchecker/core/component_factory.py +1019 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/__init__.py +199 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/algorithm_configs.py +3003 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/grammar_configs.py +369 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/loader.py +815 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/main.py +318 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/profiles.py +403 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/tagger_configs.py +392 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/text_configs.py +163 -0
- myspellchecker-1.0.0/src/myspellchecker/core/config/validation_configs.py +759 -0
- myspellchecker-1.0.0/src/myspellchecker/core/constants/__init__.py +473 -0
- myspellchecker-1.0.0/src/myspellchecker/core/constants/core_constants.py +411 -0
- myspellchecker-1.0.0/src/myspellchecker/core/constants/detector_thresholds.py +321 -0
- myspellchecker-1.0.0/src/myspellchecker/core/constants/myanmar_constants.py +1373 -0
- myspellchecker-1.0.0/src/myspellchecker/core/constants/pipeline_constants.py +71 -0
- myspellchecker-1.0.0/src/myspellchecker/core/context_validator.py +673 -0
- myspellchecker-1.0.0/src/myspellchecker/core/correction_utils.py +329 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detection_registry.py +77 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detection_rules.py +1049 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detector_data.py +152 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/__init__.py +26 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/context.py +49 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/__init__.py +26 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/collocation_detection_mixin.py +169 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/compound_detection_mixin.py +1510 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/medial_confusion_mixin.py +371 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/particle_detection_mixin.py +1193 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_normalization.py +1025 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/pre_normalization.py +649 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_detectors.py +890 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/__init__.py +22 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/register_mixing_mixin.py +586 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/structure_detection_mixin.py +526 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/tense_detection_mixin.py +616 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/tokenized_text.py +113 -0
- myspellchecker-1.0.0/src/myspellchecker/core/detectors/utils.py +106 -0
- myspellchecker-1.0.0/src/myspellchecker/core/di/__init__.py +24 -0
- myspellchecker-1.0.0/src/myspellchecker/core/di/container.py +283 -0
- myspellchecker-1.0.0/src/myspellchecker/core/di/registry.py +169 -0
- myspellchecker-1.0.0/src/myspellchecker/core/di/service_names.py +35 -0
- myspellchecker-1.0.0/src/myspellchecker/core/error_suppression.py +1269 -0
- myspellchecker-1.0.0/src/myspellchecker/core/exceptions.py +437 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/__init__.py +35 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/builders.py +557 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/context_checker_factory.py +75 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/context_validator_factory.py +232 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/optional_services_factory.py +393 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/phonetic_factory.py +52 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/provider_factory.py +71 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/ranker_factory.py +55 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/segmenter_factory.py +58 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/suggestion_strategy_factory.py +142 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/symspell_factory.py +77 -0
- myspellchecker-1.0.0/src/myspellchecker/core/factories/validators_factory.py +167 -0
- myspellchecker-1.0.0/src/myspellchecker/core/homophones.py +149 -0
- myspellchecker-1.0.0/src/myspellchecker/core/i18n.py +327 -0
- myspellchecker-1.0.0/src/myspellchecker/core/myanmar_confusables.py +501 -0
- myspellchecker-1.0.0/src/myspellchecker/core/parametric_templates.py +289 -0
- myspellchecker-1.0.0/src/myspellchecker/core/rerank_rules.py +669 -0
- myspellchecker-1.0.0/src/myspellchecker/core/response.py +477 -0
- myspellchecker-1.0.0/src/myspellchecker/core/response_builder.py +78 -0
- myspellchecker-1.0.0/src/myspellchecker/core/spellchecker.py +1487 -0
- myspellchecker-1.0.0/src/myspellchecker/core/streaming.py +617 -0
- myspellchecker-1.0.0/src/myspellchecker/core/suggestion_pipeline.py +1857 -0
- myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules.py +1592 -0
- myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.cpp +25747 -0
- myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.pxd +52 -0
- myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.pyx +1109 -0
- myspellchecker-1.0.0/src/myspellchecker/core/token_refinement.py +487 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/__init__.py +64 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/base.py +139 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/broken_compound_strategy.py +210 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_helpers.py +211 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_semantic_strategy.py +789 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_strategy.py +36 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/homophone_strategy.py +241 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/ngram_strategy.py +305 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/orthography_strategy.py +262 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/pos_sequence_strategy.py +458 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/question_strategy.py +316 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/semantic_helpers.py +268 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/semantic_strategy.py +788 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/syntactic_strategy.py +247 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/tone_strategy.py +165 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validators/__init__.py +19 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validators/base.py +187 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validators/syllable_validator.py +783 -0
- myspellchecker-1.0.0/src/myspellchecker/core/validators/word_validator.py +779 -0
- myspellchecker-1.0.0/src/myspellchecker/data/__init__.py +12 -0
- myspellchecker-1.0.0/src/myspellchecker/data/word_swap_pool.json +1 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/__init__.py +98 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/_segmenter_config.py +559 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/_segmenter_workers.py +853 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/batch_processor.cpp +21870 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/batch_processor.pyx +920 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/config.py +486 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/database_packager.py +1365 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/enrichment.py +916 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_builder.py +1382 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_checkpoint.py +50 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_counter.cpp +31523 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_counter.pyx +438 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_io.py +325 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_pos.py +687 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester.py +1063 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester_c.cpp +9265 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester_c.pyx +107 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pipeline.py +1469 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pipeline_config_unified.py +274 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pos_inference_manager.py +260 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair.py +177 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair_c.cpp +12262 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair_c.pyx +386 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/reporter.py +218 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/sample_corpus.py +443 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/schema_manager.py +357 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/segmenter.py +747 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/tsv_reader_c.cpp +14733 -0
- myspellchecker-1.0.0/src/myspellchecker/data_pipeline/tsv_reader_c.pyx +273 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/__init__.py +84 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/__init__.py +36 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/aspect.py +387 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/classifier.py +501 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/compound.py +542 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/merged_word.py +272 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/negation.py +509 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/register.py +596 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/config.py +824 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/engine.py +377 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/__init__.py +20 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/checker_delegation_mixin.py +241 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/config_grammar_mixin.py +177 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/pos_tag_mixin.py +103 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/sentence_structure_mixin.py +678 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/word_rule_mixin.py +326 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/__init__.py +40 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/grammar_parser.py +107 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/homophone_parser.py +32 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/morphology_parser.py +207 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/particle_parser.py +158 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/typo_parser.py +160 -0
- myspellchecker-1.0.0/src/myspellchecker/grammar/patterns.py +1131 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/__init__.py +48 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_bulk_ops.py +278 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_cache.py +201 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_enrichment.py +212 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_pos_resolver.py +148 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_schema.py +337 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/base.py +698 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/connection_pool.py +453 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/csv_provider.py +184 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/interfaces/__init__.py +181 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/json_provider.py +214 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/memory.py +862 -0
- myspellchecker-1.0.0/src/myspellchecker/providers/sqlite.py +1504 -0
- myspellchecker-1.0.0/src/myspellchecker/py.typed +0 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/ambiguous_words.yaml +84 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/aspects.yaml +280 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/classifiers.yaml +388 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/collocations.yaml +104 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/compound_confusion.yaml +236 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/compounds.yaml +734 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/confusable_pairs.yaml +320 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/confusion_matrix.yaml +93 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/corruption_weights.yaml +16 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/detector_confidences.yaml +75 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/grammar_rules.yaml +652 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/homophone_confusion.yaml +106 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/homophones.yaml +367 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/medial_confusion.yaml +251 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/medial_swap_pairs.yaml +46 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/morphology.yaml +788 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/morphotactics.yaml +109 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/negation.yaml +155 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/orthographic_corrections.yaml +393 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/particles.yaml +1350 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/pos_inference.yaml +345 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/pronouns.yaml +166 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/register.yaml +311 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/rerank_rules.yaml +872 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/semantic_rules.yaml +74 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/stacking_pairs.yaml +181 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/tense_markers.yaml +113 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/tone_rules.yaml +507 -0
- myspellchecker-1.0.0/src/myspellchecker/rules/typo_corrections.yaml +612 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/_common.schema.json +254 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/ambiguous_words.schema.json +47 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/aspects.schema.json +169 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/classifiers.schema.json +78 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/collocations.schema.json +100 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/compound_confusion.schema.json +98 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/compounds.schema.json +249 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/confusable_pairs.schema.json +139 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/confusion_matrix.schema.json +135 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/corruption_weights.schema.json +104 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/detector_confidences.schema.json +44 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/grammar_rules.schema.json +490 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/homophone_confusion.schema.json +128 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/homophones.schema.json +104 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/medial_confusion.schema.json +92 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/medial_swap_pairs.schema.json +124 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/morphology.schema.json +226 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/morphotactics.schema.json +80 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/negation.schema.json +110 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/orthographic_corrections.schema.json +167 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/particles.schema.json +440 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/pos_inference.schema.json +173 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/pronouns.schema.json +124 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/register.schema.json +230 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/rerank_rules.schema.json +498 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/semantic_rules.schema.json +83 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/stacking_pairs.schema.json +67 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/tense_markers.schema.json +90 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/tone_rules.schema.json +86 -0
- myspellchecker-1.0.0/src/myspellchecker/schemas/typo_corrections.schema.json +222 -0
- myspellchecker-1.0.0/src/myspellchecker/segmenters/__init__.py +18 -0
- myspellchecker-1.0.0/src/myspellchecker/segmenters/base.py +158 -0
- myspellchecker-1.0.0/src/myspellchecker/segmenters/default.py +658 -0
- myspellchecker-1.0.0/src/myspellchecker/segmenters/regex.py +226 -0
- myspellchecker-1.0.0/src/myspellchecker/text/__init__.py +142 -0
- myspellchecker-1.0.0/src/myspellchecker/text/compound_resolver.py +437 -0
- myspellchecker-1.0.0/src/myspellchecker/text/morphology.py +752 -0
- myspellchecker-1.0.0/src/myspellchecker/text/ner.py +164 -0
- myspellchecker-1.0.0/src/myspellchecker/text/ner_model.py +668 -0
- myspellchecker-1.0.0/src/myspellchecker/text/normalization_service.py +562 -0
- myspellchecker-1.0.0/src/myspellchecker/text/normalize.py +1399 -0
- myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.cpp +14928 -0
- myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.pxd +10 -0
- myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.pyx +829 -0
- myspellchecker-1.0.0/src/myspellchecker/text/phonetic.py +670 -0
- myspellchecker-1.0.0/src/myspellchecker/text/phonetic_data.py +330 -0
- myspellchecker-1.0.0/src/myspellchecker/text/place_names.py +505 -0
- myspellchecker-1.0.0/src/myspellchecker/text/reduplication.py +261 -0
- myspellchecker-1.0.0/src/myspellchecker/text/stemmer.py +164 -0
- myspellchecker-1.0.0/src/myspellchecker/text/tone.py +392 -0
- myspellchecker-1.0.0/src/myspellchecker/text/types.py +15 -0
- myspellchecker-1.0.0/src/myspellchecker/text/validator.py +588 -0
- myspellchecker-1.0.0/src/myspellchecker/text/validator_checks.py +630 -0
- myspellchecker-1.0.0/src/myspellchecker/text/validator_data.py +314 -0
- myspellchecker-1.0.0/src/myspellchecker/text/validator_patterns.py +247 -0
- myspellchecker-1.0.0/src/myspellchecker/text/validator_types.py +115 -0
- myspellchecker-1.0.0/src/myspellchecker/text/zawgyi_support.py +166 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/__init__.py +23 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/__init__.py +14 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.cpp +33050 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.pxd +48 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.pyx +431 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.cpp +18362 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.pxd +5 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.pyx +633 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/resource_loader.py +280 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/syllable.py +97 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/transformer_word_segmenter.py +377 -0
- myspellchecker-1.0.0/src/myspellchecker/tokenizers/word.py +497 -0
- myspellchecker-1.0.0/src/myspellchecker/training/__init__.py +118 -0
- myspellchecker-1.0.0/src/myspellchecker/training/config.py +175 -0
- myspellchecker-1.0.0/src/myspellchecker/training/constants.py +159 -0
- myspellchecker-1.0.0/src/myspellchecker/training/corpus_preprocessor.py +496 -0
- myspellchecker-1.0.0/src/myspellchecker/training/exporter.py +203 -0
- myspellchecker-1.0.0/src/myspellchecker/training/generator.py +498 -0
- myspellchecker-1.0.0/src/myspellchecker/training/pipeline.py +526 -0
- myspellchecker-1.0.0/src/myspellchecker/training/reporter.py +343 -0
- myspellchecker-1.0.0/src/myspellchecker/training/reranker_data.py +1352 -0
- myspellchecker-1.0.0/src/myspellchecker/training/reranker_trainer.py +690 -0
- myspellchecker-1.0.0/src/myspellchecker/training/trainer.py +1362 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/__init__.py +73 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/cache.py +288 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/console.py +316 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/console_panels.py +262 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/console_tables.py +126 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/io_utils.py +58 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/logging_utils.py +147 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/singleton.py +148 -0
- myspellchecker-1.0.0/src/myspellchecker/utils/yaml_schema_validator.py +160 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/PKG-INFO +622 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/SOURCES.txt +524 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/dependency_links.txt +1 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/entry_points.txt +2 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/requires.txt +53 -0
- myspellchecker-1.0.0/src/myspellchecker.egg-info/top_level.txt +1 -0
- myspellchecker-1.0.0/tests/test_accuracy.py +1069 -0
- myspellchecker-1.0.0/tests/test_algorithms_cache_factory.py +243 -0
- myspellchecker-1.0.0/tests/test_aspect_system.py +495 -0
- myspellchecker-1.0.0/tests/test_base_provider_comprehensive.py +199 -0
- myspellchecker-1.0.0/tests/test_beam_pruning_edge_cases.py +485 -0
- myspellchecker-1.0.0/tests/test_classifier_system.py +402 -0
- myspellchecker-1.0.0/tests/test_cli_commands.py +959 -0
- myspellchecker-1.0.0/tests/test_cli_integration.py +839 -0
- myspellchecker-1.0.0/tests/test_colloquial_variants.py +387 -0
- myspellchecker-1.0.0/tests/test_compatible_ha.py +280 -0
- myspellchecker-1.0.0/tests/test_compound_resolver.py +321 -0
- myspellchecker-1.0.0/tests/test_compound_system.py +501 -0
- myspellchecker-1.0.0/tests/test_config_loader.py +470 -0
- myspellchecker-1.0.0/tests/test_config_profiles.py +82 -0
- myspellchecker-1.0.0/tests/test_config_pydantic.py +670 -0
- myspellchecker-1.0.0/tests/test_confusable_semantic_strategy.py +875 -0
- myspellchecker-1.0.0/tests/test_confusable_strategy.py +201 -0
- myspellchecker-1.0.0/tests/test_connection_pool.py +640 -0
- myspellchecker-1.0.0/tests/test_context_validator.py +180 -0
- myspellchecker-1.0.0/tests/test_context_validator_strategies.py +484 -0
- myspellchecker-1.0.0/tests/test_core_builder.py +177 -0
- myspellchecker-1.0.0/tests/test_core_di.py +290 -0
- myspellchecker-1.0.0/tests/test_corpus_preprocessor.py +419 -0
- myspellchecker-1.0.0/tests/test_correction_utils.py +236 -0
- myspellchecker-1.0.0/tests/test_csv_provider.py +220 -0
- myspellchecker-1.0.0/tests/test_custom_segmenter.py +85 -0
- myspellchecker-1.0.0/tests/test_data_pipeline.py +452 -0
- myspellchecker-1.0.0/tests/test_data_pipeline_config.py +282 -0
- myspellchecker-1.0.0/tests/test_data_pipeline_ingester.py +543 -0
- myspellchecker-1.0.0/tests/test_data_pipeline_segmenter.py +283 -0
- myspellchecker-1.0.0/tests/test_database_packager.py +114 -0
- myspellchecker-1.0.0/tests/test_database_packager_edge_cases.py +47 -0
- myspellchecker-1.0.0/tests/test_db_build_and_usage.py +136 -0
- myspellchecker-1.0.0/tests/test_default_segmenter.py +387 -0
- myspellchecker-1.0.0/tests/test_detection_registry.py +244 -0
- myspellchecker-1.0.0/tests/test_detector_config.py +70 -0
- myspellchecker-1.0.0/tests/test_detector_context.py +51 -0
- myspellchecker-1.0.0/tests/test_disk_space.py +66 -0
- myspellchecker-1.0.0/tests/test_edit_distance.py +168 -0
- myspellchecker-1.0.0/tests/test_edit_distance_python_impl.py +381 -0
- myspellchecker-1.0.0/tests/test_empty_inputs.py +486 -0
- myspellchecker-1.0.0/tests/test_enrichment.py +338 -0
- myspellchecker-1.0.0/tests/test_error_suppression.py +275 -0
- myspellchecker-1.0.0/tests/test_extended_myanmar_characters.py +364 -0
- myspellchecker-1.0.0/tests/test_extended_myanmar_validation.py +227 -0
- myspellchecker-1.0.0/tests/test_factory.py +76 -0
- myspellchecker-1.0.0/tests/test_frequency_builder.py +551 -0
- myspellchecker-1.0.0/tests/test_grammar_engine.py +274 -0
- myspellchecker-1.0.0/tests/test_grammar_rules_critical.py +264 -0
- myspellchecker-1.0.0/tests/test_grammar_rules_improved.py +251 -0
- myspellchecker-1.0.0/tests/test_grammar_rules_schema_validation.py +467 -0
- myspellchecker-1.0.0/tests/test_homophone_strategy.py +279 -0
- myspellchecker-1.0.0/tests/test_homophones.py +86 -0
- myspellchecker-1.0.0/tests/test_incremental_build.py +345 -0
- myspellchecker-1.0.0/tests/test_inference_backends.py +131 -0
- myspellchecker-1.0.0/tests/test_ingester_c.py +157 -0
- myspellchecker-1.0.0/tests/test_initialization_refactor.py +100 -0
- myspellchecker-1.0.0/tests/test_is_curated_vocabulary.py +446 -0
- myspellchecker-1.0.0/tests/test_joint_segment_tagger.py +361 -0
- myspellchecker-1.0.0/tests/test_json_provider.py +163 -0
- myspellchecker-1.0.0/tests/test_keyboard_distance.py +311 -0
- myspellchecker-1.0.0/tests/test_lazy_imports.py +163 -0
- myspellchecker-1.0.0/tests/test_medial_confusions.py +173 -0
- myspellchecker-1.0.0/tests/test_medial_consonant_compatibility.py +166 -0
- myspellchecker-1.0.0/tests/test_medial_ordering.py +283 -0
- myspellchecker-1.0.0/tests/test_medial_ya_ai_vowel.py +98 -0
- myspellchecker-1.0.0/tests/test_memory_provider.py +252 -0
- myspellchecker-1.0.0/tests/test_merged_word_checker.py +338 -0
- myspellchecker-1.0.0/tests/test_mmap_reader.py +367 -0
- myspellchecker-1.0.0/tests/test_morpheme_suggestion_strategy.py +206 -0
- myspellchecker-1.0.0/tests/test_morphology.py +133 -0
- myspellchecker-1.0.0/tests/test_morphology_performance.py +204 -0
- myspellchecker-1.0.0/tests/test_myanmar_confusables.py +220 -0
- myspellchecker-1.0.0/tests/test_myanmar_constants.py +488 -0
- myspellchecker-1.0.0/tests/test_negation_system.py +425 -0
- myspellchecker-1.0.0/tests/test_ner.py +81 -0
- myspellchecker-1.0.0/tests/test_ner_model.py +443 -0
- myspellchecker-1.0.0/tests/test_ngram_comparison_mode.py +314 -0
- myspellchecker-1.0.0/tests/test_ngram_config_wiring.py +196 -0
- myspellchecker-1.0.0/tests/test_ngram_context_checker.py +225 -0
- myspellchecker-1.0.0/tests/test_ngram_strategy.py +223 -0
- myspellchecker-1.0.0/tests/test_normalization_service_comprehensive.py +290 -0
- myspellchecker-1.0.0/tests/test_normalize.py +46 -0
- myspellchecker-1.0.0/tests/test_orthography_validation.py +212 -0
- myspellchecker-1.0.0/tests/test_pali_segmentation.py +139 -0
- myspellchecker-1.0.0/tests/test_pat_sint_rules.py +79 -0
- myspellchecker-1.0.0/tests/test_path_validation_adversarial.py +263 -0
- myspellchecker-1.0.0/tests/test_phonetic_fix.py +178 -0
- myspellchecker-1.0.0/tests/test_phonetic_hasher.py +408 -0
- myspellchecker-1.0.0/tests/test_phonetic_vowel_separation.py +206 -0
- myspellchecker-1.0.0/tests/test_pipeline_validation.py +300 -0
- myspellchecker-1.0.0/tests/test_place_names.py +44 -0
- myspellchecker-1.0.0/tests/test_plural_markers.py +90 -0
- myspellchecker-1.0.0/tests/test_pos_algorithms.py +912 -0
- myspellchecker-1.0.0/tests/test_pos_backward_compat.py +163 -0
- myspellchecker-1.0.0/tests/test_pos_disambiguation.py +326 -0
- myspellchecker-1.0.0/tests/test_pos_inference.py +284 -0
- myspellchecker-1.0.0/tests/test_pos_sequence_strategy.py +136 -0
- myspellchecker-1.0.0/tests/test_pos_sequence_validation.py +282 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_base.py +195 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_factory.py +218 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_rule.py +75 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_transformer.py +432 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_transformer_edge_cases.py +193 -0
- myspellchecker-1.0.0/tests/test_pos_tagger_viterbi_adapter.py +162 -0
- myspellchecker-1.0.0/tests/test_python_cython_equivalence.py +201 -0
- myspellchecker-1.0.0/tests/test_question_detection.py +367 -0
- myspellchecker-1.0.0/tests/test_question_strategy.py +136 -0
- myspellchecker-1.0.0/tests/test_ranker.py +165 -0
- myspellchecker-1.0.0/tests/test_ranker_config_wiring.py +66 -0
- myspellchecker-1.0.0/tests/test_reduplication_engine.py +246 -0
- myspellchecker-1.0.0/tests/test_register_system.py +343 -0
- myspellchecker-1.0.0/tests/test_regression_cases.py +129 -0
- myspellchecker-1.0.0/tests/test_repair.py +206 -0
- myspellchecker-1.0.0/tests/test_repair_c.py +235 -0
- myspellchecker-1.0.0/tests/test_rerank_rules.py +672 -0
- myspellchecker-1.0.0/tests/test_response.py +414 -0
- myspellchecker-1.0.0/tests/test_response_builder.py +97 -0
- myspellchecker-1.0.0/tests/test_segmenter_base_class.py +175 -0
- myspellchecker-1.0.0/tests/test_segmenter_default_edge_cases.py +154 -0
- myspellchecker-1.0.0/tests/test_segmenters.py +118 -0
- myspellchecker-1.0.0/tests/test_segmenters_regex.py +77 -0
- myspellchecker-1.0.0/tests/test_semantic_checker.py +546 -0
- myspellchecker-1.0.0/tests/test_semantic_proactive_scanning.py +244 -0
- myspellchecker-1.0.0/tests/test_semantic_strategy.py +157 -0
- myspellchecker-1.0.0/tests/test_spellchecker.py +496 -0
- myspellchecker-1.0.0/tests/test_spellchecker_detection_paths.py +912 -0
- myspellchecker-1.0.0/tests/test_spellchecker_init_paths.py +243 -0
- myspellchecker-1.0.0/tests/test_spellchecker_pos_tagging.py +90 -0
- myspellchecker-1.0.0/tests/test_spellchecker_rerank_paths.py +511 -0
- myspellchecker-1.0.0/tests/test_spellchecker_suppression_paths.py +373 -0
- myspellchecker-1.0.0/tests/test_sqlite_exception_handling.py +412 -0
- myspellchecker-1.0.0/tests/test_sqlite_provider.py +354 -0
- myspellchecker-1.0.0/tests/test_sqlite_provider_security.py +123 -0
- myspellchecker-1.0.0/tests/test_stacking_exceptions.py +161 -0
- myspellchecker-1.0.0/tests/test_stemmer.py +97 -0
- myspellchecker-1.0.0/tests/test_streaming.py +858 -0
- myspellchecker-1.0.0/tests/test_suggestion_pipeline.py +207 -0
- myspellchecker-1.0.0/tests/test_suggestion_strategy_comprehensive.py +245 -0
- myspellchecker-1.0.0/tests/test_svc_refinement.py +52 -0
- myspellchecker-1.0.0/tests/test_syllable_hygiene.py +19 -0
- myspellchecker-1.0.0/tests/test_syllable_parity.py +296 -0
- myspellchecker-1.0.0/tests/test_syllable_rules.py +404 -0
- myspellchecker-1.0.0/tests/test_syllable_rules_c.py +89 -0
- myspellchecker-1.0.0/tests/test_syllable_rules_property.py +439 -0
- myspellchecker-1.0.0/tests/test_syllable_rules_python_impl.py +256 -0
- myspellchecker-1.0.0/tests/test_symspell.py +317 -0
- myspellchecker-1.0.0/tests/test_symspell_compound.py +89 -0
- myspellchecker-1.0.0/tests/test_symspell_resource_limits.py +262 -0
- myspellchecker-1.0.0/tests/test_symspell_thread_safety.py +204 -0
- myspellchecker-1.0.0/tests/test_syntactic_rules.py +158 -0
- myspellchecker-1.0.0/tests/test_syntactic_strategy.py +115 -0
- myspellchecker-1.0.0/tests/test_synthetic_error_generator.py +177 -0
- myspellchecker-1.0.0/tests/test_tall_aa_after_medial_wa.py +615 -0
- myspellchecker-1.0.0/tests/test_token_refinement.py +184 -0
- myspellchecker-1.0.0/tests/test_tokenized_text.py +167 -0
- myspellchecker-1.0.0/tests/test_tokenizers_word.py +529 -0
- myspellchecker-1.0.0/tests/test_tone_disambiguation.py +327 -0
- myspellchecker-1.0.0/tests/test_tone_strategy.py +76 -0
- myspellchecker-1.0.0/tests/test_training_components.py +335 -0
- myspellchecker-1.0.0/tests/test_training_features.py +285 -0
- myspellchecker-1.0.0/tests/test_training_reporter.py +418 -0
- myspellchecker-1.0.0/tests/test_transformer_word_segmenter.py +473 -0
- myspellchecker-1.0.0/tests/test_tsv_reader_c.py +381 -0
- myspellchecker-1.0.0/tests/test_unified_ranking.py +468 -0
- myspellchecker-1.0.0/tests/test_utils.py +349 -0
- myspellchecker-1.0.0/tests/test_utils_cache_comprehensive.py +257 -0
- myspellchecker-1.0.0/tests/test_validation_strategies.py +900 -0
- myspellchecker-1.0.0/tests/test_validator_functions.py +342 -0
- myspellchecker-1.0.0/tests/test_validator_patterns.py +239 -0
- myspellchecker-1.0.0/tests/test_validator_quality.py +564 -0
- myspellchecker-1.0.0/tests/test_validator_strictness.py +64 -0
- myspellchecker-1.0.0/tests/test_validator_truncation.py +124 -0
- myspellchecker-1.0.0/tests/test_validators_edge_cases.py +164 -0
- myspellchecker-1.0.0/tests/test_validators_paths.py +322 -0
- myspellchecker-1.0.0/tests/test_virama_validation.py +249 -0
- myspellchecker-1.0.0/tests/test_viterbi.py +158 -0
- myspellchecker-1.0.0/tests/test_viterbi_edge_cases.py +369 -0
- myspellchecker-1.0.0/tests/test_viterbi_smoothing.py +358 -0
- myspellchecker-1.0.0/tests/test_word_level_suggestion_lifting.py +322 -0
- myspellchecker-1.0.0/tests/test_yaml_config_edge_cases.py +427 -0
- myspellchecker-1.0.0/tests/test_yaml_rule_expansion.py +216 -0
- myspellchecker-1.0.0/tests/test_yaml_schema_validation.py +267 -0
- myspellchecker-1.0.0/tests/test_zawgyi_migration.py +112 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Thet Twe Aung
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Include Cython source files for building extensions from sdist
|
|
2
|
+
recursive-include src/myspellchecker *.pyx *.pxd
|
|
3
|
+
|
|
4
|
+
# Include YAML rule files
|
|
5
|
+
recursive-include src/myspellchecker/rules *.yaml
|
|
6
|
+
|
|
7
|
+
# Include JSON schema files
|
|
8
|
+
recursive-include src/myspellchecker/schemas *.json
|
|
9
|
+
|
|
10
|
+
# Include package data
|
|
11
|
+
include src/myspellchecker/py.typed
|
|
12
|
+
|
|
13
|
+
# Include data files
|
|
14
|
+
recursive-include src/myspellchecker/data *.json
|
|
15
|
+
|
|
16
|
+
# Include project metadata
|
|
17
|
+
include LICENSE
|
|
18
|
+
include README.md
|
|
19
|
+
include CHANGELOG.md
|
|
20
|
+
include pyproject.toml
|
|
21
|
+
include setup.py
|
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: myspellchecker
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: High-performance Myanmar (Burmese) spell checker with syllable-first architecture
|
|
5
|
+
Author-email: Thet Twe Aung <thettweaung@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025-2026 Thet Twe Aung
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/thettwe/my-spellchecker
|
|
29
|
+
Project-URL: Documentation, https://docs.myspellchecker.com/
|
|
30
|
+
Project-URL: Repository, https://github.com/thettwe/my-spellchecker
|
|
31
|
+
Project-URL: Bug Tracker, https://github.com/thettwe/my-spellchecker/issues
|
|
32
|
+
Keywords: myanmar,burmese,spell-checker,nlp,language-processing
|
|
33
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
34
|
+
Classifier: Intended Audience :: Developers
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
41
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
43
|
+
Requires-Python: >=3.10
|
|
44
|
+
Description-Content-Type: text/markdown
|
|
45
|
+
License-File: LICENSE
|
|
46
|
+
Requires-Dist: numpy>=1.22.0
|
|
47
|
+
Requires-Dist: python-crfsuite>=0.9.7
|
|
48
|
+
Requires-Dist: rich>=13.0.0
|
|
49
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
50
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
51
|
+
Requires-Dist: myanmartools>=1.2.1
|
|
52
|
+
Requires-Dist: python-myanmar>=1.0.0
|
|
53
|
+
Provides-Extra: build
|
|
54
|
+
Requires-Dist: pyarrow>=14.0.1; extra == "build"
|
|
55
|
+
Requires-Dist: duckdb>=1.0.0; extra == "build"
|
|
56
|
+
Requires-Dist: xxhash>=3.0.0; extra == "build"
|
|
57
|
+
Requires-Dist: tqdm>=4.65.0; extra == "build"
|
|
58
|
+
Requires-Dist: cached-path>=1.2.0; extra == "build"
|
|
59
|
+
Provides-Extra: ai
|
|
60
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "ai"
|
|
61
|
+
Requires-Dist: tokenizers>=0.13.0; extra == "ai"
|
|
62
|
+
Provides-Extra: transformers
|
|
63
|
+
Requires-Dist: transformers>=4.30.0; extra == "transformers"
|
|
64
|
+
Requires-Dist: torch>=2.6.0; extra == "transformers"
|
|
65
|
+
Provides-Extra: ai-full
|
|
66
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "ai-full"
|
|
67
|
+
Requires-Dist: tokenizers>=0.13.0; extra == "ai-full"
|
|
68
|
+
Requires-Dist: transformers>=4.30.0; extra == "ai-full"
|
|
69
|
+
Requires-Dist: torch>=2.6.0; extra == "ai-full"
|
|
70
|
+
Provides-Extra: train
|
|
71
|
+
Requires-Dist: transformers>=4.30.0; extra == "train"
|
|
72
|
+
Requires-Dist: datasets>=2.14.0; extra == "train"
|
|
73
|
+
Requires-Dist: accelerate>=0.21.0; extra == "train"
|
|
74
|
+
Requires-Dist: torch>=2.6.0; extra == "train"
|
|
75
|
+
Requires-Dist: onnx>=1.14.0; extra == "train"
|
|
76
|
+
Requires-Dist: onnxruntime>=1.15.0; extra == "train"
|
|
77
|
+
Requires-Dist: onnxscript>=0.1.0; extra == "train"
|
|
78
|
+
Requires-Dist: tokenizers>=0.13.0; extra == "train"
|
|
79
|
+
Provides-Extra: dev
|
|
80
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
81
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
82
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == "dev"
|
|
83
|
+
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
|
|
84
|
+
Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
|
|
85
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
|
|
86
|
+
Requires-Dist: freezegun>=1.2.0; extra == "dev"
|
|
87
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
88
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
89
|
+
Requires-Dist: transformers>=4.30.0; extra == "dev"
|
|
90
|
+
Requires-Dist: datasets>=2.14.0; extra == "dev"
|
|
91
|
+
Requires-Dist: accelerate>=0.21.0; extra == "dev"
|
|
92
|
+
Requires-Dist: torch>=2.6.0; extra == "dev"
|
|
93
|
+
Dynamic: license-file
|
|
94
|
+
|
|
95
|
+
# mySpellChecker: Myanmar (Burmese) Text Intelligence Library
|
|
96
|
+
|
|
97
|
+
> **Myanmar (Burmese) text intelligence library — 10-strategy checking pipeline, dictionary building, and AI model training, from O(1) SymSpell lookups to ONNX-powered inference.**
|
|
98
|
+
|
|
99
|
+
[](https://www.python.org/downloads/)
|
|
100
|
+
[](https://opensource.org/licenses/MIT)
|
|
101
|
+
[](tests/)
|
|
102
|
+
[](tests/)
|
|
103
|
+
|
|
104
|
+
## Overview
|
|
105
|
+
|
|
106
|
+
**mySpellChecker** is a comprehensive text intelligence library built specifically for the Myanmar language. It covers three domains: a **10-strategy checking pipeline** (from syllable rules through grammar checking to AI inference), a **dictionary building pipeline** (corpus ingestion, segmentation, N-gram frequency, SQLite packaging), and **AI model training** (semantic MLM fine-tuning with ONNX export). Unlike English tools that rely on spaces, mySpellChecker uses a **syllable-first architecture** to handle the continuous flow of Myanmar script, where each layer builds on validated output from the layer below.
|
|
107
|
+
|
|
108
|
+
## Key Features
|
|
109
|
+
|
|
110
|
+
> **Note**: v1.0 supports **Standard Burmese (Myanmar) only**. Other Myanmar-script languages (Shan, Karen, Mon, etc.) and extended Unicode ranges are planned for future releases.
|
|
111
|
+
|
|
112
|
+
### Checking Pipeline
|
|
113
|
+
|
|
114
|
+
* **10-Strategy Validation Pipeline**: Composable strategies from fast rule checks (sub-10ms) to AI inference, each layer building on the previous.
|
|
115
|
+
* **Syllable-First Architecture**: Validates most errors at the syllable level before assembling into words for deeper analysis.
|
|
116
|
+
* **SymSpell Algorithm**: Custom O(1) symmetric delete implementation with Myanmar-specific variant generation for fast correction suggestions.
|
|
117
|
+
* **N-gram Context Checking**: Bigram/Trigram probabilities detect real-word errors (correct spelling, wrong context).
|
|
118
|
+
* **Homophone Detection**: Bidirectional N-gram analysis catches sound-alike word errors with frequency-aware guards.
|
|
119
|
+
* **Grammar Checking**: 6 specialized checkers — Aspect, Classifier, Compound, MergedWord, Negation, Register.
|
|
120
|
+
* **POS Tagging**: Pluggable backends — Rule-Based (fast), Viterbi HMM (balanced), Transformer (93% accuracy).
|
|
121
|
+
* **Joint Segmentation**: Simultaneous word segmentation and POS tagging in a single pass.
|
|
122
|
+
* **Compound & Morpheme Handling**: DP-based compound resolution, productive reduplication validation, and morpheme-level correction for OOV words.
|
|
123
|
+
* **AI Semantic Checking (Optional)**: ONNX masked language model for context-aware validation.
|
|
124
|
+
* **Named Entity Recognition**: Heuristic and Transformer-based NER to reduce false positives on names and places.
|
|
125
|
+
|
|
126
|
+
### Dictionary Building Pipeline
|
|
127
|
+
|
|
128
|
+
* **Multi-Format Corpus Ingestion**: Build dictionaries from `.txt`, `.csv`, `.tsv`, `.json`, `.jsonl`, `.parquet` files.
|
|
129
|
+
* **Incremental Builds**: Resume corpus processing without reprocessing completed files.
|
|
130
|
+
* **Pluggable Storage**: SQLite (default, disk-based) or MemoryProvider (RAM-based) with thread-safe connection pooling.
|
|
131
|
+
|
|
132
|
+
### AI Model Training
|
|
133
|
+
|
|
134
|
+
* **Semantic Model Training**: Train masked language models with word-boundary BPE, whole-word masking, and denoising objectives.
|
|
135
|
+
* **ONNX Export & Quantization**: Convert trained models to ONNX with quantization for production deployment.
|
|
136
|
+
|
|
137
|
+
### Myanmar Language Support
|
|
138
|
+
|
|
139
|
+
* **Text Normalization**: Unified service — zero-width character removal, NFC/NFD normalization, Zawgyi conversion.
|
|
140
|
+
* **Zawgyi Detection**: Built-in detection and warning for legacy Zawgyi encoded text.
|
|
141
|
+
* **Phonetic & Colloquial Handling**: Phonetic hashing, colloquial variant detection (e.g., ကျနော် → ကျွန်တော်), configurable strictness.
|
|
142
|
+
* **Tone Processing**: Tone mark validation, disambiguation, and context-based correction.
|
|
143
|
+
* **Bilingual Error Messages**: Error reporting in English and Myanmar (Burmese).
|
|
144
|
+
|
|
145
|
+
### Performance & Production
|
|
146
|
+
|
|
147
|
+
* **Cython/C++ Extensions**: 11 performance-critical paths compiled to C++ with OpenMP parallelization.
|
|
148
|
+
* **Streaming & Batch APIs**: Process large documents with streaming, batch (`check_batch`), and async (`check_async`) APIs.
|
|
149
|
+
* **Configurable**: Pre-defined profiles (production, fast, accurate, development, testing), environment/file-based config loading, and DI container for advanced wiring.
|
|
150
|
+
|
|
151
|
+
## Documentation
|
|
152
|
+
|
|
153
|
+
Full documentation is available at **[docs.myspellchecker.com](https://docs.myspellchecker.com/)**.
|
|
154
|
+
|
|
155
|
+
### Getting Started
|
|
156
|
+
* **[Introduction](https://docs.myspellchecker.com/introduction)**: Overview of the library and its architecture.
|
|
157
|
+
* **[Installation](https://docs.myspellchecker.com/guides/installation)**: Installation options and system requirements.
|
|
158
|
+
* **[Quick Start](https://docs.myspellchecker.com/guides/quickstart)**: Get up and running in 5 minutes.
|
|
159
|
+
* **[Configuration Guide](https://docs.myspellchecker.com/guides/configuration)**: All configuration options and profiles.
|
|
160
|
+
|
|
161
|
+
### Text Checking
|
|
162
|
+
* **[Overview](https://docs.myspellchecker.com/features/index)**: 10-strategy text checking pipeline.
|
|
163
|
+
* **[Syllable Validation](https://docs.myspellchecker.com/features/syllable-validation)**: Core validation layer.
|
|
164
|
+
* **[Word Validation](https://docs.myspellchecker.com/features/word-validation)**: Dictionary + SymSpell suggestions.
|
|
165
|
+
* **[Context Checking](https://docs.myspellchecker.com/features/context-checking)**: N-gram probability analysis.
|
|
166
|
+
* **[Homophone Detection](https://docs.myspellchecker.com/features/homophones)**: Sound-alike error detection.
|
|
167
|
+
|
|
168
|
+
### Grammar
|
|
169
|
+
* **[Grammar Checking](https://docs.myspellchecker.com/features/grammar-checking)**: Syntactic validation.
|
|
170
|
+
* **[Grammar Checkers](https://docs.myspellchecker.com/features/grammar-checkers)**: 6 specialized checkers (Aspect, Classifier, Compound, MergedWord, Negation, Register).
|
|
171
|
+
* **[Grammar Engine](https://docs.myspellchecker.com/features/grammar-engine)**: Rule engine internals.
|
|
172
|
+
|
|
173
|
+
### Language Processing
|
|
174
|
+
* **[POS Tagging](https://docs.myspellchecker.com/features/pos-tagging)**: Pluggable tagging (Rule-Based, Viterbi, Transformer).
|
|
175
|
+
* **[Morphology Analysis](https://docs.myspellchecker.com/features/morphology)**: Word structure analysis.
|
|
176
|
+
* **[Segmenters](https://docs.myspellchecker.com/features/segmenters)**: Word segmentation engines.
|
|
177
|
+
* **[Named Entity Recognition](https://docs.myspellchecker.com/features/ner)**: NER with 3 implementations.
|
|
178
|
+
|
|
179
|
+
### AI-Powered Checking
|
|
180
|
+
* **[Semantic Checking](https://docs.myspellchecker.com/features/semantic-checking)**: AI-powered MLM validation.
|
|
181
|
+
* **[Validation Strategies](https://docs.myspellchecker.com/features/validation-strategies)**: 10 composable strategies.
|
|
182
|
+
* **[Training Models](https://docs.myspellchecker.com/guides/training)**: Train custom semantic models.
|
|
183
|
+
|
|
184
|
+
### Text Utilities
|
|
185
|
+
* **[Text Normalization](https://docs.myspellchecker.com/features/normalization)**: Unified normalization service.
|
|
186
|
+
* **[Text Utilities](https://docs.myspellchecker.com/features/text-utilities)**: Stemmer, Phonetic, Tone, Zawgyi.
|
|
187
|
+
* **[Text Validation](https://docs.myspellchecker.com/features/text-validation)**: Input text validation.
|
|
188
|
+
|
|
189
|
+
### Performance & Scale
|
|
190
|
+
* **[Streaming](https://docs.myspellchecker.com/features/streaming)**: Large document processing.
|
|
191
|
+
* **[Batch Processing](https://docs.myspellchecker.com/features/batch-processing)**: High-throughput parallel processing.
|
|
192
|
+
* **[Async API](https://docs.myspellchecker.com/features/async-api)**: Non-blocking spell check operations.
|
|
193
|
+
* **[Performance Tuning](https://docs.myspellchecker.com/guides/performance-tuning)**: Optimization strategies.
|
|
194
|
+
* **[Connection Pooling](https://docs.myspellchecker.com/guides/connection-pool)**: Database connection management.
|
|
195
|
+
|
|
196
|
+
### Customization
|
|
197
|
+
* **[Customization Guide](https://docs.myspellchecker.com/guides/customization)**: Extending and customizing behavior.
|
|
198
|
+
* **[Custom Dictionaries](https://docs.myspellchecker.com/guides/custom-dictionaries)**: Build and customize dictionaries.
|
|
199
|
+
* **[Custom Grammar Rules](https://docs.myspellchecker.com/guides/custom-grammar-rules)**: Write YAML grammar rules.
|
|
200
|
+
* **[Caching](https://docs.myspellchecker.com/guides/caching)**: Algorithm and result caching.
|
|
201
|
+
* **[Resource Caching](https://docs.myspellchecker.com/guides/resource-caching)**: Model and resource caching.
|
|
202
|
+
* **[Logging](https://docs.myspellchecker.com/guides/logging)**: Centralized logging configuration.
|
|
203
|
+
|
|
204
|
+
### Integration & Deployment
|
|
205
|
+
* **[Integration Guide](https://docs.myspellchecker.com/guides/integration)**: Integrate with web apps and APIs.
|
|
206
|
+
* **[Docker](https://docs.myspellchecker.com/guides/docker)**: Container deployment guide.
|
|
207
|
+
* **[Zawgyi Support](https://docs.myspellchecker.com/guides/zawgyi-support)**: Legacy encoding handling.
|
|
208
|
+
|
|
209
|
+
### Dictionary Building
|
|
210
|
+
* **[Pipeline Overview](https://docs.myspellchecker.com/data-pipeline/index)**: Dictionary building pipeline.
|
|
211
|
+
* **[Corpus Format](https://docs.myspellchecker.com/data-pipeline/corpus-format)**: Supported input formats.
|
|
212
|
+
* **[Ingestion](https://docs.myspellchecker.com/data-pipeline/ingestion)**: Corpus ingestion details.
|
|
213
|
+
* **[Building Dictionaries](https://docs.myspellchecker.com/data-pipeline/building)**: Step-by-step build guide.
|
|
214
|
+
* **[Optimization](https://docs.myspellchecker.com/data-pipeline/optimization)**: Performance tuning for large corpora.
|
|
215
|
+
|
|
216
|
+
### API & CLI Reference
|
|
217
|
+
* **[API Reference](https://docs.myspellchecker.com/api-reference/index)**: Full API documentation.
|
|
218
|
+
* **[SpellChecker API](https://docs.myspellchecker.com/core/spellchecker)**: Main SpellChecker class reference.
|
|
219
|
+
* **[Configuration API](https://docs.myspellchecker.com/core/configuration)**: Configuration class reference.
|
|
220
|
+
* **[Provider Capabilities](https://docs.myspellchecker.com/api-reference/provider-capabilities)**: Dictionary provider interface.
|
|
221
|
+
* **[Tokenizers](https://docs.myspellchecker.com/api-reference/tokenizers)**: Tokenizer API reference.
|
|
222
|
+
* **[CLI Reference](https://docs.myspellchecker.com/cli/index)**: Command-line interface guide.
|
|
223
|
+
|
|
224
|
+
### Core Internals
|
|
225
|
+
* **[Core Overview](https://docs.myspellchecker.com/core/index)**: Core package internals.
|
|
226
|
+
* **[Syllable Validation](https://docs.myspellchecker.com/core/syllable-validation)**: Syllable validator internals.
|
|
227
|
+
* **[Word Validation](https://docs.myspellchecker.com/core/word-validation)**: Word validator internals.
|
|
228
|
+
* **[Training Internals](https://docs.myspellchecker.com/core/training)**: ML training pipeline internals.
|
|
229
|
+
* **[Algorithm Factory](https://docs.myspellchecker.com/guides/algorithm-factory)**: Algorithm instantiation patterns.
|
|
230
|
+
* **[I/O Utilities](https://docs.myspellchecker.com/guides/io-utilities)**: File I/O utilities reference.
|
|
231
|
+
|
|
232
|
+
### Algorithms
|
|
233
|
+
* **[Algorithms Overview](https://docs.myspellchecker.com/algorithms/index)**: Algorithm catalog.
|
|
234
|
+
* **[SymSpell](https://docs.myspellchecker.com/algorithms/symspell)**: O(1) suggestion algorithm.
|
|
235
|
+
* **[Edit Distance](https://docs.myspellchecker.com/algorithms/edit-distance)**: Myanmar-aware Levenshtein distance.
|
|
236
|
+
* **[Suggestion Ranking](https://docs.myspellchecker.com/algorithms/suggestion-ranking)**: Multi-signal ranking pipeline.
|
|
237
|
+
* **[Suggestion Strategy](https://docs.myspellchecker.com/algorithms/suggestion-strategy)**: Strategy pattern for suggestions.
|
|
238
|
+
* **[N-gram Context](https://docs.myspellchecker.com/algorithms/ngram)**: Bigram/Trigram probability models.
|
|
239
|
+
* **[Context-Aware Checking](https://docs.myspellchecker.com/algorithms/context-aware)**: N-gram and syntactic rules.
|
|
240
|
+
* **[Semantic Algorithm](https://docs.myspellchecker.com/algorithms/semantic)**: AI/ML inference internals.
|
|
241
|
+
* **[Grammar Rules Engine](https://docs.myspellchecker.com/algorithms/grammar-rules)**: Grammar rule processing.
|
|
242
|
+
* **[Tone Disambiguation](https://docs.myspellchecker.com/algorithms/tone-disambiguation)**: Tone mark resolution.
|
|
243
|
+
* **[NER Algorithm](https://docs.myspellchecker.com/algorithms/ner)**: NER implementation details.
|
|
244
|
+
|
|
245
|
+
### Segmentation & Tagging
|
|
246
|
+
* **[Segmentation Overview](https://docs.myspellchecker.com/algorithms/segmentation)**: Segmentation algorithm catalog.
|
|
247
|
+
* **[Syllable Segmentation](https://docs.myspellchecker.com/algorithms/syllable-segmentation)**: Syllable-level segmentation.
|
|
248
|
+
* **[Normalization Algorithm](https://docs.myspellchecker.com/algorithms/normalization)**: Text normalization internals.
|
|
249
|
+
* **[Phonetic Algorithm](https://docs.myspellchecker.com/algorithms/phonetic)**: Phonetic hashing and similarity.
|
|
250
|
+
* **[Viterbi POS Tagger](https://docs.myspellchecker.com/algorithms/viterbi)**: HMM-based POS tagging.
|
|
251
|
+
* **[POS Disambiguator](https://docs.myspellchecker.com/algorithms/pos-disambiguator)**: POS disambiguation logic.
|
|
252
|
+
* **[Joint Segmentation](https://docs.myspellchecker.com/algorithms/joint-segment-tagger)**: Combined segmentation + tagging.
|
|
253
|
+
|
|
254
|
+
### Architecture
|
|
255
|
+
* **[Architecture Overview](https://docs.myspellchecker.com/architecture/index)**: Multi-layer validation pipeline.
|
|
256
|
+
* **[System Design](https://docs.myspellchecker.com/architecture/system-design)**: Component architecture.
|
|
257
|
+
* **[Validation Pipeline](https://docs.myspellchecker.com/architecture/validation-pipeline)**: Pipeline execution flow.
|
|
258
|
+
* **[Component Diagram](https://docs.myspellchecker.com/architecture/component-diagram)**: Visual component map.
|
|
259
|
+
* **[Data Flow](https://docs.myspellchecker.com/architecture/data-flow)**: Data flow through the system.
|
|
260
|
+
* **[Dependency Injection](https://docs.myspellchecker.com/architecture/dependency-injection)**: Component management system.
|
|
261
|
+
* **[Extension Points](https://docs.myspellchecker.com/architecture/extension-points)**: How to extend the library.
|
|
262
|
+
|
|
263
|
+
### Error & Rules Reference
|
|
264
|
+
* **[Reference Overview](https://docs.myspellchecker.com/reference/index)**: Technical reference index.
|
|
265
|
+
* **[Error Types](https://docs.myspellchecker.com/reference/error-types)**: Error classification reference.
|
|
266
|
+
* **[Error Codes](https://docs.myspellchecker.com/reference/error-codes)**: Complete error code listing.
|
|
267
|
+
* **[Rules System](https://docs.myspellchecker.com/reference/rules-system)**: YAML configuration files.
|
|
268
|
+
|
|
269
|
+
### Data Reference
|
|
270
|
+
* **[Constants](https://docs.myspellchecker.com/reference/constants)**: Myanmar Unicode constants and character sets.
|
|
271
|
+
* **[Glossary](https://docs.myspellchecker.com/reference/glossary)**: Terms and definitions.
|
|
272
|
+
* **[Phonetic Data](https://docs.myspellchecker.com/reference/phonetic-data)**: Phonetic groups and similarity mappings.
|
|
273
|
+
|
|
274
|
+
### Data Pipeline Internals
|
|
275
|
+
* **[Pipeline Core](https://docs.myspellchecker.com/core/data-pipeline)**: Data pipeline core module.
|
|
276
|
+
* **[Database Schema](https://docs.myspellchecker.com/data-pipeline/database-schema)**: SQLite schema reference.
|
|
277
|
+
* **[Schema Management](https://docs.myspellchecker.com/data-pipeline/schema-management)**: Schema versioning and migrations.
|
|
278
|
+
* **[Providers](https://docs.myspellchecker.com/data-pipeline/providers)**: Data source providers.
|
|
279
|
+
* **[Processing](https://docs.myspellchecker.com/data-pipeline/processing)**: Text processing stages.
|
|
280
|
+
* **[POS Inference](https://docs.myspellchecker.com/data-pipeline/pos-inference)**: POS tagging during build.
|
|
281
|
+
* **[Segmentation Repair](https://docs.myspellchecker.com/data-pipeline/segmentation-repair)**: Segmentation error correction.
|
|
282
|
+
* **[Pipeline Reporter](https://docs.myspellchecker.com/data-pipeline/pipeline-reporter)**: Build progress reporting.
|
|
283
|
+
|
|
284
|
+
### Help & FAQ
|
|
285
|
+
* **[FAQ](https://docs.myspellchecker.com/reference/faq)**: Frequently asked questions.
|
|
286
|
+
* **[Troubleshooting](https://docs.myspellchecker.com/reference/troubleshooting)**: Common issues and solutions.
|
|
287
|
+
* **[Comparisons](https://docs.myspellchecker.com/reference/comparisons)**: How mySpellChecker compares to other tools.
|
|
288
|
+
|
|
289
|
+
### Development
|
|
290
|
+
* **[Development Guide](https://docs.myspellchecker.com/development/index)**: Development overview.
|
|
291
|
+
* **[Setup](https://docs.myspellchecker.com/development/setup)**: Development environment setup.
|
|
292
|
+
* **[Contributing](https://docs.myspellchecker.com/development/contributing)**: Contribution guidelines.
|
|
293
|
+
* **[Naming Conventions](https://docs.myspellchecker.com/development/naming-conventions)**: Code naming standards.
|
|
294
|
+
* **[Testing](https://docs.myspellchecker.com/development/testing)**: Test suite and coverage.
|
|
295
|
+
* **[Cython Dev Guide](https://docs.myspellchecker.com/development/cython-guide)**: Working with Cython extensions.
|
|
296
|
+
* **[Cython Reference](https://docs.myspellchecker.com/guides/cython)**: Cython patterns and optimization.
|
|
297
|
+
* **[CLI Formatting](https://docs.myspellchecker.com/guides/cli-formatting)**: CLI output formatting internals.
|
|
298
|
+
|
|
299
|
+
## Quick Start
|
|
300
|
+
|
|
301
|
+
### 1. Installation
|
|
302
|
+
|
|
303
|
+
**Prerequisites:**
|
|
304
|
+
* Python 3.10+
|
|
305
|
+
* C++ Compiler (GCC/Clang/MSVC) for building Cython extensions.
|
|
306
|
+
|
|
307
|
+
**Standard (Recommended):**
|
|
308
|
+
```bash
|
|
309
|
+
pip install myspellchecker
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
**With Transformer POS Tagging (Optional):**
|
|
313
|
+
```bash
|
|
314
|
+
# Enables transformer-based POS tagging for 93% accuracy
|
|
315
|
+
pip install "myspellchecker[transformers]"
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Full (with all features):**
|
|
319
|
+
```bash
|
|
320
|
+
pip install "myspellchecker[ai,build,train,transformers]"
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### 2. Build Dictionary
|
|
324
|
+
|
|
325
|
+
The library requires a dictionary database. You can build a sample one or use your own corpus.
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
# Install build dependencies (pyarrow, duckdb, etc.)
|
|
329
|
+
pip install "myspellchecker[build]"
|
|
330
|
+
|
|
331
|
+
# Build a sample database for testing
|
|
332
|
+
myspellchecker build --sample
|
|
333
|
+
|
|
334
|
+
# Build from your own text corpus
|
|
335
|
+
myspellchecker build --input corpus.txt --output mySpellChecker.db
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### 3. Usage
|
|
339
|
+
|
|
340
|
+
**Python:**
|
|
341
|
+
|
|
342
|
+
```python
|
|
343
|
+
from myspellchecker.core import SpellCheckerBuilder, ConfigPresets, ValidationLevel
|
|
344
|
+
|
|
345
|
+
# 1. Initialize with Builder (Recommended)
|
|
346
|
+
checker = (
|
|
347
|
+
SpellCheckerBuilder()
|
|
348
|
+
.with_config(ConfigPresets.DEFAULT)
|
|
349
|
+
.with_phonetic(True)
|
|
350
|
+
.build()
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
# 2. Simple Syllable Check (Fastest)
|
|
354
|
+
text = "မြနမ်ာနိုင်ငံ"
|
|
355
|
+
result = checker.check(text)
|
|
356
|
+
print(f"Corrected: {result.corrected_text}")
|
|
357
|
+
# Output: မြန်မာနိုင်ငံ
|
|
358
|
+
|
|
359
|
+
# 3. Context-Aware Check (Slower, more accurate)
|
|
360
|
+
# Detects that 'နီ' (Red) is wrong in this context, suggests 'နေ' (Stay/Ing)
|
|
361
|
+
text = "မင်းဘာလုပ်နီလဲ"
|
|
362
|
+
result = checker.check(text, level=ValidationLevel.WORD)
|
|
363
|
+
print(f"Corrected: {result.corrected_text}")
|
|
364
|
+
# Output: မင်းဘာလုပ်နေလဲ
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**CLI:**
|
|
368
|
+
|
|
369
|
+
See the [CLI Reference](https://docs.myspellchecker.com/cli/index) for full details.
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
# Check a string
|
|
373
|
+
echo "မင်္ဂလာပါ" | myspellchecker
|
|
374
|
+
|
|
375
|
+
# Check a file with rich output
|
|
376
|
+
myspellchecker check input.txt --format rich
|
|
377
|
+
|
|
378
|
+
# Segment text with POS tags
|
|
379
|
+
echo "မြန်မာနိုင်ငံ" | myspellchecker segment --tag
|
|
380
|
+
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### 4. Configuration
|
|
384
|
+
|
|
385
|
+
```python
|
|
386
|
+
from myspellchecker import SpellChecker
|
|
387
|
+
from myspellchecker.core.config import SpellCheckerConfig
|
|
388
|
+
from myspellchecker.providers.sqlite import SQLiteProvider
|
|
389
|
+
|
|
390
|
+
# Configure with custom settings
|
|
391
|
+
config = SpellCheckerConfig(
|
|
392
|
+
max_edit_distance=2,
|
|
393
|
+
max_suggestions=5,
|
|
394
|
+
use_context_checker=True,
|
|
395
|
+
use_phonetic=True,
|
|
396
|
+
use_ner=True
|
|
397
|
+
)
|
|
398
|
+
checker = SpellChecker(
|
|
399
|
+
config=config,
|
|
400
|
+
provider=SQLiteProvider(database_path="mySpellChecker.db")
|
|
401
|
+
)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
See the [Configuration Guide](https://docs.myspellchecker.com/guides/configuration) for all options.
|
|
405
|
+
|
|
406
|
+
### 5. Logging
|
|
407
|
+
|
|
408
|
+
Configure logging globally at the start of your application:
|
|
409
|
+
|
|
410
|
+
```python
|
|
411
|
+
from myspellchecker.utils.logging_utils import configure_logging
|
|
412
|
+
|
|
413
|
+
# Enable verbose debug logging
|
|
414
|
+
configure_logging(level="DEBUG")
|
|
415
|
+
|
|
416
|
+
# Or use structured JSON logging for production
|
|
417
|
+
configure_logging(level="INFO", json_output=True)
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
See the [Logging Guide](https://docs.myspellchecker.com/guides/logging) for details.
|
|
421
|
+
|
|
422
|
+
## Advanced Features
|
|
423
|
+
|
|
424
|
+
### Grammar Checking
|
|
425
|
+
|
|
426
|
+
Six specialized grammar checkers for Myanmar:
|
|
427
|
+
|
|
428
|
+
```python
|
|
429
|
+
from myspellchecker.grammar.checkers.register import RegisterChecker
|
|
430
|
+
|
|
431
|
+
checker = RegisterChecker()
|
|
432
|
+
errors = checker.validate_sequence(["သူ", "သည်", "စာအုပ်", "ဖတ်", "တယ်"])
|
|
433
|
+
# Detects mixed register (formal "သည်" + colloquial "တယ်")
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
See the [Grammar Checkers Guide](https://docs.myspellchecker.com/features/grammar-checkers) for details.
|
|
437
|
+
|
|
438
|
+
### Named Entity Recognition
|
|
439
|
+
|
|
440
|
+
Reduce false positives by identifying names and places:
|
|
441
|
+
|
|
442
|
+
```python
|
|
443
|
+
from myspellchecker.core.config import SpellCheckerConfig
|
|
444
|
+
|
|
445
|
+
config = SpellCheckerConfig(use_ner=True)
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
See the [NER Guide](https://docs.myspellchecker.com/features/ner) for details.
|
|
449
|
+
|
|
450
|
+
### POS Tagging & Joint Segmentation
|
|
451
|
+
|
|
452
|
+
**mySpellChecker** supports advanced linguistic analysis:
|
|
453
|
+
|
|
454
|
+
- **Pluggable POS Tagging**: Rule-Based (fastest), Viterbi (balanced), or Transformer (most accurate).
|
|
455
|
+
- **Joint Segmentation**: Combine word breaking and tagging in a single pass.
|
|
456
|
+
|
|
457
|
+
```python
|
|
458
|
+
from myspellchecker.core.config import SpellCheckerConfig, JointConfig
|
|
459
|
+
|
|
460
|
+
config = SpellCheckerConfig(
|
|
461
|
+
joint=JointConfig(enabled=True)
|
|
462
|
+
)
|
|
463
|
+
checker = SpellChecker(config=config)
|
|
464
|
+
words, tags = checker.segment_and_tag("မြန်မာနိုင်ငံ")
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
See the [POS Tagging Guide](https://docs.myspellchecker.com/features/pos-tagging) for details.
|
|
468
|
+
|
|
469
|
+
### Validation Strategies
|
|
470
|
+
|
|
471
|
+
Composable validation pipeline with 10 strategies:
|
|
472
|
+
|
|
473
|
+
| Strategy | Priority | Purpose |
|
|
474
|
+
|----------|----------|---------|
|
|
475
|
+
| ToneValidation | 10 | Tone mark disambiguation |
|
|
476
|
+
| Orthography | 15 | Medial order and compatibility |
|
|
477
|
+
| SyntacticRule | 20 | Grammar rule checking |
|
|
478
|
+
| BrokenCompound | 25 | Broken compound word detection |
|
|
479
|
+
| POSSequence | 30 | POS sequence validation |
|
|
480
|
+
| Question | 40 | Question structure |
|
|
481
|
+
| Homophone | 45 | Sound-alike detection |
|
|
482
|
+
| ConfusableSemantic | 48 | MLM-enhanced confusable detection |
|
|
483
|
+
| NgramContext | 50 | N-gram probability |
|
|
484
|
+
| Semantic | 70 | AI-powered validation (ONNX) |
|
|
485
|
+
|
|
486
|
+
See the [Validation Strategies Guide](https://docs.myspellchecker.com/features/validation-strategies) for details.
|
|
487
|
+
|
|
488
|
+
## Benchmark Results
|
|
489
|
+
|
|
490
|
+
Tested on a 489-sentence benchmark suite (v1.0: 60 clean, 429 with errors, 470 error spans) covering 3 difficulty tiers and 4 domains. The dictionary database and semantic model are **not bundled** with the library — users build or provide their own.
|
|
491
|
+
|
|
492
|
+
**Test environment:**
|
|
493
|
+
- Dictionary: Production SQLite database (565 MB, 601K words, 2.2M bigrams, enrichment tables)
|
|
494
|
+
- Semantic model: Custom RoBERTa MLM (6L/768H, ONNX quantized, 71 MB)
|
|
495
|
+
- Hardware: Apple Silicon, Python 3.14
|
|
496
|
+
- Benchmark: [`benchmarks/myspellchecker_benchmark.yaml`](benchmarks/) (489 sentences)
|
|
497
|
+
|
|
498
|
+
### With Semantic Model
|
|
499
|
+
|
|
500
|
+
| Metric | Value |
|
|
501
|
+
|--------|-------|
|
|
502
|
+
| **F1 Score** | 98.3% |
|
|
503
|
+
| **Precision** | 97.1% |
|
|
504
|
+
| **Recall** | 99.6% |
|
|
505
|
+
| **False Positives** | 14 (0% on clean sentences) |
|
|
506
|
+
| **False Negatives** | 2 |
|
|
507
|
+
| **Top-1 Suggestion Accuracy** | 81.2% |
|
|
508
|
+
| **MRR** | 0.8395 |
|
|
509
|
+
| **Mean Latency** | 35.2 ms/sentence |
|
|
510
|
+
| **P50 Latency** | 32.1 ms |
|
|
511
|
+
|
|
512
|
+
### Without Semantic Model
|
|
513
|
+
|
|
514
|
+
| Metric | Value |
|
|
515
|
+
|--------|-------|
|
|
516
|
+
| **F1 Score** | 96.2% |
|
|
517
|
+
| **Precision** | 97.8% |
|
|
518
|
+
| **Recall** | 94.7% |
|
|
519
|
+
| **False Positives** | 10 (0% on clean sentences) |
|
|
520
|
+
| **False Negatives** | 25 |
|
|
521
|
+
| **Top-1 Suggestion Accuracy** | 85.2% |
|
|
522
|
+
| **MRR** | 0.8731 |
|
|
523
|
+
| **Mean Latency** | ~12 ms/sentence |
|
|
524
|
+
| **P50 Latency** | ~7 ms |
|
|
525
|
+
|
|
526
|
+
The semantic model adds ~23ms mean latency but boosts recall from 94.7% to 99.6% by catching 23 additional context-dependent errors that rule-based methods miss. Both modes maintain sub-35ms P50 latency suitable for interactive use.
|
|
527
|
+
|
|
528
|
+
## Development
|
|
529
|
+
|
|
530
|
+
### Setup
|
|
531
|
+
```bash
|
|
532
|
+
git clone https://github.com/thettwe/my-spellchecker.git
|
|
533
|
+
cd my-spellchecker
|
|
534
|
+
python -m venv venv
|
|
535
|
+
source venv/bin/activate
|
|
536
|
+
pip install -e ".[dev]"
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Testing
|
|
540
|
+
|
|
541
|
+
The test suite has 4,664 tests across 211 files with 75% code coverage, organized into unit, integration, e2e, and stress tiers with auto-applied pytest markers.
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
# Run default test suite (~5 min, skips slow tests)
|
|
545
|
+
pytest tests/
|
|
546
|
+
|
|
547
|
+
# Run by category
|
|
548
|
+
pytest tests/ -m integration # 307 integration tests
|
|
549
|
+
pytest tests/ -m e2e # 10 end-to-end CLI tests
|
|
550
|
+
pytest tests/ -m slow # 39 slow tests (property-based, stress, DB builds)
|
|
551
|
+
|
|
552
|
+
# Run with coverage
|
|
553
|
+
pytest tests/ --cov=src/myspellchecker --cov-fail-under=75
|
|
554
|
+
|
|
555
|
+
# Formatting and linting
|
|
556
|
+
ruff format .
|
|
557
|
+
ruff check .
|
|
558
|
+
mypy src/myspellchecker
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
See the [Development Guide](https://docs.myspellchecker.com/development/index) for contributing guidelines and the [Testing Guide](https://docs.myspellchecker.com/development/testing) for test suite details.
|
|
562
|
+
|
|
563
|
+
## Acknowledgments
|
|
564
|
+
|
|
565
|
+
This project builds upon the work of several open-source projects and researchers. We gratefully acknowledge:
|
|
566
|
+
|
|
567
|
+
### Models & Resources
|
|
568
|
+
|
|
569
|
+
| Resource | Author | Description | Link |
|
|
570
|
+
|----------|--------|-------------|------|
|
|
571
|
+
| **Myanmar POS Model** | Chuu Htet Naing | XLM-RoBERTa-based POS tagger (93.37% accuracy) | [HuggingFace](https://huggingface.co/chuuhtetnaing/myanmar-pos-model) |
|
|
572
|
+
| **myWord Segmentation** | Ye Kyaw Thu | Viterbi-based Myanmar word segmentation | [GitHub](https://github.com/ye-kyaw-thu/myWord) |
|
|
573
|
+
| **CRF Word Segmenter** | Ye Kyaw Thu | CRF-based syllable-to-word segmentation model | [GitHub](https://github.com/ye-kyaw-thu) |
|
|
574
|
+
|
|
575
|
+
### Key Dependencies
|
|
576
|
+
|
|
577
|
+
| Library | Purpose | License |
|
|
578
|
+
|---------|---------|---------|
|
|
579
|
+
| [pycrfsuite](https://github.com/scrapinghub/python-crfsuite) | CRF model inference | MIT |
|
|
580
|
+
| [transformers](https://github.com/huggingface/transformers) | Transformer model inference | Apache 2.0 |
|
|
581
|
+
|
|
582
|
+
### Algorithm References
|
|
583
|
+
|
|
584
|
+
| Algorithm | Author | Description | Link |
|
|
585
|
+
|-----------|--------|-------------|------|
|
|
586
|
+
| **SymSpell** | Wolf Garbe | Symmetric delete spelling correction algorithm. mySpellChecker includes a custom implementation with Myanmar-specific variant generation. | [GitHub](https://github.com/wolfgarbe/SymSpell) |
|
|
587
|
+
|
|
588
|
+
### Citations
|
|
589
|
+
|
|
590
|
+
If you use mySpellChecker in your research, please cite the relevant works:
|
|
591
|
+
|
|
592
|
+
```bibtex
|
|
593
|
+
@misc{chuuhtetnaing-myanmar-pos,
|
|
594
|
+
author = {Chuu Htet Naing},
|
|
595
|
+
title = {Myanmar POS Model},
|
|
596
|
+
year = {2024},
|
|
597
|
+
publisher = {Hugging Face},
|
|
598
|
+
url = {https://huggingface.co/chuuhtetnaing/myanmar-pos-model}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@misc{yekyawthu-myword,
|
|
602
|
+
author = {Ye Kyaw Thu},
|
|
603
|
+
title = {myWord: Word Segmentation Tool for Burmese},
|
|
604
|
+
year = {2017},
|
|
605
|
+
publisher = {GitHub},
|
|
606
|
+
url = {https://github.com/ye-kyaw-thu/myWord}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
@misc{garbe-symspell,
|
|
610
|
+
author = {Wolf Garbe},
|
|
611
|
+
title = {SymSpell: Symmetric Delete Spelling Correction Algorithm},
|
|
612
|
+
year = {2012},
|
|
613
|
+
publisher = {GitHub},
|
|
614
|
+
url = {https://github.com/wolfgarbe/SymSpell}
|
|
615
|
+
}
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
We thank these researchers and developers for making their work publicly available, enabling high-quality Myanmar language processing.
|
|
619
|
+
|
|
620
|
+
## License
|
|
621
|
+
|
|
622
|
+
This project is licensed under the [MIT License](LICENSE).
|