Page 1 of 1

Synonym or Grammar Checker ?

Posted: Mon Feb 13, 2006 11:40 pm
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.

Posted: Mon Feb 13, 2006 11:57 pm
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)

Posted: Tue Feb 14, 2006 12:38 am
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....

Posted: Fri Sep 29, 2006 2:56 pm
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