开发者

php script to find synonyms

Im writing a php script to compare the similarity of 2 strings. This works pretty good at the moment, but what I would like to do 开发者_开发问答is match words when one is a synonym of the first.

Any thoughts?


You might want to try looking for a thesaurus service that allows you to query the synonyms for a word and have it return an XML list of synonyms.

Here is something to look at: http://nbii-thesaurus.ornl.gov/thesaurus/


I don't know if this would be helpful for you but time ago I have been working on a PHP (CodeIgniter) library for Google Search that gets related terms by using the ~ on searches.

Maybe you can digg on the source code codeigniter-googlesearch-api

Formally aren't synonymous but depending on the application that you have in mind it could be useful (for example for SEO purposes).

As a side note, if you put ~term in Google, then it will bold you the terms that are related. Try it with ~investment for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜