Showing
1 changed file
with
2 additions
and
2 deletions
| @@ -8,7 +8,7 @@ def getTopicLen(topic):# 统计特定话题下的评论数目 | @@ -8,7 +8,7 @@ def getTopicLen(topic):# 统计特定话题下的评论数目 | ||
| 8 | topicLen+=1 | 8 | topicLen+=1 |
| 9 | return topic_len | 9 | return topic_len |
| 10 | 10 | ||
| 11 | -def getTopicPageCreatedAtCharData(topic):# 统计包含特定热词的评论在每个日期的数量,并返回日期和对应的评论数量 | 11 | +def getTopicPageCreatedAtCharData(topic):# 统计特定话题的评论在每个日期的数量,并返回日期和对应的评论数量 |
| 12 | commentsList = getAllCommentsData() | 12 | commentsList = getAllCommentsData() |
| 13 | createdAt = {} | 13 | createdAt = {} |
| 14 | for i in commentsList: | 14 | for i in commentsList: |
| @@ -19,7 +19,7 @@ def getTopicPageCreatedAtCharData(topic):# 统计包含特定热词的评论在 | @@ -19,7 +19,7 @@ def getTopicPageCreatedAtCharData(topic):# 统计包含特定热词的评论在 | ||
| 19 | createdAt[i[1]] = 1 | 19 | createdAt[i[1]] = 1 |
| 20 | return list(createdAt.keys()),list(createdAt.values()) | 20 | return list(createdAt.keys()),list(createdAt.values()) |
| 21 | 21 | ||
| 22 | -def getCommentFilterDataTopic(topic):# 筛选包含特定热词的评论并返回这些评论的数据 | 22 | +def getCommentFilterDataTopic(topic):# 筛选特定话题下的评论并返回这些评论的数据 |
| 23 | commentsList = getAllCommentsData() | 23 | commentsList = getAllCommentsData() |
| 24 | commentData = [] | 24 | commentData = [] |
| 25 | for i in commentsList: | 25 | for i in commentsList: |
-
Please register or login to post a comment