- Subject: Re: [jed-users] Re: Adding dictionaries in ispell mode
- From: Peter Sargent <plsarg@xxxxxxxxxx>
- Date: Wed, 20 Aug 2025 01:07:24 -0400
I'm using the stock ispell.sl utility from the jedmodes distribution.
Most of the spell-checking I do is on OCR outputs of scanned historical
documents in various languages, so what I need is to have per-file
selection of the appropriate dictionary for each document. I had got so
far as to change
custom_variable("Ispell_Dictionary", "default");
to
custom_variable("Ispell_Dictionary", "ask");
in ispell_init.sl. The next step was to use hunspell_add_dictionary
to add the desired dictionaries to the recognized list (also in
ispell_init.sl). So I had to figure out what arguments to give the
function. The comments in the file give examples for the ispell program,
i.e., specifically for ispell_add_dictionary, and I copied those
arguments verbatim over to hunspell_add_dictionary. That's where I went
wrong. When the ispell utility asked for a dictionary name, everything
went well if I typed in "default", but if I typed in one of the other
dictionary names, I got an error such as:
Can't open affix or dictionary files for dictionary named
"a-zA-ZÄËÏÖÜäëïöüáéíóú".
In going back to ispell_init.sl to reproduce the problem in order to
write this post, I finally noticed that while ispell_add_dictionary
takes 6 arguments, hunspell_add_dictionary takes only 5! And when I
removed the 6th argument, everything worked as expected. Hopefully my
experience can serve as a caution to other unwary persons who are trying
to make multiple spell-checking dictionaries available. In my opinion
the jed frontends for the various spell checking engines offer greater
power and flexibility (programmability!) than perhaps any other
implementation.
On 8/18/25 12:08, Morten Bo Johansen wrote:
Peter Sargent <plsarg@xxxxxxxxxx> wrote:
I'm trying to add additional dictionaries in ispell mode;
When you say "ispell mode", do you mean the stock ispell.sl utility that
ships with Jed or another mode from somewhere?
In the former case, you should be able to add this line to your ~/.jedrc
Ispell_Program_Name = "hunspell -d it_IT,de_DE_frami -a";
and then the ispell utility will use both of these dictionaries when checking
a word. If it wasn't what you were looking for, then please clarify.
Regards,
Morten
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.
[2025 date index]
[2025 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]