Skip to main content

Python 3+ spell checker, supports English, German, Italian, Spanish, and French!

Project description

Python Spell Checker

The spell checker is a python package that can check your spelling. It supports 5 languages!

It contains the following languages:

  • English
  • German
  • Spanish
  • French
  • Italian

All valid words of a language are stored in a text file in the languages folder. The words are sorted alphabetically and are in lowercase. You can add your own words to the text file.

Installation

If not already install pip

Install the package with pip or pip3:

pip install python-spell-checker

Usage

Example:

from python_spell.checker import Checker
text = "The... ! quick browmn fox jumps-over the lazi doug"
checker = Checker(text, "english")

# This returns a dictionary object
check_text = checker.check()
print(check_text)

# This returns a list of misspelt words
misspelt_words = checker.misspelt()
print("Misspelt words are " , misspelt_words)

Output:

{
"Total words": 9
"Number of misspelled words": 2
"Number of words in dictionary": 194433
"Misspelled words": ['browmn', 'lazi']
"Lookup time(s)": 0.0005731582641601562
}

Misspelt words are ['browmn', 'lazi']

Credits

Credits to Harvard90873 for creating spell-checker which is the base of this package.

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

python_spell_checker-1.0.6.tar.gz (2.2 MB view hashes)

Uploaded Source

Built Distribution

python_spell_checker-1.0.6-py3-none-any.whl (2.2 MB view hashes)

Uploaded Python 3

Supported by

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