Skip to main content Accessibility help
×
Hostname: page-component-586b7cd67f-dlnhk Total loading time: 0 Render date: 2024-11-28T22:11:44.446Z Has data issue: false hasContentIssue false

Conducting Sentiment Analysis

Published online by Cambridge University Press:  25 August 2021

Lei Lei
Affiliation:
Shanghai Jiao Tong University, China
Dilin Liu
Affiliation:
University of Alabama

Summary

This Element provides a basic introduction to sentiment analysis, aimed at helping students and professionals in corpus linguistics to understand what sentiment analysis is, how it is conducted, and where it can be applied. It begins with a definition of sentiment analysis and a discussion of the domains where sentiment analysis is conducted and used the most. Then, it introduces two main methods that are commonly used in sentiment analysis known as supervised machine-learning and unsupervised learning (or lexicon-based) methods, followed by a step-by-step explanation of how to perform sentiment analysis with R. The Element then provides two detailed examples or cases of sentiment and emotion analysis, with one using an unsupervised method and the other using a supervised learning method.
Get access
Type
Element
Information
Online ISBN: 9781108909679
Publisher: Cambridge University Press
Print publication: 23 September 2021

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Ali, N. M., Abd El Hamid, M. M., & Youssif, A. (2019). Sentiment analysis for movies reviews dataset using deep learning models. International Journal of Data Mining & Knowledge Management Process, 9(2/3), 1927.Google Scholar
Ambrose, S. (1983). Eisenhower: Soldier, general of the army, president-elect (1893–1952). New York: Simon & Schuster.Google Scholar
Antonakaki, D., Spiliotopoulos, D., Samaras, C. V., Pratikakis, P., Ioannidis, S., & Fragopoulou, P. (2017). Social media analysis during political turbulence. PLoS ONE, 12(10), e0186836.CrossRefGoogle ScholarPubMed
Biber, D. (2006) Stance in spoken and written university registers. Journal of English for Academic Purposes, 5, 97116.CrossRefGoogle Scholar
Brookhiser, R. (2002). America’s first dynasty: The Adamses, 1735–1918. New York: Simon & Schuster.Google Scholar
Cambria, E., Poria, S., Bajpai, R., & Schuller, B. (2016). SenticNet 4: A semantic resource for sentiment analysis based on conceptual primitives. In Y. Matsumoto & R. Prasad (eds.), Proceedings of COLING 2016, the 26th international conference on computational linguistics: Technical papers (pp. 2666–2677). Osaka, Japan.Google Scholar
Cao, X., Lei, L., & Wen, J. (2020). Promoting science with linguistic devices: A large-scale study of the use of positive and negative words in academic writing. Learned Publishing, https://doi.org/10.1002/leap.1322.CrossRefGoogle Scholar
Chen, Y., & Skiena, S. (2014). Building sentiment lexicons for all major languages. In K. Toutanova & H. Wu (eds.), Proceedings of the 52nd annual meeting of the Association for Computational Linguistics (short papers) (pp. 383–389). Baltimore, MD.Google Scholar
Collins COBUILD English Dictionary. (1987). Glasgow, UK: HarperCollins.Google Scholar
Conrad, S., & Biber, D. (2000). Adverbial marking of stance in speech and writing. In Hunston, S. & Thompson, G. (eds.), Evaluation in text: Authorial stance and the construction of discourse (p. 5673). Oxford: Oxford University Press.CrossRefGoogle Scholar
Cooper, J. (2008). The Reagan years: The Great Communicator as diarist. Intelligence and National Security, 23(6), 892901.Google Scholar
D’Andrea, A., Ferri, F., Grifoni, P., & Guzzo, T. (2015). Approaches, tools and applications for sentiment analysis implementation. International Journal of Computer Applications, 125(3), 2633.CrossRefGoogle Scholar
Davenport, T. H., & Harris, J. G. (2009). What people want (and how to predict it). MIT Sloan Management Review, 50(2), 2331.Google Scholar
Davies, M. (2008–) The corpus of contemporary American English. www.english-corpora.org/coca/ (last accessed April 2021).Google Scholar
Denecke, K., & Deng, Y. (2015). Sentiment analysis in medical settings: New opportunities and challenges. Artificial Intelligence in Medicine, 64(1), 1727.Google Scholar
Desjardins, L. (January 30, 2018). The word nearly every president uses to describe the state of the union. PBS NewsHour. www.pbs.org/newshour/politics/the-word-nearly-every-president-uses-to-describe-the-state-of-the-union (accessed August 13, 2020).Google Scholar
Dipper, S. (2008). Theory-driven and corpus-driven computational linguistics, and the use of corpora. In Lüdeling, A. & Kytö, M. (eds). Corpus linguistics: An international handbook (pp. 6896). Berlin/New York: de Gruyter.Google Scholar
Eggertsson, G. B. (2008). Great expectations and the end of the Depression. American Economic Review, 98(4), 14761516.Google Scholar
Ekman, P. (1999). Basic emotions. In Dalgleish, T. & Power, M. J. (eds.), Handbook of cognition and emotion (pp. 4560). Hoboken, NJ: Wiley.Google Scholar
Federal Reserve Bank of Minneapolis Quarterly Review, Vol. 4, No. 1 (1980). https://ideas.repec.org/s/fip/fedmqr2.html (accessed August 15, 2020).Google Scholar
Feldman, R. (2013). Techniques and applications for sentiment analysis. Communication of the ACM, 56(4), 8289.Google Scholar
Garcia, D. (2013). Sentiment during recessions. The Journal of Finance, 68(3), 12671300.Google Scholar
Gayo-Avello, D. (2012a). I wanted to predict elections with Twitter and all I got was this lousy paper: A balanced survey on election prediction using Twitter data. arXiv preprint arXiv:1204.6441.CrossRefGoogle Scholar
Gayo-Avello, D. (2012b). No, you cannot predict elections with Twitter. Internet Computing, IEEE, 16(6), 9194.Google Scholar
Giuntini, F. T., Cazzolato, M. T., dos Reis, M. d. J. D., Campbell, A. T., Traina, A. J. M., & Ueyama, J. (2020). A review on recognizing depression in social networks: Challenges and opportunities. Journal of Ambient Intelligence and Humanized Computing, Advance online publication. https://doi.org/10.1007/s12652-020-01726-4.CrossRefGoogle Scholar
Gonçalves, P., Benevenuto, F., & Cha, M. (2013). Panas-t: A psychometric scale for measuring sentiments on twitter. arXiv preprint:1308.1857.Google Scholar
Gopaldas, A. (2014). Marketplace sentiments. Journal of Consumer Research, 41(4), 9951014.Google Scholar
Hajek, P., Olej, V., & Myskova, R. (2014). Forecasting corporate financial performance using sentiment in annual reports for stakeholders’ decision-making. Technological and Economic Development of Economy, 20(4), 721738.Google Scholar
Hamilton, W. L., Clark, K., Leskovec, J., & Jurafsky, D. (2016). Inducing domain-specific sentiment lexicons from unlabeled corpora. In J. Su, K. Duh, & X. Carreras (eds.), Proceedings of the conference on empirical methods in natural language processing, (pp. 595605). Austin, TX.CrossRefGoogle Scholar
Homburg, C., Ehm, L., & Artz, M. (2015). Measuring and managing consumer sentiment in an online community environment. Journal of Marketing Research, 52(5), 629641.CrossRefGoogle Scholar
Hu, Y., Hsiau, W., Shih, S., & Chen, C. (2018). Considering online consumer reviews to predict movie box-office performance between the years 2009 and 2014 in the US. The Electronic Library 36(6), 10101026.CrossRefGoogle Scholar
Hu, M., & Liu, B. (2004). Mining and summarizing customer reviews. In Kim, W., Kohavi, R., Gehrke, J., & DuMouchel, W. (eds.), The 2004 ACM SIGKDD international conference (pp. 168–177). Seattle, WA.Google Scholar
Hunston, S. (2011). Corpus approaches to evaluation: Phraseology and evaluative language. London: Routledge.Google Scholar
Hur, M., Kang, P., & Cho, S. (2016). Box-office forecasting based on sentiments of movie reviews and independent subspace method. Information Sciences, 372, 608624.CrossRefGoogle Scholar
Ikoro, V., Sharmina, M., Malik, K., & Batista-Navarro, R. (2018). Analyzing sentiments expressed on Twitter by UK energy company consumers. In 2018 fifth international conference on social networks analysis, management and security (SNAMS 2018). (pp. 95–98). Valencia, Spain: IEEE. https://doi.org/10.1109/SNAMS.2018.8554619.Google Scholar
Jockers, M. (2017a). Syuzhet (Version 1.04) [Computer software]. https://github.com/mjockers/syuzhet.Google Scholar
Jockers, M. (2017b). Syuzhet sentiment lexicon [Computer software]. https://github.com/mjockers/syuzhet.Google Scholar
Jungherr, A., Schoen, H., Posegga, O., & Jürgens, P. (2017). Digital trace data in the study of public opinion: An indicator of attention toward politics rather than political support. Social Science Computing, 35, 336356.CrossRefGoogle Scholar
Katti, R. (2016). Naïve Bayes classification for sentiment analysis of movie reviews. https://rpubs.com/cen0te/naivebayes-sentimentpolarity.Google Scholar
Keller, B. (2003). God and George W. Bush. New York Times May 17. www.nytimes.com/2003/05/17/opinion/god-and-george-w-bush.html (accessed August 16, 2020).Google Scholar
Kohn, R. H. (1972). The Washington administration’s decision to crush the Whiskey Rebellion. The Journal of American History, 59(3), 567584.Google Scholar
Lei, L., & Wen, J. (2019). Is dependency distance experiencing a process of minimization? A diachronic study based on the State of the Union addresses. Lingua, S002438411930511X. https://doi.org/10.1016/j.lingua.2019.102762.Google Scholar
Liang, T. P., Li, X., Yang, C. T., & Wang, M. (2015). What in consumer reviews affects the sales of mobile apps: A multifacet sentiment analysis approach. International Journal of Electronic Commerce, 20(2), 236260.CrossRefGoogle Scholar
Liu, B., Hu, M., & Cheng, J. (2005). Opinion observer. In A. Ellis & T. Hagino (eds.), The 14th international world wide web conference (WWW2005) (pp. 342–351). Chiba, Japan. https://doi.org/10.1145/1060745.1060797.CrossRefGoogle Scholar
Liu, D., & Lei, L. (2018). The appeal to political sentiment: An analysis of Donald Trump’s and Hillary Clinton’s speech themes and discourse strategies in the 2016 US presidential election. Discourse, Context & Media, 25, 143152.Google Scholar
Loureiro, S. M. C., Bilro, R. G., & Japutra, A. (2019), The effect of consumer-generated media stimuli on emotions and consumer brand engagement. Journal of Product & Brand Management, 29(3), 387408.Google Scholar
Lu, X. (2010). Automatic analysis of syntactic complexity in second language writing. International Journal of Corpus Linguistics, 15, 474496.CrossRefGoogle Scholar
Maas, A. L., Daly, R. E., Pham, P. T., Huang, D., Ng, A. Y., & Potts, C. (2011). Learning word vectors for sentiment analysis. In D. Lin, Y. Matsumoto, & R. Mihalcea (eds.), Proceedings of the 49th annual meeting of the Association for Computational Linguistics: Human language technologies (pp. 142–150). Portland, Oregon, USA. www.aclweb.org/anthology/P11-1015.Google Scholar
Martin, J. R., & White, P. R. R. (2005). The language of evaluation: Appraisal in English, London & New York: Palgrave/Macmillan.Google Scholar
Mäntylä, M., Graziotin, D., & Kuutila, M. (2018). The evolution of sentiment analysis: A review of research topics, venues, and top cited papers. Computer Science Review, 27, 1632.CrossRefGoogle Scholar
Mohammad, S. M., & Turney, P. (2010). Emotions evoked by common words and phrases: Using mechanical Turk to create an emotion lexicon. In D. Inkpen & C. Strapparava (eds.), Proceedings of the NAACL HLT 2010 workshop on computational approaches to analysis and generation of emotion in text (pp. 26–34). Los Angeles, CA. www.aclweb.org/anthology/W10-0204.Google Scholar
Mohammad, S. M., & Turney, P. D. (2013). Crowdsourcing a word-emotion association lexicon. Computational Intelligence, 29(3), 436465.Google Scholar
Mohammad, S. M., Zhu, X., Kiritchenko, S., & Martin, J. (2015). Sentiment, emotion, purpose, and style in electoral tweets. Information Processing & Management, 51(4), 480499. https://doi.org/10.1016/j.ipm.2014.09.003.CrossRefGoogle Scholar
Mukhtar, N., Khan, M. A., & Chiragh, N. (2018). Lexicon-based approach outperforms supervised machine Learning approach for Urdu sentiment analysis in multiple domains. Telematics and Informatics, 35(8), 21732183.CrossRefGoogle Scholar
Murthy, D. (2015). Twitter and elections: Are tweets, predictive, reactive, or a form of buzz? Information, Communication & Society, 18, 816831.CrossRefGoogle Scholar
Nasukawa, T., & Yi, J. (2003). Sentiment analysis: Capturing favorability using natural language processing. In B. Porter & J. Gennari (eds.), Proceedings of the 2nd international conference on knowledge capture, (pp. 7077). Florida, USA.Google Scholar
Nielsen, F. Å. (2011). A new ANEW: Evaluation of a word list for sentiment analysis in microblogs. In M. Rowe, M. Stankovic, A. Dadzie, & M. Hardey (eds.), Proceedings of the ESWC2011 Workshop on “Making Sense of Microposts”: Big things come in small packages. (pp. 93–98). Heraklion, Crete, Greece. https://arxiv.org/pdf/1103.2903.Google Scholar
Oscar, N, Fox, P. A., Croucher, R., Wernick, R., Keune, J., & Hooker, K. (2017). Machine learning, sentiment analysis, and tweets: An examination of Alzheimer’s disease stigma on Twitter. Journal of Gerontology Series B: Psychological Science Social Science, 72(5), 742751.CrossRefGoogle ScholarPubMed
Pagolu, V. S., Reddy, K. N., Panda, G. & Majhi, B. (2016). Sentiment analysis of Twitter data for predicting stock market movements. International conference on Signal Processing, Communication, Power and Embedded System (SCOPES) (pp.1345–1350). Paralakhemundi, India.Google Scholar
Pang, B., Lee, L., & Vaithyanathan, S. (2002). Thumbs up? Sentiment classification using machine learning techniques. In Proceedings of the ACL-02 conference on empirical methods in natural language processing (pp. 7986). Stroudsburg, PA.Google Scholar
Parkhe, V. & Biswas, B. (2016). Sentiment analysis of movie reviews: Finding most important movie aspects using driving factors. Soft Computing, 20, 33733379.Google Scholar
Rambocas, M. & Pacheco, B. G. (2018). Online sentiment analysis in marketing research: A review. Journal of Research in Interactive Marketing, 12(2), 146163.Google Scholar
Ramteke, J., Shah, S., Godhia, D., & Shaikh, A. (2016). Election result prediction using Twitter sentiment analysis. In Proceedings of the 2016 international conference on inventive computation technologies; ICICT’16 (pp. 1–5). Coimbatore, India. https://doi.org/10.1109/INVENTIVE.2016.7823280.CrossRefGoogle Scholar
Ren, F., & Quan, C. (2012). Linguistic-based emotion analysis and recognition for measuring consumer satisfaction: an application of affective computing. Information Technology and Management, 13(4), 321332.CrossRefGoogle Scholar
Rinker, T. (2018). Sentimentr (Version 2.6.1) [Computer software]. http://github.com/trinker/sentimentr.Google Scholar
Rout, J. K., Choo, K.-K. R., Dash, A. K., Bakshi, S., Jena, S. K., & Williams, K. L. (2018). A model for sentiment and emotion analysis of unstructured social media text. Electronic Commerce Research, 18(1), 181199.Google Scholar
Savoy, J. (2015). Text clustering: An application with the State of the Union addresses. Journal of the Association for Information Science and Technology, 66(8), 16451654.CrossRefGoogle Scholar
Seabrook, E. M., Kern, M. L., Fulcher, B. D., & Rickard, N. S. (2018). Predicting depression from language-based emotion dynamics: Longitudinal analysis of Facebook and Twitter status updates. Journal of Medical Internet Research, 20(5), e168. https://doi.org/10.2196/jmir.9267.Google Scholar
Shalev-Shwartz, S. & Ben-David, D. (2014). Understanding machine learning. Cambridge: Cambridge University Press.Google Scholar
Shogan, C. J. (2016). The president’s State of the Union address: Tradition, function, and policy implications (updated version). Congressional Research Service, R40132. https://crsreports.congress.gov/product/pdf/R/R40132 (last assessed August 14, 2020).Google Scholar
Sinclair, J. (1991) Corpus Concordance Collocation. Oxford: Oxford University Press.Google Scholar
Sinclair, J. (2004) Trust the Text: Language, Corpus and Discourse. London: Routledge.Google Scholar
Singh, V. K., Piryani, R., Uddin, A., & Waila, P. (2013). Sentiment analysis of movie reviews: A new feature-based heuristic for aspect-level sentiment classification. International mutli-conference on automation, computing, communication, control and compressed sensing (iMac4s), Kottayam (pp. 712–717). Kottayam, Kerala, India. https://doi.org/10.1109/iMac4s.2013.6526500.CrossRefGoogle Scholar
Sonnier, G.P., McAlister, L. & Rutz, O.J. (2011). A dynamic model of the effect of online communications on firm sales. Marketing Science, 30(4), pp. 702716.Google Scholar
Strapparava, C., & Valitutti, A. (2004). WordNet Affect: An affective extension of WordNet. In Proceedings of the fourth international conference on language resources and evaluation (LREC’04). European Language Resources Association (ELRA). www.lrec-conf.org/proceedings/lrec2004/pdf/369.pdf.Google Scholar
Taboada, M., Brooke, J., Tofiloski, M., Voll, K., & Stede, M. (2011). Lexicon-based methods for sentiment analysis. Computational Linguistics, 37(2), 267307.Google Scholar
Tausczik, Y. R., & Pennebaker, J. W. (2010). The psychological meaning of words: LIWC and computerized text analysis methods. Journal of Language and Social Psychology, 29, 2454.Google Scholar
Thet, T. T., Na, J., & Khoo, C.S.G. (2010). Aspect-based sentiment analysis of movie reviews on discussion boards. Journal of Information Science, 36(6), 823848.Google Scholar
Tumasjan, A., Sprenger, T. O., Sandner, P. G., & Welpe, I. W. (2011). Election forecasts with Twitter: How 140 characters reflect the political landscape. Social Science Computer Review, 29(4), 402418.Google Scholar
Turney, P. (2002). Thumbs up or thumbs down? Semantic orientation applied to unsupervised classication of reviews. In P. Isabelle, E. Charniak, & D. Lin (eds.), Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (pp. 417–424), Philadelphia, PA.Google Scholar
Unankard, S., Li, X., Sharaf, M., Zhong, J., & Li, X. (2014). Predicting elections from social networks based on sub-event detection and sentiment analysis. In Benatallah, B., Bestavros, A., Manolopoulos, Y., Vakali, A., & Zhang, Y. (eds.), Web information systems engineering – WISE 2014: 15th international conference, proceedings, Part II (pp. 1–16). Thessaloniki, Greece & Switzerland: Springer International Publishing.Google Scholar
Vinkers, C. H., Tijdink, J. K., & Otte, W. M. (2015). Use of positive and negative words in scientific PubMed abstracts between 1974 and 2014: Retrospective analysis. BMJ, h6467. https://doi.org/10.1136/bmj.h6467.Google Scholar
Wang, L., Liu, H., & Zhou, T. (2020). A sequential emotion approach for diagnosing mental disorder on social media. Applied Sciences, 10(5), 1–191-19.Google Scholar
Weidmann, N. B., Otto, S., & Kawerau, L. (2018). The use of positive words in political science language. PS-Political Science and Politics, 51(3), 625628.Google Scholar
Weissman, G. E., Ungar, L. H., Harhay, M. O., Courtright, K. R., & Halpern, S. D. (2019). Construct validity of six sentiment analysis methods in the text of encounter notes of patients with critical illness. Journal of Biomedical Informatics, 89, 114121.Google Scholar
Wilks, Y. (2010). Corpus linguistics and computational linguistics. International Journal of Corpus Linguistics, 15(3), 408411.Google Scholar
Wilson, T. Wilder, J, & Hoffmann, p. (2005). Recognizing contextual polarity in phrase-level sentiment analysis. In R. Mooney, C. Brew, L. Chien, & K. Kirchhoff (eds.), Proceedings of human language technology conference and conference on empirical methods in natural language processing (pp. 347–354). Vancouver, Canada.Google Scholar
Yekrangi, M. & Abdolvand, N. (2020). Financial markets sentiment analysis: developing a specialized lexicon. Journal of Intelligent Information Systems. https://doi.org/10.1007/s10844-020-00630-9.Google Scholar
Yuan, B. (2017). Sentiment analytics: Lexicons construction and analysis. Unpublished thesis, University of Missouri of Science and Technology. https://scholarsmine.mst.edu/cgi/viewcontent.cgi?article=8668&context=masters_theses.Google Scholar
Zhang, H., Gan, W., & Jiang, B. (2014). Machine learning and lexicon based methods for sentiment classification: A survey. In L. O’Conner (ed.), Proceedings of 11th Web information system and application conference (pp. 262–265), Tianjin, China.Google Scholar
Zunic, A, Corcoran, P., & Spasic, I. (2020). Sentiment analysis in health and well-being: Systematic review. JMIR Medical Informatics, 8(1): e16023. https://doi.org/10.2196/16023.Google Scholar

Save element to Kindle

To save this element to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Conducting Sentiment Analysis
  • Lei Lei, Shanghai Jiao Tong University, China, Dilin Liu, University of Alabama
  • Online ISBN: 9781108909679
Available formats
×

Save element to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Conducting Sentiment Analysis
  • Lei Lei, Shanghai Jiao Tong University, China, Dilin Liu, University of Alabama
  • Online ISBN: 9781108909679
Available formats
×

Save element to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Conducting Sentiment Analysis
  • Lei Lei, Shanghai Jiao Tong University, China, Dilin Liu, University of Alabama
  • Online ISBN: 9781108909679
Available formats
×