* Create a complete/huge dictionary for aspell.
@ 2021-07-22 6:22 Hongyi Zhao
2021-07-22 6:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-22 6:22 UTC (permalink / raw)
To: help-gnu-emacs
On Ubuntu 20.04, I'm using aspell as the ispell checker program, which
can be confirmed with `C-h v ispell-program-name RET' as shown below:
;;;
ispell-program-name is a variable defined in ‘ispell.el’.
Its value is "/usr/bin/aspell"
;;;
I found that too many words are not included in the pre-established
aspell-en dictionary, say this one: destigmatize [1]:
$ aspell dump master | egrep -i destigmatize
$
For additional information about the packages installed on my
computer, see the following:
$ aspell --version
@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.8)
$ dpkg --get-selections |grep ^aspell
aspell install
aspell-en install
So, I want to make a complete/huge dictionary for aspell, say, based
on the well known Webster's unabridged dictionary of the English
language.
[1] https://www.merriam-webster.com/dictionary/destigmatize
Any hints for achieving this aim?
Regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-22 6:22 Create a complete/huge dictionary for aspell Hongyi Zhao
@ 2021-07-22 6:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22 7:48 ` Hongyi Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-22 6:36 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao wrote:
> I found that too many words are not included in the
> pre-established aspell-en dictionary, say this one:
> destigmatize
$ sudo apt-get --install-suggests install iamerican-insane
Some interesting stuff for you, perhaps:
https://dataswamp.org/~incal/emacs-init/spell.el
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-22 6:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-22 7:48 ` Hongyi Zhao
2021-07-23 1:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-23 12:58 ` Felix Dietrich
0 siblings, 2 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-22 7:48 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 704 bytes --]
On Thu, Jul 22, 2021 at 2:36 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > I found that too many words are not included in the
> > pre-established aspell-en dictionary, say this one:
> > destigmatize
>
> $ sudo apt-get --install-suggests install iamerican-insane
I installed the above dictionary, but still can't see the completion
hints for the word "destigmatize" in the candidate list. See the
attachment for more details.
> Some interesting stuff for you, perhaps:
> https://dataswamp.org/~incal/emacs-init/spell.el
I've browsed through this configuration, but found nothing related to
iamerican-Insane dictionary.
HY
[-- Attachment #2: 2021-07-22_15-42.png --]
[-- Type: image/png, Size: 164214 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-22 7:48 ` Hongyi Zhao
@ 2021-07-23 1:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-23 1:29 ` Hongyi Zhao
2021-07-23 12:58 ` Felix Dietrich
1 sibling, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-23 1:07 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao wrote:
>>> I found that too many words are not included in the
>>> pre-established aspell-en dictionary, say this one:
>>> destigmatize
>>
>> $ sudo apt-get --install-suggests install iamerican-insane
>
> I installed the above dictionary, but still can't see the
> completion hints for the word "destigmatize" in the
> candidate list. See the attachment for more details.
Yeah, but when it comes, and is correct after you carefully
examine and double-check the word, hit I so it will be in your
local list forever after. That's how it works, you'll still
have to do that for a lot of words in the beginning. But add,
add and add and soon enough that will almost never happen.
>> Some interesting stuff for you, perhaps:
>> https://dataswamp.org/~incal/emacs-init/spell.el
>
> I've browsed through this configuration, but found nothing
> related to iamerican-Insane dictionary.
No comments...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-23 1:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-23 1:29 ` Hongyi Zhao
2021-07-23 1:44 ` Hongyi Zhao
2021-07-23 7:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 2 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-23 1:29 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
On Fri, Jul 23, 2021 at 9:07 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> >>> I found that too many words are not included in the
> >>> pre-established aspell-en dictionary, say this one:
> >>> destigmatize
> >>
> >> $ sudo apt-get --install-suggests install iamerican-insane
> >
> > I installed the above dictionary, but still can't see the
> > completion hints for the word "destigmatize" in the
> > candidate list. See the attachment for more details.
>
> Yeah, but when it comes, and is correct after you carefully
> examine and double-check the word, hit I so it will be in your
> local list forever after. That's how it works, you'll still
> have to do that for a lot of words in the beginning. But add,
> add and add and soon enough that will almost never happen.
I've posted a similar issue [1]. Here I give my some further tries and
testings as described below.
I've created a [personal
dictionary](http://aspell.net/man-html/Format-of-the-Personal-and-Replacement-Dictionaries.html)
which has the following contents:
```
$ cat ~/.aspell.en.pws
personal_ws-1.1 en 2
Telegram
destigmatize
```
This time, the expected word really appread in the correct ispell's
popup dropdown menu, as shown in the attachment. But I still can't
understand the following question: since I've added the correct rarely
used word to the personal dictionary, why we still need the
installation of the big/huge/insane dictionaries, such as
iamerican-insane?
> >> Some interesting stuff for you, perhaps:
> >> https://dataswamp.org/~incal/emacs-init/spell.el
> >
> > I've browsed through this configuration, but found nothing
> > related to iamerican-Insane dictionary.
>
> No comments...
[1]. https://github.com/GNUAspell/aspell/issues/615
Best regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
[-- Attachment #2: 2021-07-23-091934_1011x987_scrot.png --]
[-- Type: image/png, Size: 151840 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-23 1:29 ` Hongyi Zhao
@ 2021-07-23 1:44 ` Hongyi Zhao
2021-07-23 7:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-23 1:44 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
On Fri, Jul 23, 2021 at 9:29 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Fri, Jul 23, 2021 at 9:07 AM Emanuel Berg via Users list for the
> GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> >
> > Hongyi Zhao wrote:
> >
> > >>> I found that too many words are not included in the
> > >>> pre-established aspell-en dictionary, say this one:
> > >>> destigmatize
> > >>
> > >> $ sudo apt-get --install-suggests install iamerican-insane
> > >
> > > I installed the above dictionary, but still can't see the
> > > completion hints for the word "destigmatize" in the
> > > candidate list. See the attachment for more details.
> >
> > Yeah, but when it comes, and is correct after you carefully
> > examine and double-check the word, hit I so it will be in your
> > local list forever after. That's how it works, you'll still
> > have to do that for a lot of words in the beginning. But add,
> > add and add and soon enough that will almost never happen.
>
> I've posted a similar issue [1]. Here I give my some further tries and
> testings as described below.
>
> I've created a [personal
> dictionary](http://aspell.net/man-html/Format-of-the-Personal-and-Replacement-Dictionaries.html)
> which has the following contents:
>
> ```
> $ cat ~/.aspell.en.pws
> personal_ws-1.1 en 2
> Telegram
> destigmatize
> ```
> This time, the expected word really appread in the correct ispell's
> popup dropdown menu, as shown in the attachment.
Additional comment: The screenshot was prepared by the following
command, which allows some delay so that I've enough time to show the
popup dropdown menu:
$ scrot -c -d 5 -s -b
Hongyi
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-23 1:29 ` Hongyi Zhao
2021-07-23 1:44 ` Hongyi Zhao
@ 2021-07-23 7:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-23 7:29 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao wrote:
> This time, the expected word really appread in the correct
> ispell's popup dropdown menu, as shown in the attachment.
> But I still can't understand the following question: since
> I've added the correct rarely used word to the personal
> dictionary, why we still need the installation of the
> big/huge/insane dictionaries, such as iamerican-insane?
Uhm, I'm not sure I follow, probably not, right?
But basically you want the iamerican-insane to get everything
you can as easily as possible, the rest I don't know any other
way than to add them one by one by using them and then, with
the the ispell interface in Emacs, have them end up in you
local dictionary, to complement any "insanity" left out that
you feel you have it inside you to contribute...
A good idea actually with one little issue, why are everyone
expected to do this all the time and over and over? every year
every person "insane" should send their locals upstream to
level up insanity at headquarters, so we can even easier get an
even bigger list.
I think that actually, because of proximity in time, space,
and interests/hobbies/activities (computers) it is possible
the very same words are being added from that world over
and over!
Or does something actually happen with all that "silent
feedback"?
PS. Can you believe any other software get that much active
feedback, and then never care about it? So I hope that
isn't what happens but I sure never agreed anywhere they
could use mine so I guess it doesn't!
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-22 7:48 ` Hongyi Zhao
2021-07-23 1:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-23 12:58 ` Felix Dietrich
2021-07-23 13:33 ` Hongyi Zhao
1 sibling, 1 reply; 22+ messages in thread
From: Felix Dietrich @ 2021-07-23 12:58 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> On Thu, Jul 22, 2021 at 2:36 PM Emanuel Berg via Users list for the
> GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>>
>> Hongyi Zhao wrote:
>>
>> > I found that too many words are not included in the
>> > pre-established aspell-en dictionary, say this one:
>> > destigmatize
>>
>> $ sudo apt-get --install-suggests install iamerican-insane
>
> I installed the above dictionary, but still can't see the completion
> hints for the word "destigmatize" in the candidate list. See the
> attachment for more details.
Donʼt you also have to select the dictionary to use either with the
function ‘ispell-change-dictionary’ or by setting
‘ispell-local-dictionary’ (global default is configured via
‘ispell-dictionary’)? Or does the “insane” dictionary become aspellʼs
default once installed?
--
Felix Dietrich
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-23 12:58 ` Felix Dietrich
@ 2021-07-23 13:33 ` Hongyi Zhao
2021-07-24 13:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-23 13:33 UTC (permalink / raw)
To: Felix Dietrich; +Cc: help-gnu-emacs
On Fri, Jul 23, 2021 at 8:59 PM Felix Dietrich
<felix.dietrich@sperrhaken.name> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > On Thu, Jul 22, 2021 at 2:36 PM Emanuel Berg via Users list for the
> > GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> >>
> >> Hongyi Zhao wrote:
> >>
> >> > I found that too many words are not included in the
> >> > pre-established aspell-en dictionary, say this one:
> >> > destigmatize
> >>
> >> $ sudo apt-get --install-suggests install iamerican-insane
> >
> > I installed the above dictionary, but still can't see the completion
> > hints for the word "destigmatize" in the candidate list. See the
> > attachment for more details.
>
> Donʼt you also have to select the dictionary to use either with the
> function ‘ispell-change-dictionary’ or by setting
> ‘ispell-local-dictionary’ (global default is configured via
> ‘ispell-dictionary’)?
Both ‘ispell-local-dictionary’ and ‘ispell-dictionary’ are nil on my side:
;;;
ispell-local-dictionary is a buffer-local variable defined in
ispell.el.gz.
Global Value
nil
;;;
;;;
ispell-dictionary is a variable defined in ispell.el.gz.
Value
nil
;;;
But, I don't know which one is corresponding to iamerican-insane dictionary:
$ aspell dump dicts
en
en-variant_0
en-variant_1
en-variant_2
en-w_accents
en-wo_accents
en_AU
en_AU-variant_0
en_AU-variant_1
en_AU-w_accents
en_AU-wo_accents
en_CA
en_CA-variant_0
en_CA-variant_1
en_CA-w_accents
en_CA-wo_accents
en_GB
en_GB-ise
en_GB-ise-w_accents
en_GB-ise-wo_accents
en_GB-ize
en_GB-ize-w_accents
en_GB-ize-wo_accents
en_GB-variant_0
en_GB-variant_1
en_GB-w_accents
en_GB-wo_accents
en_US
en_US-variant_0
en_US-variant_1
en_US-w_accents
en_US-wo_accents
> Or does the “insane” dictionary become aspellʼs
> default once installed?
How to know or set this?
Regards
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-23 13:33 ` Hongyi Zhao
@ 2021-07-24 13:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-24 13:54 ` ispell select Emacs dictionary on Debian (was: Re: Create a complete/huge dictionary for aspell.) Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-24 15:30 ` Create a complete/huge dictionary for aspell Hongyi Zhao
0 siblings, 2 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-24 13:34 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao wrote:
> Both ‘ispell-local-dictionary’ and ‘ispell-dictionary’ are
> nil on my side
Do
M-x ispell-change-dictionary RET SPC
to see what dictionaries are installed.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* ispell select Emacs dictionary on Debian (was: Re: Create a complete/huge dictionary for aspell.)
2021-07-24 13:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-24 13:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-25 22:37 ` ispell select Emacs dictionary on Debian Felix Dietrich
2021-07-24 15:30 ` Create a complete/huge dictionary for aspell Hongyi Zhao
1 sibling, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-24 13:54 UTC (permalink / raw)
To: help-gnu-emacs
>> Both ‘ispell-local-dictionary’ and ‘ispell-dictionary’ are
>> nil on my side
>
> Do
>
> M-x ispell-change-dictionary RET SPC
>
> to see what dictionaries are installed.
Now I start to think it doesn't work for me either!
I did
$ sudo apt-get --install-suggests install iamerican-insane
$ sudo select-default-ispell
and selected american-insane (the UI even mentions Emacs BTW)
but the dictionary wouldn't turn up with
M-x ispell-change-dictionary RET SPC
then I did
$ sudo apt-get --install-suggests install iamerican-\*
and it installed all of it, I did 'ispell-change-dictionary'
again and all the smaller alternatives were now there, but
I picked -insane anyway, and what happened is, now "american"
turns up as an alternative in Emacs.
Is this as it should be, i.e. I use the -insane version and it
is solved under the hood somehow? Or am I using
just iamerican?
OS:
Linux ebih 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2
(2019-11-11) x86_64 GNU/Linux
Emacs:
GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
Version 3.24.5, cairo version 1.16.0) of 2020-10-23
Ispell:
International Ispell Version 3.4.02 08 Jan 2021
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-24 13:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-24 13:54 ` ispell select Emacs dictionary on Debian (was: Re: Create a complete/huge dictionary for aspell.) Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-24 15:30 ` Hongyi Zhao
2021-07-24 16:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-24 15:30 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
On Sat, Jul 24, 2021 at 9:34 PM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > Both ‘ispell-local-dictionary’ and ‘ispell-dictionary’ are
> > nil on my side
>
> Do
>
> M-x ispell-change-dictionary RET SPC
>
> to see what dictionaries are installed.
See the attached file.
Hongyi
[-- Attachment #2: Selection_010.png --]
[-- Type: image/png, Size: 140407 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-24 15:30 ` Create a complete/huge dictionary for aspell Hongyi Zhao
@ 2021-07-24 16:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-25 2:57 ` Hongyi Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-24 16:47 UTC (permalink / raw)
To: help-gnu-emacs
Hongyi Zhao wrote:
>> to see what dictionaries are installed
>
> See the attached file
Please describe whatever it is you want to communicate
in words.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-24 16:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-25 2:57 ` Hongyi Zhao
2021-07-25 15:36 ` Hongyi Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-25 2:57 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
On Sun, Jul 25, 2021 at 12:47 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> >> to see what dictionaries are installed
> >
> > See the attached file
>
> Please describe whatever it is you want to communicate
> in words.
As you can see, there are so many dictionaries, and I don't know which
of them is/are corresponding to iamerican-insane dictionary.
Regards,
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Create a complete/huge dictionary for aspell.
2021-07-25 2:57 ` Hongyi Zhao
@ 2021-07-25 15:36 ` Hongyi Zhao
0 siblings, 0 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-07-25 15:36 UTC (permalink / raw)
To: Emanuel Berg, help-gnu-emacs
On Sun, Jul 25, 2021 at 10:57 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Sun, Jul 25, 2021 at 12:47 AM Emanuel Berg via Users list for the
> GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> >
> > Hongyi Zhao wrote:
> >
> > >> to see what dictionaries are installed
> > >
> > > See the attached file
> >
> > Please describe whatever it is you want to communicate
> > in words.
>
> As you can see, there are so many dictionaries, and I don't know which
> of them is/are corresponding to iamerican-insane dictionary.
Maybe I don't understand the nature of my question and what exactly is
the problem I’m trying to solve. The discussion on here [1] makes me
realize the essence of some relevant problems more clearly, so I refer
it back to you here, just FYI.
[1] https://github.com/company-mode/company-mode/issues/1146#issuecomment-886172208
Regards,
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-07-24 13:54 ` ispell select Emacs dictionary on Debian (was: Re: Create a complete/huge dictionary for aspell.) Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-25 22:37 ` Felix Dietrich
2021-07-26 0:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 22+ messages in thread
From: Felix Dietrich @ 2021-07-25 22:37 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
>>> Both ‘ispell-local-dictionary’ and ‘ispell-dictionary’ are
>>> nil on my side
>>
>> Do
>>
>> M-x ispell-change-dictionary RET SPC
>>
>> to see what dictionaries are installed.
>
> Now I start to think it doesn't work for me either!
>
> I did
>
> $ sudo apt-get --install-suggests install iamerican-insane
> $ sudo select-default-ispell
>
> and selected american-insane (the UI even mentions Emacs BTW)
>
> but the dictionary wouldn't turn up with
>
> M-x ispell-change-dictionary RET SPC
Emacs defaults to using aspell for spell-checking. The package
“iamerican-insane” installs a dictionary for the ispell program. Both
programs use different, incompatible formats for their dictionaries. If you
set ‘ispell-program-name’ to “ispell”, Emacs will offer the installed ispell
dictionaries with “M-x ispell-change-dictionary”. Note, though, that you
also *cannot* share your personal dictionary between these two programs.
You may generate an american-insane dictionary for aspell from the wordlist
distributed in the package “wamerican-insane” using:
aspell --lang=en --encoding=utf-8 \
create master /usr/lib/aspell/en_US-insane.rws \
</usr/share/dict/american-english-insane
I also had to create a file “/usr/lib/aspell/en_US-insane.multi” with the
following content for the dictionary to be picked up by aspell:
add en_US-insane.rws
Afterwards check whether “en_US-insane” is listed in the output of
“aspell dicts”. If it is, it should also be selectable in Emacs with
“M-x ispell-change-dictionary” (when ‘ispell-program-name’ is “aspell”).
As an aside: at a quick glance, I think that the insane dictionary contains
some dubious spelling.
> then I did
>
> $ sudo apt-get --install-suggests install iamerican-\*
>
> and it installed all of it, I did 'ispell-change-dictionary'
> again and all the smaller alternatives were now there, but
> I picked -insane anyway, and what happened is, now "american"
> turns up as an alternative in Emacs.
I could not reproduce that.
> Is this as it should be, i.e. I use the -insane version and it
> is solved under the hood somehow? Or am I using
> just iamerican?
I donʼt know how to directly see which dictionary is used. Try looking at
the [ia]spell processʼ arguments, either in emacs with “list-processes” or
in the shell with “ps”. In the shell, you may also look at a list of open
files of the [ia]spell process using “lsof -p IASPELL_PID”.
Debian does some Debian things under the hood to make the installed
dictionaries selectable in Emacs. They also ship custom versions of
“ispell.el” and “flyspell.el”. Check the package “dictionaries-common”.
--
Felix Dietrich
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-07-25 22:37 ` ispell select Emacs dictionary on Debian Felix Dietrich
@ 2021-07-26 0:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-27 5:17 ` Felix Dietrich
0 siblings, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-26 0:24 UTC (permalink / raw)
To: help-gnu-emacs
Felix Dietrich wrote:
> Emacs defaults to using aspell for spell-checking.
> The package “iamerican-insane” installs a dictionary for the
> ispell program. Both programs use different, incompatible
> formats for their dictionaries. If you set
> ‘ispell-program-name’ to “ispell”, Emacs will offer the
> installed ispell dictionaries with “M-x
> ispell-change-dictionary”.
`ispell-program-name' is "ispell".
As described in the previous post, Debian seems to react upon
the installation of the iamerican-insane package as with the
superuser script to set the dictionary that alternative does
show up. However after that with `ispell-change-dictionary' the
alternatives are still only
american
default
svenska
If I remove all iamerican-* packages the american alternative
go away. I don't know if this is related to the iamerican
package in particular but that seems reasonable.
But then why aren't the iamerican-small, iamerican-large,
iamerican-huge, and iamerican-insane there whenever _they_
are installed?
PS. The Swedish dictionary doesn't work either. It says
"ispell-init-process: Illegal format hash table
/usr/lib/ispell/svenska.hash - expected magic2 0x9602, got
0x414c"
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-07-26 0:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-07-27 5:17 ` Felix Dietrich
2021-08-01 0:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 22+ messages in thread
From: Felix Dietrich @ 2021-07-27 5:17 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> As described in the previous post, Debian seems to react upon the
> installation of the iamerican-insane package as with the superuser
> script [select-default-ispell] to set the dictionary that alternative
> does show up.
The iamerican packages call in their postinst script [1]
“update-default-ispell” which will call the function
“build_emacsen_support”; this function creates the file
</var/cache/dictionaries-common/emacsen-ispell-dicts.el>
with entries for ‘ispell-dictionary-alist’ (indirectly,
see the function ‘debian-ispell-initialize-dicts-alist’
and the hook ‘ispell-initialize-spellchecker-hook’).
> However after that with `ispell-change-dictionary' the
> alternatives are still only
>
> american
> default
> svenska
“emacsen-ispell-dicts.el” is only read at start-up [2]. If you install a
new dictionary, an already running Emacs will not know about it. You may
try to reinitialise the dictionary with the following snippet:
(progn
(setq debian-ispell-only-dictionary-alist nil
debian-aspell-only-dictionary-alist nil
debian-hunspell-only-dictionary-alist nil
ispell-dictionary-alist nil)
(load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el")
;; There is a setter associated with ‘ispell-program-name’ which
;; calls ‘ispell-set-spellchecker-params’. Calling this function
;; directly does not work; I donʼt understand why.
(setq ispell-program-name "ispell"))
For testing purposes, start Emacs with the “-q” (“--no-init-file”)
switch. Do the dictionaries show up then in the dialog of
‘ispell-change-dictionary’? Do you use a custom built Emacs or the
Debian package?
> If I remove all iamerican-* packages the american alternative
> go away. I don't know if this is related to the iamerican
> package in particular but that seems reasonable.
It is connected to the action of removing the dictionary: ispell filters
the list of ‘ispell-dictionary-alist’ for the dialog: it will only
display those entries whose dictionary files exist.
> But then why aren't the iamerican-small, iamerican-large,
> iamerican-huge, and iamerican-insane there whenever _they_
> are installed?
To reiterate: their entries are added on installation of the respective
package to the file emacsen-ispell-dicts.el; this file is only loaded at
start-up.
> PS. The Swedish dictionary doesn't work either. It saysff
> "ispell-init-process: Illegal format hash table
> /usr/lib/ispell/svenska.hash - expected magic2 0x9602, got
> 0x414c"
Does not work for me either. Seems like a bug. Please report it.
Meanwhile, try recreating the .hash file manually (requires the wswedish
package):
buildhash /usr/share/dict/svenska /usr/lib/ispell/svenska.aff \
/usr/lib/ispell/svenska.hash
Footnotes:
[1] If you have the package installed you may read their content here:
</var/lib/dpkg/info/iamerican.postinst>. Otherwise, download the
package and open it: the file is in the subarchive
“control.tar.xz".
[2] </etc/emacs/site-start.d/50dictionaries-common.el>
--
Felix Dietrich
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-07-27 5:17 ` Felix Dietrich
@ 2021-08-01 0:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-01 6:09 ` Eli Zaretskii
2021-08-01 12:46 ` Felix Dietrich
0 siblings, 2 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-01 0:26 UTC (permalink / raw)
To: help-gnu-emacs
Felix Dietrich wrote:
> “emacsen-ispell-dicts.el” is only read at start-up [2].
> If you install a new dictionary, an already running Emacs
> will not know about it.
Same with restart.
> You may try to reinitialise the dictionary with the
> following snippet:
>
> (progn
> (setq debian-ispell-only-dictionary-alist nil
> debian-aspell-only-dictionary-alist nil
> debian-hunspell-only-dictionary-alist nil
> ispell-dictionary-alist nil)
> (load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el")
> ;; There is a setter associated with ‘ispell-program-name’ which
> ;; calls ‘ispell-set-spellchecker-params’. Calling this function
> ;; directly does not work; I don't understand why.
> (setq ispell-program-name "ispell"))
That file,
/var/cache/dictionaries-common/emacsen-ispell-dicts.el, has as
its last line
(setq debian-hunspell-dictionary (debian-ispell-get-hunspell-default))
but the function "debian-ispell-get-hunspell-default"
is undefined.
Anyway same.
> For testing purposes, start Emacs with the “-q”
> (“--no-init-file”) switch. Do the dictionaries show up then
> in the dialog of ‘ispell-change-dictionary’?
A lot of dictionaries show up with -q! No idea why, and
interestingly, american-insane and the other installed do not.
> Do you use a custom built Emacs or the Debian package?
It is installed from source!
>> PS. The Swedish dictionary doesn't work either. It saysff
>> "ispell-init-process: Illegal format hash table
>> /usr/lib/ispell/svenska.hash - expected magic2 0x9602,
>> got 0x414c"
>
> Does not work for me either. Seems like a bug. Please report
> it. Meanwhile, try recreating the .hash file manually
> (requires the wswedish package):
>
> buildhash /usr/share/dict/svenska /usr/lib/ispell/svenska.aff \
> /usr/lib/ispell/svenska.hash
That works! Cool!
A bug where, in Debian's wswedish?
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-08-01 0:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-01 6:09 ` Eli Zaretskii
2021-08-01 12:46 ` Felix Dietrich
1 sibling, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2021-08-01 6:09 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 01 Aug 2021 02:26:16 +0200
> From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>
> Felix Dietrich wrote:
>
> > “emacsen-ispell-dicts.el” is only read at start-up [2].
> > If you install a new dictionary, an already running Emacs
> > will not know about it.
>
> Same with restart.
>
> > You may try to reinitialise the dictionary with the
> > following snippet:
> >
> > (progn
> > (setq debian-ispell-only-dictionary-alist nil
> > debian-aspell-only-dictionary-alist nil
> > debian-hunspell-only-dictionary-alist nil
> > ispell-dictionary-alist nil)
> > (load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el")
> > ;; There is a setter associated with ‘ispell-program-name’ which
> > ;; calls ‘ispell-set-spellchecker-params’. Calling this function
> > ;; directly does not work; I don't understand why.
> > (setq ispell-program-name "ispell"))
>
> That file,
> /var/cache/dictionaries-common/emacsen-ispell-dicts.el, has as
> its last line
>
> (setq debian-hunspell-dictionary (debian-ispell-get-hunspell-default))
>
> but the function "debian-ispell-get-hunspell-default"
> is undefined.
>
> Anyway same.
>
> > For testing purposes, start Emacs with the “-q”
> > (“--no-init-file”) switch. Do the dictionaries show up then
> > in the dialog of ‘ispell-change-dictionary’?
>
> A lot of dictionaries show up with -q! No idea why, and
> interestingly, american-insane and the other installed do not.
>
> > Do you use a custom built Emacs or the Debian package?
>
> It is installed from source!
>
> >> PS. The Swedish dictionary doesn't work either. It saysff
> >> "ispell-init-process: Illegal format hash table
> >> /usr/lib/ispell/svenska.hash - expected magic2 0x9602,
> >> got 0x414c"
> >
> > Does not work for me either. Seems like a bug. Please report
> > it. Meanwhile, try recreating the .hash file manually
> > (requires the wswedish package):
> >
> > buildhash /usr/share/dict/svenska /usr/lib/ispell/svenska.aff \
> > /usr/lib/ispell/svenska.hash
>
> That works! Cool!
>
> A bug where, in Debian's wswedish?
I wonder why people still insist on using ispell (the program), when
hunspell and aspell are widely available, provide better
spell-checking in more languages, and detect the installed
dictionaries automatically instead of requiring complicated manual
sertup?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-08-01 0:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-01 6:09 ` Eli Zaretskii
@ 2021-08-01 12:46 ` Felix Dietrich
2021-08-01 21:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
1 sibling, 1 reply; 22+ messages in thread
From: Felix Dietrich @ 2021-08-01 12:46 UTC (permalink / raw)
To: help-gnu-emacs
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Felix Dietrich wrote:
>
>> For testing purposes, start Emacs with the “-q”
>> (“--no-init-file”) switch. Do the dictionaries show up then
>> in the dialog of ‘ispell-change-dictionary’?
>
> A lot of dictionaries show up with -q! No idea why, and
> interestingly, american-insane and the other installed do not.
>
>> That file, /var/cache/dictionaries-common/emacsen-ispell-dicts.el,
>> has as its last line
>>
>> (setq debian-hunspell-dictionary (debian-ispell-get-hunspell-default))
>>
>> but the function "debian-ispell-get-hunspell-default" is undefined.
>> Do you use a custom built Emacs or the Debian package?
>
> It is installed from source!
This means that the Debian specific initialisation is not run: the Debian
Emacs package installs a custom “startup.el” file that loads
“debian-startup” [1], which loads the Debian specific configuration; this is
why the function ‘debian-ispell-get-hunspell-default’ is not defined. If
you want to use the Debian dictionary configuration, you may try to load the
necessary code manually:
(progn
(load-file "/usr/share/dictionaries-common/site-elisp/debian-ispell.el")
(load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el")
(setq ispell-program-name "ispell") ; [2]
)
I donʼt think you can load all the Debian start-up files, if you have
installed Emacs below /usr/local/: I suspect ‘debian-pkg-add-load-path-item’
[3] will not be able to add Debian specific paths to ‘load-path’ at the
correct position. There may be other issues as well.
Another solution, maybe more appropriate for a custom installation, could be
to add the dictionaries you are interested in, and that are not already in
‘ispell-dictionary-base-alist’, manually to ‘ispell-local-dictionary-alist’.
Copy the necessary information from emacsen-ispell-dicts.el [4] (or extract
it manually or programmatically from the pertinent files in
/var/lib/dictionaries-common/ispell/):
(setq ispell-local-dictionary-alist
'(("american-large"
"[A-Za-z]"
"[^A-Za-z]"
"[']"
nil
("-B" "-d" "american-large")
nil
utf-8)))
>>> PS. The Swedish dictionary doesn't work either. It saysff
>>> "ispell-init-process: Illegal format hash table
>>> /usr/lib/ispell/svenska.hash - expected magic2 0x9602,
>>> got 0x414c"
>>
>> Does not work for me either. Seems like a bug. Please report it.
>>
> A bug where, in Debian's wswedish?
The broken hash file belongs to the “iswedish” package. Therefore, I
would file the bug report against “iswedish”. (Incidentally, both
“wswedish” and “iswedish” are actually built from the same Debian source
package.)
Footnotes:
[1] <https://sources.debian.org/src/emacs/1:27.1+1-3.1/debian/patches/0002-Run-debian-startup-and-set-debian-emacs-flavor.patch/>
[2] This forces ‘ispell-set-spellchecker-params’ to run and sets
‘ispell-dictionary-alist’ appropriately.
[3] In debian-startup.el:
<https://sources.debian.org/src/emacsen-common/3.0.4/debian-startup.el/#L33>
[4] /var/cache/dictionaries-common/emacsen-ispell-dicts.el
--
Felix Dietrich
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: ispell select Emacs dictionary on Debian
2021-08-01 12:46 ` Felix Dietrich
@ 2021-08-01 21:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-01 21:11 UTC (permalink / raw)
To: help-gnu-emacs
Felix Dietrich wrote:
> (progn
> (load-file "/usr/share/dictionaries-common/site-elisp/debian-ispell.el")
> (load-file "/var/cache/dictionaries-common/emacsen-ispell-dicts.el")
> (setq ispell-program-name "ispell") )
Works! Amazing! Thank you! 2/2 problems solved
https://dataswamp.org/~incal/emacs-init/spell.el
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2021-08-01 21:11 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-22 6:22 Create a complete/huge dictionary for aspell Hongyi Zhao
2021-07-22 6:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-22 7:48 ` Hongyi Zhao
2021-07-23 1:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-23 1:29 ` Hongyi Zhao
2021-07-23 1:44 ` Hongyi Zhao
2021-07-23 7:29 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-23 12:58 ` Felix Dietrich
2021-07-23 13:33 ` Hongyi Zhao
2021-07-24 13:34 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-24 13:54 ` ispell select Emacs dictionary on Debian (was: Re: Create a complete/huge dictionary for aspell.) Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-25 22:37 ` ispell select Emacs dictionary on Debian Felix Dietrich
2021-07-26 0:24 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-27 5:17 ` Felix Dietrich
2021-08-01 0:26 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-01 6:09 ` Eli Zaretskii
2021-08-01 12:46 ` Felix Dietrich
2021-08-01 21:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-24 15:30 ` Create a complete/huge dictionary for aspell Hongyi Zhao
2021-07-24 16:47 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-25 2:57 ` Hongyi Zhao
2021-07-25 15:36 ` Hongyi Zhao
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.