The research content of this paper is based on sentiment analysis of short text on Weibo.Sentiment analysis belongs to an important direction of text classification in natural language processing.The data in this article comes from Sina Weibo collected by the Data Fountain platform on the 10 w text data of Weibo on the topic of "New Coronary Pneumonia",and the emotional tendency of the text is manually marked as negative,positive and neutral.The empirical part uses dictionary sentiment analysis and machine learning analysis respectively.The algorithms used are TFIDF-based support vector machine and naive Bayes,Wod2vec-based support vector machine and LSTM,and the five results are compared.,Combined with statistical analysis methods and the development of the incident to conduct public opinion analysis of the initial network response to the outbreak.First,this paper calculates the text sentiment score based on the sentiment dictionary.Then,the paper combined the TFIDF(inverse text document)one of traditional text representation and feature selection method and the naive Bayes and support vector machine algorithms.Due to the sparse vectors caused by the explosion of dimensions,the classification effect is very unsatisfactory.Therefore,the word2 vec algorithm are used to represent all the texts which greatly improved the result of these algorithms;After this,one of neural network structures--LSTM was used for text classification.After completing all the steps,the paper used different indices to estimate the results of different machines.For the first time,this paper uses machine learning algorithms combined with statistical analysis to conduct real-time public opinion analysis of current affairs.This direction will be of great significance for the introduction and implementation of national policies. |