-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dictionaries to pip package creation
- Loading branch information
David Wright
committed
Mar 4, 2021
1 parent
f410b04
commit 851a1a6
Showing
6 changed files
with
386 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
include LICENSE | ||
include MANIFEST | ||
include MANIFEST.in | ||
include README.md | ||
include phunspell | ||
include requirements.txt | ||
include setup.cfg | ||
include setup.py | ||
include phunspell/__init__.py | ||
include phunspell/data | ||
include phunspell/phunspell.py | ||
recursive-include phunspell/data/dictionary/af_ZA * | ||
recursive-include phunspell/data/dictionary/an_ES * | ||
recursive-include phunspell/data/dictionary/ar * | ||
recursive-include phunspell/data/dictionary/be_BY * | ||
recursive-include phunspell/data/dictionary/bg_BG * | ||
recursive-include phunspell/data/dictionary/bn_BD * | ||
recursive-include phunspell/data/dictionary/bo * | ||
recursive-include phunspell/data/dictionary/br_FR * | ||
recursive-include phunspell/data/dictionary/bs_BA * | ||
recursive-include phunspell/data/dictionary/ca * | ||
recursive-include phunspell/data/dictionary/cs_CZ * | ||
recursive-include phunspell/data/dictionary/da_DK * | ||
recursive-include phunspell/data/dictionary/de * | ||
recursive-include phunspell/data/dictionary/el_GR * | ||
recursive-include phunspell/data/dictionary/en * | ||
recursive-include phunspell/data/dictionary/es * | ||
recursive-include phunspell/data/dictionary/et_EE * | ||
recursive-include phunspell/data/dictionary/fr_FR * | ||
recursive-include phunspell/data/dictionary/gd_GB * | ||
recursive-include phunspell/data/dictionary/gl * | ||
recursive-include phunspell/data/dictionary/gu_IN * | ||
recursive-include phunspell/data/dictionary/gug * | ||
recursive-include phunspell/data/dictionary/he_IL * | ||
recursive-include phunspell/data/dictionary/hi_IN * | ||
recursive-include phunspell/data/dictionary/hr_HR * | ||
recursive-include phunspell/data/dictionary/hu_HU * | ||
recursive-include phunspell/data/dictionary/id * | ||
recursive-include phunspell/data/dictionary/is * | ||
recursive-include phunspell/data/dictionary/it_IT * | ||
recursive-include phunspell/data/dictionary/kmr_Latn * | ||
recursive-include phunspell/data/dictionary/ko_KR * | ||
recursive-include phunspell/data/dictionary/lo_LA * | ||
recursive-include phunspell/data/dictionary/lt_LT * | ||
recursive-include phunspell/data/dictionary/lv_LV * | ||
recursive-include phunspell/data/dictionary/ne_NP * | ||
recursive-include phunspell/data/dictionary/nl_NL * | ||
recursive-include phunspell/data/dictionary/no * | ||
recursive-include phunspell/data/dictionary/oc_FR * | ||
recursive-include phunspell/data/dictionary/pl_PL * | ||
recursive-include phunspell/data/dictionary/pt_BR * | ||
recursive-include phunspell/data/dictionary/pt_PT * | ||
recursive-include phunspell/data/dictionary/ro * | ||
recursive-include phunspell/data/dictionary/ru_RU * | ||
recursive-include phunspell/data/dictionary/si_LK * | ||
recursive-include phunspell/data/dictionary/sk_SK * | ||
recursive-include phunspell/data/dictionary/sl_SI * | ||
recursive-include phunspell/data/dictionary/sq_AL * | ||
recursive-include phunspell/data/dictionary/sr * | ||
recursive-include phunspell/data/dictionary/sv_SE * | ||
recursive-include phunspell/data/dictionary/sw_TZ * | ||
recursive-include phunspell/data/dictionary/te_IN * | ||
recursive-include phunspell/data/dictionary/th_TH * | ||
recursive-include phunspell/data/dictionary/tr_TR * | ||
recursive-include phunspell/data/dictionary/uk_UA * | ||
recursive-include phunspell/data/dictionary/vi * | ||
recursive-include phunspell/data/dictionary/zu_ZA * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,106 @@ | ||
Metadata-Version: 1.1 | ||
Metadata-Version: 2.1 | ||
Name: phunspell | ||
Version: 0.1.0 | ||
Version: 0.1.1 | ||
Summary: Pure Python spell checker, utilizing Spylls a port of Hunspell | ||
Home-page: https://github.com/dvwright/phunspell | ||
Author: David Wright | ||
Author-email: [email protected] | ||
License: MIT | ||
Download-URL: https://github.com/dvwright/phunspell/archive/v1.0.0.tar.gz | ||
Description: A pure Python spell checker, utilizing Spylls a port of Hunspell | ||
Keywords: Hunspell,Python | ||
Download-URL: https://github.com/dvwright/phunspell/archive/v0.1.1.tar.gz | ||
Description: # Phunspell | ||
|
||
A pure Python spell checker utilizing [spylls](https://github.com/zverok/spylls) a port of [Hunspell](https://hunspell.github.io/). | ||
|
||
*NOTE: If you are only supporting languages: English, Russian or Swedish then use [spylls](https://github.com/zverok/spylls) directly: (`pip install spylls`)* | ||
|
||
This library includes [dictionaries](https://github.com/LibreOffice/dictionaries) for all languages supported by [LibreOffice](https://wiki.documentfoundation.org/Development/Dictionaries). | ||
|
||
Just a note giving credit where it's due, [spylls](https://github.com/zverok/spylls) is a fantastic project which deserves all the credit. There is a [corresponding blog](https://zverok.github.io/blog/2021-01-05-spellchecker-1.html) entry which is a good read. (and of course [Hunspell](https://hunspell.github.io/) itself) | ||
|
||
### Usage | ||
|
||
import phunspell | ||
|
||
pspell = phunspell.Phunspell('en_US') | ||
print(pspell.lookup("phunspell")) # False | ||
print(pspell.lookup("about")) # True | ||
|
||
mispelled = pspell.lookup_list("Bill's TV is borken".split(" ")) | ||
print(mispelled) # ["borken"] | ||
|
||
for suggestion in pspell.suggest('phunspell'): | ||
print(suggestion) # Hunspell | ||
|
||
### Installation | ||
|
||
``` | ||
pip install phunspell | ||
``` | ||
|
||
#### Supported Languages | ||
Language | Language Code | ||
---------------------------- | ------------- | ||
Afrikaans | af_ZA | ||
Aragonese | an_ES | ||
Arabic | ar | ||
Belarusian | be_BY | ||
Bulgarian | bg_BG | ||
Breton | br_FR | ||
Catalan | ca_ES | ||
Czech | cs_CZ | ||
Danish | da_DK | ||
German | de (de_AT,de_CH,de_DE) | ||
Greek | el_GR | ||
English (Australian) | en_AU | ||
English (Canada) | en_CA | ||
English (Great Britain) | en_GB | ||
English (US) | en_US | ||
English (South African) | en_ZA | ||
Spanish (all variants) | es | ||
Estonian | et_EE | ||
French | fr_FR | ||
Scottish Gaelic | gd_GB | ||
Gujarati | gu_IN | ||
Guarani | gug_PY | ||
Hebrew | he_IL | ||
Hindi | hi_IN | ||
Croatian | hr_HR | ||
Hungarian | hu_HU | ||
Icelandic | is | ||
Indonesian | id_ID | ||
Italian | it_IT | ||
Kurdish (Turkey) | ku_TR | ||
Lithuanian | lt_LT | ||
Latvian | lv_LV | ||
Mapudüngun | md (arn) | ||
Netherlands | nl_NL | ||
Norwegian | no | ||
Occitan | oc_FR | ||
Polish | pl_PL | ||
Brazilian Portuguese | pt_BR | ||
Portuguese | pt_PT | ||
Romanian | ro | ||
Sinhala | si_LK | ||
Slovak | sk_SK | ||
Slovenian | sl_SI | ||
Serbian (Cyrillic and Latin) | sr | ||
Swedish | sv_SE | ||
Swahili | sw_TZ | ||
Tamil | Ta | ||
Thai | th_TH | ||
Turkish | tr_TR | ||
Ukrainian | uk_UA | ||
Vietnamese | vi | ||
|
||
#### Tests | ||
``` | ||
python -m unittest discover -s phunspell/tests -p "test_*.py" | ||
``` | ||
|
||
#### Misc | ||
`python`, `python3`, `hunspell`, `libreoffice`, `spell`, `spell checking` | ||
|
||
Keywords: Spelling,Hunspell,Spylls,Python | ||
Platform: UNKNOWN | ||
Classifier: Development Status :: 4 - Beta | ||
Classifier: Intended Audience :: Developers | ||
|
@@ -21,3 +113,4 @@ Classifier: Programming Language :: Python :: 3.5 | |
Classifier: Programming Language :: Python :: 3.6 | ||
Classifier: Programming Language :: Python :: 3.7 | ||
Classifier: Programming Language :: Python :: 3.8 | ||
Description-Content-Type: text/markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,191 @@ | ||
LICENSE | ||
MANIFEST | ||
MANIFEST.in | ||
README.md | ||
pyproject.toml | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
phunspell/__init__.py | ||
phunspell/phunspell.py | ||
phunspell.egg-info/PKG-INFO | ||
phunspell.egg-info/SOURCES.txt | ||
phunspell.egg-info/dependency_links.txt | ||
phunspell.egg-info/requires.txt | ||
phunspell.egg-info/top_level.txt | ||
phunspell/data/dictionary/af_ZA/af_ZA.aff | ||
phunspell/data/dictionary/af_ZA/af_ZA.dic | ||
phunspell/data/dictionary/an_ES/an_ES.aff | ||
phunspell/data/dictionary/an_ES/an_ES.dic | ||
phunspell/data/dictionary/ar/ar.aff | ||
phunspell/data/dictionary/ar/ar.dic | ||
phunspell/data/dictionary/be_BY/be_BY.aff | ||
phunspell/data/dictionary/be_BY/be_BY.dic | ||
phunspell/data/dictionary/bg_BG/bg_BG.aff | ||
phunspell/data/dictionary/bg_BG/bg_BG.dic | ||
phunspell/data/dictionary/bn_BD/bn_BD.aff | ||
phunspell/data/dictionary/bn_BD/bn_BD.dic | ||
phunspell/data/dictionary/bo/bo.aff | ||
phunspell/data/dictionary/bo/bo.dic | ||
phunspell/data/dictionary/br_FR/br_FR.aff | ||
phunspell/data/dictionary/br_FR/br_FR.dic | ||
phunspell/data/dictionary/bs_BA/bs_BA.aff | ||
phunspell/data/dictionary/bs_BA/bs_BA.dic | ||
phunspell/data/dictionary/ca/ca-valencia.aff | ||
phunspell/data/dictionary/ca/ca-valencia.dic | ||
phunspell/data/dictionary/ca/ca.aff | ||
phunspell/data/dictionary/ca/ca.dic | ||
phunspell/data/dictionary/cs_CZ/cs_CZ.aff | ||
phunspell/data/dictionary/cs_CZ/cs_CZ.dic | ||
phunspell/data/dictionary/da_DK/da_DK.aff | ||
phunspell/data/dictionary/da_DK/da_DK.dic | ||
phunspell/data/dictionary/de/de_AT.aff | ||
phunspell/data/dictionary/de/de_AT.dic | ||
phunspell/data/dictionary/de/de_CH.aff | ||
phunspell/data/dictionary/de/de_CH.dic | ||
phunspell/data/dictionary/de/de_DE.aff | ||
phunspell/data/dictionary/de/de_DE.dic | ||
phunspell/data/dictionary/el_GR/el_GR.aff | ||
phunspell/data/dictionary/el_GR/el_GR.dic | ||
phunspell/data/dictionary/en/en_AU.aff | ||
phunspell/data/dictionary/en/en_AU.dic | ||
phunspell/data/dictionary/en/en_CA.aff | ||
phunspell/data/dictionary/en/en_CA.dic | ||
phunspell/data/dictionary/en/en_GB.aff | ||
phunspell/data/dictionary/en/en_GB.dic | ||
phunspell/data/dictionary/en/en_US.aff | ||
phunspell/data/dictionary/en/en_US.dic | ||
phunspell/data/dictionary/en/en_ZA.aff | ||
phunspell/data/dictionary/en/en_ZA.dic | ||
phunspell/data/dictionary/es/es.aff | ||
phunspell/data/dictionary/es/es.dic | ||
phunspell/data/dictionary/es/es_AR.aff | ||
phunspell/data/dictionary/es/es_AR.dic | ||
phunspell/data/dictionary/es/es_BO.aff | ||
phunspell/data/dictionary/es/es_BO.dic | ||
phunspell/data/dictionary/es/es_CL.aff | ||
phunspell/data/dictionary/es/es_CL.dic | ||
phunspell/data/dictionary/es/es_CO.aff | ||
phunspell/data/dictionary/es/es_CO.dic | ||
phunspell/data/dictionary/es/es_CR.aff | ||
phunspell/data/dictionary/es/es_CR.dic | ||
phunspell/data/dictionary/es/es_CU.aff | ||
phunspell/data/dictionary/es/es_CU.dic | ||
phunspell/data/dictionary/es/es_DO.aff | ||
phunspell/data/dictionary/es/es_DO.dic | ||
phunspell/data/dictionary/es/es_EC.aff | ||
phunspell/data/dictionary/es/es_EC.dic | ||
phunspell/data/dictionary/es/es_ES.aff | ||
phunspell/data/dictionary/es/es_ES.dic | ||
phunspell/data/dictionary/es/es_GQ.aff | ||
phunspell/data/dictionary/es/es_GQ.dic | ||
phunspell/data/dictionary/es/es_GT.aff | ||
phunspell/data/dictionary/es/es_GT.dic | ||
phunspell/data/dictionary/es/es_HN.aff | ||
phunspell/data/dictionary/es/es_HN.dic | ||
phunspell/data/dictionary/es/es_MX.aff | ||
phunspell/data/dictionary/es/es_MX.dic | ||
phunspell/data/dictionary/es/es_NI.aff | ||
phunspell/data/dictionary/es/es_NI.dic | ||
phunspell/data/dictionary/es/es_PA.aff | ||
phunspell/data/dictionary/es/es_PA.dic | ||
phunspell/data/dictionary/es/es_PE.aff | ||
phunspell/data/dictionary/es/es_PE.dic | ||
phunspell/data/dictionary/es/es_PH.aff | ||
phunspell/data/dictionary/es/es_PH.dic | ||
phunspell/data/dictionary/es/es_PR.aff | ||
phunspell/data/dictionary/es/es_PR.dic | ||
phunspell/data/dictionary/es/es_PY.aff | ||
phunspell/data/dictionary/es/es_PY.dic | ||
phunspell/data/dictionary/es/es_SV.aff | ||
phunspell/data/dictionary/es/es_SV.dic | ||
phunspell/data/dictionary/es/es_US.aff | ||
phunspell/data/dictionary/es/es_US.dic | ||
phunspell/data/dictionary/es/es_UY.aff | ||
phunspell/data/dictionary/es/es_UY.dic | ||
phunspell/data/dictionary/es/es_VE.aff | ||
phunspell/data/dictionary/es/es_VE.dic | ||
phunspell/data/dictionary/et_EE/et_EE.aff | ||
phunspell/data/dictionary/et_EE/et_EE.dic | ||
phunspell/data/dictionary/fr_FR/fr_FR.aff | ||
phunspell/data/dictionary/fr_FR/fr_FR.dic | ||
phunspell/data/dictionary/gd_GB/gd_GB.aff | ||
phunspell/data/dictionary/gd_GB/gd_GB.dic | ||
phunspell/data/dictionary/gl/gl_ES.aff | ||
phunspell/data/dictionary/gl/gl_ES.dic | ||
phunspell/data/dictionary/gu_IN/gu_IN.aff | ||
phunspell/data/dictionary/gu_IN/gu_IN.dic | ||
phunspell/data/dictionary/gug/gug_PY.aff | ||
phunspell/data/dictionary/gug/gug_PY.dic | ||
phunspell/data/dictionary/he_IL/he_IL.aff | ||
phunspell/data/dictionary/he_IL/he_IL.dic | ||
phunspell/data/dictionary/hi_IN/hi_IN.aff | ||
phunspell/data/dictionary/hi_IN/hi_IN.dic | ||
phunspell/data/dictionary/hr_HR/hr_HR.aff | ||
phunspell/data/dictionary/hr_HR/hr_HR.dic | ||
phunspell/data/dictionary/hu_HU/hu_HU.aff | ||
phunspell/data/dictionary/hu_HU/hu_HU.dic | ||
phunspell/data/dictionary/id/id_ID.aff | ||
phunspell/data/dictionary/id/id_ID.dic | ||
phunspell/data/dictionary/is/is.aff | ||
phunspell/data/dictionary/is/is.dic | ||
phunspell/data/dictionary/it_IT/it_IT.aff | ||
phunspell/data/dictionary/it_IT/it_IT.dic | ||
phunspell/data/dictionary/kmr_Latn/kmr_Latn.aff | ||
phunspell/data/dictionary/kmr_Latn/kmr_Latn.dic | ||
phunspell/data/dictionary/ko_KR/ko_KR.aff | ||
phunspell/data/dictionary/ko_KR/ko_KR.dic | ||
phunspell/data/dictionary/lo_LA/lo_LA.aff | ||
phunspell/data/dictionary/lo_LA/lo_LA.dic | ||
phunspell/data/dictionary/lt_LT/lt_LT.aff | ||
phunspell/data/dictionary/lt_LT/lt_LT.dic | ||
phunspell/data/dictionary/lv_LV/lv_LV.aff | ||
phunspell/data/dictionary/lv_LV/lv_LV.dic | ||
phunspell/data/dictionary/ne_NP/ne_NP.aff | ||
phunspell/data/dictionary/ne_NP/ne_NP.dic | ||
phunspell/data/dictionary/nl_NL/nl_NL.aff | ||
phunspell/data/dictionary/nl_NL/nl_NL.dic | ||
phunspell/data/dictionary/no/nb_NO.aff | ||
phunspell/data/dictionary/no/nb_NO.dic | ||
phunspell/data/dictionary/no/nn_NO.aff | ||
phunspell/data/dictionary/oc_FR/oc_FR.aff | ||
phunspell/data/dictionary/oc_FR/oc_FR.dic | ||
phunspell/data/dictionary/pl_PL/pl_PL.aff | ||
phunspell/data/dictionary/pl_PL/pl_PL.dic | ||
phunspell/data/dictionary/pt_BR/pt_BR.aff | ||
phunspell/data/dictionary/pt_BR/pt_BR.dic | ||
phunspell/data/dictionary/pt_PT/pt_PT.aff | ||
phunspell/data/dictionary/pt_PT/pt_PT.dic | ||
phunspell/data/dictionary/ro/ro_RO.aff | ||
phunspell/data/dictionary/ro/ro_RO.dic | ||
phunspell/data/dictionary/ru_RU/ru_RU.aff | ||
phunspell/data/dictionary/ru_RU/ru_RU.dic | ||
phunspell/data/dictionary/si_LK/si_LK.aff | ||
phunspell/data/dictionary/si_LK/si_LK.dic | ||
phunspell/data/dictionary/sk_SK/sk_SK.aff | ||
phunspell/data/dictionary/sk_SK/sk_SK.dic | ||
phunspell/data/dictionary/sl_SI/sl_SI.aff | ||
phunspell/data/dictionary/sl_SI/sl_SI.dic | ||
phunspell/data/dictionary/sq_AL/sq_AL.aff | ||
phunspell/data/dictionary/sq_AL/sq_AL.dic | ||
phunspell/data/dictionary/sr/sr-Latn.aff | ||
phunspell/data/dictionary/sr/sr-Latn.dic | ||
phunspell/data/dictionary/sr/sr.aff | ||
phunspell/data/dictionary/sr/sr.dic | ||
phunspell/data/dictionary/sv_SE/sv_FI.aff | ||
phunspell/data/dictionary/sv_SE/sv_FI.dic | ||
phunspell/data/dictionary/sv_SE/sv_SE.aff | ||
phunspell/data/dictionary/sv_SE/sv_SE.dic | ||
phunspell/data/dictionary/sw_TZ/sw_TZ.aff | ||
phunspell/data/dictionary/sw_TZ/sw_TZ.dic | ||
phunspell/data/dictionary/te_IN/te_IN.aff | ||
phunspell/data/dictionary/te_IN/te_IN.dic | ||
phunspell/data/dictionary/th_TH/th_TH.aff | ||
phunspell/data/dictionary/th_TH/th_TH.dic | ||
phunspell/data/dictionary/tr_TR/tr_TR.aff | ||
phunspell/data/dictionary/tr_TR/tr_TR.dic | ||
phunspell/data/dictionary/uk_UA/uk_UA.aff | ||
phunspell/data/dictionary/uk_UA/uk_UA.dic | ||
phunspell/data/dictionary/vi/vi_VN.aff | ||
phunspell/data/dictionary/vi/vi_VN.dic | ||
phunspell/data/dictionary/zu_ZA/hyph_zu_ZA.dic |
Oops, something went wrong.