Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document symlinking compatible PWLs together (e.g. ~/.hunspell_LANG) #118

Closed
audreytoskin opened this issue Mar 31, 2017 · 2 comments
Closed
Milestone

Comments

@audreytoskin
Copy link

I started by trying to figure out how to get GEdit and Evolution email client, and other applications, to use the same user personal spelling dictionary, so I wouldn't have to keep re-adding the same words over and over.

As I understand it, gedit uses the GNOME library gspell, and Evolution uses gtkspell3, which both rely on Enchant, which uses hunspell/myspell as a back-end.

This fits with some other applications where I need a spell-checker, so I created the file ~/.hunspell_en_US. It's just plain, line-separated words (so, no /flags). The hunspell CLI accepts the words in this file, but spell-checking in gedit and Evolution still marks those words as misspelled. I originally reported this issue to the gspell Bugzilla, but they say that the problem is more likely in Enchant.

@rrthomas
Copy link
Contributor

Personally, I symlink enchant's wordlist files (~/.config/enchant/en_GB.dic etc., or possibly ~/.enchant/en_GB.dic) to the relevant hunspell files.

Unfortunately, it's not possible to do better at present. It just so happens that Enchant and Hunspell use the same format, so symlinking the files mostly doesn't matter (except that it does: Enchant 1.6.0, the most widely used version presently, and earlier, adds a newline followed by a word, whereas hunspell adds a word followed by a newline: this means that you can end up with

parts
of
your

wordlistlike
this

) which is one reason I took over Enchant maintenance. However, even assuming that your applications all use Enchant 1.6.1 (you can installed it built from source on your system, without recompiling the applications that use it), it is not possible for Enchant to simply use another back-end's word lists without building in assumptions about where they are (fragile, as what happens if Hunspell changes the preferred location? it's not currently possible to ask Hunspell where it is).

Also, some applications do have subtle differences: for example, I noticed recently that Firefox, which uses hunspell, seems to sort its wordlist alphabetically when it saves it out. Probably doesn't matter, but I'm not sure.

Taken altogether, the only obvious way around this is to make every application use Enchant, which sadly is not very likely.

However, if it continues to be the case that Hunspell is by far the most popular back-end for Enchant, it might be reasonable to build some special knowledge about it into Enchant.

I will certainly document the symlinking method for the next release of Enchant, now that it is properly compatible with Hunspell, and leave this bug open to think about in future.

@rrthomas rrthomas changed the title Add support for ~/.hunspell_LANG personal spelling dictionaries Use spell-checker back-end personal wordlists directly (e.g. ~/.hunspell_LANG) Mar 31, 2017
@rrthomas rrthomas added this to the 2.0 milestone Mar 31, 2017
@rrthomas rrthomas changed the title Use spell-checker back-end personal wordlists directly (e.g. ~/.hunspell_LANG) Document symlinking compatible PWLs together (e.g. ~/.hunspell_LANG) Apr 26, 2017
@rrthomas
Copy link
Contributor

The direct use of providers' PWL support is bug #115.

rrthomas added a commit to rrthomas/enchant that referenced this issue Apr 26, 2017
rrthomas added a commit that referenced this issue Apr 29, 2017
Fix #118: document how to symlink compatible PWLs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants