Predicting content-based political inclinations of Iranian twitter users using BERT and deep learning

Document Type : Original Article


Faculty of Computer Engineering, Malek-Ashtar University of Technology, Tehran, Iran


Along with the advent of social networks such as Twitter; Politicians, social media, and ordinary citizens regularly turn to them to share their thoughts and feelings, such as political views. This article analyzes the political ideology of Iranian Twitter users using deep learning and combining the deep layers of LSTM and CNN with BERT, enabling us to target groups of sympathizers and opponents of the Islamic Republic of Iran that are also of particular interest to political scientists. We trained a model for predicting whether a tweet is a sympathizer or opponent, using a novel dataset from Twitter, including tweets from sympathizers and opponent people. Then, using the trained model, the people's ideology can be identified. The results show that using the proposed model, tweets can be categorized with a 75.68\% F1-Score, and the classification of individuals based on political orientation to a 93.18\% F1-Score can be done correctly


Main Subjects