Skip to main content

Twitter Sentiment Tracking for Predicting Marketing Trends

  • Chapter
  • First Online:

Part of the book series: Advances in Computer Vision and Pattern Recognition ((ACVPR))

Abstract

We present a web-based Twitter sentiment tracking tool for brands. The tweets about four companies, namely, Facebook, Twitter, Apple, and Microsoft are collected by this system. The collection is implemented in an hourly basis in 17 Anglophone cities from which these tweets are sent. After collecting the tweets, the system classifies them as positive or negative by using the Naïve Bayes and Maximum Entropy classification methods. Later on, the system determines the winner brand of each city according to the percentage of positive tweets sent by users located in the aforementioned cities. Lastly, the winner brands of the day can be monitored on a web page using Google Maps. To increase the performance of classification methods, the tweet texts are preprocessed, such as through converting all the letters to lower case, both for training hand-classified dataset and for the collected tweets. Furthermore, statistical tracking charts can be viewed via web page of the system. A dataset is produced by collecting 362,529 tweets in 9 days via Twitter API for the research, which is automatically classified by the system. Performance of the Naïve Bayes and Maximum Entropy classification methods is also evaluated with the hand-classified dataset.

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   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   54.99
Price excludes VAT (USA)
  • Durable hardcover 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.

    https://about.twitter.com/company/.

  2. 2.

    http://www.tumblr.com/.

  3. 3.

    http://www.plurk.com/.

  4. 4.

    http://www.twitter.com/.

  5. 5.

    http://www.python.org/.

  6. 6.

    http://www.nltk.org/.

  7. 7.

    http://www.json.org/.

References

  1. K.M. Al-Aidaroos, A.A. Bakar, Z. Othman, Medical data classification with Naive Bayes approach. Inf. Technol. J. 11(9), 1166–1174 (2012)

    Article  Google Scholar 

  2. D. Allard, D. D’Or, R. Froidevaux, An efficient maximum entropy approach for categorical variable prediction. Eur. J. Soil Sci. 62(3), 381–393 (2011)

    Article  Google Scholar 

  3. S. Asur, B.A. Huberman, Predicting the future with social media, in 2010 IEEE/WIC/ACM International Conference on Web Intelligence and Intelligent Agent Technology (WI-IAT), vol. 1 pp.492–499 (2010)

    Google Scholar 

  4. F. Benamara, C. Cesarano, A. Picariello, D.R. Recupero, V.S. Subrahmanian, Sentiment analysis: adjectives and adverbs are better than adjectives alone, in ICWSM (2007)

    Google Scholar 

  5. A.L. Berger, V.J. Della Pietra, S.A. Della Pietra, A maximum entropy approach to natural language processing. Comput. Linguist. 22(1), 39–71 (1996)

    Google Scholar 

  6. E. Boiy, P. Hens, K. Deschacht, M.-F. Moens, Automatic sentiment analysis in on-line text, in ELPUB, pp. 349–360 (2007)

    Google Scholar 

  7. J. Bollen, H. Mao, X. Zeng, Twitter mood predicts the stock market. J. Comput. Sci. 2(1), 1–8 (2011)

    Article  Google Scholar 

  8. J. Chen, H. Huang, S. Tian, Feature selection for text classification with Naive Bayes. Expert Syst. Appl. 36(3), 5432–5435 (2009)

    Article  Google Scholar 

  9. A. Devitt, K. Ahmad, Sentiment polarity identification in financial news: a cohesion-based approach, in Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics (2007)

    Google Scholar 

  10. N.A. Diakopoulos, D.A. Shamma, Characterizing debate performance via aggregated Twitter sentiment, in Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, CHI’10 (ACM, New York, 2010), pp. 1195–1198

    Google Scholar 

  11. B.F. Green, A.K. Wolf Jr, C. Chomsky, K. Laughery, Baseball: An automatic question-answerer, in Papers Presented at the 9–11 May 1961, Western Joint IRE-AIEE-ACM Computer Conference, IRE-AIEE-ACM’61 (Western) (ACM, New York, 1961), pp. 219–224

    Google Scholar 

  12. S.C. Herring, L.A. Scheidt, S. Bonus, E. Wright, Bridging the gap: a genre analysis of weblogs, in Proceedings of the 37th Annual Hawaii International Conference on System Sciences, January 2004, pages 11 pp.- (2004)

    Google Scholar 

  13. B.J. Jansen, M. Zhang, K. Sobel, A. Chowdury, Twitter power: tweets as electronic word of mouth. J. Am. Soc. Inf. Sci. Technol. 60(11), 2169–2188 (2009)

    Article  Google Scholar 

  14. T. Joachims, Text Categorization with Support Vector Machines: Learning with Many Relevant Features (Springer, New York, 1998)

    Google Scholar 

  15. K. Sang-Bum, H. Kyoung-Soo, R. Hae-Chang, H. Myaeng, Some effective techniques for Naive Bayes text classification. IEEE Trans. Knowl. Data Eng. 18(11), 1457–1466 (2006)

    Article  Google Scholar 

  16. H. Kwak, C. Lee, H. Park, S. Moon, What is Twitter, a social network or a news media? in Proceedings of the 19th International Conference on World Wide Web, WWW’10 (ACM, New York, 2010), pp. 591–600

    Google Scholar 

  17. N. Li, D.D. Wu, Using text mining and sentiment analysis for online forums hotspot detection and forecast. Decis. Support Syst. 48(2), 354–368 (2010)

    Article  Google Scholar 

  18. T. Liu, W. Che, S. Li, Y. Hu, H. Liu, Semantic role labeling system using maximum entropy classifier, in Proceedings of the Ninth Conference on Computational Natural Language Learning, CONLL’05 (Association for Computational Linguistics, Stroudsburg, 2005), pp. 189–192

    Google Scholar 

  19. E. Loper, S. Bird, NLTK: the natural language toolkit, in Proceedings of the ACL-02 Workshop on Effective Tools and Methodologies for Teaching Natural Language Processing and Computational Linguistics—Volume 1, ETMTNLP’02 (Association for Computational Linguistics, Stroudsburg, 2002), pp. 63–70

    Google Scholar 

  20. K. Nigam, J. Lafferty, A. McCallum, Using maximum entropy for text classification, in IJCAI-99 Workshop on Machine Learning for Information Filtering, vol. 1, pp. 61–67 (1999)

    Google Scholar 

  21. B. O’Connor, R. Balasubramanyan, B.R. Routledge, N.A. Smith, From tweets to polls: linking text sentiment to public opinion time series, in Proceedings of the Fourth International AAAI Conference on Weblogs and Social Media (2010)

    Google Scholar 

  22. B. Pang, L. Lee, Opinion mining and sentiment analysis. Found. Trends Inf. Retr. 2(1–2), 1–135 (2008)

    Article  Google Scholar 

  23. D. Quercia, J. Ellis, L. Capra, J. Crowcroft, Tracking “gross community happiness” from tweets, in Proceedings of the ACM 2012 Conference on Computer Supported Cooperative Work, CSCW’12 (ACM, New York, 2012), pp. 965–968

    Google Scholar 

  24. E.S. Robertson, K.S. Jones, Relevance weighting of search terms. J. Am. Soc. Inf. Sci. 27(3), 129–146 (1976)

    Article  Google Scholar 

  25. S.J. Rosenschein, S.M. Shieber, Translating English into logical form, in Proceedings of the 20th Annual Meeting on Association for Computational Linguistics, ACL’82 (Association for Computational Linguistics, Stroudsburg, 1982), pp. 1–8

    Google Scholar 

  26. F. Rousseaux, K. Lhoste, Rapid software prototyping using Ajax and Google map Api, in IEEE Second International Conferences on Advances in Computer-Human Interactions, ACHI’09, (IEEE, 2009), pp. 317-323

    Google Scholar 

  27. M.F. Sanner, Python: a programming language for software integration and development.J. Mol. Graph. Model. 17(1), 57–61 (1999)

    Google Scholar 

  28. K.-M. Schneider, A comparison of event models for Naive Bayes anti-spam e-mail filtering, in Proceedings of the Tenth Conference on European Chapter of the Association for Computational Linguistics—Volume 1, EACL’03 (Association for Computational Linguistics, Stroudsburg, 2003), pp. 307–314

    Google Scholar 

  29. B. Sharifi, M.-A. Hutton, J. Kalita, Summarizing microblogs automatically, in Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, HLT’10 (Association for Computational Linguistics, Stroudsburg, 2010), pp. 685–688

    Google Scholar 

  30. S. Soderland, Learning information extraction rules for semi-structured and free text. Mach. Learn. 34(1–3), 233–272 (1999)

    Article  MATH  Google Scholar 

  31. A. Tumasjan, T.O. Sprenger, P.G. Sandner, I.M. Welpe, Predicting elections with Twitter: what 140 characters reveal about political sentiment. ICWSM 10, 178–185 (2010)

    Google Scholar 

  32. A.M. Turing, Computing machinery and intelligence. Mind 59, 433–460 (1950)

    Article  MathSciNet  Google Scholar 

  33. K. Tzeras, S. Hartmann, Automatic indexing based on Bayesian inference networks, in Proceedings of the 16th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR’93 (ACM, New York, 1993), pp. 22–35

    Google Scholar 

  34. C.T. Yu, G. Salton, Precision weighting; an effective automatic indexing method. J. ACM 23(1), 76–88 (1976)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

The first author has been funded by the Ministry of National Education, Republic of Turkey.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cagdas Esiyok .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Esiyok, C., Albayrak, S. (2015). Twitter Sentiment Tracking for Predicting Marketing Trends. In: Hopfgartner, F. (eds) Smart Information Systems. Advances in Computer Vision and Pattern Recognition. Springer, Cham. https://doi.org/10.1007/978-3-319-14178-7_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-14178-7_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-14177-0

  • Online ISBN: 978-3-319-14178-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics