Hunspell ported to pure Python
Project description
Spylls is an effort of porting prominent spellcheckers into clear, well-structured, well-documented Python. It is intended to be useful both as a library and as some kind of “reference (or investigatory, if you will) implementation”. Currently, only Hunspell is ported.
Hunspell is a long-living, complicated, almost undocumented piece of software, and it was our feeling that the significant part of human knowledge is somehow “locked” in a form of a large C++ project. That’s how Spylls was born: as an attempt to “unlock” it, via well-structured and well-documented implementation in a high-level language.
Follow the explanatory blog post series: on my blog, on Medium, or subscribe to my mailing list.
Usage as a library
$ pip install spylls
from spylls.hunspell import Dictionary
# en_US dictionary is distributed with spylls
# See docs to load other dictionaries
dictionary = Dictionary.from_files('en_US')
print(dictionary.lookup('spylls'))
# False
for suggestion in dictionary.suggest('spylls'):
print(suggestion)
# spells
# spills
Documentation
Full documentation, including detailed source code/algorithms walkthrough, more detailed reasoning and some completeness reports, is available at https://spylls.readthedocs.io/.
Project Links
License
MPL 2.0. See the bundled LICENSE file for more details. Note that being an “explanatory rewrite”, spylls should considered a derivative work of Hunspell, and so would be all of its ports/rewrites.
We are incredibly grateful to Hunspell’s original authors and current maintainers for all the hard work they’ve put into the most used spellchecker in the world!
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
Built Distribution
File details
Details for the file spylls-0.1.7.tar.gz
.
File metadata
- Download URL: spylls-0.1.7.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7045892dcbd324d3685f69c5a760063e78fb839913724ce18077cf0a0c93f220 |
|
MD5 | e171829f507db11390b745219484f314 |
|
BLAKE2b-256 | 5cc219f34deb2dc1475dfeadafbd5666246041ee7578bb933e82de794f0a9283 |
File details
Details for the file spylls-0.1.7-py2.py3-none-any.whl
.
File metadata
- Download URL: spylls-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7fa4b66615f390bd12fd37939b85934c012309fd3cce8584844c54270b7776 |
|
MD5 | 4d1fd01a837bcfe5d8bc758f12c4f207 |
|
BLAKE2b-256 | cd19ce6fcb4b86e188983bcfc1f84e4ac6f3038ca8d68b6d70a678cdc566f66c |