Forum OpenACS Development: Spell checking

Collapse
Posted by Malte Sussdorff on
We started to to delve into the possibilities for developing nsspell. It will be an aolserver module that uses the threadsafe aspell Library to actually do the grunt work. Björn Kiesbye, who also has written the nsjabber module as well as the libtgdchart module will take on this effort.

In contrast to the previous work, where we added a reasonable TCL API to the module itself for OpenACS in a package, I would call for volunteers to take up the effort this time. Roberto's statement in the thread https://openacs.org/forums/message-view?message_id=112286 made me confident that this will happen.

No timeline can be given at this early stage, just wanted to let you know about it. We will post more details and ideas here.

To give you an idea about the scope how far we are willing to go at this stage: Provide a procedure in nsspell that takes some text, the language and return a corrected version in HTML for display (with corrected items marked yellow and uncorrectable ones in red).

As always, if someone wants to help us in our efforts (both coding as well as financially wise), you are most welcome to jump on board. Once we collected some more ideas I hope to get a spell checking RFC out into the open.

Collapse
2: Re: Spell checking (response to 1)
Posted by Ola Hansson on
You may not know this, but we have been developing a spellchecker for OpenACS that uses Aspell/Ispell as its backend and that is implemented as a datatype/widget combination in the templating system. Thus it can be used either from form builder proper or from its wrapper, ad_form. Our implementation (based on the old aD tool by Jin Choi and Eve Anderson) has dropdown boxes so that you may choose the correct replacement word ...

Here's a demo showing it in its current status:
http://oacs4.polyxena.net/spellchecker/

We are currently seeking funding to finish up this product as you can see in this thread:
https://openacs.org/forums/message-view?message_id=113215

/Ola

Collapse
3: Re: Spell checking (response to 2)
Posted by Steve Manning on
Ola

I just tried your demo and I must say its awesome.

One question - I notice your demo is running an American English dictionary (color not colour). Can this be configured directly to pick up its dictionary from whatever dictionaries iSpell has available?

I suppose a fully i18n OACS would allow the user to specify their language in their profile. Alternatively perhaps the dictionaries could be chosen from the Spellcheck/Don't spellcheck dropdown.

    - Steve

Collapse
4: Re: Spell checking (response to 1)
Posted by Ola Hansson on
Hi Steve,

Yes, something like that is the idea. Currently, there's a param in acs-templating where you may set the (default) site-wide spell-check language, but this only works with Aspell (which is much preferred to Ispell anyway, IMHO). In ispell you'll need to manually switch to the proper dictionary if I recall correctly. But (as I suggested to Malte in private) I think it might be wiser to put that parameter under acs-subsite instead in order to get finer-grained control ...

What you're suggesting was just what I had in mind - to put the available languages/dialects in the spellcheck dropdown below "do not spellcheck".

Perhaps the personalisation (with an s and not a z, since I believe I'm talking to an Englishman 😊 of the dictionary setting should wait till the toolkit has adopted a general solution for personal preferences. There's "user-preferences" which may or may not work and which hasn't been ported to PostgreSQL yet ... but I also think Collaboraid has some ideas for a more unified solution to *parameters* in whatever level.

/Ola

Collapse
5: Re: Spell checking (response to 4)
Posted by Steve Manning on
<blockquote>Perhaps the personalisation (with an s and not a z, since I believe I'm talking to an Englishman 😊
</blockquote>

Yup your right but don't tell anyone 'cos  I think we're out numbered these days (or is that dayz) :o)

    Steve

Collapse
6: Re: Spell checking (response to 1)
Posted by Malte Sussdorff on
In addition to the things mentioned above, I'd like to extend ideas on how to use spell checking effectively.

- You should be able to spell check and correct a whole document at once (done)
- You should be able to choose the language you want to spellcheck (done)
- You should be able to add words to your private spellchecking dictionary (for each particular language)
- A better solution needs to be found for words that you misspelled and don't show up in the dictionary. Currently the back button is your friend :).
- Instead of using the confirmation page for displaying the result of a spell check, you should only be redirected to a confirmation page if the result of the spell check returns an error.  The use of a central page for this would hopefully lower integration work in other packages than forums.
- You might think of having community based dictionaries as well. This e.g. could be extremly useful for acronyms used within an organization or if you talk in a community specific language (due to job requirements or just for fun).
- Integration of other dictionaries but aspell
- Integration with a translation service. What I have in mind is the following. You should be able to set your native tongue (somewhere in the system). Due to the fact that you do spell checking, the system can detect which language your text is. Now, if it does not recognize a word, offer the corrections as well as possible translations from your mother tongue. This would allow me to write "if you want to übersetzen your text, please hit bestätigen", and I would get the two german words offered as translations (translate and confirm).