Skip to main content
# spaCy Symspell
## Spelling correction implementation in spaCy via Symspell

This package is a [spaCy 2.0 extension](https://spacy.io/usage/processing-pipelines#section-extensions) that adds sentnece/spelling corrections via Symspell to spaCy's text processing pipeline.

## Installation

`pip install spacy_symspell`

## Notes
This package is still in Alpha and there may be unforeseen errors. Performance improvement still needs to be done for the symspell python port.

## Usage

Adding the component to the processing pipeline is relatively simple:

```
import spacy
from spacy_symspell import SpellingCorrector

nlp = spacy.load('en_core_web_sm')
corrector = SpellingCorrector()
nlp.add_pipe(corrector)
doc = nlp('What doyuoknowabout antyhing')

doc._.suggestions #iterable
doc._.segmentation #that dook now about anything
```

spaCy_symspell operates on `Doc` and `Span` spaCy objects. When called on a `Doc` or `Span`, the object is given two attributes: `suggestions` (a list of all found spelling suggestions) and `segmentation` (a corrected sentence in the case of ommitted spaces).

## Todo
Symspell accuracy can be improved with the help of spaCy by extracting and analyzing resulting n-grams and cross-referencing with possible n-grams deductible from the character groups in the symspell result. For example the correction 'that dook now' leaves us with a verbless sentence, and on closer analysis will reveal that the character group 'now' is related with the verb 'know', and the verb know is associated with the n-gram 'you know'.

## Under the hood
spacy_symspell is currently a wrapper of the [python port](https://github.com/mammothb/symspellpy) for [Symspell](https://github.com/wolfgarbe/SymSpell). For additional details, see the linked project pages.

Metadata

Release files for spacy-symspell 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spacy-symspell 0.1.0
File Size Uploaded
spacy_symspell-0.1.0.tar.gz 3.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for spacy-symspell 0.1.0
File Interpreter ABI Platform
spacy_symspell-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 MB

Release files / spacy_symspell-0.1.0.tar.gz

Download URL spacy_symspell-0.1.0.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e51e4237be16bf5c78425ea449ce0731ac695685006053daf11527dbab0d4d1e
BLAKE2b-256 checksum
How to use checksums
b3de2556819d8b390cf10d13da03cbcb43a96c9b635dced572590abc86ad3325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3

Release files / spacy_symspell-0.1.0-py3-none-any.whl

Download URL spacy_symspell-0.1.0-py3-none-any.whl
Size 3.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
940b0eee74148ad114af1608cd17a973aa03e065359ab878fa1c9b959afc7f39
BLAKE2b-256 checksum
How to use checksums
50f2dec4e9f992328a00da4cfd15ad7e4413943cbea7fb8bdda3136b43417c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.3

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page