...

View Full Version : PHP Grammar Checker



npage85
03-25-2010, 06:26 PM
Does anyone know where I can find some code for a web-based English grammar checker?

I need it to be able to run while a PHP script is running, so it should be PHP as well. I could always do some crazy AJAX, so it would be okay for it to be Javascript, Java, or anything else... as long as I can dynamically check sentences for grammar *as* the PHP script is running (I'll be doing some output buffer flushes while the script is running).

Any help would be appreciated. I've searched and searched, but couldn't find anything like that anywhere. Oh, and I am *not* about to code something like that from scratch... that would be crazy.

met
03-25-2010, 08:04 PM
I need it to be able to run while a PHP script is running


explain this further please.

If you want to spell check as you type, this is an AJAX related matter.

If you want to submit, say, an article, have the article parsed through a spell checker, and the results returned, then this can be achieved.

to my knowledge you cannot "spellcheck" a php script as it's being parsed ~ why would you want to?

or perhaps i misunderstand

MattF
03-25-2010, 08:11 PM
If you want to spell check as you type, this is an AJAX related matter.

Unless he worded his original post poorly, he's wanting to check for grammatical correctness, not spelling per se. As far as I know, there is no feasible way to check for correct grammar?

thesavior
03-25-2010, 08:26 PM
The only way I know to check for grammar is to use the Backus–Naur Form. You can read about it here http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form

met
03-25-2010, 08:32 PM
Unless he worded his original post poorly, he's wanting to check for grammatical correctness, not spelling per se. As far as I know, there is no feasible way to check for correct grammar?

ah yes upon re-reading the post is worded fine.

I just can't differentiate between grammar and spelling. well done me.:rolleyes:

npage85
03-25-2010, 09:16 PM
Thanks for all your replies everyone.

I checked out that Wikipedia article, and I understand the process, but would I have to use that technique to code my own PHP Grammar check?

And... is there a Backus–Naur Form for English?

Also, I noticed a few programs at the bottom of the Wiki page, some of them I recognized from my fruitless searches. It seems like most of them just build BNFs, not check strings of text for grammar errors.

So, is there a program in that list that does check English grammar, and would I just have to move it over to PHP?

Besitypanacea
03-14-2015, 10:12 AM
I can direct you to the best place I know, PHP: pspell_new_personal - Manual (http://php.net/manual/en/function.pspell-new-personal.php)

and this one too: PHP: Pspell Functions - Manual (http://php.net/manual/en/ref.pspell.php)

But for more let me send you an email upclose and personal



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum