简体   繁体   English

项目推荐的数据库管理

[英]database management for item recommendation

I am collecting user review from my site. 我正在从我的网站收集用户评论。 Review can have 1,2,3,4,5 rate. 评论可以有1,2,3,4,5评分。

From each review I am collceting list of adjectives. 从每条评论中,我都会列出形容词。 So I will have good, nice, great, excellent etc scrapped from these reviews. 所以我将从这些评论中剔除好,好,好,好等。

Currently I am taking adjectives from review and storing into table. 目前,我正在将评论中的形容词存储到表中。 I append each new set of adjectives coming from reviewa with previous list. 我将来自reviewa的每组新的形容词附加上一个列表。

Then I have seperate function call to which counts occurrence of each word and store into another table. 然后,我有一个单独的函数调用,该函数将每个单词的出现计数并存储到另一个表中。

What I want: 我想要的是:

I want to create review recommendation which grade the recommendation system based on adjective occurrence. 我想创建评论推荐,该评论推荐基于形容词出现对推荐系统进行评分。

Depending on how many adjectives (good, great,nice etc) count review has, it will be ranked. 根据评论数有多少个形容词(好,好,好等),它将对其进行排名。 Good in 4 star review has more value then good in 3 star review. Good于4颗星的评价具有更多的价值,然后在3颗星的评价不错。

means displaying the best review (4-5 star) having maximum positive adjectives. 表示显示具有最高肯定形容词的最佳评论(4-5星)。

I am wondering how should I manage my database so that I can get rid of this in faster way. 我想知道如何管理数据库,以便可以更快地摆脱它。

any thought would be highly apprecited. 任何想法都会被高度赞赏。

review 评论

ok, I think making query - select review from table where max (good,nice,great) and business_type = 'xyz' order by review_rate desc; 好的,我想进行查询- select review from table where max (good,nice,great) and business_type = 'xyz' order by review_rate desc; will do. 会做。

for max (good,nice,great) - selecting reviews from table in which contents adjective which have highest occurence. max (good,nice,great) -从表中选择出现率最高的形容词评论。 how can I make query for this? 我该如何查询?

I have seperate table which contains words and occurrence 我有一个单独的表,其中包含单词和出现

word   count
-------------
good    463
great   345
nice    321
best    234

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM