PyCorrector is an open-source toolkit for Chinese and English text error correction โ detecting and fixing spelling and grammatical mistakes in text. It unifies several generations of correction models, from KenLM statistical methods to MacBERT, T5 and LLM-based approaches, behind one ready-to-use API. The project has earned about 6,500 stars on GitHub, is Apache 2.0 licensed, and is actively maintained in 2026.
Text correction is essential infrastructure for search engines, input methods, education software and content platforms, especially for Chinese, where homophone and glyph errors are common and hard to catch with rules. PyCorrector packages the field’s practical techniques into one library: n-gram language-model correction with KenLM, deep models such as MacBERT4CSC fine-tuned for Chinese spelling correction, seq2seq T5 variants, and prompts that use large models like ChatGLM or Qwen for correction. It supports error detection with positions, custom vocabularies and domain dictionaries, batch processing, and both Chinese and English pipelines, and it ships trained model weights so results are usable out of the box. The toolkit is maintained by the author of several popular Chinese NLP libraries, and a commercial corrector product and API are offered through Mulan AI for production deployments.
Freemium. The PyCorrector library is free and open source under the Apache 2.0 license; Mulan AI also offers a commercial corrector product and hosted API for production use.
NLP engineers and product teams building Chinese or English text-processing features โ proofreading, search query correction, education and content moderation โ who need proven correction models without training them from scratch.