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.
Files changed (526) hide show
  1. myspellchecker-1.0.0/LICENSE +21 -0
  2. myspellchecker-1.0.0/MANIFEST.in +21 -0
  3. myspellchecker-1.0.0/PKG-INFO +622 -0
  4. myspellchecker-1.0.0/README.md +528 -0
  5. myspellchecker-1.0.0/pyproject.toml +228 -0
  6. myspellchecker-1.0.0/setup.cfg +4 -0
  7. myspellchecker-1.0.0/setup.py +151 -0
  8. myspellchecker-1.0.0/src/myspellchecker/__init__.py +157 -0
  9. myspellchecker-1.0.0/src/myspellchecker/__main__.py +6 -0
  10. myspellchecker-1.0.0/src/myspellchecker/algorithms/__init__.py +100 -0
  11. myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_candidates.py +292 -0
  12. myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_scoring.py +250 -0
  13. myspellchecker-1.0.0/src/myspellchecker/algorithms/_ngram_smoothing.py +368 -0
  14. myspellchecker-1.0.0/src/myspellchecker/algorithms/cache.py +623 -0
  15. myspellchecker-1.0.0/src/myspellchecker/algorithms/dedup.py +97 -0
  16. myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/__init__.py +17 -0
  17. myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance.py +446 -0
  18. myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance_c.cpp +13382 -0
  19. myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/edit_distance_c.pyx +426 -0
  20. myspellchecker-1.0.0/src/myspellchecker/algorithms/distance/keyboard.py +157 -0
  21. myspellchecker-1.0.0/src/myspellchecker/algorithms/factory.py +341 -0
  22. myspellchecker-1.0.0/src/myspellchecker/algorithms/inference_backends.py +183 -0
  23. myspellchecker-1.0.0/src/myspellchecker/algorithms/interfaces.py +158 -0
  24. myspellchecker-1.0.0/src/myspellchecker/algorithms/joint_segment_tagger.py +571 -0
  25. myspellchecker-1.0.0/src/myspellchecker/algorithms/medial_swap_strategy.py +370 -0
  26. myspellchecker-1.0.0/src/myspellchecker/algorithms/morpheme_suggestion_strategy.py +240 -0
  27. myspellchecker-1.0.0/src/myspellchecker/algorithms/neural_reranker.py +216 -0
  28. myspellchecker-1.0.0/src/myspellchecker/algorithms/ngram_context_checker.py +1547 -0
  29. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_disambiguator.py +481 -0
  30. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_inference.py +512 -0
  31. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_base.py +276 -0
  32. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_factory.py +401 -0
  33. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_rule.py +306 -0
  34. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_transformer.py +910 -0
  35. myspellchecker-1.0.0/src/myspellchecker/algorithms/pos_tagger_viterbi.py +370 -0
  36. myspellchecker-1.0.0/src/myspellchecker/algorithms/ranker.py +799 -0
  37. myspellchecker-1.0.0/src/myspellchecker/algorithms/semantic_checker.py +1654 -0
  38. myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/__init__.py +17 -0
  39. myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/compound_strategy.py +165 -0
  40. myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/context_strategy.py +218 -0
  41. myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/morphology_strategy.py +142 -0
  42. myspellchecker-1.0.0/src/myspellchecker/algorithms/strategies/symspell_strategy.py +118 -0
  43. myspellchecker-1.0.0/src/myspellchecker/algorithms/suggestion_strategy.py +397 -0
  44. myspellchecker-1.0.0/src/myspellchecker/algorithms/symspell.py +1414 -0
  45. myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.cpp +17057 -0
  46. myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.py +851 -0
  47. myspellchecker-1.0.0/src/myspellchecker/algorithms/viterbi.pyx +572 -0
  48. myspellchecker-1.0.0/src/myspellchecker/cli.py +250 -0
  49. myspellchecker-1.0.0/src/myspellchecker/cli_completions.py +297 -0
  50. myspellchecker-1.0.0/src/myspellchecker/cli_formatters.py +205 -0
  51. myspellchecker-1.0.0/src/myspellchecker/cli_parser.py +754 -0
  52. myspellchecker-1.0.0/src/myspellchecker/cli_utils.py +111 -0
  53. myspellchecker-1.0.0/src/myspellchecker/commands/__init__.py +20 -0
  54. myspellchecker-1.0.0/src/myspellchecker/commands/build.py +265 -0
  55. myspellchecker-1.0.0/src/myspellchecker/commands/check.py +179 -0
  56. myspellchecker-1.0.0/src/myspellchecker/commands/completion.py +17 -0
  57. myspellchecker-1.0.0/src/myspellchecker/commands/config_cmd.py +84 -0
  58. myspellchecker-1.0.0/src/myspellchecker/commands/infer_pos.py +139 -0
  59. myspellchecker-1.0.0/src/myspellchecker/commands/segment.py +70 -0
  60. myspellchecker-1.0.0/src/myspellchecker/commands/train.py +77 -0
  61. myspellchecker-1.0.0/src/myspellchecker/core/__init__.py +166 -0
  62. myspellchecker-1.0.0/src/myspellchecker/core/builder.py +588 -0
  63. myspellchecker-1.0.0/src/myspellchecker/core/component_factory.py +1019 -0
  64. myspellchecker-1.0.0/src/myspellchecker/core/config/__init__.py +199 -0
  65. myspellchecker-1.0.0/src/myspellchecker/core/config/algorithm_configs.py +3003 -0
  66. myspellchecker-1.0.0/src/myspellchecker/core/config/grammar_configs.py +369 -0
  67. myspellchecker-1.0.0/src/myspellchecker/core/config/loader.py +815 -0
  68. myspellchecker-1.0.0/src/myspellchecker/core/config/main.py +318 -0
  69. myspellchecker-1.0.0/src/myspellchecker/core/config/profiles.py +403 -0
  70. myspellchecker-1.0.0/src/myspellchecker/core/config/tagger_configs.py +392 -0
  71. myspellchecker-1.0.0/src/myspellchecker/core/config/text_configs.py +163 -0
  72. myspellchecker-1.0.0/src/myspellchecker/core/config/validation_configs.py +759 -0
  73. myspellchecker-1.0.0/src/myspellchecker/core/constants/__init__.py +473 -0
  74. myspellchecker-1.0.0/src/myspellchecker/core/constants/core_constants.py +411 -0
  75. myspellchecker-1.0.0/src/myspellchecker/core/constants/detector_thresholds.py +321 -0
  76. myspellchecker-1.0.0/src/myspellchecker/core/constants/myanmar_constants.py +1373 -0
  77. myspellchecker-1.0.0/src/myspellchecker/core/constants/pipeline_constants.py +71 -0
  78. myspellchecker-1.0.0/src/myspellchecker/core/context_validator.py +673 -0
  79. myspellchecker-1.0.0/src/myspellchecker/core/correction_utils.py +329 -0
  80. myspellchecker-1.0.0/src/myspellchecker/core/detection_registry.py +77 -0
  81. myspellchecker-1.0.0/src/myspellchecker/core/detection_rules.py +1049 -0
  82. myspellchecker-1.0.0/src/myspellchecker/core/detector_data.py +152 -0
  83. myspellchecker-1.0.0/src/myspellchecker/core/detectors/__init__.py +26 -0
  84. myspellchecker-1.0.0/src/myspellchecker/core/detectors/context.py +49 -0
  85. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/__init__.py +26 -0
  86. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/collocation_detection_mixin.py +169 -0
  87. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/compound_detection_mixin.py +1510 -0
  88. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/medial_confusion_mixin.py +371 -0
  89. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_norm_mixins/particle_detection_mixin.py +1193 -0
  90. myspellchecker-1.0.0/src/myspellchecker/core/detectors/post_normalization.py +1025 -0
  91. myspellchecker-1.0.0/src/myspellchecker/core/detectors/pre_normalization.py +649 -0
  92. myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_detectors.py +890 -0
  93. myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/__init__.py +22 -0
  94. myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/register_mixing_mixin.py +586 -0
  95. myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/structure_detection_mixin.py +526 -0
  96. myspellchecker-1.0.0/src/myspellchecker/core/detectors/sentence_mixins/tense_detection_mixin.py +616 -0
  97. myspellchecker-1.0.0/src/myspellchecker/core/detectors/tokenized_text.py +113 -0
  98. myspellchecker-1.0.0/src/myspellchecker/core/detectors/utils.py +106 -0
  99. myspellchecker-1.0.0/src/myspellchecker/core/di/__init__.py +24 -0
  100. myspellchecker-1.0.0/src/myspellchecker/core/di/container.py +283 -0
  101. myspellchecker-1.0.0/src/myspellchecker/core/di/registry.py +169 -0
  102. myspellchecker-1.0.0/src/myspellchecker/core/di/service_names.py +35 -0
  103. myspellchecker-1.0.0/src/myspellchecker/core/error_suppression.py +1269 -0
  104. myspellchecker-1.0.0/src/myspellchecker/core/exceptions.py +437 -0
  105. myspellchecker-1.0.0/src/myspellchecker/core/factories/__init__.py +35 -0
  106. myspellchecker-1.0.0/src/myspellchecker/core/factories/builders.py +557 -0
  107. myspellchecker-1.0.0/src/myspellchecker/core/factories/context_checker_factory.py +75 -0
  108. myspellchecker-1.0.0/src/myspellchecker/core/factories/context_validator_factory.py +232 -0
  109. myspellchecker-1.0.0/src/myspellchecker/core/factories/optional_services_factory.py +393 -0
  110. myspellchecker-1.0.0/src/myspellchecker/core/factories/phonetic_factory.py +52 -0
  111. myspellchecker-1.0.0/src/myspellchecker/core/factories/provider_factory.py +71 -0
  112. myspellchecker-1.0.0/src/myspellchecker/core/factories/ranker_factory.py +55 -0
  113. myspellchecker-1.0.0/src/myspellchecker/core/factories/segmenter_factory.py +58 -0
  114. myspellchecker-1.0.0/src/myspellchecker/core/factories/suggestion_strategy_factory.py +142 -0
  115. myspellchecker-1.0.0/src/myspellchecker/core/factories/symspell_factory.py +77 -0
  116. myspellchecker-1.0.0/src/myspellchecker/core/factories/validators_factory.py +167 -0
  117. myspellchecker-1.0.0/src/myspellchecker/core/homophones.py +149 -0
  118. myspellchecker-1.0.0/src/myspellchecker/core/i18n.py +327 -0
  119. myspellchecker-1.0.0/src/myspellchecker/core/myanmar_confusables.py +501 -0
  120. myspellchecker-1.0.0/src/myspellchecker/core/parametric_templates.py +289 -0
  121. myspellchecker-1.0.0/src/myspellchecker/core/rerank_rules.py +669 -0
  122. myspellchecker-1.0.0/src/myspellchecker/core/response.py +477 -0
  123. myspellchecker-1.0.0/src/myspellchecker/core/response_builder.py +78 -0
  124. myspellchecker-1.0.0/src/myspellchecker/core/spellchecker.py +1487 -0
  125. myspellchecker-1.0.0/src/myspellchecker/core/streaming.py +617 -0
  126. myspellchecker-1.0.0/src/myspellchecker/core/suggestion_pipeline.py +1857 -0
  127. myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules.py +1592 -0
  128. myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.cpp +25747 -0
  129. myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.pxd +52 -0
  130. myspellchecker-1.0.0/src/myspellchecker/core/syllable_rules_c.pyx +1109 -0
  131. myspellchecker-1.0.0/src/myspellchecker/core/token_refinement.py +487 -0
  132. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/__init__.py +64 -0
  133. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/base.py +139 -0
  134. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/broken_compound_strategy.py +210 -0
  135. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_helpers.py +211 -0
  136. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_semantic_strategy.py +789 -0
  137. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/confusable_strategy.py +36 -0
  138. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/homophone_strategy.py +241 -0
  139. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/ngram_strategy.py +305 -0
  140. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/orthography_strategy.py +262 -0
  141. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/pos_sequence_strategy.py +458 -0
  142. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/question_strategy.py +316 -0
  143. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/semantic_helpers.py +268 -0
  144. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/semantic_strategy.py +788 -0
  145. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/syntactic_strategy.py +247 -0
  146. myspellchecker-1.0.0/src/myspellchecker/core/validation_strategies/tone_strategy.py +165 -0
  147. myspellchecker-1.0.0/src/myspellchecker/core/validators/__init__.py +19 -0
  148. myspellchecker-1.0.0/src/myspellchecker/core/validators/base.py +187 -0
  149. myspellchecker-1.0.0/src/myspellchecker/core/validators/syllable_validator.py +783 -0
  150. myspellchecker-1.0.0/src/myspellchecker/core/validators/word_validator.py +779 -0
  151. myspellchecker-1.0.0/src/myspellchecker/data/__init__.py +12 -0
  152. myspellchecker-1.0.0/src/myspellchecker/data/word_swap_pool.json +1 -0
  153. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/__init__.py +98 -0
  154. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/_segmenter_config.py +559 -0
  155. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/_segmenter_workers.py +853 -0
  156. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/batch_processor.cpp +21870 -0
  157. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/batch_processor.pyx +920 -0
  158. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/config.py +486 -0
  159. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/database_packager.py +1365 -0
  160. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/enrichment.py +916 -0
  161. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_builder.py +1382 -0
  162. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_checkpoint.py +50 -0
  163. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_counter.cpp +31523 -0
  164. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_counter.pyx +438 -0
  165. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_io.py +325 -0
  166. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/frequency_pos.py +687 -0
  167. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester.py +1063 -0
  168. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester_c.cpp +9265 -0
  169. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/ingester_c.pyx +107 -0
  170. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pipeline.py +1469 -0
  171. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pipeline_config_unified.py +274 -0
  172. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/pos_inference_manager.py +260 -0
  173. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair.py +177 -0
  174. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair_c.cpp +12262 -0
  175. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/repair_c.pyx +386 -0
  176. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/reporter.py +218 -0
  177. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/sample_corpus.py +443 -0
  178. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/schema_manager.py +357 -0
  179. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/segmenter.py +747 -0
  180. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/tsv_reader_c.cpp +14733 -0
  181. myspellchecker-1.0.0/src/myspellchecker/data_pipeline/tsv_reader_c.pyx +273 -0
  182. myspellchecker-1.0.0/src/myspellchecker/grammar/__init__.py +84 -0
  183. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/__init__.py +36 -0
  184. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/aspect.py +387 -0
  185. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/classifier.py +501 -0
  186. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/compound.py +542 -0
  187. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/merged_word.py +272 -0
  188. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/negation.py +509 -0
  189. myspellchecker-1.0.0/src/myspellchecker/grammar/checkers/register.py +596 -0
  190. myspellchecker-1.0.0/src/myspellchecker/grammar/config.py +824 -0
  191. myspellchecker-1.0.0/src/myspellchecker/grammar/engine.py +377 -0
  192. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/__init__.py +20 -0
  193. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/checker_delegation_mixin.py +241 -0
  194. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/config_grammar_mixin.py +177 -0
  195. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/pos_tag_mixin.py +103 -0
  196. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/sentence_structure_mixin.py +678 -0
  197. myspellchecker-1.0.0/src/myspellchecker/grammar/mixins/word_rule_mixin.py +326 -0
  198. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/__init__.py +40 -0
  199. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/grammar_parser.py +107 -0
  200. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/homophone_parser.py +32 -0
  201. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/morphology_parser.py +207 -0
  202. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/particle_parser.py +158 -0
  203. myspellchecker-1.0.0/src/myspellchecker/grammar/parsers/typo_parser.py +160 -0
  204. myspellchecker-1.0.0/src/myspellchecker/grammar/patterns.py +1131 -0
  205. myspellchecker-1.0.0/src/myspellchecker/providers/__init__.py +48 -0
  206. myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_bulk_ops.py +278 -0
  207. myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_cache.py +201 -0
  208. myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_enrichment.py +212 -0
  209. myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_pos_resolver.py +148 -0
  210. myspellchecker-1.0.0/src/myspellchecker/providers/_sqlite_schema.py +337 -0
  211. myspellchecker-1.0.0/src/myspellchecker/providers/base.py +698 -0
  212. myspellchecker-1.0.0/src/myspellchecker/providers/connection_pool.py +453 -0
  213. myspellchecker-1.0.0/src/myspellchecker/providers/csv_provider.py +184 -0
  214. myspellchecker-1.0.0/src/myspellchecker/providers/interfaces/__init__.py +181 -0
  215. myspellchecker-1.0.0/src/myspellchecker/providers/json_provider.py +214 -0
  216. myspellchecker-1.0.0/src/myspellchecker/providers/memory.py +862 -0
  217. myspellchecker-1.0.0/src/myspellchecker/providers/sqlite.py +1504 -0
  218. myspellchecker-1.0.0/src/myspellchecker/py.typed +0 -0
  219. myspellchecker-1.0.0/src/myspellchecker/rules/ambiguous_words.yaml +84 -0
  220. myspellchecker-1.0.0/src/myspellchecker/rules/aspects.yaml +280 -0
  221. myspellchecker-1.0.0/src/myspellchecker/rules/classifiers.yaml +388 -0
  222. myspellchecker-1.0.0/src/myspellchecker/rules/collocations.yaml +104 -0
  223. myspellchecker-1.0.0/src/myspellchecker/rules/compound_confusion.yaml +236 -0
  224. myspellchecker-1.0.0/src/myspellchecker/rules/compounds.yaml +734 -0
  225. myspellchecker-1.0.0/src/myspellchecker/rules/confusable_pairs.yaml +320 -0
  226. myspellchecker-1.0.0/src/myspellchecker/rules/confusion_matrix.yaml +93 -0
  227. myspellchecker-1.0.0/src/myspellchecker/rules/corruption_weights.yaml +16 -0
  228. myspellchecker-1.0.0/src/myspellchecker/rules/detector_confidences.yaml +75 -0
  229. myspellchecker-1.0.0/src/myspellchecker/rules/grammar_rules.yaml +652 -0
  230. myspellchecker-1.0.0/src/myspellchecker/rules/homophone_confusion.yaml +106 -0
  231. myspellchecker-1.0.0/src/myspellchecker/rules/homophones.yaml +367 -0
  232. myspellchecker-1.0.0/src/myspellchecker/rules/medial_confusion.yaml +251 -0
  233. myspellchecker-1.0.0/src/myspellchecker/rules/medial_swap_pairs.yaml +46 -0
  234. myspellchecker-1.0.0/src/myspellchecker/rules/morphology.yaml +788 -0
  235. myspellchecker-1.0.0/src/myspellchecker/rules/morphotactics.yaml +109 -0
  236. myspellchecker-1.0.0/src/myspellchecker/rules/negation.yaml +155 -0
  237. myspellchecker-1.0.0/src/myspellchecker/rules/orthographic_corrections.yaml +393 -0
  238. myspellchecker-1.0.0/src/myspellchecker/rules/particles.yaml +1350 -0
  239. myspellchecker-1.0.0/src/myspellchecker/rules/pos_inference.yaml +345 -0
  240. myspellchecker-1.0.0/src/myspellchecker/rules/pronouns.yaml +166 -0
  241. myspellchecker-1.0.0/src/myspellchecker/rules/register.yaml +311 -0
  242. myspellchecker-1.0.0/src/myspellchecker/rules/rerank_rules.yaml +872 -0
  243. myspellchecker-1.0.0/src/myspellchecker/rules/semantic_rules.yaml +74 -0
  244. myspellchecker-1.0.0/src/myspellchecker/rules/stacking_pairs.yaml +181 -0
  245. myspellchecker-1.0.0/src/myspellchecker/rules/tense_markers.yaml +113 -0
  246. myspellchecker-1.0.0/src/myspellchecker/rules/tone_rules.yaml +507 -0
  247. myspellchecker-1.0.0/src/myspellchecker/rules/typo_corrections.yaml +612 -0
  248. myspellchecker-1.0.0/src/myspellchecker/schemas/_common.schema.json +254 -0
  249. myspellchecker-1.0.0/src/myspellchecker/schemas/ambiguous_words.schema.json +47 -0
  250. myspellchecker-1.0.0/src/myspellchecker/schemas/aspects.schema.json +169 -0
  251. myspellchecker-1.0.0/src/myspellchecker/schemas/classifiers.schema.json +78 -0
  252. myspellchecker-1.0.0/src/myspellchecker/schemas/collocations.schema.json +100 -0
  253. myspellchecker-1.0.0/src/myspellchecker/schemas/compound_confusion.schema.json +98 -0
  254. myspellchecker-1.0.0/src/myspellchecker/schemas/compounds.schema.json +249 -0
  255. myspellchecker-1.0.0/src/myspellchecker/schemas/confusable_pairs.schema.json +139 -0
  256. myspellchecker-1.0.0/src/myspellchecker/schemas/confusion_matrix.schema.json +135 -0
  257. myspellchecker-1.0.0/src/myspellchecker/schemas/corruption_weights.schema.json +104 -0
  258. myspellchecker-1.0.0/src/myspellchecker/schemas/detector_confidences.schema.json +44 -0
  259. myspellchecker-1.0.0/src/myspellchecker/schemas/grammar_rules.schema.json +490 -0
  260. myspellchecker-1.0.0/src/myspellchecker/schemas/homophone_confusion.schema.json +128 -0
  261. myspellchecker-1.0.0/src/myspellchecker/schemas/homophones.schema.json +104 -0
  262. myspellchecker-1.0.0/src/myspellchecker/schemas/medial_confusion.schema.json +92 -0
  263. myspellchecker-1.0.0/src/myspellchecker/schemas/medial_swap_pairs.schema.json +124 -0
  264. myspellchecker-1.0.0/src/myspellchecker/schemas/morphology.schema.json +226 -0
  265. myspellchecker-1.0.0/src/myspellchecker/schemas/morphotactics.schema.json +80 -0
  266. myspellchecker-1.0.0/src/myspellchecker/schemas/negation.schema.json +110 -0
  267. myspellchecker-1.0.0/src/myspellchecker/schemas/orthographic_corrections.schema.json +167 -0
  268. myspellchecker-1.0.0/src/myspellchecker/schemas/particles.schema.json +440 -0
  269. myspellchecker-1.0.0/src/myspellchecker/schemas/pos_inference.schema.json +173 -0
  270. myspellchecker-1.0.0/src/myspellchecker/schemas/pronouns.schema.json +124 -0
  271. myspellchecker-1.0.0/src/myspellchecker/schemas/register.schema.json +230 -0
  272. myspellchecker-1.0.0/src/myspellchecker/schemas/rerank_rules.schema.json +498 -0
  273. myspellchecker-1.0.0/src/myspellchecker/schemas/semantic_rules.schema.json +83 -0
  274. myspellchecker-1.0.0/src/myspellchecker/schemas/stacking_pairs.schema.json +67 -0
  275. myspellchecker-1.0.0/src/myspellchecker/schemas/tense_markers.schema.json +90 -0
  276. myspellchecker-1.0.0/src/myspellchecker/schemas/tone_rules.schema.json +86 -0
  277. myspellchecker-1.0.0/src/myspellchecker/schemas/typo_corrections.schema.json +222 -0
  278. myspellchecker-1.0.0/src/myspellchecker/segmenters/__init__.py +18 -0
  279. myspellchecker-1.0.0/src/myspellchecker/segmenters/base.py +158 -0
  280. myspellchecker-1.0.0/src/myspellchecker/segmenters/default.py +658 -0
  281. myspellchecker-1.0.0/src/myspellchecker/segmenters/regex.py +226 -0
  282. myspellchecker-1.0.0/src/myspellchecker/text/__init__.py +142 -0
  283. myspellchecker-1.0.0/src/myspellchecker/text/compound_resolver.py +437 -0
  284. myspellchecker-1.0.0/src/myspellchecker/text/morphology.py +752 -0
  285. myspellchecker-1.0.0/src/myspellchecker/text/ner.py +164 -0
  286. myspellchecker-1.0.0/src/myspellchecker/text/ner_model.py +668 -0
  287. myspellchecker-1.0.0/src/myspellchecker/text/normalization_service.py +562 -0
  288. myspellchecker-1.0.0/src/myspellchecker/text/normalize.py +1399 -0
  289. myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.cpp +14928 -0
  290. myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.pxd +10 -0
  291. myspellchecker-1.0.0/src/myspellchecker/text/normalize_c.pyx +829 -0
  292. myspellchecker-1.0.0/src/myspellchecker/text/phonetic.py +670 -0
  293. myspellchecker-1.0.0/src/myspellchecker/text/phonetic_data.py +330 -0
  294. myspellchecker-1.0.0/src/myspellchecker/text/place_names.py +505 -0
  295. myspellchecker-1.0.0/src/myspellchecker/text/reduplication.py +261 -0
  296. myspellchecker-1.0.0/src/myspellchecker/text/stemmer.py +164 -0
  297. myspellchecker-1.0.0/src/myspellchecker/text/tone.py +392 -0
  298. myspellchecker-1.0.0/src/myspellchecker/text/types.py +15 -0
  299. myspellchecker-1.0.0/src/myspellchecker/text/validator.py +588 -0
  300. myspellchecker-1.0.0/src/myspellchecker/text/validator_checks.py +630 -0
  301. myspellchecker-1.0.0/src/myspellchecker/text/validator_data.py +314 -0
  302. myspellchecker-1.0.0/src/myspellchecker/text/validator_patterns.py +247 -0
  303. myspellchecker-1.0.0/src/myspellchecker/text/validator_types.py +115 -0
  304. myspellchecker-1.0.0/src/myspellchecker/text/zawgyi_support.py +166 -0
  305. myspellchecker-1.0.0/src/myspellchecker/tokenizers/__init__.py +23 -0
  306. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/__init__.py +14 -0
  307. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.cpp +33050 -0
  308. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.pxd +48 -0
  309. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/mmap_reader.pyx +431 -0
  310. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.cpp +18362 -0
  311. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.pxd +5 -0
  312. myspellchecker-1.0.0/src/myspellchecker/tokenizers/cython/word_segment.pyx +633 -0
  313. myspellchecker-1.0.0/src/myspellchecker/tokenizers/resource_loader.py +280 -0
  314. myspellchecker-1.0.0/src/myspellchecker/tokenizers/syllable.py +97 -0
  315. myspellchecker-1.0.0/src/myspellchecker/tokenizers/transformer_word_segmenter.py +377 -0
  316. myspellchecker-1.0.0/src/myspellchecker/tokenizers/word.py +497 -0
  317. myspellchecker-1.0.0/src/myspellchecker/training/__init__.py +118 -0
  318. myspellchecker-1.0.0/src/myspellchecker/training/config.py +175 -0
  319. myspellchecker-1.0.0/src/myspellchecker/training/constants.py +159 -0
  320. myspellchecker-1.0.0/src/myspellchecker/training/corpus_preprocessor.py +496 -0
  321. myspellchecker-1.0.0/src/myspellchecker/training/exporter.py +203 -0
  322. myspellchecker-1.0.0/src/myspellchecker/training/generator.py +498 -0
  323. myspellchecker-1.0.0/src/myspellchecker/training/pipeline.py +526 -0
  324. myspellchecker-1.0.0/src/myspellchecker/training/reporter.py +343 -0
  325. myspellchecker-1.0.0/src/myspellchecker/training/reranker_data.py +1352 -0
  326. myspellchecker-1.0.0/src/myspellchecker/training/reranker_trainer.py +690 -0
  327. myspellchecker-1.0.0/src/myspellchecker/training/trainer.py +1362 -0
  328. myspellchecker-1.0.0/src/myspellchecker/utils/__init__.py +73 -0
  329. myspellchecker-1.0.0/src/myspellchecker/utils/cache.py +288 -0
  330. myspellchecker-1.0.0/src/myspellchecker/utils/console.py +316 -0
  331. myspellchecker-1.0.0/src/myspellchecker/utils/console_panels.py +262 -0
  332. myspellchecker-1.0.0/src/myspellchecker/utils/console_tables.py +126 -0
  333. myspellchecker-1.0.0/src/myspellchecker/utils/io_utils.py +58 -0
  334. myspellchecker-1.0.0/src/myspellchecker/utils/logging_utils.py +147 -0
  335. myspellchecker-1.0.0/src/myspellchecker/utils/singleton.py +148 -0
  336. myspellchecker-1.0.0/src/myspellchecker/utils/yaml_schema_validator.py +160 -0
  337. myspellchecker-1.0.0/src/myspellchecker.egg-info/PKG-INFO +622 -0
  338. myspellchecker-1.0.0/src/myspellchecker.egg-info/SOURCES.txt +524 -0
  339. myspellchecker-1.0.0/src/myspellchecker.egg-info/dependency_links.txt +1 -0
  340. myspellchecker-1.0.0/src/myspellchecker.egg-info/entry_points.txt +2 -0
  341. myspellchecker-1.0.0/src/myspellchecker.egg-info/requires.txt +53 -0
  342. myspellchecker-1.0.0/src/myspellchecker.egg-info/top_level.txt +1 -0
  343. myspellchecker-1.0.0/tests/test_accuracy.py +1069 -0
  344. myspellchecker-1.0.0/tests/test_algorithms_cache_factory.py +243 -0
  345. myspellchecker-1.0.0/tests/test_aspect_system.py +495 -0
  346. myspellchecker-1.0.0/tests/test_base_provider_comprehensive.py +199 -0
  347. myspellchecker-1.0.0/tests/test_beam_pruning_edge_cases.py +485 -0
  348. myspellchecker-1.0.0/tests/test_classifier_system.py +402 -0
  349. myspellchecker-1.0.0/tests/test_cli_commands.py +959 -0
  350. myspellchecker-1.0.0/tests/test_cli_integration.py +839 -0
  351. myspellchecker-1.0.0/tests/test_colloquial_variants.py +387 -0
  352. myspellchecker-1.0.0/tests/test_compatible_ha.py +280 -0
  353. myspellchecker-1.0.0/tests/test_compound_resolver.py +321 -0
  354. myspellchecker-1.0.0/tests/test_compound_system.py +501 -0
  355. myspellchecker-1.0.0/tests/test_config_loader.py +470 -0
  356. myspellchecker-1.0.0/tests/test_config_profiles.py +82 -0
  357. myspellchecker-1.0.0/tests/test_config_pydantic.py +670 -0
  358. myspellchecker-1.0.0/tests/test_confusable_semantic_strategy.py +875 -0
  359. myspellchecker-1.0.0/tests/test_confusable_strategy.py +201 -0
  360. myspellchecker-1.0.0/tests/test_connection_pool.py +640 -0
  361. myspellchecker-1.0.0/tests/test_context_validator.py +180 -0
  362. myspellchecker-1.0.0/tests/test_context_validator_strategies.py +484 -0
  363. myspellchecker-1.0.0/tests/test_core_builder.py +177 -0
  364. myspellchecker-1.0.0/tests/test_core_di.py +290 -0
  365. myspellchecker-1.0.0/tests/test_corpus_preprocessor.py +419 -0
  366. myspellchecker-1.0.0/tests/test_correction_utils.py +236 -0
  367. myspellchecker-1.0.0/tests/test_csv_provider.py +220 -0
  368. myspellchecker-1.0.0/tests/test_custom_segmenter.py +85 -0
  369. myspellchecker-1.0.0/tests/test_data_pipeline.py +452 -0
  370. myspellchecker-1.0.0/tests/test_data_pipeline_config.py +282 -0
  371. myspellchecker-1.0.0/tests/test_data_pipeline_ingester.py +543 -0
  372. myspellchecker-1.0.0/tests/test_data_pipeline_segmenter.py +283 -0
  373. myspellchecker-1.0.0/tests/test_database_packager.py +114 -0
  374. myspellchecker-1.0.0/tests/test_database_packager_edge_cases.py +47 -0
  375. myspellchecker-1.0.0/tests/test_db_build_and_usage.py +136 -0
  376. myspellchecker-1.0.0/tests/test_default_segmenter.py +387 -0
  377. myspellchecker-1.0.0/tests/test_detection_registry.py +244 -0
  378. myspellchecker-1.0.0/tests/test_detector_config.py +70 -0
  379. myspellchecker-1.0.0/tests/test_detector_context.py +51 -0
  380. myspellchecker-1.0.0/tests/test_disk_space.py +66 -0
  381. myspellchecker-1.0.0/tests/test_edit_distance.py +168 -0
  382. myspellchecker-1.0.0/tests/test_edit_distance_python_impl.py +381 -0
  383. myspellchecker-1.0.0/tests/test_empty_inputs.py +486 -0
  384. myspellchecker-1.0.0/tests/test_enrichment.py +338 -0
  385. myspellchecker-1.0.0/tests/test_error_suppression.py +275 -0
  386. myspellchecker-1.0.0/tests/test_extended_myanmar_characters.py +364 -0
  387. myspellchecker-1.0.0/tests/test_extended_myanmar_validation.py +227 -0
  388. myspellchecker-1.0.0/tests/test_factory.py +76 -0
  389. myspellchecker-1.0.0/tests/test_frequency_builder.py +551 -0
  390. myspellchecker-1.0.0/tests/test_grammar_engine.py +274 -0
  391. myspellchecker-1.0.0/tests/test_grammar_rules_critical.py +264 -0
  392. myspellchecker-1.0.0/tests/test_grammar_rules_improved.py +251 -0
  393. myspellchecker-1.0.0/tests/test_grammar_rules_schema_validation.py +467 -0
  394. myspellchecker-1.0.0/tests/test_homophone_strategy.py +279 -0
  395. myspellchecker-1.0.0/tests/test_homophones.py +86 -0
  396. myspellchecker-1.0.0/tests/test_incremental_build.py +345 -0
  397. myspellchecker-1.0.0/tests/test_inference_backends.py +131 -0
  398. myspellchecker-1.0.0/tests/test_ingester_c.py +157 -0
  399. myspellchecker-1.0.0/tests/test_initialization_refactor.py +100 -0
  400. myspellchecker-1.0.0/tests/test_is_curated_vocabulary.py +446 -0
  401. myspellchecker-1.0.0/tests/test_joint_segment_tagger.py +361 -0
  402. myspellchecker-1.0.0/tests/test_json_provider.py +163 -0
  403. myspellchecker-1.0.0/tests/test_keyboard_distance.py +311 -0
  404. myspellchecker-1.0.0/tests/test_lazy_imports.py +163 -0
  405. myspellchecker-1.0.0/tests/test_medial_confusions.py +173 -0
  406. myspellchecker-1.0.0/tests/test_medial_consonant_compatibility.py +166 -0
  407. myspellchecker-1.0.0/tests/test_medial_ordering.py +283 -0
  408. myspellchecker-1.0.0/tests/test_medial_ya_ai_vowel.py +98 -0
  409. myspellchecker-1.0.0/tests/test_memory_provider.py +252 -0
  410. myspellchecker-1.0.0/tests/test_merged_word_checker.py +338 -0
  411. myspellchecker-1.0.0/tests/test_mmap_reader.py +367 -0
  412. myspellchecker-1.0.0/tests/test_morpheme_suggestion_strategy.py +206 -0
  413. myspellchecker-1.0.0/tests/test_morphology.py +133 -0
  414. myspellchecker-1.0.0/tests/test_morphology_performance.py +204 -0
  415. myspellchecker-1.0.0/tests/test_myanmar_confusables.py +220 -0
  416. myspellchecker-1.0.0/tests/test_myanmar_constants.py +488 -0
  417. myspellchecker-1.0.0/tests/test_negation_system.py +425 -0
  418. myspellchecker-1.0.0/tests/test_ner.py +81 -0
  419. myspellchecker-1.0.0/tests/test_ner_model.py +443 -0
  420. myspellchecker-1.0.0/tests/test_ngram_comparison_mode.py +314 -0
  421. myspellchecker-1.0.0/tests/test_ngram_config_wiring.py +196 -0
  422. myspellchecker-1.0.0/tests/test_ngram_context_checker.py +225 -0
  423. myspellchecker-1.0.0/tests/test_ngram_strategy.py +223 -0
  424. myspellchecker-1.0.0/tests/test_normalization_service_comprehensive.py +290 -0
  425. myspellchecker-1.0.0/tests/test_normalize.py +46 -0
  426. myspellchecker-1.0.0/tests/test_orthography_validation.py +212 -0
  427. myspellchecker-1.0.0/tests/test_pali_segmentation.py +139 -0
  428. myspellchecker-1.0.0/tests/test_pat_sint_rules.py +79 -0
  429. myspellchecker-1.0.0/tests/test_path_validation_adversarial.py +263 -0
  430. myspellchecker-1.0.0/tests/test_phonetic_fix.py +178 -0
  431. myspellchecker-1.0.0/tests/test_phonetic_hasher.py +408 -0
  432. myspellchecker-1.0.0/tests/test_phonetic_vowel_separation.py +206 -0
  433. myspellchecker-1.0.0/tests/test_pipeline_validation.py +300 -0
  434. myspellchecker-1.0.0/tests/test_place_names.py +44 -0
  435. myspellchecker-1.0.0/tests/test_plural_markers.py +90 -0
  436. myspellchecker-1.0.0/tests/test_pos_algorithms.py +912 -0
  437. myspellchecker-1.0.0/tests/test_pos_backward_compat.py +163 -0
  438. myspellchecker-1.0.0/tests/test_pos_disambiguation.py +326 -0
  439. myspellchecker-1.0.0/tests/test_pos_inference.py +284 -0
  440. myspellchecker-1.0.0/tests/test_pos_sequence_strategy.py +136 -0
  441. myspellchecker-1.0.0/tests/test_pos_sequence_validation.py +282 -0
  442. myspellchecker-1.0.0/tests/test_pos_tagger_base.py +195 -0
  443. myspellchecker-1.0.0/tests/test_pos_tagger_factory.py +218 -0
  444. myspellchecker-1.0.0/tests/test_pos_tagger_rule.py +75 -0
  445. myspellchecker-1.0.0/tests/test_pos_tagger_transformer.py +432 -0
  446. myspellchecker-1.0.0/tests/test_pos_tagger_transformer_edge_cases.py +193 -0
  447. myspellchecker-1.0.0/tests/test_pos_tagger_viterbi_adapter.py +162 -0
  448. myspellchecker-1.0.0/tests/test_python_cython_equivalence.py +201 -0
  449. myspellchecker-1.0.0/tests/test_question_detection.py +367 -0
  450. myspellchecker-1.0.0/tests/test_question_strategy.py +136 -0
  451. myspellchecker-1.0.0/tests/test_ranker.py +165 -0
  452. myspellchecker-1.0.0/tests/test_ranker_config_wiring.py +66 -0
  453. myspellchecker-1.0.0/tests/test_reduplication_engine.py +246 -0
  454. myspellchecker-1.0.0/tests/test_register_system.py +343 -0
  455. myspellchecker-1.0.0/tests/test_regression_cases.py +129 -0
  456. myspellchecker-1.0.0/tests/test_repair.py +206 -0
  457. myspellchecker-1.0.0/tests/test_repair_c.py +235 -0
  458. myspellchecker-1.0.0/tests/test_rerank_rules.py +672 -0
  459. myspellchecker-1.0.0/tests/test_response.py +414 -0
  460. myspellchecker-1.0.0/tests/test_response_builder.py +97 -0
  461. myspellchecker-1.0.0/tests/test_segmenter_base_class.py +175 -0
  462. myspellchecker-1.0.0/tests/test_segmenter_default_edge_cases.py +154 -0
  463. myspellchecker-1.0.0/tests/test_segmenters.py +118 -0
  464. myspellchecker-1.0.0/tests/test_segmenters_regex.py +77 -0
  465. myspellchecker-1.0.0/tests/test_semantic_checker.py +546 -0
  466. myspellchecker-1.0.0/tests/test_semantic_proactive_scanning.py +244 -0
  467. myspellchecker-1.0.0/tests/test_semantic_strategy.py +157 -0
  468. myspellchecker-1.0.0/tests/test_spellchecker.py +496 -0
  469. myspellchecker-1.0.0/tests/test_spellchecker_detection_paths.py +912 -0
  470. myspellchecker-1.0.0/tests/test_spellchecker_init_paths.py +243 -0
  471. myspellchecker-1.0.0/tests/test_spellchecker_pos_tagging.py +90 -0
  472. myspellchecker-1.0.0/tests/test_spellchecker_rerank_paths.py +511 -0
  473. myspellchecker-1.0.0/tests/test_spellchecker_suppression_paths.py +373 -0
  474. myspellchecker-1.0.0/tests/test_sqlite_exception_handling.py +412 -0
  475. myspellchecker-1.0.0/tests/test_sqlite_provider.py +354 -0
  476. myspellchecker-1.0.0/tests/test_sqlite_provider_security.py +123 -0
  477. myspellchecker-1.0.0/tests/test_stacking_exceptions.py +161 -0
  478. myspellchecker-1.0.0/tests/test_stemmer.py +97 -0
  479. myspellchecker-1.0.0/tests/test_streaming.py +858 -0
  480. myspellchecker-1.0.0/tests/test_suggestion_pipeline.py +207 -0
  481. myspellchecker-1.0.0/tests/test_suggestion_strategy_comprehensive.py +245 -0
  482. myspellchecker-1.0.0/tests/test_svc_refinement.py +52 -0
  483. myspellchecker-1.0.0/tests/test_syllable_hygiene.py +19 -0
  484. myspellchecker-1.0.0/tests/test_syllable_parity.py +296 -0
  485. myspellchecker-1.0.0/tests/test_syllable_rules.py +404 -0
  486. myspellchecker-1.0.0/tests/test_syllable_rules_c.py +89 -0
  487. myspellchecker-1.0.0/tests/test_syllable_rules_property.py +439 -0
  488. myspellchecker-1.0.0/tests/test_syllable_rules_python_impl.py +256 -0
  489. myspellchecker-1.0.0/tests/test_symspell.py +317 -0
  490. myspellchecker-1.0.0/tests/test_symspell_compound.py +89 -0
  491. myspellchecker-1.0.0/tests/test_symspell_resource_limits.py +262 -0
  492. myspellchecker-1.0.0/tests/test_symspell_thread_safety.py +204 -0
  493. myspellchecker-1.0.0/tests/test_syntactic_rules.py +158 -0
  494. myspellchecker-1.0.0/tests/test_syntactic_strategy.py +115 -0
  495. myspellchecker-1.0.0/tests/test_synthetic_error_generator.py +177 -0
  496. myspellchecker-1.0.0/tests/test_tall_aa_after_medial_wa.py +615 -0
  497. myspellchecker-1.0.0/tests/test_token_refinement.py +184 -0
  498. myspellchecker-1.0.0/tests/test_tokenized_text.py +167 -0
  499. myspellchecker-1.0.0/tests/test_tokenizers_word.py +529 -0
  500. myspellchecker-1.0.0/tests/test_tone_disambiguation.py +327 -0
  501. myspellchecker-1.0.0/tests/test_tone_strategy.py +76 -0
  502. myspellchecker-1.0.0/tests/test_training_components.py +335 -0
  503. myspellchecker-1.0.0/tests/test_training_features.py +285 -0
  504. myspellchecker-1.0.0/tests/test_training_reporter.py +418 -0
  505. myspellchecker-1.0.0/tests/test_transformer_word_segmenter.py +473 -0
  506. myspellchecker-1.0.0/tests/test_tsv_reader_c.py +381 -0
  507. myspellchecker-1.0.0/tests/test_unified_ranking.py +468 -0
  508. myspellchecker-1.0.0/tests/test_utils.py +349 -0
  509. myspellchecker-1.0.0/tests/test_utils_cache_comprehensive.py +257 -0
  510. myspellchecker-1.0.0/tests/test_validation_strategies.py +900 -0
  511. myspellchecker-1.0.0/tests/test_validator_functions.py +342 -0
  512. myspellchecker-1.0.0/tests/test_validator_patterns.py +239 -0
  513. myspellchecker-1.0.0/tests/test_validator_quality.py +564 -0
  514. myspellchecker-1.0.0/tests/test_validator_strictness.py +64 -0
  515. myspellchecker-1.0.0/tests/test_validator_truncation.py +124 -0
  516. myspellchecker-1.0.0/tests/test_validators_edge_cases.py +164 -0
  517. myspellchecker-1.0.0/tests/test_validators_paths.py +322 -0
  518. myspellchecker-1.0.0/tests/test_virama_validation.py +249 -0
  519. myspellchecker-1.0.0/tests/test_viterbi.py +158 -0
  520. myspellchecker-1.0.0/tests/test_viterbi_edge_cases.py +369 -0
  521. myspellchecker-1.0.0/tests/test_viterbi_smoothing.py +358 -0
  522. myspellchecker-1.0.0/tests/test_word_level_suggestion_lifting.py +322 -0
  523. myspellchecker-1.0.0/tests/test_yaml_config_edge_cases.py +427 -0
  524. myspellchecker-1.0.0/tests/test_yaml_rule_expansion.py +216 -0
  525. myspellchecker-1.0.0/tests/test_yaml_schema_validation.py +267 -0
  526. 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
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
100
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
101
+ [![Coverage](https://img.shields.io/badge/coverage-75%25-green)](tests/)
102
+ [![Tests](https://img.shields.io/badge/tests-4%2C664_passed-brightgreen)](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).