Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Grammar Checker

    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.

  • #2
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    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

  • #3
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Quote Originally Posted by met View Post
    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?

  • #4
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    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

  • #5
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    Quote Originally Posted by MattF View Post
    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.

  • #6
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •