Practical overview
When it fits
Use it when you need code and documented examples for experimenting with BERT-based Chinese spelling correction locally, rather than a ready-made online correction interface.
Who it is for
- Researchers comparing BERT-based Chinese spelling-correction models.
- Developers who want to train or run the included models locally.
- Teams exploring a model-based Chinese text-cleaning workflow.
Documented uses
- Prepare SIGHAN corpus files for model training.
- Train BERT4CSC, MacBERT4CSC or SoftMaskedBert using a project configuration.
- Run model inference on supplied text strings or line-by-line text files.
- Export BERT weights for a workflow that follows the referenced Transformers or pycorrector instructions.
Requirements & limits
The repository is public and lists an Apache-2.0 license. The README says commercial use is permitted when the project link and license are included in product documentation.
- Inference depends on a compatible checkpoint and configuration; pretrained model files are described as a separate download.
- The documented environment setup recommends Python 3.7 and flags a possible OpenCC adjustment for a GLIBC-related error.
- The README includes reported metrics for SoftMaskedBert, BERT4CSC and MacBERT4CSC, which are project results rather than independent evaluations.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run inference on text with a project checkpoint
Use the documented Python interface to predict corrected text from a list of strings.
Before you start
- A local checkout of the repository with its required Python dependencies installed.
- A trained checkpoint and matching configuration file; the README shows examples under checkpoints and configs.
- The project root added to PYTHONPATH.
Steps
Load the checkpoint path and configuration path with load_model_directly from tools.inference.
Pass a list of Chinese text strings to model.predict.
Expected outcome
The model returns a list of predictions; the README example changes 今天我很高心 to 今天我很高兴 and leaves 测试 unchanged.
Guide limitations
- A suitable checkpoint is required; the README describes trained model files as a separate download.
- The example documents list-based prediction, not a hosted service or deployment process.
Prepare SIGHAN data and train a correction model
Arrange the specified SIGHAN corpus files and launch training with a supported configuration.
Before you start
- Python environment; the README recommends creating a Conda environment with Python 3.7.
- The repository cloned locally and its requirements installed with pip install -r requirements.txt.
- SIGHAN dataset files and train.sgml placed in datasets/csc, including the listed training SGML files and SIGHAN15 test input and truth files.
Steps
Copy the required corpus files into datasets/csc as listed in the README.
From the project root, install dependencies and set the current directory on PYTHONPATH with export PYTHONPATH=.
Run python tools/train_csc.py --config_file csc/train_SoftMaskedBert.yml; select the documented BERT4CSC or MacBERT4CSC configuration file to train those models.
Expected outcome
The training script starts training using the selected configuration; the README says the first run processes the data automatically.
Guide limitations
- The README notes that its original SIGHAN download link is no longer valid and points to a GitHub-distributed copy.
- It notes that an OpenCC version adjustment, such as 1.1.0, may be needed if a GLIBC-version error occurs.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Bertbasedcorrectionmodels | Prepare SIGHAN corpus files for model training. | Linux | The repository is public and lists an Apache-2.0 license. The README says commercial use is permitted when the project link and license are included in product documentation. |
| Pulse Of Motion | Estimate a video's physical frame rate from its visual dynamics. | Linux | The repository is public. Its README describes a released checkpoint that downloads from Hugging Face on first inference, with a manual download option. The strongest internal model is not fully released; the README directs interested users to contact the project about access. No license information is provided in the repository evidence. |
| Neural Image Assessment | Train the model using AVA images and rating annotations. | Cloud, Linux, macOS, Windows |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- gitabtion/BertBasedCorrectionModels · Official homepage title · retained in its source language

