Skip to main content

A Framework for Controversial Political Topics Identification Using Twitter Data

  • Conference paper
  • First Online:
Intelligent Systems (BRACIS 2023)

Abstract

Social networks have become the main stage for discussion on various current topics. In particular, electoral processes tend to bring many publications with polarized opinions on political issues addressed by candidates. A comprehensive analysis of social media publications on high-impact controversial topics and the opinions expressed in them could contribute to a clearer understanding of the dynamics of political discussion, providing valuable insights for society. In this context, we investigate how to apply a clustering-based topic modeling approach to produce public evaluation information on different current issues, in particular controversial political topics. We propose a framework that enriches text representations, combining state-of-the-art unsupervised (HDBSCAN) and supervised (BERTimbau) techniques to identify controversial political topics in social media publications in Brazilian Portuguese. To this end, weekly collections were carried out on the social network Twitter, making it possible to identify controversial events for each analyzed date. We compare the controversial topics uncovered with real-world news to validate the results and compare our method with a traditional method described in the literature.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/JustAnotherArchivist/snscrape.

  2. 2.

    https://spacy.io/.

  3. 3.

    https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2.

  4. 4.

    https://umap-learn.readthedocs.io/en/latest/.

  5. 5.

    https://hdbscan.readthedocs.io/en/latest/.

  6. 6.

    https://huggingface.co/.

  7. 7.

    May \(05^{th}\) - Links: www.uol.com.br | www.em.com.br.

  8. 8.

    May \(12^{th}\) - Links: www.uol.com.br | www.senado.leg.br.

  9. 9.

    May \(19^{th}\) - Links: www.uol.com.br | www.correiobraziliense.com.br.

  10. 10.

    May \(27^{th}\) - Links: www.brasil247.com.

References

  1. Aguiar, A., Silveira, R., Furtado, V., Pinheiro, V., Neto, J.A.M.: Using topic modeling in classification of Brazilian lawsuits. In: Pinheiro, V., et al. (eds.) PROPOR 2022. LNCS (LNAI), vol. 13208, pp. 233–242. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-98305-5_22

    Chapter  Google Scholar 

  2. Akhgari, Z., Malekimajd, M., Rahmani, H.: Sem-TED: semantic twitter event detection and adapting with news stories. In: 2022 8th International Conference on Web Research (ICWR), pp. 61–69. IEEE (2022)

    Google Scholar 

  3. Alhaj, F., Al-Haj, A., Sharieh, A., Jabri, R.: Improving Arabic cognitive distortion classification in twitter using bertopic. Int. J. Adv. Comput. Sci. Appl. 13(1), 854–860 (2022)

    Google Scholar 

  4. Angelov, D.: Top2vec: distributed representations of topics. arXiv preprint arXiv:2008.09470 (2020)

  5. Antypas, D., Preece, A., Collados, J.C.: Politics and virality in the time of twitter: a large-scale cross-party sentiment analysis in Greece, Spain and united kingdom. arXiv preprint arXiv:2202.00396 (2022)

  6. Archivist, J.A.: Github - snscrape is a scraper for social networking services (SNS). It scrapes things like user profiles, hashtags, or searches and returns the discovered items, e.g. the relevant posts (2020). https://github.com/JustAnotherArchivist/snscrape. Accessed 15 May 2022

  7. Boon-Itt, S., Skunkan, Y., et al.: Public perception of the COVID-19 pandemic on Twitter: sentiment analysis and topic modeling study. JMIR Public Health Surveill. 6(4), e21978 (2020)

    Article  Google Scholar 

  8. Bose, R., Dey, R.K., Roy, S., Sarddar, D.: Analyzing political sentiment using twitter data. In: Satapathy, S.C., Joshi, A. (eds.) Information and Communication Technology for Intelligent Systems. SIST, vol. 107, pp. 427–436. Springer, Singapore (2019). https://doi.org/10.1007/978-981-13-1747-7_41

    Chapter  Google Scholar 

  9. Brum, H.B., Nunes, M.D.G.V.: Building a sentiment corpus of tweets in Brazilian Portuguese. arXiv preprint arXiv:1712.08917 (2017)

  10. Chaudhary, J., Niveditha, S.: Twitter sentiment analysis using tweepy. Int. Res. J. EngTech 8, 4512–6 (2021)

    Google Scholar 

  11. Egger, R., Yu, J.: A topic modeling comparison between LDA, NMF, Top2Vec, and BERTopic to demystify twitter posts. Front. Sociol. 7, 886498 (2022)

    Article  Google Scholar 

  12. Ester, M., Kriegel, H.P., Sander, J., Xu, X., et al.: A density-based algorithm for discovering clusters in large spatial databases with noise. In: KDD, pp. 226–231 (1996)

    Google Scholar 

  13. Feldman, R., et al.: Knowledge management: a text mining approach. In: Proceedings of the 2nd International Conference on Practical Aspects of Knowledge Management (PAKM 1998), pp. 9–1. No. CONF (1998)

    Google Scholar 

  14. Grootendorst, M.: Bertopic: neural topic modeling with a class-based TF-IDF procedure. arXiv preprint arXiv:2203.05794 (2022)

  15. Hendry, D., et al.: Topic modeling for customer service chats. In: 2021 International Conference on Advanced Computer Science and Information Systems (ICACSIS), pp. 1–6. IEEE (2021)

    Google Scholar 

  16. Lorenzo-Rodríguez, J., Torcal, M.: Twitter and affective polarisation: following political leaders in Spain. South Eur. Soc. Polit. 27, 1–27 (2022)

    Google Scholar 

  17. Lund, M.: Duplicate detection and text classification on simplified technical english (2019)

    Google Scholar 

  18. Marjanen, J., Zosa, E., Hengchen, S., Pivovarova, L., Tolonen, M.: Topic modelling discourse dynamics in historical newspapers. arXiv preprint arXiv:2011.10428 (2020)

  19. McInnes, L., Healy, J., Astels, S.: HDBSCAN: hierarchical density based clustering. J. Open Source Softw. 2(11), 205 (2017)

    Article  Google Scholar 

  20. McInnes, L., Healy, J., Melville, J.: UMAP: uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426 (2018)

  21. Moulavi, D., Jaskowiak, P.A., Campello, R.J., Zimek, A., Sander, J.: Density-based clustering validation. In: Proceedings of the 2014 SIAM International Conference on Data Mining, pp. 839–847. SIAM (2014)

    Google Scholar 

  22. Na, S., Xumin, L., Yong, G.: Research on k-means clustering algorithm: an improved k-means clustering algorithm. In: 2010 Third International Symposium on Intelligent Information Technology and Security Informatics, pp. 63–67. IEEE (2010)

    Google Scholar 

  23. Radovanovic, M., Ivanovic, M.: Text mining: approaches and applications. Novi Sad J. Math. 38, 227–234 (2008)

    MATH  Google Scholar 

  24. Reimers, N., Gurevych, I.: Sentence-BERT: sentence embeddings using siamese BERT-networks. arXiv preprint arXiv:1908.10084 (2019)

  25. Röder, M., Both, A., Hinneburg, A.: Exploring the space of topic coherence measures. In: Proceedings of the eighth ACM International Conference on Web Search and Data Mining, pp. 399–408 (2015)

    Google Scholar 

  26. Senado, I.D.: Datasenado - portal institucional do senado federal. https://www12.senado.leg.br/institucional/datasenado/publicacaodatasenado?id=panorama-politico-2022. Accessed 06 Oct 2022

  27. Sheikha, H.: Text mining twitter social media for covid-19: comparing latent semantic analysis and latent dirichlet allocation (2020)

    Google Scholar 

  28. Silva, N.F.F., et al.: Evaluating topic models in Portuguese political comments about bills from brazil’s chamber of deputies. In: Britto, A., Valdivia Delgado, K. (eds.) BRACIS 2021. LNCS (LNAI), vol. 13074, pp. 104–120. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-91699-2_8

    Chapter  Google Scholar 

  29. Souza, F., Nogueira, R., Lotufo, R.: BERTimbau: pretrained BERT models for Brazilian Portuguese. In: Cerri, R., Prati, R.C. (eds.) BRACIS 2020. LNCS (LNAI), vol. 12319, pp. 403–417. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61377-8_28

    Chapter  Google Scholar 

  30. Souza, F.D., Filho, J.B.O.S.: BERT for sentiment analysis: pre-trained and fine-tuned alternatives. In: Pinheiro, V., et al. (eds.) PROPOR 2022. LNCS (LNAI), vol. 13208, pp. 209–218. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-98305-5_20

    Chapter  Google Scholar 

  31. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)

    Google Scholar 

  32. Wang, W., Wei, F., Dong, L., Bao, H., Yang, N., Zhou, M.: MiniLM: deep self-attention distillation for task-agnostic compression of pre-trained transformers. Adv. Neural. Inf. Process. Syst. 33, 5776–5788 (2020)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kenzo Sakiyama .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sakiyama, K., de Souza Rodrigues, L., Nogueira, B.M., Matsubara, E.T., Romero, R.A.F. (2023). A Framework for Controversial Political Topics Identification Using Twitter Data. In: Naldi, M.C., Bianchi, R.A.C. (eds) Intelligent Systems. BRACIS 2023. Lecture Notes in Computer Science(), vol 14197. Springer, Cham. https://doi.org/10.1007/978-3-031-45392-2_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-45392-2_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-45391-5

  • Online ISBN: 978-3-031-45392-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics