Spell Checker in English Text

Description

Spell Checker is a sequence-to-sequence pipeline that detects and corrects spelling errors in your input text. It’s based on Levenshtein Automaton for generating candidate corrections and a Neural Language Model for ranking corrections. You can download the pretrained pipeline that comes ready to use.

Download

How to use

In order to use this pretrained pipeline, you need to just provide the text to be checked.

from sparknlp.pretrained import PretrainedPipeline 

pipeline = PretrainedPipeline('check_spelling_dl', lang='en')
result = pipeline.fullAnnotate("During the summer we have the hottest ueather. I have a black ueather jacket, so nice.I intrduce you to my sister, she is called ueather.")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = new PretrainedPipeline("check_spelling_dl", lang = "en")
val result = pipeline.fullAnnotate("During the summer we have the hottest ueather. I have a black ueather jacket, so nice.I intrduce you to my sister, she is called ueather.")

Results

[('During', 'During'),
 ('the', 'the'),
 ('summer', 'summer'),
 ('we', 'we'),
 ('have', 'have'),
 ('the', 'the'),
 ('hottest', 'hottest'),
 ('ueather', 'weather'),
 ('.', '.'),
 ('I', 'I'),
 ('have', 'have'),
 ('a', 'a'),
 ('black', 'black'),
 ('ueather', 'leather'),
 ('jacket', 'jacket'),
 (',', ','),
 ('so', 'so'),
 ('nice', 'nice'),
 ('.', '.'),
 ('I', 'I'),
 ('intrduce', 'introduce'),
 ('you', 'you'),
 ('to', 'to'),
 ('my', 'my'),
 ('sister', 'sister'),
 (',', ','),
 ('she', 'she'),
 ('is', 'is'),
 ('called', 'called'),
 ('ueather', 'Heather'),
 ('.', '.')]

Model Information

Model Name: check_spelling_dl
Type: pipeline
Compatibility: Spark NLP 2.7.5+
License: Open Source
Edition: Official
Language: en

Included Models

SentenceDetectorDLModel ContextSpellCheckerModel