[TALLIP] General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining
65
stars
15
commits
Python
primary language
Aug 10, 2026
updated
Code for paper "General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining"
This repository contains the official PyTorch implementation for ECSpell. Our approach leverages error-consistent pretraining to improve generalization and domain adaptation for Chinese Spelling Check (CSC).
We recommend Python 3.8+ and PyTorch >= 1.9.0.
conda create -n ecspell python=3.8 -y
conda activate ecspell
pip install torch transformers jieba pypinyin Pinyin2Hanzi tqdm scipy
Install the local glyce library:
cd glyce
python setup.py develop
pip show glyce # to ensure the successful installation of glyce lib
Transformers/glyce/.Data/domains_data/ for domain-specific data.data/basedata/simplified/ or data/basedata/traditional/ for baseline training data.python3 Code/tokenize_sequence.py
Set the Python path and run the training script:
export PYTHONPATH=$PYTHONPATH:./:./Code
python Code/train_baseline.py \
--config_path Transformers/glyce_bert_both_font.json \
--output_dir ./outputs
(Adjust arguments in train_baseline.py as needed for your specific setup.)
csc_evaluation/ or modify the training script to enable evaluation mode.csc_evaluation/build_train_data.py can be used to construct and split training/validation datasets.Path: Data/domains_data
*.train file and *.test file.*.train file is used to do training and do evaluating while *.test is adopted to do predicting.If you use this code in your research, please cite our paper:
@article{lv2023general,
title={General and Domain-adaptive Chinese Spelling Check with Error-consistent Pretraining},
author={Lv, Qi and Cao, Ziqiang and Geng, Lei and Ai, Chunhui and Yan, Xu and Fu, Guohong},
journal={ACM Transactions on Asian and Low-Resource Language Information Processing},
volume={22},
number={5},
pages={1--18},
year={2023},
publisher={ACM New York, NY}
}
14 commits
1 commits
Python
99.9%
[TALLIP] General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining
65
stars
15
commits
Python
primary language
Aug 10, 2026
updated
Code for paper "General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining"
This repository contains the official PyTorch implementation for ECSpell. Our approach leverages error-consistent pretraining to improve generalization and domain adaptation for Chinese Spelling Check (CSC).
We recommend Python 3.8+ and PyTorch >= 1.9.0.
conda create -n ecspell python=3.8 -y
conda activate ecspell
pip install torch transformers jieba pypinyin Pinyin2Hanzi tqdm scipy
Install the local glyce library:
cd glyce
python setup.py develop
pip show glyce # to ensure the successful installation of glyce lib
Transformers/glyce/.Data/domains_data/ for domain-specific data.data/basedata/simplified/ or data/basedata/traditional/ for baseline training data.python3 Code/tokenize_sequence.py
Set the Python path and run the training script:
export PYTHONPATH=$PYTHONPATH:./:./Code
python Code/train_baseline.py \
--config_path Transformers/glyce_bert_both_font.json \
--output_dir ./outputs
(Adjust arguments in train_baseline.py as needed for your specific setup.)
csc_evaluation/ or modify the training script to enable evaluation mode.csc_evaluation/build_train_data.py can be used to construct and split training/validation datasets.Path: Data/domains_data
*.train file and *.test file.*.train file is used to do training and do evaluating while *.test is adopted to do predicting.If you use this code in your research, please cite our paper:
@article{lv2023general,
title={General and Domain-adaptive Chinese Spelling Check with Error-consistent Pretraining},
author={Lv, Qi and Cao, Ziqiang and Geng, Lei and Ai, Chunhui and Yan, Xu and Fu, Guohong},
journal={ACM Transactions on Asian and Low-Resource Language Information Processing},
volume={22},
number={5},
pages={1--18},
year={2023},
publisher={ACM New York, NY}
}
14 commits
1 commits
Python
99.9%