https://github.com/zverok/spylls
Pure Python spell-checker, (almost) full port of Hunspell
https://github.com/zverok/spylls
hunspell spellcheck spellchecker spelling
Last synced: 6 months ago
JSON representation
Pure Python spell-checker, (almost) full port of Hunspell
- Host: GitHub
- URL: https://github.com/zverok/spylls
- Owner: zverok
- License: mpl-2.0
- Created: 2020-02-09T12:30:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T12:20:33.000Z (over 1 year ago)
- Last Synced: 2025-03-28T06:08:38.165Z (7 months ago)
- Topics: hunspell, spellcheck, spellchecker, spelling
- Language: Python
- Homepage: https://spylls.readthedocs.io
- Size: 2.75 MB
- Stars: 289
- Watchers: 6
- Forks: 20
- Open Issues: 13
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
Spylls: Hunspell ported to Python
=================================.. image:: https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg
:target: https://stand-with-ukraine.pp.ua**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 `_.
Usage as a library
------------------::
$ pip install spylls
.. code-block:: python
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
# spillsDocumentation
-------------Full documentation, including detailed source code/algorithms walkthrough, more detailed reasoning and some completeness reports, is available at https://spylls.readthedocs.io/.
Project Links
-------------- Docs: https://spylls.readthedocs.io/
- GitHub: https://github.com/zverok/spylls
- PyPI: https://pypi.python.org/pypi/spylls
- Issues: https://github.com/spylls/spylls/issuesLicense
-------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!