Tagging with pysentimiento and its Evaluation in Traditional Supervised Learning Models for Sentiment Analysis
摘要
The excessive growth of opinions or emotions in different social networks has enabled the optimization of sentiment analysis (SA). However, the data labeling phase usually takes a lot of time and resources if manual labeling is performed, due to the amount of data. The present study seeks to use bidirectional transformer models (pysentimiento) to label tweets in Spanish, considering political and health events in Peru. For this purpose, a methodology for the construction of a dataset is proposed, which includes the extraction of tweets by Twint, the filtering and cleaning of data, the labeling of tweets by pysentimiento, the balancing of classes, and the manual verification of tweets. Through the experimental phase, where traditional supervised models-naive Bayes (NB), super vector machine (SVM), random forest (RF), and multilayer perceptron (MP)-are trained with the proposed datasets, the improvement in the performance of each model is shown by cross validation and the stratification of classes. The results show that manual verification contributes to an optimal classification of tweets in the positive and negative categories, but not in the neutral category.