Reputation: 115
I am using pyenchant package for spell check in Python. I am able to do it successfully for languages English, French, German.
Also, I want to do it for languages Italian and Spanish. I looked into available dictionaries in enchant using enchant.list_languages()
and I got only ['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR']
.
I am looking for how to do spell check for Italian and Spanish using enchant package or any other package/techniques.
Thanks.
Upvotes: 6
Views: 6302
Reputation: 7412
You can use hunspell
for italian
it will replace it, and myspell
for spanish
sudo apt install hunspell-it
Italian
sudo apt install myspell-es
Spanish
Upvotes: 1
Reputation: 9430
You can use any myspell, aspell, openoffice.org or ispell dictionary with Pyenchant. It will depend upon which operating system you have as how you get them installed.
For example on Ubuntu you can install any of these packages e.g.
sudo apt-get install myspell-it myspell-es
For Ubuntu 14.04 the packages are listed here:
http://packages.ubuntu.com/trusty/myspell-dictionary
http://packages.ubuntu.com/trusty/aspell-dictionary
http://packages.ubuntu.com/source/trusty/openoffice.org-dictionaries
http://packages.ubuntu.com/trusty/ispell-dictionary
Windows users see http://pythonhosted.org/pyenchant/tutorial.html#windows-users
Once installed the dictionaries will show when you run:
enchant.list_languages()
Upvotes: 4