| Affective Analysis,also known as Affective Polarity Classification,is used to explore the feelings contained in a text,usually in three types-partial positive,partial negative and partial neutral.With the rapid development of the Internet,social network platforms have exerted more and more influence on people,and network users will produce mass information on plenty of platforms,most of which is displayed by texts,pictures and videos.And texts can,to some extent,represent a user's attitude towards an event,being emotionally positive,negative or neutral.By the classification of the evaluation towards a film or product,you can determine whether the film or product is popular among users,and then the marketing for the film or product will play a certain guiding role.This study is exactly based on word2 vec Affective Analysis Method,taking commodity review and film review as the research object.First,in response to the expected lack of high-quality sentiment analyses,crawler technology has been used to crawl product reviews and film reviews on the Internet,and a series of data pre-processing work such as text cleaning,text normalization,Chinese word segmentation and emotional polarity tagging is completed for obtaining a text comment Corpus.Based on the Corpus,the data set used in this paper is constructed,in which the training set accounts for 70% of the total data and the test set accounts for30%.At the same time,in order to rapidly calculate the value of TF-IDF,a corresponding affective dictionary is constructed.The word vector set is trained by the word2 vec model and then is as input information for subsequent models.Secondly,an algorithm model based on Positional Encoding is proposed and combined by word2 vec and TF-IDF is proposed,and then based on the data set constructed in this paper,it is followed by simulation experiments among the newly-brought model,SVM the traditional machine learning model,and two classic depth learning models namely CNN and LSTM.The experimental results show that compared with SVM,CNN and LSTM,the new model has a smaller size and fewer parameters.Its ACC(Accuracy)is 23.2% higher than that of SVM,9.7% higher thanthat of CNN and 3.5% higher than that of LSTM,and the Acc and F1-Score even reaches 85.9% and 73.2% respectively on the test set.Finally,this paper designs and realizes an on-line real-time Affective Analysis system.Users can input any text at any time,and the system will analyze the emotion information contained in the text to the user and display its type by a graphical interface,which is convenient for users to inquire.The model is featured high practicality,operability,accuracy and intuitiveness. |