Re: pspell dictionary issue
| From: | John Nichel | Date: | Tue, 20 Dec 2005 14:28:13 +0000 |
| Subject: | Re: pspell dictionary issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227716@lists.php.net to get a copy of this message | ||
Adi wrote:
I am having a problem switching dictionaries from 'american', 'british' and 'canadian' English in pspell. Pspell seems to test everything against the american dictionary for some reason. I tested aspell on command line and worked fine if I supplied the dictionary I wanted to use with the –d option. Below is some basic code I used to test this in php: <?php $string = "color"; $pspell_link = pspell_new("en", "canadian"); if (!pspell_check($pspell_link, $string)) { $suggestions = pspell_suggest($pspell_link, $string); foreach ($suggestions as $suggestion) {I had a problem similiar to this a couple of years ago; don't know if this will help, but.... How is your version of php installed (from source, RPM, another package?) If you installed php/aspell from source, check to see if your system also has aspell installed as an RPM (or other package). -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 jnichel@dotcomholdingsofbuffalo.comecho "Possible spelling: $suggestion<br />";} } else { echo "All good"; } ?> The output was "All good" instead of a list of suggestions. Also, when I tested the string "colour" with pspell_new("en", "american"); pspell accepted the spelling…aspell on the other hand worked as expected in shell. Any suggestions would be much appreciated.