Exploiting Syntactic and Distributional Information for Spelling Correction with Web-Scale N-gram Models

Wei Xu, Joel R. Tetreault, Martin Chodorow, Ralph Grishman, Le ZhaoEMNLP 2011

Abstract

Context-sensitive spelling correction remains a challenge for traditional n-gram models due to data sparsity and limited context windows. This paper presents a method to improve correction accuracy by incorporating dependency parsing to capture long-distance grammatical relationships and distributional semantics to model word relatedness. Our approach achieves up to a 12.4% reduction in error rates over state-of-the-art web-scale n-gram systems.

1. Introduction

Context-sensitive spelling correction involves choosing the correct word from a "confusion set" (e.g., {adverse, averse}) based on the surrounding text. While web-scale n-gram models (e.g., the Google Web 1T corpus) are highly effective, they suffer from "nearsightedness"—only considering a small window of adjacent words—and data sparsity, where valid phrases may not appear in the training corpus even at a trillion-word scale.

2. Methodology

We enhance a baseline SVM classifier using two primary techniques to move beyond local lexical context:

2.1 Dependency Parse Features (PAR)

Dependency parsing identifies the grammatical structure of a sentence, linking words like verbs and their objects regardless of their physical distance. This allows the model to "see" informative context that n-grams would miss. For example, in a complex sentence where a verb and its object are separated by multiple modifiers, the parser links them directly, providing a clear signal for the correct spelling.

Table 1: Examples of dependency parse features for a confusion set.

2.2 Distributional Semantics

To handle missing phrases, we use distributional models to capture semantic similarity. We employed first-order co-occurrence (local 5-word windows) and Random Indexing (higher-order similarity). The final system uses a Logistic Regression model to combine the high-precision n-gram/parse classifier with these broader distributional signals.

3. Experimental Setup

The system was trained on a 1.9-billion-word corpus of newspaper text spanning 89 years. Evaluation was performed on 14 confusion sets: 5 standard "Bergsma" pairs and 9 "rare" ESL pairs introduced to test performance on sparse data. The test set consisted of nine months of New York Times articles.

4. Results and Discussion

The inclusion of syntactic features (PAR) proved to be the most significant driver of performance gains across nearly every confusion set tested.

Table 2: Detailed accuracy results for the proposed models across 14 confusion sets.

As shown in Table 2, the full system (NG+LEX+PAR) reduced error rates by 12.4% on the rare confusion sets and 8.4% on the standard Bergsma sets compared to previous state-of-the-art systems. Parse features consistently improved accuracy, particularly for rare word pairs where n-gram data is most sparse, proving that syntax provides a bridge over the data sparsity gap.

5. Conclusion

By bridging the gap between local n-gram context and global sentence structure, dependency parsing significantly enhances context-sensitive spelling correction. While distributional semantics provide additional robustness, the structural clarity provided by syntax remains the most powerful tool for overcoming the limitations of web-scale n-gram models.

Summary updated

BibTeX
@inproceedings{xu2011exploiting,
  author = {Wei Xu and Joel R. Tetreault and Martin Chodorow and Ralph Grishman and Le Zhao},
  title = {{Exploiting Syntactic and Distributional Information for Spelling Correction with Web-Scale N-gram Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2011},
}
Figure