Exorcising KSpell

Zack Rusin zack at kde.org
Mon Feb 2 03:26:01 GMT 2004


Ave,

after almost 7 years it's time to replace kspell. We had and still have 
a lot of problems with the current implementation. The asynchronous 
nature of the library and the fact that binaries (ispell/aspell/hspell) 
it uses often have different options makes it almost unmaintainable. 
Those problems apply both to kspell and kospell. 

Currently the best replacement option is kspell2. It's a completely new 
library addressing all issues we had with kspell and kospell.
1) It's synchronous - no more guessing whether the process hangs, 
whether we fed too much to it or whether something broke - you get 
results instantaneously.
2) Multiple dictionaries per document - you can spell check a document 
in multiple languages. Will be incredibly useful in KMail, where email 
can be in part in a few languages.
3) Everything is in process - kspell2 doesn't use any binaries or 
kprocio. You need either aspell-devel package or just ispell 
dictionaries.
4) It's plugin based instead of being monolithic - currently aspell and 
ispell plugins are there. hspell and myspell will be added. 
5) Text feed is filtered - there were many problem with spell checking 
html or tex document. KSpell2 introduces concept of filters which you 
pass to the spell checking dialog. Filters deal with the buffer and 
give the spell checker words to spellcheck. So now we can easily add a 
spell checker to Kate that would check only the actual strings instead 
of the code.

As far as the library we'd have to figure out how to and where to move 
this stuff. KSpell needs to be kept as long as we're having bc, kspell2 
lives in a namespace so it can safely live along kspell. (btw kspell2 
is in kdenonbeta/kspell ). The following files don't use _any_ gui 
classes:
kspell_broker.[h,cpp] , kspell_client.[h,cpp], kspell_dictionary.
[h,cpp], kspell_config.[h,cpp], kspell_filter.[h,cpp]. Then there are 
two plugins and kspell_dialog.[h,cpp]. 

I'd like to start switching with koffice because David is assigning some 
of its bugs to me and I don't drink so they get me close to crying 
every single time. 

Besides come on, don't you wanna have the on-fly spell checking working 
correctly/reliably for a change?

Zack

-- 
If money is the root of all evil, why do churches want it so badly?




More information about the kde-core-devel mailing list