Skip to main content

Sentiment Analysis to Find Sentence Polarity on Tweet Data

  • Conference paper
  • First Online:
Machine Learning in Information and Communication Technology

Part of the book series: Lecture Notes in Networks and Systems ((LNNS,volume 498))

Abstract

In this present age, everyone uses social media. Whilst ideas spread through these mediums can be colourful, there are certain views of people which are shared with a tone of negativity, mischief and offensiveness to them as well. One of the most used of such social media platforms include Twitter, which is a platform where messages with limited word limit are sent by the people. This present work, thus, is about analysing the polarity of a tweet by using millions of data achieved through Natural Language Processing (NLP). We collected a large dataset of tweets which are marked by levels of polarity from negative to positive. We use Machine Learning algorithms on this dataset to detect the polarity of the tweet. Here we have used Multinomial Naïve-Bayes, Complement Naïve-Bayes and Logistic Regression classifier to find the polarity of tweets. The dataset size is 1.6 million and we got the best result using Logistic Regression. The highest accuracy is 78.05%.

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 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

Institutional subscriptions

References

  1. Kharde VA, Sonawane SS (2016) Sentiment analysis of Twitter data: a survey of techniques. In: Proceedings of the international journal of computer applications, pp 0975–8887

    Google Scholar 

  2. Parikh R, Movassate M (2009) Sentiment analysis of user-generated Twitter updates using various classification techniques. CS224N Final Report, nlp.stanford.edu

    Google Scholar 

  3. Davidov D, Rappoport A (2010) Enhanced sentiment learning using Twitter hashtags and smileys. Coling 2010: Poster 241, 249

    Google Scholar 

  4. Krouska A, Troussas C, Virvou M (2017) Comparative evaluation of algorithms for sentiment analysis over social networking services. J Univ Comput Sci 23(8):755–768 submitted: 8/5/17, accepted: 27/8/17, appeared: 28/8/17

    Google Scholar 

  5. Medhat W, Hassan A, Korashy H (2014) Sentiment analysis algorithms and applications: a survey. Ain Shams Eng J 5(4):1093–1113. ISSN 2090–4479

    Google Scholar 

  6. Wilson T, Wiebe J, Hoffman P (2005) Recognizing contextual polarity in phrase level sentiment analysis. ACL

    Google Scholar 

  7. Pradha S, Halgamuge MN, Tran Quoc Vinh N (2019) Effective text data preprocessing technique for sentiment analysis in social media data. In: 2019 11th international conference on knowledge and systems engineering (KSE), pp 1–8. https://doi.org/10.1109/KSE.2019.8919368

  8. Vinodhini G, Chandrasekaran RM (2012) Sentiment analysis and opinion mining: a survey. Int J Adv Res Comput Sci Softw Eng 2(6). ISSN: 2277 128X

    Google Scholar 

  9. Go A, Huang L, Bhayani R (2009) Twitter sentiment analysis. Project Report, standford

    Google Scholar 

  10. Zhang K, Narayanan R (2010) Voice of the customers: mining online customer reviews for product

    Google Scholar 

  11. Ku L-W, Liang Y-T, Chen H, Opinion extraction, summarization and tracking in news and blog corpora. In: AAAI-CAAW”06

    Google Scholar 

  12. Khan K, Baharudin BB, Khan A, Malik F (2010) Automatic extraction of features and opinion oriented sentences from customer reviews. World Acad Sci Eng Technol 62

    Google Scholar 

  13. Kennedy A, Inkpen D (2006) Sentiment classification of movie reviews using contextual valence shifters. Comput Intell 22:110–125

    Google Scholar 

  14. Wiebe JM (2000) Learning subjective adjectives from corpora. In: AAAI

    Google Scholar 

  15. Wilson T, Wiebe J, Hoffmann P (2005) Recognizing contextual polarity in phraselevel sentiment analysis. In HLT/EMNLP

    Google Scholar 

  16. Sentiment140 dataset with 1.6 million tweets. [Online]. Available on: www.kaggle.com/kazanova/sentiment140. Accessed on 24 Sept 2021

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pranati Rakshit .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 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

Rakshit, P., Gupta, S., Das, T. (2023). Sentiment Analysis to Find Sentence Polarity on Tweet Data. In: Deva Sarma, H.K., Piuri, V., Pujari, A.K. (eds) Machine Learning in Information and Communication Technology . Lecture Notes in Networks and Systems, vol 498. Springer, Singapore. https://doi.org/10.1007/978-981-19-5090-2_19

Download citation

  • DOI: https://doi.org/10.1007/978-981-19-5090-2_19

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-19-5089-6

  • Online ISBN: 978-981-19-5090-2

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics