计算机毕业设计Python+Flask微博舆情分析 微博情感分析 微博爬虫 微博大数据 舆情监控系统 大数据毕业设计 NLP文本分类 机器学习 深度学习 AI

基于Python/flask的微博舆情数据分析可视化系统
python爬虫数据分析可视化项目
编程语言:python
涉及技术:flask mysql echarts SnowNlP情感分析 文本分类


系统设计的功能:
①用户注册登录
②微博数据描述性统计、热词统计、舆情统计
③微博数据分析可视化,文章分析、IP分析、评论分析、舆情分析
④文章内容词云图

核心算法代码分享如下:

python 复制代码
from utils.getPublicData import getAllCommentsData
import jieba
import jieba.analyse as analyse
targetTxt = 'cutComments.txt'
# stopWords 停用词
def stopWordList():
    stopWords = [line.strip() for line in open('./stopWords.txt',encoding='utf8').readlines()]
    return stopWords

def seg_depart(sentence):
    sentence_depart = jieba.cut(" ".join([x[4] for x in sentence]).strip())
    print(sentence_depart)

    stopWords = stopWordList()
    outStr = ''
    for word in sentence_depart:
        if word not in stopWords:
            if word != '\t':
                outStr += word
    return outStr

def writer_comments_cuts():
    with open(targetTxt,'a+',encoding='utf-8') as targetFile:
        seg = jieba.cut(seg_depart(getAllCommentsData()),cut_all=True)
        output = ' '.join(seg)
        targetFile.write(output)
        targetFile.write('\n')
        print('写入成功')


if __name__ == '__main__':
    # print(stopWordList())
    writer_comments_cuts()
相关推荐
smj2302_796826523 分钟前
解决leetcode第3777题使子字符串变交替的最少删除次数
python·算法·leetcode
sugar椰子皮16 分钟前
【爬虫框架-8】其他
爬虫
具***717 分钟前
探索对称双向半桥LLC谐振变换器双向运行仿真模型
nlp
0思必得030 分钟前
[Web自动化] CSS基础概念和介绍
前端·css·python·自动化·html·web自动化
计算机徐师兄33 分钟前
Python基于Django的MOOC线上课程推荐数据分析与可视化系统(附源码,文档说明)
python·数据分析·django·慕课线上课程推荐·慕课线上课程推荐可视化系统·pytho线上课程推荐可视化·线上课程推荐数据分析可视化系统
free-elcmacom36 分钟前
Python实战项目<2>使用Graphviz绘制流程框图
开发语言·python·graphviz
ljuncong42 分钟前
python的装饰器怎么使用
开发语言·python
该用户已不存在1 小时前
没有这7款工具,难怪你的Python这么慢
后端·python
一缕猫毛1 小时前
Flink demo代码
java·大数据·flink
serve the people1 小时前
tensorflow 零基础吃透:RaggedTensor 的不规则形状与广播机制 2
人工智能·python·tensorflow