• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP spell checker

rdegler

Member
Anyone have a very simple example of how to set up a spell check in php?

I am looking for something very simple just to get a feel for how the process works.

roy
 
Using the pspell library or...?

The way I'd do it is setup a MySQL database, with a `words` table, and parse out a freely available dictionary online ( project gutenburg ) and compare each word to that...

More details might help... what exactly are you trying to do / spellcheck / with what library / etc.?
 
I have tried aspell and pspell in php but it is apprently not installed.

I downloaded a program from sourceforge (http://spellerpages.sourceforge.net/) and it works great. It executes a command line to preform the task. Most of the code is a little over my head.

But this works OK.

All I want to do is check words in a textbox and respond with a line like Google uses Did you mean ...
with suggested spellings.

It would be great at this time to be able to do something like this


***Psuedo code ***

$word = "tesst"; /or get contents of text box
$cmd = "aspell suggest $word";

$suggestion= exec ($cmd);

if ($suggestion is not blank){
echo "Did you mean $suggestion";
}

roy

 
Back
Top