How to add words to system spell-check dictionary
I'm trying to figure out how to add words to a spelling dictionary so that I get the most impact for the effort --- some way to have it apply to all applications, or at least as many of the ones I actually use as possible.
If I have to target specific spell checkers for specific applications, then I'm mostly interested in adding words to the spell checking dictionaries used by the applications I most often compose text with: Firefox for web forms, Evolution for email, Atom and gedit for code and plain text, and LibreOffice for office documents. Each of these applications has a way to add words to their own spelling dictionary, but those dictionaries are application-specific, and I would have to add a given word to all of them. So I've been hunting to see If they share a single spell-check system, or even if there's 2 or 3 systems that covers all of those. Here's what I've found out so far:
I notice my system in particular has these packages which match "spell" in the name, plus enchant:
- aspell - 12:0.60.6.1-14.fc25
- gnome-python2-gtkspell - 2.25.3-48.fc25
- gspell - 1.2.3-1.fc25
- gtkspell - 2.0.16-11.fc24
- gtkspell3 - 3.0.9-1.fc25
- hunspell - 1.4.1-1.fc25
- hunspell-en - 0.20140811.1-5.fc24
- hunspell-en-GB - 0.20140811.1-5.fc24
- hunspell-en-US - 0.20140811.1-5.fc24
- enchant - 1:1.6.0-14.fc25
- python3-enchant - 1.6.8-1.fc25
Wikipedia says hunspell replaces myspell and is widely used. rpm --query --requires
says that Firefox and LibreOffice both depend on hunspell. Gedit uses gspell, which relies on enchant, which can use myspell as a backend --- and the directory /usr/share/myspell/
is actually owned by hunspell. Atom's spell-checking package searches in the myspell directory too, so it seems like I should have a good chance of doing everything I want to do from the hunspell configuration. So I tried creating a user addon dictionary by creating the file ~/.hunspell_en_US
containing a few line-separated words (all lower case except for proper nouns, no /flags or anything). However, those words are still marked as a spelling error in all the applications I'm testing on, except for hunspell itself, via the command line tool.
Why isn't it working?
And you have not only
hunspell
but alsohunspell-en-US
orhunspell-en-GB
installed?Did you see this post here?
Yes, I also have
hunspell-en
,hunspell-en-US
, andhunspell-en-GB
installed.I did eventually find and read the hunspell.5 syntax man page (currently, Fedora only includes that documentation in the
hunspell-devel
package). I don't entirely understand how all the flags work, but for a simple user dictionary which adds words for the existing language's dictionary, should basically just be a plain list of words separated by line breaks.The rest of the StackOverflow thread seems to be about writing a language file from scratch, or integrating with a C# application, so I can't use the code snippets.