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.
How to use
pipeline_local = PretrainedPipeline("check_spelling_dl")
testDoc = '''
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.
'''
result=pipeline_local.annotate(testDoc)
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = new PretrainedPipeline("check_spelling_dl", lang = "en")
val result = pipeline.annotate("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 nlu
nlu.load("en.spell").predict("""
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 3.3.4+ |
License: | Open Source |
Edition: | Official |
Language: | en |
Size: | 118.1 MB |
Included Models
- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- ContextSpellCheckerModel