# ChineseErrorCorrector: one platform for Chinese spelling and grammar correction

> ChineseErrorCorrector is a Python project that puts academic papers, an evaluation tool, inference deployment, data augmentation and model training in one place for Chinese text correction, with a family of open weights from a 1.5B spelling model to a 4B grammar model. It suits a team building Chinese error correction, and it is a model family plus tooling rather than a library you call once.

**TW-NLP/ChineseErrorCorrector** — 一个面向中文文本纠错任务的综合平台，集学术研究、模型训练、模型评测和推理部署于一体，文本纠错新Sota。（ 2026 ACL Main Oral ） 

- Repository: https://github.com/TW-NLP/ChineseErrorCorrector
- Stars: 659 · Forks: 48
- Language: Python
- License: Apache-2.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/tw-nlp-chineseerrorcorrector

## A platform for two different error types, not a single corrector

The project positions itself as a comprehensive platform for Chinese text correction that brings academic research, model evaluation, inference deployment, data augmentation and model training into one place. The scope it names explicitly is two directions: spelling correction, abbreviated CSC, and grammar correction, abbreviated CGEC.

That split matters more than it looks. A spelling error in Chinese is a wrong character, either a similar-sounding one or a similar-looking one, and the project's own description of its spelling models says they handle those two categories. A grammar error is a structural mistake in a sentence, and correcting it is a different modelling problem with a different data requirement and a different evaluation. Treating them as one task, which a single general-purpose language model would, means paying for a large model and accepting large-scale rewrites where you only wanted a character fixed.

The platform is organised around that distinction. The four pillars are academic research, model evaluation, inference deployment and data augmentation, with model training as the entry point into the training side. Each has its own documentation file in the repository: README_paper.md for the paper list, the scores directory for the evaluation tool documentation, README_ELECTRA.md for the gating model, README_DAT.md for the augmentation tool, and a separate training guide that points at LLaMA-Factory.

So this is not a wrapper library with one entry point. It is a research group that publishes its models, its evaluation tooling, its data-generation tooling and its training recipe in one place, and the primary language is Python with an Apache-2.0 licence.

## The model ladder spans spelling-only and grammar workloads

The published model list is the clearest picture of what the project actually supports, and it is worth reading for the differences in training data rather than the parameter counts.

At the top is twnlp/ChineseErrorCorrector4-4B, the ACL 2026 Main Oral paper model, covering grammar and spelling. Its reported numbers are NACGEC F0.5 of 50.99 and CSCD Correction F1 of 59.61, with the claim that both leaderboards set a new state of the art and that it outperforms GPT-4 and models of the same size.

Below it, twnlp/ChineseErrorCorrector3-4B and twnlp/ChineseErrorCorrector2-7B, both grammar and spelling models. The 3-4B was trained on two million correction examples in a full training pass, and the 2-7B went through multiple rounds of iteration on the same two million examples. Both are described as working well.

Then the spelling-only entries. twnlp/ChineseErrorCorrector-7B was trained on 380 thousand open spelling examples and handles sound-similar and shape-similar errors, with the note that its correction quality is good. twnlp/ChineseErrorCorrector-1.5B was trained on the same 380 thousand examples and is described as having mediocre correction quality, which is an unusually candid line in a model table and a useful one when you are choosing.

There is also a 32B LoRA variant for the 7B spelling model. So the practical choice is not which model is best, it is which error type you have and how much hardware you have, with the 4B entry as the default when the answer is grammar.

## A character-level gate that skips the large model on clean sentences

The most interesting engineering idea in the project is the one added in May 2026: a lightweight character-level discriminator built on Chinese ELECTRA, published as xurong123/ChineseErrorDetectorElectra, which acts as an optional gate in front of the large correction model.

The mechanism is described plainly. The gate is a lightweight character-level discriminative model. It runs before the large model, and its job is to decide whether a sentence is even worth correcting. Only sentences suspected of containing errors get passed to the 4B model.

That is a cost optimisation with a specific shape. If your traffic is mostly clean text, which is the normal case for a correction service that runs over every incoming message, then most of the expensive inference is avoidable. The gate is character-level rather than sentence-level because the decision it makes is character-level: is there a suspect character in this string.

The word optional in the documentation is the important qualifier, and the project uses it consistently. The gate is not a required component. A team that only corrects a small volume of known-bad text can skip it and lose nothing.

The gate also comes with its own trade-off, which is not stated as a trade-off but follows from the design. It is a second model to serve, to keep warm, and to version in step with the corrector. For a deployment where inference is dominated by GPU time on the 4B model, that is a good trade. For a deployment where the corrector runs rarely, it is a second moving part for a saving you would not have banked.

## Data augmentation is how the project manufactures supervision

The fourth pillar is a tool for generating training data by injecting errors, and it is the part of the project that exists because corrected Chinese text is scarce.

The augmentation tool covers 14 kinds of grammar error, and the approach is described as one-click augmentation, with the note that it is the champion solution from the 2024 CCL competition. Different industries can substitute their own data for the error injection, so you can train on your own domain's syntax rather than generic web text.

The tool is published on PyPI, so the augmentation is usable without cloning the repository, and it has its own documentation file, README_DAT.md.

This is the piece that changes how you should think about the rest of the platform. A correction model trained on human-corrected text learns to reproduce human correction habits, which is the right target if your users expect standard written Chinese and the wrong target if your domain has its own conventions. Error injection lets you define the errors you care about and the corrections you accept, and generate the pairs yourself.

The training data the project publishes follows the same logic at a larger scale. Two sets are listed: a 340 thousand example chain-of-thought dataset for ChineseErrorCorrector4, and a two million example supervised dataset for ChineseErrorCorrector3, both hosted on Hugging Face under the twnlp organisation. The training guide recommends LLaMA-Factory, and the project says it opened the training steps for the 2-7B model and fully supports reproduction of results, with a reproduction tutorial linked from the repository.

That last point is the one that distinguishes this platform from a model dump. The weights are published, and so is the recipe to get back to them.

## Inference runs through transformers, VLLM or modelscope

Deployment is where most teams stop reading, and the repository does document it.

The models support several inference methods, and the project's news log records the addition of batched inference for transformers and for VLLM in March 2025, plus modelscope as a third route. There are also online demo spaces for the 3-4B model on Hugging Face and ModelScope, which the project opened in February 2026 for people who want to try the behaviour before downloading anything.

For the 4B model specifically, the recommended path is the optional ELECTRA gate in front of it, which is described in its own README_ELECTRA.md rather than in the main document.

The dependency list is where the practical cost of running this shows. A few lines from the pinned requirements file in the repository root show the shape of the environment:

```text
accelerate==1.5.2
datasets==3.2.0
deepspeed==0.16.4
fastapi==0.115.12
gradio==5.31.0
huggingface-hub==0.33.0
jieba==0.42.1
ltp==4.1.3.post1
modelscope==1.26.0
```

It also carries the usual mixture of transitive dependencies that a pinned environment accumulates, including cupy-cuda12x for CUDA array work and FlagEmbedding for embedding.

That file is worth reading before you install it, because it is a snapshot of one working configuration rather than a minimal requirement list. A team that needs a stable, small production environment for one correction endpoint will probably install the specific packages it needs rather than the whole file, and will need the model weights from Hugging Face or ModelScope regardless.

## Common Errant covers evaluation for eighty languages

The evaluation pillar is a tool called Common Errant, described as a general text correction evaluation tool covering eighty languages, published in August 2025. Its documentation lives in the scores directory of the repository.

The reason that matters is that a correction model is only comparable to another correction model if they were measured the same way, and each correction dataset has its own metric conventions. The project's own leaderboard numbers are given as F0.5 on NACGEC and Correction F1 on CSCD, which are two different metrics on two different datasets, and the per-model table in the readme makes clear that the older spelling models are not measured on the grammar benchmarks at all because they do not do grammar.

The tool is also where the project's reach extends beyond Chinese. The news entry for Common Errant says it can be used to evaluate text correction in high-resource languages such as Chinese and English, and in low-resource languages such as Hindi and Bengali. So the evaluation half of the platform is general, while the model half is Chinese-only.

That asymmetry is the useful thing to notice. If you are working in a language other than Chinese, the evaluation tooling and the data augmentation approach are the parts that transfer, and the model weights are not. The augmentation tool is also a Chinese-language tool by construction, since it injects Chinese grammar errors.

The academic pillar sits alongside: a continuously updated list of Chinese error correction papers in README_paper.md, plus a CITATION.cff file at the repository root and a dedicated paper list for the 4B model.

## Where this platform is the wrong tool

The first limit is that a correction model is not a rewriting model, and confusing the two is the most common way to pick the wrong tool. ChineseErrorCorrector fixes errors. It does not improve style, translate, summarise or reformat. If you want a Chinese rewriting assistant, a general instruction-tuned model is the right category, and this project is not competing in that space.

The second limit is the hardware. The flagship model is a 4B parameter one, the alternatives run to 7B and a 32B LoRA, and the dependencies include deepspeed and cupy-cuda12x, which means the intended environment has a CUDA GPU. The spelling-only 1.5B entry is the only one that plausibly runs on a CPU, and the project describes its correction quality as mediocre. A team with a CPU-only deployment has one underwhelming option.

The third is that the model list moves fast and the release tags are behind it. The published releases are v0.2.0 from 2025-03-26, v0.3.0 from 2025-04-29 and v0.4.0 from 2025-06-20, while the models themselves have continued to appear through 2026, with the 4B model released in May 2026 and its paper in June 2026. The last push to the repository was on 2026-08-16. The consequence is that the code and the weights are versioned separately, so pinning a package version does not pin the model you get.

The fourth is the accuracy of the claim against the cost of the check. The ELECTRA gate is a cost optimisation, not a correctness improvement, and it adds a second model to serve. The numbers in the table are the project's own, and while the 4B entry is a peer-reviewed paper with an ACL 2026 Main Oral slot behind it, that says nothing about performance on your domain's vocabulary, which is the same gap every domain-specific model has.

The fifth is that the platform's centre of gravity is research. The tooling for data augmentation and the reproduction tutorial are genuinely useful, but a team that wants a stable service dependency is adopting a repository that is explicitly still adding pillars, with the paper list growing on a schedule that has nothing to do with your release cycle.

## Conclusion

ChineseErrorCorrector is worth adopting for a team that has to correct Chinese text and wants the models, the evaluation harness, the augmentation tooling and the training entry point in one repository rather than assembled from separate pieces, because the model ladder covers both spelling-only and grammar workloads and the ELECTRA gate exists to stop you paying for a 4B model on sentences with no errors. It is the wrong tool for a project that needs a general Chinese rewriting assistant, since a correction model changes errors and leaves everything else alone. Before you build on it, check the three things that decide the outcome: which model matches your error type, since ChineseErrorCorrector-7B and ChineseErrorCorrector-1.5B are spelling models while the 4B and 2-7B entries handle grammar and spelling, and the 1.5B entry is described as having mediocre correction quality; whether you need the ELECTRA gate at all, since it is optional and adds a second model to serve; and the deployment path, because transformers, VLLM and modelscope are listed as supported inference routes and the pinned dependency file is large enough that you should read it before installing.

## FAQ

### What is ChineseErrorCorrector and what does it cover?

It is a Python platform for Chinese text correction that brings academic research, model evaluation, inference deployment, data augmentation and model training together. It covers two directions, spelling correction and grammar correction, and publishes open model weights from a 1.5B spelling model up to a 4B grammar model.

### How do I run ChineseErrorCorrector inference?

The models support several inference routes, and the project lists transformers, VLLM and modelscope. For the 4B model the recommended path adds an optional character-level gate, the Chinese ELECTRA discriminator published as ChineseErrorDetectorElectra, so that only sentences suspected of containing errors reach the large model.

### How does ChineseErrorCorrector generate training data?

It ships an augmentation tool that injects 14 kinds of grammar error into correct text, described as the champion approach from the 2024 CCL competition, and the tool is published on PyPI so it can be used without cloning the repository. The project also publishes a 340 thousand example chain-of-thought dataset and a two million example supervised dataset, and the training guide recommends LLaMA-Factory.

## Sources

- [Issues](https://github.com/TW-NLP/ChineseErrorCorrector/issues)
- [License: Apache-2.0](https://github.com/TW-NLP/ChineseErrorCorrector/blob/main/LICENSE)
- [README](https://github.com/TW-NLP/ChineseErrorCorrector/blob/main/README.md)
- [Releases](https://github.com/TW-NLP/ChineseErrorCorrector/releases)
- [TW-NLP/ChineseErrorCorrector on GitHub](https://github.com/TW-NLP/ChineseErrorCorrector)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tw-nlp-chineseerrorcorrector
