Simple Regex spellchecker based on Wikipedia's RegExTypoFix project
Project description
RegEx Typo Fix
====
Regex spellchecker based on Wikipedia's `RegExTypoFix` project
.. _RegExTypoFix: https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
The dictionary prepared by wikipedia contains most common incorrectly spelled words.
Usage
-----
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)
====
Regex spellchecker based on Wikipedia's `RegExTypoFix` project
.. _RegExTypoFix: https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
The dictionary prepared by wikipedia contains most common incorrectly spelled words.
Usage
-----
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.
Source Distribution
regextypofix-1.0.4.tar.gz
(118.0 kB
view details)
File details
Details for the file regextypofix-1.0.4.tar.gz.
File metadata
- Download URL: regextypofix-1.0.4.tar.gz
- Upload date:
- Size: 118.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99584161f24c9d2704db4fe2328b45e2fe95ee3773c2024b86ff1815b05f276a
|
|
| MD5 |
dd0350d2c5448cb8c21dbd4159f2230f
|
|
| BLAKE2b-256 |
abc08497d1fdc9a0e2253df4f85cf7c1a8100205d7cbf562849d4f4d4477e7bb
|