Synonym or Grammar Checker ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Deseree
Forum Commoner
Posts: 84
Joined: Mon Feb 13, 2006 11:35 pm

Synonym or Grammar Checker ?

Post by Deseree »

Hi,
I am handy with php preg_exp, but I need a little bit of guidance on this script I am creating.

I need a script to , where the user puts in a sentance, and it checks for synyoms and grammar, spelling, etc.. Same for paragraphs but that is no more difficult.

How would I do that? I would guess I would use a for loop and need a database of synonyms and do a if check statment on each word in the sentance and see if there are any synynms? anybody know where I can get a global synonym database or dictionary/ thesource for this script I am writing?

I appreciated any help very much.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Grammar will be a bit more difficult, as that is far more complicated. Synonyms aren't so hard, as you could do a thesaurus lookup on say dictionary.com (get their permission first)
Deseree
Forum Commoner
Posts: 84
Joined: Mon Feb 13, 2006 11:35 pm

Post by Deseree »

thesource lookup on dictionary.com is out of the question, i doubt they will allow it plus their service is SO incredibly slow, i'd like to offer something more ORIGINAL rather than "scraping" someone else's service, if you can understand that.....

Any other ideas? Like is there a open source or GPL licensed datbase of terms / nouns / verbs / adj / adv / pronouns and synonyms I can get? There has to be i just don't know where to look, then I would have to think how would one parse a 10 word sentance and check each word against those synonyms....
tomfra
Forum Contributor
Posts: 126
Joined: Wed Jun 23, 2004 12:56 pm
Location: Prague, Czech Republic

Post by tomfra »

Deseree,

Take a look at Wordnet: http://wordnet.princeton.edu , it may help you although I am not sure if it has a list of synonyms.
I would have to think how would one parse a 10 word sentance and check each word against those synonyms
Simply use something like $text_array = explode(" ", $string); , then check each of the individual words in the array against a list of synonyms. That should be fairly simple once you actually have the list of synonyms...

Tomas
Post Reply