On Fri, Jan 26, 2007 at 01:46:34PM +0100, Thijs Kinkhorst wrote:
> Hi Rafael,
>
> On Tue, 2007-01-23 at 19:42 +0100, Rafael Laboissiere wrote:
> > The information you are looking for is in
> > /var/cache/dictionaries-common/ispell.db. This file contains Perl code and
> > the hash name can be easily extract like this (try the following in bash):
> >
> > perl -e '$name = "francais Hydro-Quebec (French Hydro-Quebec)"; \
> > do "/var/cache/dictionaries-common/ispell.db"; \
> > print ($dictionaries{$name}->{"hash-name"}, "\n")'
>
> It was suggested to me originally by the dictionaries-common maintainers
> that I use the ispell-dicts-list.txt file.
Those are Rafael and me. IIRC that file contains exactly what was asked for,
the identifiers for each dict in the same format as ispell-default, I do not
remember any of us suggested that any part of that entries directly provide
the hash name. I am afraid there was a misunderstanding here.
> And I'd prefer to continue using it too, because calling perl in a shell
> is something I'd like to avoid, since it has the potential of breaking
> and the extra forking needed on squirrelspell invocation might not be
> appreciated by large-scalle installs.
There were no changes in this code since just before sarge was released. So,
I am surprised that nobody has complained about this before. I have tried
using ispell-wrapper directly under emacs and the double pipe works as
expected, so I think is the easiest way to go, after selected spellchecker
using either
aspell -d xx_XX
or
ispell-wrapper --language=the_full_entry_from_ispell-dicts-list.txt
with parenthesis escaped in the_full_entry_from_ispell-dicts-list.txt. I
have been playing with the perl snippet
$entry =~ s/([^\\]|^)(\(|\))/$1\\$2/g;
to do this, only if not previously escaped. I will eventually add this to
ispell-wrapper, but we are too close to lenny (I hope).
While ispell-wrapper is a perl script, it should put little load on your
system, it calls ispell through exec and ends early.
> What does the first field in the .txt file mean?
Nothing, there is no first field, each line is a full field by itself.
--
Agustin
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]