Re: POW: Get ispell working


Subject: Re: POW: Get ispell working
From: Thomas Fletcher (thomasf@qnx.com)
Date: Tue Apr 24 2001 - 07:33:13 CDT


On Mon, 23 Apr 2001, Dom Lachowicz wrote:

> I have this feeling that no one cares about Applix, but in case this
> interests someone, here's another suggested POW:
>
> The next release of AbiWord is *not* getting released until ispell support
> works at least as well as it did before. Preferably, we'd like it to work as
> well as the pspell class.
>
> So the important question is "what needs to be done?"
>
> Well, as it stands, ispell is a horrible mess. It utilizes some 20-30 global
> variables and has a bunch of functions that take very few arguments.
>
> So, what to do? Well, if you look at ispell_checker.cpp, you'll see a
> section called "reduced globals." What you'll want to do is turn this into a
> struct probably containing all of those global vars. You'll then want an
> instance of this Ispell_var_t struct in your ISpellChecker class.
>
> Now, ispell defines an interface of about 10 or so functions that utilize
> these variables. We'll want to:
>
> 1) rename *.c -> *.cpp
> 2) Pass an instance of this Ispell_var_t from our ISpellChecker class to
> each one of these functions (they can remain functions, there's no need to
> make them into a class, unless you're feeling really ambitious).
>
> So, now we have a stateful version of ispell. This is a GOOD THING (tm).
>
> Now, the final bit is to map our language tags to ispell dictionaries. So
> "en-US" -> AbiSuiteLibDir->dictionary/american.hash, "de-DE"-> german.hash,
> etc... you should be able to do with a lookup table here. These path names
> get passed to the linit() function, which loads the ispell hash file into
> memory.
>
> That should just about do it. Then ispell *should* work just about as well
> as pspell, at least for our purposes. It's not conceptuall hard, just a bit
> of work.
>
> Good luck! Please someone ZAP this ASAP!!!

I'm willing to investigate some more into ispell to get
it working in some semblance of reasonability. However if
I'm going to bother going this "deep" into ispell, I would
also like to take a crack at other known issues with it ...
that have been killing us, such as the differences between
7 and 8 bit dictionaries and possible endianness issues.

Now I haven't actually been paying all that close attention
to the ispell problems, so if people wouldn't mind "chiming
in" with their issues it would be greatly appreciated.

Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 2b25 : Tue Apr 24 2001 - 07:32:48 CDT