Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
戒酒的李白
2024-07-03 21:41:47 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
7e366e08348477963bb81c96cd813253ab48268f
7e366e08
2 parents
1b198559
d0b92e96
Merge branch 'main' of
https://github.com/666ghj/Weibo_PublicOpinion_AnalysisSystem
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
utils/getTopicPageData.py
utils/getTopicPageData.py
View file @
7e366e0
...
...
@@ -8,7 +8,7 @@ def getTopicLen(topic):# 统计特定话题下的评论数目
topicLen
+=
1
return
topic_len
def
getTopicPageCreatedAtCharData
(
topic
):
# 统计
包含特定热词
的评论在每个日期的数量,并返回日期和对应的评论数量
def
getTopicPageCreatedAtCharData
(
topic
):
# 统计
特定话题
的评论在每个日期的数量,并返回日期和对应的评论数量
commentsList
=
getAllCommentsData
()
createdAt
=
{}
for
i
in
commentsList
:
...
...
@@ -19,7 +19,7 @@ def getTopicPageCreatedAtCharData(topic):# 统计包含特定热词的评论在
createdAt
[
i
[
1
]]
=
1
return
list
(
createdAt
.
keys
()),
list
(
createdAt
.
values
())
def
getCommentFilterDataTopic
(
topic
):
# 筛选
包含特定热词
的评论并返回这些评论的数据
def
getCommentFilterDataTopic
(
topic
):
# 筛选
特定话题下
的评论并返回这些评论的数据
commentsList
=
getAllCommentsData
()
commentData
=
[]
for
i
in
commentsList
:
...
...
Please
register
or
login
to post a comment