Skip to main content
QUICK REVIEW

[Paper Review] GitHub Typo Corpus: A Large-Scale Multilingual Dataset of Misspellings and Grammatical Errors

Masato Hagiwara, Masato Mita|arXiv (Cornell University)|Nov 28, 2019
Natural Language Processing TechniquesComputer Science25 references17 citations
TL;DR

This paper introduces the GitHub Typo Corpus, a large-scale multilingual dataset of over 350,000 typo edits and 64 million characters across 15+ languages, harvested from GitHub commits. Using a simple logistic regression classifier with three features, the authors achieve 90% F1 in distinguishing true typo edits from semantic ones, demonstrating that existing spell checkers perform poorly (F1 ≈ 0.5), thus establishing the dataset as a rich, realistic benchmark for spelling and grammatical error correction research.

ABSTRACT

The lack of large-scale datasets has been a major hindrance to the development of NLP tasks such as spelling correction and grammatical error correction (GEC). As a complementary new resource for these tasks, we present the GitHub Typo Corpus, a large-scale, multilingual dataset of misspellings and grammatical errors along with their corrections harvested from GitHub, a large and popular platform for hosting and sharing git repositories. The dataset, which we have made publicly available, contains more than 350k edits and 65M characters in more than 15 languages, making it the largest dataset of misspellings to date. We also describe our process for filtering true typo edits based on learned classifiers on a small annotated subset, and demonstrate that typo edits can be identified with F1 ~ 0.9 using a very simple classifier with only three features. The detailed analyses of the dataset show that existing spelling correctors merely achieve an F-measure of approx. 0.5, suggesting that the dataset serves as a new, rich source of spelling errors that complement existing datasets.

Motivation & Objective

  • To address the lack of large-scale, realistic datasets for spelling correction and grammatical error correction (GEC) in NLP.
  • To overcome the limitations of synthetic or noisy datasets like those from Wikipedia, which often contain non-lexical edits and vandalism.
  • To develop a scalable method for identifying authentic typo edits in real-world software development contexts.
  • To create a publicly available, high-quality multilingual dataset that complements existing resources and reflects natural human error patterns.
  • To evaluate the performance of existing spell checkers on a realistic, large-scale dataset of real-world errors.

Proposed method

  • Harvested typo edits from GitHub commit histories using metadata and commit messages to identify potential corrections.
  • Filtered non-linguistic edits (e.g., code changes) using a small annotated subset of 1,000 edits.
  • Trained a logistic regression classifier with only three features—edit length, edit type, and edit position—to distinguish typo edits from semantic edits.
  • Achieved 90% F1 in classifying true typo edits using the trained classifier on a held-out test set.
  • Analyzed edit types using the ERRANT toolkit to categorize errors into spelling, orthographic, punctuation, and grammatical edits.
  • Evaluated existing spell checkers (Aspell and Enchant) on the corpus to benchmark their performance on real-world errors.

Experimental results

Research questions

  • RQ1Can a simple classifier with minimal features effectively distinguish true typo edits from semantic edits in GitHub commit histories?
  • RQ2How does the distribution of spelling and grammatical errors in real-world software development compare to synthetic or Wikipedia-based datasets?
  • RQ3What is the performance of existing open-source spell checkers (e.g., Aspell, Enchant) on a large-scale, real-world typo dataset?
  • RQ4To what extent does the GitHub Typo Corpus represent diverse linguistic patterns, including multilingual and code-mixed text?
  • RQ5Does the dataset reveal error patterns that current spell checkers fail to capture, suggesting a need for improved correction models?

Key findings

  • The GitHub Typo Corpus contains over 350,000 typo edits and 64 million characters across more than 15 languages, making it the largest multilingual typo dataset to date.
  • A simple logistic regression classifier with only three features achieved an F1-score of approximately 0.9 in identifying true typo edits.
  • Existing spell checkers such as Aspell and Enchant achieve only an F1-measure of approximately 0.5 on the dataset, indicating significant room for improvement.
  • The dataset includes diverse error types, including spelling, orthographic, punctuation, and grammatical errors, with notable examples in non-English languages like Chinese and Japanese involving code-mixed English terms.
  • Frequent atomic edits include simple insertions and deletions (e.g., adding 's' or removing 'e'), and grammatical errors such as particle misuse in Chinese and Japanese.
  • The dataset reveals that many errors occur in code-related terms (e.g., 'Gemfile', 'GB-18030'), indicating that real-world errors often involve technical vocabulary and mixed-language contexts.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.