NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining

Qi Lv, Ziqiang Cao, Lei Geng, Chunhui Ai, Xu Yan, Guohong Fu · DOI

TL;DR

This paper introduces ECSpell, a Chinese spelling checker that uses an "Error Consistent Masking" strategy to leverage unlabeled data for pretraining, outperforming existing models on general benchmarks. To address domain-specific challenges, they propose ECSpellUD, which integrates a user dictionary to adapt to specialized fields without requiring domain-specific fine-tuning.

What Problem Does This Paper Address?

Chinese Spelling Check (CSC) is crucial for many NLP tasks, but it's severely hampered by a lack of high-quality labeled data. Existing methods often generate synthetic data from unlabeled corpora, but this synthetic data can differ significantly from real-world errors, leading to a performance gap. Furthermore, in practical applications, spelling checkers often need to perform well within specific domains (e.g., legal, medical) where general models struggle due to specialized terminology. Adapting models to these domains typically requires extensive, costly fine-tuning or new datasets, which is impractical.

Methods

The core innovation is the Error Consistent Masking (ECM) strategy for pretraining. Instead of random masking, ECM simulates realistic error patterns by first identifying an error type (based on pronunciation, shape, etc.) and then masking characters accordingly. This creates more naturalistic training data. For domain adaptation, they introduce a User Dictionary Guided Inference Module (UD). This module works with a pre-trained general speller (like ECSpell) and a user-provided dictionary. During inference, UD re-ranks candidate corrections, favoring those that align with terms in the user dictionary, enabling zero-shot domain adaptation. The general speller, ECSpell, also incorporates glyph and fine-grained pinyin embeddings to better capture character similarities.

Datasets

  • Pretraining Data: 38.1 million sentences from news2016 and wiki2019zh.
  • General Benchmark: SIGHAN15 dataset.
  • Domain-Specific Datasets: The authors created three new datasets for Law, Medical Treatment (Med), and Official Document Writing (Odw) domains. These were constructed by collecting sentences from public websites and then having annotators introduce realistic spelling errors.
  • Dictionaries: Public Tsinghua University dictionaries for Law and Medical domains, and custom-built dictionaries for the Odw domain using phrase mining.

Key Insights and Ideas

  • Simulating Real Errors is Key: The "Error Consistent Masking" strategy highlights that simply generating errors isn't enough; the errors need to mimic how they actually occur in natural language input. This is crucial for effective pretraining.
  • User Dictionaries are Powerful for Domain Adaptation: The UD module demonstrates that a well-curated user dictionary can significantly boost performance in specialized domains, even without any domain-specific fine-tuning. This offers a practical and efficient way to achieve domain adaptation.
  • General Models Still Struggle in Domains: The experiments clearly show that general spelling checkers perform poorly on domain-specific data, underscoring the need for adaptation mechanisms like UD.
  • UD Enhances Existing Models: The UD module isn't tied to ECSpell; it can improve the performance of other token-classification-based spellers, making it a versatile tool.

Key Results

  • General Task: ECSpell achieved state-of-the-art performance on the SIGHAN15 benchmark, outperforming previous models. For instance, it showed a 2.5% gain in correction F1 score over basic BERT.
  • Domain Adaptive Task: ECSpellUD (ECSpell + UD) significantly improved performance on the Law, Med, and Odw datasets. For example, on the Law dataset, ECSpellUD achieved a correction F1 of 72.9, compared to ECSpell's 67.2 without UD.
  • UD Effectiveness: The UD module consistently improved the performance of various spellers across all domain datasets, demonstrating its broad applicability.
  • Efficiency: The proposed pretraining is described as "lightweight" compared to some prior work.

Limitations and Future Work

  • Conflicting Terms: The paper notes that UD can be limited when dealing with domain-specific terms that are phonetically or visually similar and hard to distinguish (e.g., "检察" vs. "监察").
  • Independent Character Errors: UD also faces challenges with independent character errors that lack context or dictionary support.
  • Dictionary Quality: The effectiveness of UD is shown to be dependent on the quality and coverage of the user dictionary.
  • Future Work: The authors suggest collecting spelling errors from more diverse and emerging domains. They also believe the model could be extended to personalized scenarios.

Summary updated

BibTeX
@article{lv2022general,
  author = {Qi Lv and Ziqiang Cao and Lei Geng and Chunhui Ai and Xu Yan and Guohong Fu},
  title = {{General and Domain Adaptive Chinese Spelling Check with Error Consistent Pretraining}},
  journal = {ACM Trans. Asian Low Resour. Lang. Inf. Process.},
  year = {2022},
  doi = {10.1145/3564271},
}
Figure