SpellCure — correction engine for highly scrambled text
Project description
SpellCure
SpellCure is a mathematical correction engine for highly scrambled or distorted text, created by Saheban Khan (GitHub: Lsaheban) and maintained by Tohid Khan (GitHub: Tohid096).
Rather than using machine learning, SpellCure applies a position-weighted ratio algorithm to match noisy tokens with valid dictionary words — enabling high-accuracy recovery even from severely jumbled text.
✨ Features
- Corrects heavily scrambled or distorted words
- Pure mathematical algorithm (no ML required)
- Supports:
- Small built-in vocabulary (~10k curated words)
- Large NLTK vocabulary (~200k+ words)
- Works with single words, sentences, or mixed noisy text
- Fast, deterministic, and lightweight
- Extensible word bank (users may request custom additions)
🧠 How SpellCure Works
SpellCure analyzes each token using:
- Position-based character similarity
- Ratio scoring
- Multi-stage refinement
- Optional large NLTK dataset
Examples:
| Input | Output |
|---|---|
aplpe |
apple |
tihs wrod is msesdy |
this word is messy |
olve is evryetign |
love is everything |
🚀 Quick Start
Importing SpellCure
from spellcure import corrector
---
## 🧪 Example Usage
Here is a minimal working example using the **small** vocabulary mode:
```python
from spellcure import corrector
def test_small():
model = corrector(mode="small") # Use small curated word bank
output = model.correct("olve is evryetign")
print(output)
test_small()
#Outpu: love is everything
# small = ~10k curated words
# large = ~200k NLTK words
model = corrector(mode="large")
bash pip install spellcure
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spellcure-1.0.3.tar.gz.
File metadata
- Download URL: spellcure-1.0.3.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66c8cc5b7d35d2d27c078aab7afe51abc572abe57482e4f84832a080b3fff984
|
|
| MD5 |
c2357c17c05130a87c7192ae1a5c1efb
|
|
| BLAKE2b-256 |
1f8634117de022733f1feda9a42cb35c9211415d4ce7b99eefc4a4b658f73728
|
File details
Details for the file spellcure-1.0.3-py3-none-any.whl.
File metadata
- Download URL: spellcure-1.0.3-py3-none-any.whl
- Upload date:
- Size: 52.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85ed2dabe4ae8be75793e220179a617d3e48496d7be6562239c99e79909d9095
|
|
| MD5 |
a69a69399d7ed2e1ab7523122f8ecc2a
|
|
| BLAKE2b-256 |
ca96e0f7b1665892e01f3b486834e71d614b59bc778d811e14d37ef33323b1e6
|