Package: phunspell
PhunspellA pure Python spell checker utilizingspyllsa port ofHunspell.NOTE: If you are only supporting languages: English, Russian or Swedish then usespyllsdirectly: (pip install spylls)This library includesdictionariesfor all languages supported byLibreOffice.Just a note giving credit where it's due,spyllsis a fantastic project which deserves all the credit. There is acorresponding blogentry which is a good read. (and of courseHunspellitself)Usageimport 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) # HunspellInstallationpipinstallphunspellSupported LanguagesLanguageLanguage CodeAfrikaansaf_ZAAragonesean_ESArabicarBelarusianbe_BYBulgarianbg_BGBretonbr_FRCatalanca_ESCzechcs_CZDanishda_DKGermande_ATGermande_CHGermande_DEGreekel_GREnglish (Australian)en_AUEnglish (Canada)en_CAEnglish (Great Britain)en_GBEnglish (US)en_USEnglish (South African)en_ZASpanish	(all variants)esSpanishes_ARSpanishes_BOSpanishes_CLSpanishes_COSpanishes_CRSpanishes_CUSpanishes_DOSpanishes_ECSpanishes_ESSpanishes_GQSpanishes_GTSpanishes_HNSpanishes_MXSpanishes_NISpanishes_PASpanishes_PESpanishes_PHSpanishes_PRSpanishes_PYSpanishes_SVSpanishes_USSpanishes_UYSpanishes_VEEstonianet_EEFrenchfr_FRScottish Gaelicgd_GBGujaratigu_INGuaranigug_PYHebrewhe_ILHindihi_INCroatianhr_HRHungarianhu_HU (TODO)IcelandicisIndonesianid_IDItalianit_ITKurdish (Turkey)ku_TRLithuanianlt_LTLatvianlv_LVMapudüngunmd (arn) (TODO)Netherlandsnl_NLNorwegiannb_NONorwegiannn_NOOccitanoc_FRPolishpl_PLBrazilian Portuguesept_BRPortuguesept_PTRomanianro_ROSinhalasi_LKSlovaksk_SKSloveniansl_SISerbian (Cyrillic)srSerbian (Latin)sr-LatnSwedishsv_SESwahilisw_TZTamilTa (TODO)Thaith_THTurkishtr_TRUkrainianuk_UAVietnamesevi_VNTestspython-munittestdiscover-sphunspell/tests-p"test_*.py"Experimental# Extended Optional:# First time usage:# create a directory of dictionaries stored as object# makes loading/access much fasterstorage_path="/home/dvwright/data/phunspell/dictionary_objects"# run once only:pspell_object_create=PhunspellObjectStore(path=storage_path)# Then, typical usage:pspell=Phunspell(object_storage=storage_path)dicts_words={"an_ES":"vengar","be_BY":"ідалапаклонніцкі","bg_BG":"удържехме",}forlocindicts_words.keys():print(pspell.lookup(dicts_words[loc],locs=loc))There is an option to build/store all the dictionaries as pickled data. Since there are security risks associated with pickled data we will not include that data in the distrubution.To create your own local pickled dictionaries:enter a python shell:$pythonstorage_path="/home/dvwright/data/phunspell/dictionary_objects"pspell=PhunspellObjectStore(path=storage_path)NOTE: You only have to do this once before using the library and it's optional (this will consume a lot of resources!)Once completed you should have a picked object for every dictionary supported by this lib.$ls/home/dwright/python/phunspell/pickled_data/
af_ZA
an_ES
be_BY
bg_BG
bn_BD
br_FR
bs_BA
cs_CZ
da_DK
de_AT
de_CH
...
...
...NOTE: will take up almost 2 GB of space$du-sh.1.4GFor all future uses of the library just pass the directory as an argument.storage_path="/home/dvwright/data/phunspell/dictionary_objects"pspell=Phunspell(object_storage=storage_path)# load the specific locale on lookupspspell.lookup_list(['us-word1','us-word2'],locs='en_US')pspell.lookup('german-word',locs='de_DE')NOTE: If you ever update dictionary data, you will need to create a new pickle store for it.and it should find the dictionaries and load them quicklyMiscpython,python3,hunspell,libreoffice,spell,spell checking