开发者

word suggestion based on input algorithm?

I 开发者_如何学编程am thinking of creating a web site, which lets people to rate restaurants. Since I don't have a database containing all the restaurants, this web site relies on user's inputs.

But there is a problem of this method, because people may use different word (name) to describe a same restaurant, but I don't want to create different entries inside the database, as they refer to the same restaurant.

For example, when describing KFC, somebody use the name "KFC", others may use "Kentucky Fried Chicken"

How can I make the system to automatically detect this? and give the user a list of existing items of the database.

This should quite similar to stackoverflow, which tells you "questions with similar title". But I don't know how to implement this.


You can't ... you have to create a list of the restaurant names and their "synonyms" and other possible spellings.


How can I make the system to automatically detect this?

The system doesn't know that "KFC" means "Kentucky Fried Chicken".

Make a map of synonyms, to let it know.

This should quite similar to stackoverflow, which tells you "questions with similar title"

It generally matches word-for-word. It may have an internal list of synonyms to deal with common cases.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜