aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aspell-devel] remove from word lists


From: Jose Da Silva
Subject: Re: [aspell-devel] remove from word lists
Date: Sun, 20 Feb 2005 18:37:27 -0800
User-agent: KMail/1.6.1

On Sunday 20 February 2005 01:32 pm, Kevin Atkinson wrote:
> 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.

You would not want to store such information in the files themselves, but you 
already have knowledge of ownership there, such as:
address@hidden ls -l *
-rw-r--r--  1 root root 91 Sep 17 18:56 mainfile.txt
-rw-rw-r--  1 user1 user1 84 Sep 17 17:14 user1personalfile.txt
-rw----r--  1 user2 user2 91 Jan 26 05:44 user2personalfile.txt

...similarly speaking, same idea with windows NT and higher which is also 
supposed to lock-down files according to users and user accessibility rules.

the processes running already know it's rights since they have a process 
number and ownership.

> What happens when the Aspell processes finishes.

I suppose the same as before.
The idea still needs work.

> Than what happens to the ownership of words for the processes?

That would depend on who owns the file and what were the plans. If root owns 
it, you shouldn't be able to modify the file unless you got permission to 
modify it. If it is a personal file, you should or shouldn't be able to 
remove it unless the user set the permissions.

> Also please, in a few sentences, describe how it will  
> solve the problem at hand.

If you are asking for an overnight solution, to fix the problem at hand, 
there is none yet. There is no patch. Nothing written. Nada. Zippo. Zero.

Right now, as you described above, you don't/can't remove a word because you 
have no idea where a word came from because everything got hashed into one 
big list.
If you knew which file the word originated from, would you be closer to the 
possiblilty of being able to remove a word from a list?
If you knew which file a word came from, would you know if you have access 
rights to remove a word?
If you knew which file a word came from, would you know which language rules 
to apply if you are spell checking a document in say... german, french, or 
what ever other language you chose to spell check with?

I was suggesting an idea. It's probably only a premature idea. Needs more 
thought and don't know what pitfalls would be ahead. However if it looks 
like a worthwhile idea, then it could be planned better.

This would be the reason for [aspell-devel]?  a place to toss some ideas? :-/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]