Skip to main content

Simple Regex spellchecker based on Wikipedia's RegExTypoFix project

Project description

RegEx Typo Fix

Regex spellchecker based on Wikipedia's `RegExTypoFix` project

.. _RegExTypoFix:

The dictionary prepared by wikipedia contains most common incorrectly spelled words.


The easiest way to install it is using pip::

pip install regextypofix

from regextypofix import correct
print (correct('whiel selled'))

Add more patterns
You can either create your own dictionary or just append to the default dictionary::

from regextypofix import correct, create_dictionary

# Build default dictionary
default_dictionary = create_dictionary()

# User defined dictionary
user_dictionary = create_dictionary('./path_to_text_files')

# Complete dictionary
dictionary = default_dictionary + user_dictionary

# Now pass dictionary to `correct`

correct('whiel selled', dictionary=dictionary)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for regextypofix, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size regextypofix-1.0.4.tar.gz (118.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page