Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Automatic Polarity Identification on Twitter Using Machine Learning

  • Conference paper
  • First Online:
Proceedings of the Future Technologies Conference (FTC) 2022, Volume 3 (FTC 2022 2022)

Abstract

This work presents a study of emotions to analyze the polarity of a set of data that was extracted from Twitter, detailing each of the resources in the different forms that a language has, and to be able to observe feelings such as irony, sarcasm, and happiness, among others. This research can help us classify the polarity of each one of them deeply in the corpus that deals with this research work. Experimental results conducted using different machine learning methods are presented: Support Vector Machines, Naïve Bayes, Logistic regression, KNN and Random Forest, with which a classification system based on cross-validation was implemented. All experiments were performed in Python. The results obtained are shown with two different Corpus; where the first set is made up of 10,653 tweets in total divided equally each with 3551 tweets with a positive, negative and neutral label; while the second set was handled with 10% of all the tweets contained in the database mentioned in the article, where the first set shows a polarity precision of 74.9%, having Logistic Regression as the best classifier using the classification scenario known as cross validation, while the second set shows an accuracy of 78.5%, also having Random Forest as the best classifier using Cross Validation as the best classification scenario.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Similar content being viewed by others

Notes

  1. 1.

    https://www.kaggle.com/cosmos98/twitter-and-reddit-sentimental-analysis-dataset.

  2. 2.

    https://github.com/manishkanadje/reuters21578/blob/master/stopwords.txt.

  3. 3.

    https://www.ranks.nl/stopwords.

References

  1. Agarwal, A., Xie, B., Vovsha, I., Rambow, O., Passonneau, R.J.: Sentiment analysis of twitter data. In: Proceedings of the Workshop on Language in Social Media (LSM 2011), pp. 30–38 (2011)

    Google Scholar 

  2. Jackson, J., Gettings, S., Metcalfe, A.J.N.: “The power of Twitter”: Using social media at a conference with nursing students. 68. Elsevier, pp. 188–191 (2018)

    Google Scholar 

  3. Fiorini, P.M., Lipsky, L.R.: Search Marketing Traffic and Performance Models. 34(6), 517–526 (2012)

    Google Scholar 

  4. Fernandez, J., Boldrini, E., Manuel Gomez, J., Martinez-Barco, P.J.P.D.L.N.: Sentiment Analysis and Opinion Mining: The EmotiBlog Corpus. 47, pp. 179–187 (2011)

    Google Scholar 

  5. Reyes, A., Rosso, P., Veale, T.: A Multidimensional Approach for Detecting Irony in Twitter 47(1), 239–268 (2013)

    Google Scholar 

  6. Saberi, B., Saad, S.: Sentiment Analysis or Opinion Mining: A Review. 7(5), 1660–1666 (2017)

    Google Scholar 

  7. Hierons, R.:Machine learning. Tom M. Mitchell. Published by McGraw‐Hill, Maidenhead, UK, International Student Edition, 1997. ISBN: 0‐07‐115467‐1, 414 pages. Price: UK£ 22.99, soft cover, ed: Wiley Online Library (1999)

    Google Scholar 

  8. Chaovalit, P., Zhou, L.: Movie review mining: A comparison between supervised and unsupervised classification approaches. In: Proceedings of the 38th Annual Hawaii International Conference on System Sciences, pp. 112c-112c: IEEE (2005)

    Google Scholar 

  9. Brooke, J., Tofiloski, M., Taboada, M.: Cross-linguistic sentiment analysis: from english to Spanish. In: Proceedings of the International Conference RANLP-2009, pp. 50–54 (2009)

    Google Scholar 

  10. Refaeilzadeh, P., Tang, L., Liu, H.: Cross-validation. 5, p. 532–538 (2009)

    Google Scholar 

  11. Wright, R.E.: Logistic Regression (1995)

    Google Scholar 

  12. Castro, W.M., Cabrera, S.G.: Tuberculosis: Diagnosis by Image Processing. 24(2) (2020)

    Google Scholar 

  13. González, R.H., Morell, C., Blanco, A.: Regresión lineal local con reducción de rango para problemas de predicción con salidas compuestas. Revista Cubana de Ciencias Informáticas 10(4), 184–193 (2016)

    Google Scholar 

  14. Bowers, A.J., Zhou, R.: Receiver operating characteristic (ROC) area under the curve (AUC): a diagnostic measure for evaluating the accuracy of predictors of education outcomes. 24(1), 20–46 (2019)

    Google Scholar 

  15. Makhoul, J., Kubala, F., Schwartz, R., Weischedel, R.: Performance measures for information extraction. In: Proceedings of DARPA Broadcast News Workshop, 249–252 Herndon, VA (1999)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rafael Guzmán Cabrera .

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

Castro, J.C.M., Cabrera, R.G., Pinales, J.R., Carrillo, L.M.L., Priego, B. (2023). Automatic Polarity Identification on Twitter Using Machine Learning. In: Arai, K. (eds) Proceedings of the Future Technologies Conference (FTC) 2022, Volume 3. FTC 2022 2022. Lecture Notes in Networks and Systems, vol 561. Springer, Cham. https://doi.org/10.1007/978-3-031-18344-7_35

Download citation

Publish with us

Policies and ethics