Results 1 to 5 of 5
Thread: spell checker
Apr 22, 2014, 07:04 #1
Since google spell checker API is closed I tried this: https://github.com/AlphawolfWMP/google-spell-pspell
and got this:
Warning: pspell_new_config() [function.pspell-new-config]: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en".
How can I use that class?
Apr 25, 2014, 16:51 #2
Apr 25, 2014, 17:24 #3
How this should be? like below?
require_once('spell-check-library.php'); $content = ""; $options = array( "lang" => 'en', "maxSuggestions" => 10, "customDict" => 0, "charset" => 'utf-8' ); $pspell_config = pspell_config_create("en"); $pspell_link = pspell_new_config($pspell_config); $factory = new SpellChecker($options); $spell = $factory->create(trim($_GET['message'])); header('Content-Type: text/xml; charset=UTF-8'); echo $spell->toXML();
Apr 27, 2014, 11:11 #4
I found the exact error in http://www.php.net/manual/en/ref.pspell.php
Add following lines prior to calling pspell_check:
$pspell_config = pspell_config_create("en");
$pspell_link = pspell_new_config($pspell_config);
Apr 27, 2014, 11:49 #5
The code you gave is for when we want to use pspell extensions directly but the code i gave is for a particular class file with different structure so that code in php doc is irrelevant for my problem. Pleade look further and help.