Spellchecker Woes...

Spellchecker Woes...

Nosūtīja Steve Sharrad
Atbilžu skaits: 13

Dear all,

Anyone got the spellchecker function in the HTMLAREA to work?

The spellchecker button appears in the editor, but when a user clicks it the spell-checker window appears and then quickly says "Couldn't create handle!"

We've installed aspell 0.50 + en dictionary in C:\ASPELL, and have added C:\ASPELL;C:\ASPELL\BIN to the system path. We've also added

$CFG->aspellpath = '"c:\aspell\bin\aspell.exe"';

to CONFIG.PHP - and have tried variants of quotes and not putting the .EXE extension etc..

We're running PHP 4.3.7 under IIS on W2K3. We've also checked filesystem permissions etc., but the spellchecker.php file doesn't seem to be running aspell at all. Is there any way of tracing this?

Any ideas would be greatly appreciated!

Many thanks,

Moby & team.

P.S. We have also installed Perl on the server... not sure if it is needed, though.

Vidējais novērtējums: -
Atbildot uz Steve Sharrad

Re: Spellchecker Woes...

Nosūtīja Marcus Green
Core developers attēls Particularly helpful Moodlers attēls Plugin developers attēls Testers attēls
Does aspell work from the command line?
Atbildot uz Marcus Green

Re: Spellchecker Woes...

Nosūtīja Steve Sharrad

Hi,

Thanks for your reply.... Yup, it works from the command line from any directory.

aspell dump dicts shows

en

en_CA

en_CA - w-accents

en_GB

en_GB - w-accents

en_US

en_US - w-accents

Any more ideas? It's baffling us!

Thanks,

Moby.

Atbildot uz Steve Sharrad

Re: Spellchecker Woes...

Nosūtīja Janne Mikkonen
Are there any restricted functions in your php configuration?
It uses popen -function to find out what dictionaries are installed on your server.

"Couldn't create handle" tells us that popen -function couldn't create handle where to read data from.

- Janne -
Atbildot uz Janne Mikkonen

Re: Spellchecker Woes...

Nosūtīja Steve Sharrad

Hi Janne,

The problem is solved! Under Windows 2003 & IIS, the file CMD.EXE must have explicit permissions for the IIS user accounts to access.

Regards,

Stephen

Atbildot uz Janne Mikkonen

Re: Spellchecker Woes...

Nosūtīja Steve Sharrad

Hi Janne,

The problem is solved! Under Windows 2003 & IIS, the file CMD.EXE must have explicit permissions for the IIS user accounts to access.

Thanks for your help & best regards,

Stephen

Atbildot uz Steve Sharrad

Re: Spellchecker Woes...

Nosūtīja Janne Mikkonen
Hi Stephen

That's not really "good" news bēdīgs I don't mean that you get it working but you had to give permissions to IIS user account to execute cmd.

- Janne -
Atbildot uz Janne Mikkonen

Re: Spellchecker Woes...

Nosūtīja Ludo (Marc Alier)

Hi folks,

now is necessary either in unix or windows that the user have the rigth to execute command line instructions. Whe nmy workload stabilizes i'll try to program a php library that skips the command line issue (Janne and I allready discused this two months ago). But it will take some time. I hote to get it ready after xmas.confuso

Cheers

Marc

Atbildot uz Ludo (Marc Alier)

Re: Spellchecker Woes...

Nosūtīja Janne Mikkonen
Hi Marc

I had a look at this last night and played around with pspell and we're in little trouble with it.

The nastiness is about the xhtml coding that is included, when spell-check been ran. There aren't any options that'd exclude xhtml coding from the text  about to be checked, so it makes things a little bit harder.

- Janne -
Atbildot uz Janne Mikkonen

Re: Spellchecker Woes...

Nosūtīja Ludo (Marc Alier)

Hi Janne,

I haven't experimented with phpspell yet but I havce some ideas that migth be usefull. But it takes a litle experimentation to validate it.

  • I think aspell has a command line option to exclude xhtml and html tags. Can we use it using the phspell conduit?
  • If it does not work we could add most of the xhtml tags to the dictionary. Is not a perfect solution but it shoult help a litle.
  • We could use a html/xhtml parser to sweep the document and feed to the aspell engine only with the valid text.. then we should figure out a way to recompose the document in the original XHTML format.

Finally there's a mad idea I had that could be usefull, fasten your seat belt. Convert the aspell service into a web service.... tachan !!!payaso

The idea consist in programming a simple php script that recieves the text as an http parameter, then runs the aspell engine in the way we do now... with all the privileges needed and so on. Then return result as the http response. Its simple to develop. But where is the gain in it ?

* If you have no privileges in you server, you can allways install only aspell and the web service in a workstation (linux or windoes) where you have no problems  with your systems admin and security... Since it has no critical data, and its only a service it shoul be a solution.

* An open aspell web service could be setted up as a foundation, accessed for free or paying a small fee for the moodle servers.

What do you think about it?

Cheers

Marc

Atbildot uz Ludo (Marc Alier)

Re: Spellchecker Woes...

Nosūtīja Janne Mikkonen
Hi Marc,

Mad ideas are usually "great" ideas approve. Nothing new doesn't get developed if people do not have "mad" ideas. Spelling as a web service is atleast worth of considering and maybe included as an extra option.

- Aspell does have commandline option that excludes the tagging from spelled text, but php's pspell does not.

I think the third option would be the best one, but can we produce it in a manner that doesn't mess up the original tagging?

I do not promise that I have much time to play around with this, but I'll try to keep a sharp eye on it.

Cheers,
Janne
Atbildot uz Janne Mikkonen

Re: Spellchecker Woes...

Nosūtīja Ludo (Marc Alier)

Hi Janne and others,

I've been playing arround a litle more with aspell. Its possible tot set up a configuration file (actived with an environment variable), so maybe the "html" or "sgml" option could be setted by default and used with pspell.

Anyway I'ms seriously studying the idea of programming a aspell web-service to be called from the spellerpages server-script. It would be very usefull not only for the moodle aplication, but for all the web based aplications that we run in our university, and very easy to integrate in standard html forms. In fact to integrate the speller pages engine with the html editor was really painfull. ;)

To play a litle with the web services architecture will be a good experience. I'm designing a wiki based elearning content authoring tool, wich I plan to fully integrate with moodle. Adn web-services seems to be a very good content delivery architecture.

I'll keep you posted.

Marc

Atbildot uz Ludo (Marc Alier)

Re: Spellchecker Woes...

Nosūtīja Anthony Borrow
Core developers attēls Plugin developers attēls Testers attēls
I am working on migrating my Moodle site from W2K to W23 and would very much like to continue to provide spell checking for our students. Any progress on getting Aspell working as a service?