作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (12): 386-395. doi: 10.19678/j.issn.1000-3428.0068530

• 开发研究与工程应用 • 上一篇    下一篇

基于机器学习的政务微博情感分析模型设计

张财1,2, 马自强1,2,*(), 闫博1,2   

  1. 1. 宁夏大学信息工程学院, 宁夏 银川 750021
    2. 宁夏大数据与人工智能省部共建协同创新中心, 宁夏 银川 750021
  • 收稿日期:2023-10-09 出版日期:2024-12-15 发布日期:2024-04-19
  • 通讯作者: 马自强
  • 基金资助:
    宁夏回族自治区重点研发计划一般项目(2022BDE03008); 宁夏回族自治区重点研发计划引才专项(2021BEB04047); 宁夏自然科学基金一般项目(2021AAC03078); 国家社会科学基金项目(西部项目)(20XXW009)

Design of a Machine Learning-Based Sentiment Analysis Model for Government Weibo

ZHANG Cai1,2, MA Ziqiang1,2,*(), YAN Bo1,2   

  1. 1. School of Information Engineering, Ningxia University, Yinchuan 750021, Ningxia, China
    2. Collaborative Innovation Center for Ningxia Big Data and Artificial Intelligence Co-Founded by Ningxia Municipality and Ministry of Education, Yinchuan 750021, Ningxia, China
  • Received:2023-10-09 Online:2024-12-15 Published:2024-04-19
  • Contact: MA Ziqiang

摘要:

针对政务微博评论杂乱、审核困难的问题, 提出一种基于机器学习的政务微博情感分析模型。该模型能够量化分析政务微博中的情感, 为自动审核提供有效依据。以2022年北京冬奥会和中国足协的微博为例, 首先扩展与案例相关的词汇, 并进行数据清洗和文本特征表示; 然后采用机器学习模型进行情感倾向判断, 并结合大连理工大学中文情感词汇文本计算情感强度。分别采用基于词袋模型和Word2vec模型的决策树、朴素贝叶斯和支持向量机模型进行预测, 并对它们的性能进行对比评估。实验结果表明, 在基于Word2vec的支持向量机模型下, 情感分类的准确率达到84.3%, 这表明所提模型在预测政务微博情感方面具有有效性, 可应用于政务微博自动审核任务。

关键词: 机器学习, 政务微博, 情感强度, 情感分析, 情感分类

Abstract:

A machine learning-based sentiment analysis model for government Weibo is proposed to address the challenges posed by cluttered comments and subjective reviews. This model quantitatively analyzes sentiments on government Weibo, providing a reliable foundation for automatic reviews. Using the Weibo of the 2022 Beijing Winter Olympics and the Chinese Football Association as case studies, the methodology begins with the expansion of relevant vocabulary, followed by data cleaning and text feature representation. Subsequently, machine learning models are employed to assess emotional tendencies, and the Chinese sentiment lexicon from the Dalian University of Technology is utilized to calculate emotional intensity. This study employs decision trees, Naïve Bayes, and Support Vector Machine (SVM) models, incorporating both bag-of-words and Word2vec models for sentiment prediction and performance comparison. The experimental results indicate that the SVM model using Word2vec achieves an accuracy of 84.3% in sentiment classification. This demonstrates the effectiveness of the proposed model in predicting sentiments on government Weibo, indicating its potential for automatic review tasks.

Key words: machine learning, government Weibo, sentiment intensity, sentiment analysis, sentiment classification