enchant icon indicating copy to clipboard operation
enchant copied to clipboard

Add custom dictionary support for Aspell

Open rrthomas opened this issue 1 year ago • 3 comments

This depends on a new API being added to Aspell: https://github.com/GNUAspell/aspell/issues/646

rrthomas avatar Apr 25 '24 11:04 rrthomas

I don't know if this is related or not, but my native language (European Portuguese) recently went through a reform and because of that dictionary providers offer the prereform and postreform variants of the European Portuguese dictionary.

For GNU Aspell you can download the dictionaries here: link

In order to differentiate between dictionary files, the providers call the new variant pt_PT and the old variant pt_PT-preao. For example if I execute on my machine:

$ aspell dicts

I get

en
en_GB
en_US
pt_BR
pt_PT
pt_PT-preao

And I can run Aspell in ispell -a compatibility mode while using such a dictionary by executing:

$ aspell -a -d pt_PT-preao

Nonetheless, even if I edit the enchant.ordering file in order to try and use the old variant pt_PT-preao dict, Enchant falls back to the new variant.

Note: It might be useful to know that running

aspell -a -l pt_PT-preao

also falls back to the new variant. Notice the -l instead of -d.

david-vicente avatar May 22 '24 14:05 david-vicente

This is not related: custom dictionary support refers to user-installed dictionary files, whereas you're talking about non-standard dictionary tags, which should be supported in Enchant ≥ 2.6.1. Please test with such a version and report a bug if you have problems.

rrthomas avatar May 22 '24 14:05 rrthomas

I can confirm that enchant-2 -a -d pt_PT-preao works. Thank you! And sorry for the off-topic.

david-vicente avatar May 22 '24 14:05 david-vicente