Neural spelling correction toolkit
Top 49.9% on sourcepulse
NeuSpell is an open-source toolkit for context-sensitive English spelling correction, offering a suite of ten neural and non-neural models. It targets NLP practitioners and researchers seeking to improve text quality, with applications ranging from adversarial attack defense to enhancing OCR and grammar correction systems.
How It Works
NeuSpell trains neural models using synthetically generated spelling errors within context, reverse-engineered from isolated misspellings. It leverages rich contextual representations from models like BERT and ELMo, achieving higher correction rates than systems trained on random perturbations. The toolkit provides a unified interface for using these models.
Quick Start & Requirements
pip install -e .
(source install) or pip install neuspell
(pip install).pip install -r extras-requirements.txt
for optional features (e.g., [elmo]
, [spacy]
). spacy
models require python -m spacy download en_core_web_sm
. Non-neural checkers (Aspell, Jamspell) have separate, manual installation steps.neuspell.seq_modeling.downloads.download_pretrained_model("checkpoint_name")
or "_all_"
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
allennlp
library is not automatically installed for ELMo-based models, requiring a source installation.2 years ago
1 week