Forum OpenACS Q&A: Re: Spell-checker for 5.0 delivered

Collapse
Posted by Ola Hansson on
Thank you all for the feedback! Let's implement whatever good ideas come out of this discussion. Having it work satisfactorily for the majority of the community-members is the main thing, as always.

Til,

I have changed the param to "textarea 0 richtext 0", like Peter and you (and I) suggested.

The idea of drop-down boxes was actually Jin Choi's, way back then, not mine!

I, too, am leaning towards choosing dictionary according to the user's locale. The problem with that is just how to establish which dictionaries are installed, and making it work for aspell and ispell (and perhaps other spelling tools as well) ... OTOH, just because the user's locale is "semaphore" doesn't always exclude that the language you are posting in is "gibberish", if you know what I mean.
At any rate, if we implement the above it is probably a good idea to change the radio buttons to a drop-down instead, where you may choose "Don't spell-check", "Italian", "French", etc.

The spell-check feature should be documented somewhere of course, perhaps in the section about the templating system. Still, I think the idea is very good, to check for the availability of the binaries instead of showing an error page in case they are nowhere to be found. Putting a call to "which aspell" - which, if it returns nothing, is followed by the second best option "which ispell" - could be done in the init file of acs-templating, no?. In case that doesn't yield any result ... we will simply give up ...

I will look into the other issues that you mention, also.

Malte,

The spell-checkers (aspell/ispell) keep track of two types of unrecognized words, "nearmiss" and "miss". Near misses will yield a select box with suggested words and a miss will output a text field with the unrecognized word as the default value. BTW, there is a (currently unused) feature to make use of "local" dictionaries where you may teach aspell new words, or just manually expand the vocabulary to make it fit a particular community, for instance ... These features are simply not implemented yet.

As far as language choices, as I said above I like the idea of drop-downs, given that it is possible to ask the system which dictionaries are available on the server. I wonder if that is possible somehow.

The support for multiple languages for a given widget (from the supported ones, of course) is there, but I'm not really sure I understand your question.

Anyway, it would probably be quite simple to replace the call to the proc that is currently responsible for the errword replacement, or to replace the shell script which is used to make the call to the aspell/ispell binary with your ns_aspell whenever we want. It might very well be the preferred approach for all I know. Is it finished yet?

/Ola