Skip to main content

Pure Python spell checker inspired by pyspellchecker

Project description

Harmonia Spell Checker

A fast, (pretty) accurate python spell checker, inspired by pyspellchecker. Features:

  • Optimized dictionary loading
  • Phonetic (Soundex) matching
  • Hyphen/quote variation support
  • Levenshtein distance-based suggestions

CLI Usage

harmonia check file.txt -> shows errors
harmonia check file.txt --suggest -> shows errors + suggestions

Python API Usage

from harmonia import Dictionary, check_file

dictionary = Dictionary() #only english right now
errors = check_file("file.txt", dictionary, suggest=True)

for error in errors:
    print(f"Error: {error['word']} at line {error['line']}")
    if error['suggestions']:
        print(f"Suggestions: {', '.join(error['suggestions'])}")


Check works well!

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

harmoniapy-1.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

harmoniapy-1.0.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file harmoniapy-1.0.0.tar.gz.

File metadata

  • Download URL: harmoniapy-1.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for harmoniapy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b7b9254dc4a86825d5cf9c41cfeb068ec849fd87cc344005cedbc7f9496249dd
MD5 e7cc844b444d5eb19343f49498d6b9d1
BLAKE2b-256 121859b9c752100272391513db1c13223c3232a310301f74e49b7201b412ba99

See more details on using hashes here.

File details

Details for the file harmoniapy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: harmoniapy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for harmoniapy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae0575573e6c390b2f6ecb680889a547131b84b2e779e3f83f208b32e66401c6
MD5 80745e12dc6aaab7a769dd9972df0094
BLAKE2b-256 c72edc479dd5b42f2e4672e1dc0d7e74cc8fbcf752a5d9c4d8c2c1b08f5b62f0

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