I'm working on adding spell check functionality to form input, and so far I can successfully get aspell to return a list of mispelled words. The problem is, I'm using aspell on the command line via exec() and I can't find a way to also return a list of suggested words. I can proceed once I can get aspell to output these suggestions to standard output. (My server won't set up with PHP --aspell). The only lead I have is the aspell -a option, which allows you to enter words and have suggested words returned on one line, but the program doesn't exit so I'm unable to capture the output. Sample code below:
This works fine:
exec('aspell -l -c < bad.txt',$capture);
This is where I'm stuck:
exec('aspell -a'); // opens the aspell program, doesn't seem to take parameters
Thanks in advance for any suggestions !
Best,
Dustin