Skip to main content

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

spellcure-1.0.4.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spellcure-1.0.4-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file spellcure-1.0.4.tar.gz.

File metadata

  • Download URL: spellcure-1.0.4.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

Hashes for spellcure-1.0.4.tar.gz
Algorithm Hash digest
SHA256 293ed7f5b204de1c7d4bfba17c6787f22763aa537c76416657c8a11168a833bd
MD5 ec27437336a9011c581a07c7f81bd3d8
BLAKE2b-256 e94d985223f9765c3a4e6ce40a87b57e64389ba7187aa2b77141e7cbf20dd2ba

See more details on using hashes here.

File details

Details for the file spellcure-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: spellcure-1.0.4-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

Hashes for spellcure-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0757c342feaae26070f0c7f67d6a8d41a84b02db694c45a1a0048719d95ebfe3
MD5 f13f6f16c5a837117e749bb40b41a4d0
BLAKE2b-256 d664bedbe700424110799934c4f60a847a7e9356affa855cc8b4be1f51930a37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page