RE: Proposed POW: Integrate Pspell


Subject: RE: Proposed POW: Integrate Pspell
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sun Sep 17 2000 - 17:42:11 CDT


On Sun, 17 Sep 2000, WJCarpenter wrote:

> dom> What would Pspell give us? Well, we'd have a better spell-checker
> dom> than MSWord for starters. Also, we'd be able to shed our Ispell
> dom> problems for good. However with Pspell, we encounter a new set of
> dom> problems, the largest being that Pspell/Aspell isn't known to
> dom> work on all of Abiword's supported platforms.
>
> In case anyone is considering taking this on, let me editorialize a
> bit to provide some background. This is just additional info and not
> a disagreement with anything said so far.
>
> I don't think there is much of a problem in the interfaces between
> Ispell and AbiWord. It's really just a few function calls. Sure,
> spell checking is scattered all over the countryside in the AbiWord
> source code, but the actual calls to functions provided by the
> embedded Ispell library are few and fairly isolated.
>
> So, as far as I can read the tea leaves, this POW is mostly an
> integration job that will result in few changes to the mainline
> AbiWord code. The job is to replace Ispell with Aspell, and the
> consensus way to do that is via the Pspell stuff.

Absolutely! Here is a private email I sent to Kevin, Heinrik and James
Brown last night. With a a few more pointers.

HI Kevin,
        I've been thinking about this. Since neither Pspell or Aspell are
cross platform at this stage AND that ispell appears to work for Windows I
was think that we should make spelling platform dependent. ie We should
sub-class the spelling code via virtual functions the same we we do the
Gui's and event code. This can then be a two step process. First we sub
class the spelling code with identical implementations on all platforms.
Then we replace ispell on Unix with Aspell or PSpell. Which should it be
Kevin?

Specifically all we have to do is make "SpellCheckNWord16" a virtual
function. This is called 3 times in abi/src/text/fmt/xp/fl_BlockLayout.cpp
and once in abi/src/wp/ap/xp/ap_Dialog_Spell.cpp. This is a function
within Abi's hacked ispell which is located in abi/src/other/spell. The
calling sequence is really simple:

SpellCheckNWord16(theWord, wordLength)

where theWord is a UT_UCSChar (wide char) array amd wordlength is the
length of the word. It returns true or false (1 or 0).

To try Kevins spell checking code in Linux at first we simply need to add
his code to the tree (maybe abi/src/other/Pspell?) and change these 4
calls to suit his code.

Is that enough for you to get started Kevin?

Cheers

Martin



This archive was generated by hypermail 2b25 : Sun Sep 17 2000 - 17:42:25 CDT