[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspell-devel] remove from word lists
From: |
Kevin Atkinson |
Subject: |
Re: [aspell-devel] remove from word lists |
Date: |
Sun, 20 Feb 2005 14:32:16 -0700 (MST) |
On Sat, 19 Feb 2005, Jose Da Silva wrote:
> On Wednesday 16 February 2005 02:48 pm, Kevin Atkinson wrote:
> > On Wed, 16 Feb 2005, Anton Leuski wrote:
> > > I guess it's not possible to remove words from the personal and session
> > > word lists, right? When I try the remove method on a personal word
> > > list from a Speller instance it comes back with
> > >
> > > The method "remove" is unimplemented in "WritableDict"
> > >
> > > Or am I missing something? Can you give me any advice on how implement
> > > the remove method? Or (even better :-)) when is it going to implemented
> > > in the main code base?
> >
> > The problem is that when Aspell "saves" a personal word list it doesn't
> > really "save" it. Instead it merges the in-memory word list with the one
> > saved to disk. That is before saving it reread the on-disk word list and
> > than add any new words found to the in-memory word list. I do this
> > avoid the problem of multiple Aspell processes, running at the same
> > time, clobbering each others changes. This means that deleting a word
> > from on in-memory word list will have no effect if word is also in the
> > on-disk word list. A truly correct solution to this problem will be
> > rather complicated. I am willing to accept a simpler, yet not 100%
> > correct, solution but I have not got around to implementing it.
>
> After reading through this, it makes more sense what's happening within
> Aspell, but looking at Aspell, it does appear like one huge ball of tangled
> yarn, so it is fairly difficult to find a place to start without unravelling
> a bunch of other items.
All the code should be self contained in
modules/speller/default/writable.cpp.
> Word hashing seems to have advantages, such as fewer words to search through,
> probably a smaller memory footprint, but somehow it would seem worthwhile to
> have word "ownership" thrown into the hash so you know where what word came
> from.
Your idea makes no sense. Just how the devil do you define ownership
when multiple Aspell processes are running and how to store that
information in the personal dictionaries file. What happens when the
Aspell processes finishes. Than what happens to the ownership of words
for the processes? Also please, in a few sentences, describe how it will
solve the problem at hand.
--
http://kevin.atkinson.dhs.org