Skip to content

2022-01-04-check_spelling_dl_en #6706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions docs/_posts/egenc/2022-01-04-check_spelling_dl_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
layout: model
title: Spell Checker in English Text
author: John Snow Labs
name: check_spelling_dl
date: 2022-01-04
tags: [open_source, en, spell, dl]
task: Spell Check
language: en
edition: Spark NLP 3.3.0
spark_version: 2.4
supported: true
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## 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.

{:.btn-box}
<button class="button button-orange" disabled>Live Demo</button>
<button class="button button-orange" disabled>Open in Colab</button>
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/models/check_spelling_dl_en_3.3.0_2.4_1641301117763.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
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.")
```
```scala
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.")
```
</div>

## Results

```bash
[('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-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|check_spelling_dl|
|Type:|pipeline|
|Compatibility:|Spark NLP 3.3.0+|
|License:|Open Source|
|Edition:|Official|
|Language:|en|
|Size:|118.1 MB|

## Included Models

- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- ContextSpellCheckerModel