Mitigating Class Imbalance in Sentiment Analysis of Politicians’ Statements
摘要
With the rapid development of the Internet and social networks, the use of smart devices has led to the creation of a huge amount of data, which has brought with it great challenges. The challenges are mostly related to safe storage, processing, and extraction of useful knowledge from given data. Great knowledge is hidden in data from social networks, which refer to comments, opinions, and views of users regarding a certain topic, place, product. Sentiment analysis refers to the analysis of the polarity of a certain product, place, or service based on the sentiment of people towards a given subject. Analyzing people’s opinions is an extremely complex task considering that people usually express their feelings in sentences or words. The languages people use to communicate are extremely complex, given that language evolves with society, and people often make mistakes in communication and use stylistic figures. Consequently, sentiment analysis relies heavily on Natural Language Processing (NLP) methods to interpret and extract insights from textual data. The prevailing datasets utilized in sentiment analysis literature are often derived from data sourced from social networks. However, there is a notable scarcity of datasets in languages other than English, including Bosnian. In this paper, the Twitter Airline Sentiment dataset as well as the ParlaSent dataset together with an annotated lexicon of the Bosnian language were used, and a comparison of machine and deep learning methods on the given datasets was presented. The given sets are unbalanced, therefore the SMOTE algorithm was used to overcome the imbalance problem as well as the cross-validation method. The achieved results show how cross validation together with SMOTE algorithm provided almost 20% more accurate results than the simple train-test split method.