[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Aspell-user] Aspell uses a common English user dictionary for AE an
Florian v. Savigny
Re: [Aspell-user] Aspell uses a common English user dictionary for AE and BE
Mon, 19 May 2008 18:09:06 +0200
> Date: Sat, 17 May 2008 18:29:12 -0600 (MDT)
> From: Kevin Atkinson <address@hidden>
> One think you can do is to explicitly set the personal or "-p"
> config option. Like so aspell -d british -p .aspell.en_GB.pws
Thanks very much; that does the trick. For doing this from Emacs, I
have hacked together an ispell-change-dictionary alternative (with a
different name so you can still use the original one for finding out
the current dictionary). It's appended below, just in case anyone else
would like to do this.
> Unfortunately this is a design choice I made that is not easy to
> fix. Arguments can be made either way. The basic problem is that
> while "british" and "american" are separate dictionaries they are
> technically the same language "en" as seen by Aspell and personal
> dictionaries names are based on language, not the dictionary.
I am not sure if I understand the design entirely (I suppose the -
reasonable - assumption is that people use only one variant of a
language; hence one personal dictionary should do), but I have noted
that for the spellings it provides, aspell uses a large common English
dictionary combined with small, additional dictionaries for British,
American etc. (and similar for other languages). I think this is a
very sensible idea.
For people who have to deal with several varieties of a language, it
would of course be ideal to mirror this kind of structure in the
personal dictionaries (this would, however, require that the user be
asked to which personal dict to save each inserted word - the general
or the variety one (e.g. common English or, say British English). I
guess this is the problem in deciding against that).
As I am working on a script to share personal dictionaries among
several applications (among which figures, I admit, MS W**d), this is
not a problem, because such a structure can be used "centrally", and
the step of separating common from local spellings can be done later
Thanks a lot,
;; I'm not quite sure here why ispell-local-pdict, which should be
;; buffer-local, survives to other buffers. But as this is actually
;; the desired behaviour, there's no need to examine ...
(defun ispell-change-dicts (dict)
"Change the ispell dictionary, but also the personal dictionary."
(completing-read "Change ispell general and personal dict to: "
'(("british" . t)
("american" . t)
("deutsch" . t)))))
(cdr (assoc dict '(("british" . "~/.aspell.en_GB.pws")
("american" . "~/.aspell.en_US.pws")
("deutsch" . "~/.aspell.de.pws"))))))