Abstract
We analyze the use of language models for political text classification. Political texts become increasingly available and language models have succeeded in various natural language processing tasks. We apply two baselines and different language models to data from the UK, Germany, and Norway. Observed accuracy shows language models improving on the performance of the baselines by up to 10.35% (Norwegian), 12.95% (German), and 6.39% (English).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The Treaty of the European Union states that “Every citizen shall have the right to participate in the democratic life of the Union. Decisions shall be taken as openly and as closely as possible to the citizen.” (see http://data.europa.eu/eli/treaty/teu_2016/art_10/oj).
- 2.
- 3.
- 4.
We use the MultinomialNB classifier, remove stopwords (Norwegian/German/English), use n-grams from 1 to 4. We determine the best hyperparameter configuration with grid search over maximum number of features \( \{30k, 50k, 100k\} \) and the learning rate \( \alpha \in \{0.01, 0.1, 0.5, 1.0 \} \). For the NPSC data, we use 30000 features and \( \alpha = 0.01 \). For the GPSC data, we use 100000 features and \( \alpha = 0.1 \). For the ParlVote data, we use 100000 features and \( \alpha = 0.01 \).
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
References
Abercrombie, G., Batista-Navarro, R.: ParlVote: a Corpus for sentiment analysis of political debates. In: Proceedings of the 12th Language Resources and Evaluation Conference. pp. 5073–5078. European Language Resources Association (2020). https://aclanthology.org/2020.lrec-1.624
Baly, R., Da San Martino, G., Glass, J., Nakov, P.: We can detect your bias: predicting the political ideology of news articles. In: Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 4982–4991 (2020). https://doi.org/10.18653/v1/2020.emnlp-main.404
Biessmann, F., Lehmann, P., Kirsch, D., Schelter, S.: Predicting political party affiliation from text. PolText 14, 14 (2016)
Dahllöf, M.: Automatic prediction of gender, political affiliation, and age in Swedish politicians from the wording of their speeches—a comparative study of classifiability. Liter. Linguist. Comput. 27(2), 139–153 (2012). https://doi.org/10.1093/llc/fqs010
Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018). https://doi.org/10.18653/v1/N19-1423
Høyland, B., Godbout, J.F., Lapponi, E., Velldal, E.: Predicting party affiliations from European parliament debates. In: Proceedings of the ACL 2014 Workshop on Language Technologies and Computational Social Science, pp. 56–60 (2014)
Kummervold, P.E., De la Rosa, J., Wetjen, F., Brygfjeld, S.A.: Operationalizing a national digital library: the case for a Norwegian transformer model. In: Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa), pp. 20–29 (2021). https://aclanthology.org/2021.nodalida-main.3
Luong, M.T., Kayser, M., Manning, C.D.: Deep neural language models for machine translation. In: Proceedings of the 19th Conference on Computational Natural Language Learning, pp. 305–309 (2015). https://doi.org/10.18653/v1/K15-1031
Radford, A., et al.: Language models are unsupervised multitask learners. OpenAI blog 1(8), 9 (2019)
Rao, A., Spasojevic, N.: Actionable and political text classification using word embeddings and LSTM. arXiv preprint arXiv:1607.02501 (2016)
Richter, F., et al.: Open Discourse (2020). https://doi.org/10.7910/DVN/FIKIBO
Serban, I., Sordoni, A., Bengio, Y., Courville, A., Pineau, J.: Building end-to-end dialogue systems using generative hierarchical neural network models. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 30 (2016)
Solberg, P.E., Ortiz, P.: The Norwegian parliamentary speech corpus. arXiv preprint arXiv:2201.10881 (2022)
Sun, C., Qiu, X., Xu, Y., Huang, X.: How to fine-tune BERT for text classification? In: Sun, M., Huang, X., Ji, H., Liu, Z., Liu, Y. (eds.) CCL 2019. LNCS (LNAI), vol. 11856, pp. 194–206. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-32381-3_16
Wang, W., Shen, S., Li, G., Jin, Z.: Towards full-line code completion with neural language models. arXiv preprint arXiv:2009.08603 (2020)
Wong, F.M.F., Tan, C.W., Sen, S., Chiang, M.: Quantifying political leaning from tweets, retweets, and retweeters. IEEE Trans. Knowl. Data Eng. 28(8), 2158–2172 (2016)
Yu, B., Kaufmann, S., Diermeier, D.: Classifying party affiliation from political speech. J. Inf. Technol. Polit. 5, 33–48 (2008). https://doi.org/10.1080/19331680802149608
Acknowledgements
This work is done as part of the Trondheim Analytica project and funded under Digital Transformation program at Norwegian University of Science and Technology (NTNU), 7034 Trondheim, Norway.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Doan, T.M., Kille, B., Gulla, J.A. (2022). Using Language Models for Classifying the Party Affiliation of Political Texts. In: Rosso, P., Basile, V., Martínez, R., Métais, E., Meziane, F. (eds) Natural Language Processing and Information Systems. NLDB 2022. Lecture Notes in Computer Science, vol 13286. Springer, Cham. https://doi.org/10.1007/978-3-031-08473-7_35
Download citation
DOI: https://doi.org/10.1007/978-3-031-08473-7_35
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-08472-0
Online ISBN: 978-3-031-08473-7
eBook Packages: Computer ScienceComputer Science (R0)