I want to create a spell-checker and being unfamiliar with the pspell functionality, I threw together a tester snippet:
Code: Select all
<?
$pspell_link = pspell_new("en");
$testWord = 'test';
$html = 'testing... '.$testWord.'<br>';
$pslStatus = ( $pspell_link ? 'good to go' : 'you no spell' );
if(pspell_check($pspell_link, $testWord))
{ $html .= "This is a valid spelling"; }
else { $html .= "Sorry, wrong spelling"; }
?>
<?=$pslStatus?>
<br>
<?=$html?>Code: Select all
$pspell_link = pspell_new("en");Code: Select all
$pspell_link = pspell_new("xx");This makes me think that the code is fine, that the “en” dictionary exists and that the problem is permissions related. I contacted my hoster and was informed:Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any suitable word lists for the language-tag "xx".
Can anyone give me insight to whether this response is valid or where I should go from here? Also, is it possible to get the built English dictionary so that I can test this locally?I am sorry but seems that is unresolved issue for PHP and pspell binding... I am not sure that we can help you atm.
Thank for reading.