Sentiment Analysis on Twitter for the Major German Parties during the 2021 German Federal Election

166

Authors

nan

Abstract

We present the results of a project perform- ing sentiment analysis on tweets from Ger- man politicians and party accounts for the 2021 German federal election. We collected over 58,000 tweets from the Twitter accounts of the seven parties represented in the German Bun- destag, of which a selection of 2,000 tweets were annotated by three annotators. Based on the annotated data, we implemented multiple sentiment analysis approaches and evaluated the sentiment classification performance. We found that transformer-based models like bidi- rectional encoder from transformers (BERT) performed better than traditional machine learn- ing models such as Naive Bayes and lexicon- based models like GerVADER. The best per- forming BERT model achieved an accuracy of 93.3% and macro f1 score of 93.4%. Applying sentiment analysis on the overall corpus via this method showed that overall, negative sentiment was most frequent and that there were multiple major shifts in sentiment a few months before and after the election. Furthermore, we found that tweets from opposition parties had on av- erage more negative sentiment than those from governing parties. 1

Keywords

nan

Full Content

Sentiment Analysis on Twitter for the Major German Parties during the 2021 German Federal Election Thomas Schmidt Media Informatics Group University of Regensburg Regensburg, Germany thomas.schmidt@ur.de Jakob Fehle Media Informatics Group University of Regensburg Regensburg, Germany jakob.fehle@ur.de Maximilian Weissenbacher Media Informatics Group University of Regensburg Regensburg, Germany maximilian. weissenbacher@ur.de Jonathan Richter Media Informatics Group University of Regensburg Regensburg, Germany jonathan.richter @ur.de Philipp Gottschalk Media Informatics Group University of Regensburg Regensburg, Germany philipp.gottschalk @ur.de Christian Wolff Media Informatics Group University of Regensburg Regensburg, Germany christian.wolff@ur.de Abstract We present the results of a project perform- ing sentiment analysis on tweets from Ger- man politicians and party accounts for the 2021 German federal election. We collected over 58,000 tweets from the Twitter accounts of the seven parties represented in the German Bun- destag, of which a selection of 2,000 tweets were annotated by three annotators. Based on the annotated data, we implemented multiple sentiment analysis approaches and evaluated the sentiment classification performance. We found that transformer-based models like bidi- rectional encoder from transformers (BERT) performed better than traditional machine learn- ing models such as Naive Bayes and lexicon- based models like GerVADER. The best per- forming BERT model achieved an accuracy of 93.3% and macro f1 score of 93.4%. Applying sentiment analysis on the overall corpus via this method showed that overall, negative sentiment was most frequent and that there were multiple major shifts in sentiment a few months before and after the election. Furthermore, we found that tweets from opposition parties had on av- erage more negative sentiment than those from governing parties. 1 Introduction The 2021 federal election in Germany led to a dra- matic change in power of the leading parties. An- gela Merkel’s chancellorship and the reign of the CDU (Christlich Demokratische Union) came to an end after 16 years and a new coalition now forms the government (see table A.1 in the appendix for election results). Whereas former election cam- paigns only took place in the real world through posters and election events, ever since the rise of social media, campaigns additionally focus on gain- ing support on the internet (Freelon, 2017). During elections, politicians of all parties are strategic ac- tors focused on gaining voters’ support (Druckman et al., 2010). Besides online advertisements, politi- cal discussions via social media have gained more and more importance. This is a worldwide phe- nomenon but can especially be seen in the United States (Tumasjan et al., 2010) where former presi- dent Donald Trump used Twitter almost on a daily basis to share his opinion on a wide variety of top- ics. Twitter is a micro-blogging platform and one of the most popular social-media channels for on- line communication. Sharing content takes place in form of a short text, limited to 280 characters, which is called a tweet. Twitter has become an important platform for research in computational social science and a source for research conduct- ing sentiment analysis (Drus and Khalid, 2019). Sentiment analysis is the computational method to predict …

Content truncated to 500 words

Labeled Text

We present the results of a project performing sentiment analysis on tweets from German politicians and party accounts for the 2021 German federal election. We collected over 58,000 tweets from the Twitter accounts of the seven parties represented in the German Bundestag, of which a selection of 2,000 tweets were annotated by three annotators. Based on the annotated data, we implemented multiple sentiment analysis approaches and evaluated the sentiment classification performance. We found that transformer-based models like bidirectional encoder from transformers (BERT) performed better than traditional machine learning models such as Naive Bayes and lexiconbased models like GerVADER. The best performing BERT model achieved an accuracy of 93.3% and macro f1 score of 93.4%. Applying sentiment analysis on the overall corpus via this method showed that overall, negative sentiment was most frequent and that there were multiple major shifts in sentiment a few months before and after the election. Furthermore, we found that tweets from opposition parties had on average more negative sentiment than those from governing parties. 1

Publication Details

Paper ID:
166
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan