Skip to main content

Political Polarity Classification Using NLP

  • Conference paper
  • First Online:
  • 365 Accesses

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 1424))

Abstract

Twitter is a popular platform for sharing our perspective with the world and perceiving the expert opinions of the popular figures on day-to-day affairs. Politicians also find an outlet here for their campaigns, thereby reaching out to a vast audience online. In this research, we focus on identifying and classifying the subtleties of such political tweets that aim to influence the crowd. However, the noise in the dataset concerning linguistic anomalies makes it challenging to apply the direct classification methods. We begin by preprocessing the raw tweets to tackle grammatical and semantic issues. Further, natural language processing (NLP) tools such as Word2Vec that help in preserving semantic and syntactical relationships are incorporated. The classification accuracy is affected by this technique because grammatical structures distort with Word2Vec. Bigram count of special tokens is added to the resulting set of features to solve this problem. A Receiver Operating Characteristic (ROC) curve is used to measure the accuracy by selecting a different set of features, once using a Naïve Bayes classifier and once using random forest.

All authors have contributed equally

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   189.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   249.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

Learn about institutional subscriptions

Notes

  1. 1.

    2017 Spanish billion-word corpus and embeddings. URL https://crscardellino.github.io/SBWCE/.

References

  1. Tumasjan, A., Sprenger, T., Sandner, P., Welpe, I.: Predicting elections with twitter: What 140 characters reveal about political sentiment. In: Proceedings of the Fourth International AAAI Conference on Weblogs and Social Media, pp. 178–185 (2010). http://www.aaai.org/ocs/index.php/ICWSM/ICWSM10/paper/viewFile/1441/1852

  2. Bermingham, A., Smeaton, A.F.: On using twitter to monitor political sentiment and predict election results. Psychology 2–10 (2011)

    Google Scholar 

  3. Jungherr, A., Jürgens, P., Schoen, H.: Why the pirate party won the German election of 2009 or the trouble with predictions: a response to Tumasjan, A., Sprenger, t. O., Sander, P. G., & Welpe, I. M. “predicting elections with twitter: What 140 characters reveal about political sentiment”. Social Science Computer Review 30 (2), 229–234 (2012). http://journals.sagepub.com/doi/https://doi.org/10.1177/0894439311404119

  4. Martínez-Cámara, E., Martín-Valdivia, M., Ureña-López, L., Montejo-Ráez, A.: Sentiment analysis in Twitter. Natural Language Eng. 20(1), 1–28 (2014). https://doi.org/10.1017/S1351324912000332

    Article  Google Scholar 

  5. Harjule, P., Gurjar, A., Seth, H., Thakur, P.: Text Classification on Twitter Data, pp. 160–164 (2020). https://doi.org/10.1109/ICETCE48199.2020.9091774

  6. Pang, B., Lee, L.: Opinion mining and sentiment analysis. Foundations Trends® Inf. Retrieval 2(1–2), 1–135 (2008). http://www.nowpublishers.com/article/Details/INR-011

  7. Turney, P.D.: Thumbs up or thumbs down? Semantic orientation applied to unsupervised classification of reviews. In: Proceedings of the 40th Annual Meeting on Association for Computational Linguistics. Association for Computational Linguistics, USA, pp. 417–424 (2002). https://doi.org/10.3115/1073083.1073153

  8. Pang, B., Lee, L., Vaithyanathan, S.: Thumbs up? Sentiment classification using machine learning techniques (2002). http://www.aclweb.org/anthology/W02-1011

  9. Kontopoulos, E., Berberidis, C., Dergiades, T., Bassiliades, N.: Ontology-based sentiment analysis of twitter posts. Expert Syst. Appl. 40(10), 4065–4074 (2013). https://doi.org/10.1016/j.eswa.2013.01.001

    Article  Google Scholar 

  10. Li, Y.M., Li, T.Y.: Deriving market intelligence from microblogs. Decision Support Syst. 55(1), 206–217 (2013). https://doi.org/10.1016/j.dss.2013.01.023

    Article  Google Scholar 

  11. Ramirez-marquez, J.: Some features speak loud, but together they all speak louder: a study on the correlation between classification error and feature usage in decision-tree classification ensembles. Eng. Appl. Artif. Intell. 67, 270–282 (2018). http://www.sciencedirect.com/science/article/pii/S0952197617302488

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sagi Harshad Varma .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Varma, S.H., Harsha, Y.V.S. (2022). Political Polarity Classification Using NLP. In: Roy, S., Sinwar, D., Perumal, T., Slowik, A., Tavares, J.M.R.S. (eds) Innovations in Computational Intelligence and Computer Vision . Advances in Intelligent Systems and Computing, vol 1424. Springer, Singapore. https://doi.org/10.1007/978-981-19-0475-2_3

Download citation

Publish with us

Policies and ethics