计算机毕业设计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()
相关推荐
燐妤几秒前
Python工具使用:Pycharm
python·pycharm
Wonderful U4 分钟前
基于Python+Django的私有化云笔记系统:从痛点分析到完整实现
笔记·python·django
weixin_468466856 分钟前
机器学习数据预处理新手实战指南
人工智能·python·算法·机器学习·编程·数据预处理
大数据魔法师13 分钟前
Streamlit(二十)- API 参考文档(十三)- 缓存与状态管理组件
python·web
清辞85316 分钟前
Ai应用——数据分析
大数据
冯RI375II6948719 分钟前
样品准备指南:LFGB认证检测送样要求详解
大数据
Cloud_Shy61831 分钟前
解读《Effective Python 3rd Edition》:从练气到老魔(第一章 Item 7 - 9)
开发语言·数据库·python
weixin_BYSJ198732 分钟前
基于Django的非物质文化遗产管理系统设计与实现(源码 + 文档)98950
java·javascript·spring boot·python·django·flask·php
繁星星繁38 分钟前
Git 入门之道:从版本流转到基础操作
大数据·git·elasticsearch