About
Sibel is a Python spellchecker with the powerful Hunspell as the back-end. Specifically, the following methods are available:
spell(): check if a word is spelled correctly.suggest(): get a list of suggestions for a word.stem(): get the stems of a word.analyse(): get the morphological analysis of a word.
Apart from these methods, Sibel also provides an additional one, orthographic_forms(), which, given an input in ASCII, returns a list of all possible orthographic forms of the input in Unicode, that is, with diacritics added, and constituent letters combined into proper ligatures.
Comparison with PyHunspell
- Sibel is not wedded to Hunspell. It might switch to other back-ends.
- PyHunspell is no longer actively maintained, and uses deprecated APIs.
- Sibel's methods return the natural types, instead of raw bytes.
- Sibel releases the GIL when appropriate.
- Sibel has an additional method, which requires libicu.
- Sibel does not expose all APIs of Hunspell.
Installation
pip install sibel
On devices with limited memory, the compilation might fail due to the very large map defined in substitutions.cc. If this happens, the only way to use Sibel is manual compilation. First comment out the languages you don't use (by prepending // to irrelevant lines), then run the following:
python setup.py build
python setup.py install
Usage
>>> import sibel
>>> speller = sibel.Speller('/usr/share/hunspell', 'de_DE')
>>> speller.orthographic_forms('Massen')
['Massen', 'Maßen']
>>> speller = sibel.Speller('/usr/share/hunspell', 'en_GB')
>>> speller.spell('analyze')
False
>>> speller.suggest('analyze')
['analyse', 'analyte']
>>> speller.stem('archer')
['arch']
>>> speller.orthographic_forms('fiance')
['fiancé', 'fiance']
Metadata
Release files for sibel 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sibel-0.1.1.tar.gz | 20.7 kB | Without provenance | Details for sibel-0.1.1.tar.gz |
Release files / sibel-0.1.1.tar.gz
| Download URL | sibel-0.1.1.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c06068b473721b0cb5ff743bf62e6f14d145f6b65fc1409953976db10781948
|
|
BLAKE2b-256 checksum How to use checksums |
5c53b9d68074718af2572df4753bd577988612e2c0ced5a924b20d6abd11d535
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for sibel 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.