Sentiment analysis

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Sentiment analysis (sometimes known as opinion mining or emotion AI) refers to the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjective information. Sentiment analysis is widely applied to voice of the customer materials such as reviews and survey responses, online and social media, and healthcare materials for applications that range from marketing to customer service to clinical medicine.

Generally speaking, sentiment analysis aims to determine the attitude of a speaker, writer, or other subject with respect to some topic or the overall contextual polarity or emotional reaction to a document, interaction, or event. The attitude may be a judgment or evaluation (see appraisal theory), affective state (that is to say, the emotional state of the author or speaker), or the intended emotional communication (that is to say, the emotional effect intended by the author or interlocutor).


A basic task in sentiment analysis is classifying the polarity of a given text at the document, sentence, or feature/aspect level—whether the expressed opinion in a document, a sentence or an entity feature/aspect is positive, negative, or neutral. Advanced, "beyond polarity" sentiment classification looks, for instance, at emotional states such as "angry", "sad", and "happy".

One method that holds historical priority is the method of Volcani and Fogel,[1] which remains in practice currently. The method examines individual words and phrases with respect to different emotional scales and presents synonyms that can be used to increase or decrease the level of evoked emotion in each scale.

Other early work included Turney,[2] and Pang[3] who applied different methods for detecting the polarity of product reviews and movie reviews respectively. This work is at the document level. One can also classify a document's polarity on a multi-way scale, which was attempted by Pang[4] and Snyder[5] among others: Pang and Lee[4] expanded the basic task of classifying a movie review as either positive or negative to predict star ratings on either a 3- or a 4-star scale, while Snyder[5] performed an in-depth analysis of restaurant reviews, predicting ratings for various aspects of the given restaurant, such as the food and atmosphere (on a five-star scale). Even though in most statistical classification methods, the neutral class is ignored under the assumption that neutral texts lie near the boundary of the binary classifier, several researchers suggest that, as in every polarity problem, three categories must be identified. Moreover, it can be proven that specific classifiers such as the Max Entropy[6] and the SVMs[7] can benefit from the introduction of a neutral class and improve the overall accuracy of the classification. There are in principle two ways for operating with a neutral class. Either, the algorithm proceeds by first identifying the neutral language, filtering it out and then assessing the rest in terms of positive and negative sentiments, or it builds a three-way classification in one step.[8] This second approach often involves estimating a probability distribution over all categories (e.g. naive Bayes classifiers as implemented by Python's NLTK kit). Whether and how to use a neutral class depends on the nature of the data: if the data is clearly clustered into neutral, negative and positive language, it makes sense to filter the neutral language out and focus on the polarity between positive and negative sentiments. If, in contrast, the data are mostly neutral with small deviations towards positive and negative affect, this strategy would make it harder to clearly distinguish between the two poles.

A different method for determining sentiment is the use of a scaling system whereby words commonly associated with having a negative, neutral, or positive sentiment with them are given an associated number on a −10 to +10 scale (most negative up to most positive) or simply from 0 to a positive upper limit such as +4. This makes it possible to adjust the sentiment of a given term relative to its environment (usually on the level of the sentence). When a piece of unstructured text is analyzed using natural language processing, each concept in the specified environment is given a score based on the way sentiment words relate to the concept and its associated score.[9] This allows movement to a more sophisticated understanding of sentiment, because it is now possible to adjust the sentiment value of a concept relative to modifications that may surround it. Words, for example, that intensify, relax or negate the sentiment expressed by the concept can affect its score. Alternatively, texts can be given a positive and negative sentiment strength score if the goal is to determine the sentiment in a text rather than the overall polarity and strength of the text.[10]

Subjectivity/objectivity identification

This task is commonly defined as classifying a given text (usually a sentence) into one of two classes: objective or subjective.[11] This problem can sometimes be more difficult than polarity classification.[12] The subjectivity of words and phrases may depend on their context and an objective document may contain subjective sentences (e.g., a news article quoting people's opinions). Moreover, as mentioned by Su,[13] results are largely dependent on the definition of subjectivity used when annotating texts. However, Pang[14] showed that removing objective sentences from a document before classifying its polarity helped improve performance.


It refers to determining the opinions or sentiments expressed on different features or aspects of entities, e.g., of a cell phone, a digital camera, or a bank.[15] A feature or aspect is an attribute or component of an entity, e.g., the screen of a cell phone, the service for a restaurant, or the picture quality of a camera. The advantage of feature-based sentiment analysis is the possibility to capture nuances about objects of interest. Different features can generate different sentiment responses, for example a hotel can have a convenient location, but mediocre food.[16] This problem involves several sub-problems, e.g., identifying relevant entities, extracting their features/aspects, and determining whether an opinion expressed on each feature/aspect is positive, negative or neutral.[17] The automatic identification of features can be performed with syntactic methods or with topic modeling.[18][19] More detailed discussions about this level of sentiment analysis can be found in Liu's work.[20]

Methods and features

Existing approaches to sentiment analysis can be grouped into three main categories: knowledge-based techniques, statistical methods, and hybrid approaches.[21] Knowledge-based techniques classify text by affect categories based on the presence of unambiguous affect words such as happy, sad, afraid, and bored.[22] Some knowledge bases not only list obvious affect words, but also assign arbitrary words a probable "affinity" to particular emotions.[23] Statistical methods leverage on elements from machine learning such as latent semantic analysis, support vector machines, "bag of words" and Semantic Orientation — Pointwise Mutual Information (See Peter Turney's[2] work in this area). More sophisticated methods try to detect the holder of a sentiment (i.e., the person who maintains that affective state) and the target (i.e., the entity about which the affect is felt).[24] To mine the opinion in context and get the feature which has been opinionated, the grammatical relationships of words are used. Grammatical dependency relations are obtained by deep parsing of the text.[25] Hybrid approaches leverage on both machine learning and elements from knowledge representation such as ontologies and semantic networks in order to detect semantics that are expressed in a subtle manner, e.g., through the analysis of concepts that do not explicitly convey relevant information, but which are implicitly linked to other concepts that do so.[26]

Open source software tools deploy machine learning, statistics, and natural language processing techniques to automate sentiment analysis on large collections of texts, including web pages, online news, internet discussion groups, online reviews, web blogs, and social media.[27] Knowledge-based systems, on the other hand, make use of publicly available resources, to extract the semantic and affective information associated with natural language concepts. Sentiment analysis can also be performed on visual content, i.e., images and videos. One of the first approach in this direction is SentiBank[28] utilizing an adjective noun pair representation of visual content.

A human analysis component is required in sentiment analysis, as automated systems are not able to analyze historical tendencies of the individual commenter, or the platform and are often classified incorrectly in their expressed sentiment. Automation impacts approximately 23% of comments that are correctly classified by humans.[29] However, also humans often disagree, and it is argued that the inter-human agreement provides an upper bound that automated sentiment classifiers can eventually reach.[30]

Sometimes, the structure of sentiments and topics is fairly complex. Also, the problem of sentiment analysis is non-monotonic in respect to sentence extension and stop-word substitution (compare THEY would not let my dog stay in this hotel vs I would not let my dog stay in this hotel). To address this issue a number of rule-based and reasoning-based approaches have been applied to sentiment analysis, including defeasible logic programming.[31] Also, there is a number of tree traversal rules applied to syntactic parse tree to extract the topicality of sentiment in open domain setting.[32][33]


The accuracy of a sentiment analysis system is, in principle, how well it agrees with human judgments. This is usually measured by precision and recall. However, according to research human raters typically agree 79%[34] of the time (see Inter-rater reliability).

Thus, a 70% accurate program is doing nearly as well as humans, even though such accuracy may not sound impressive. If a program were "right" 100% of the time, humans would still disagree with it about 20% of the time, since they disagree that much about any answer .[35] More sophisticated measures can be applied, but evaluation of sentiment analysis systems remains a complex matter. For sentiment analysis tasks returning a scale rather than a binary judgement, correlation is a better measure than precision because it takes into account how close the predicted value is to the target value.

Web 2.0

The rise of social media such as blogs and social networks has fueled interest in sentiment analysis. With the proliferation of reviews, ratings, recommendations and other forms of online expression, online opinion has turned into a kind of virtual currency for businesses looking to market their products, identify new opportunities and manage their reputations. As businesses look to automate the process of filtering out the noise, understanding the conversations, identifying the relevant content and actioning it appropriately, many are now looking to the field of sentiment analysis.[36] Further complicating the matter, is the rise of anonymous social media platforms such as 4chan and Reddit.[37] If web 2.0 was all about democratizing publishing, then the next stage of the web may well be based on democratizing data mining of all the content that is getting published.[38]

One step towards this aim is accomplished in research. Several research teams in universities around the world currently focus on understanding the dynamics of sentiment in e-communities through sentiment analysis.[39] The CyberEmotions project, for instance, recently identified the role of negative emotions in driving social networks discussions.[40]

The problem is that most sentiment analysis algorithms use simple terms to express sentiment about a product or service. However, cultural factors, linguistic nuances and differing contexts make it extremely difficult to turn a string of written text into a simple pro or con sentiment.[36] The fact that humans often disagree on the sentiment of text illustrates how big a task it is for computers to get this right. The shorter the string of text, the harder it becomes.

Even though short text strings might be a problem, sentiment analysis within microblogging has shown that Twitter can be seen as a valid online indicator of political sentiment. Tweets' political sentiment demonstrates close correspondence to parties' and politicians' political positions, indicating that the content of Twitter messages plausibly reflects the offline political landscape.[41]

Application in recommender system

For a recommender system, sentiment analysis has been proven to be a valuable technique. A recommender system aims to predict the preference to an item of a target user. Mainstream recommender systems work on explicit data set. For example, collaborative filtering works on the rating matrix, and content-based filtering works on the meta-data of the items.

In many social networking services or E-commerce websites, users can provide text review, comment or feedback to the items. These user-generated text provide a rich source of user's sentiment opinions about numerous products and items. Potentially, for an item, such text can reveal both the related feature/aspects of the item and the users' sentiments on each feature.[42] The item's feature/aspects described in the text play the same role with the meta-data in content-based filtering, but the former are more valuable for the recommender system. Since these features are broadly mentioned by users in their reviews, they can be seen as the most crucial features that can significantly influence the user's experience on the item, while the meta-data of the item (usually provided by the producers instead of consumers) may ignore features that are concerned by the users. For different items with common features, a user may give different sentiments. Also, a feature of the same item may receive different sentiments from different users. Users' sentiments on the features can be regarded as a multi-dimensional rating score, reflecting their preference on the items.

Based on the feature/aspects and the sentiments extracted from the user-generated text, a hybrid recommender system can be constructed.[43] There are two types of motivation to recommend a candidate item to a user. The first motivation is the candidate item have numerous common features with the user's preferred items,[44] while the second motivation is that the candidate item receives a high sentiment on its features. For a preferred item, it is reasonable to believe that items with the same features will have a similar function or utility. So, these items will also likely to be preferred by the user. On the other hand, for a shared feature of two candidate items, other users may give positive sentiment to one of them while give negative sentiment to another. Clearly, the high evaluated item should be recommended to the user. Based on these two motivations, a combination ranking score of similarity and sentiment rating can be constructed for each candidate item.[43]

Except the difficulty of the sentiment analysis itself, applying sentiment analysis on reviews or feedback also face the challenge of spam and biased reviews. One direction of work is focused on evaluating the helpfulness of each review.[45] Review or feedback poorly written are hardly helpful for recommender system. Besides, a review can be designed to hinder sales of a target product, thus be harmful to the recommender system even it is well written.

Researchers also found that long and short form of user-generated text should be treated differently. An interesting result shows that short form reviews are sometimes more helpful than long form,[46] because it is easier to filter out the noise in a short form text. For the long form text, the growing length of the text does not always bring a proportionate increase of the number of features or sentiments in the text.

See also


  1. ^ USA Issued 7,136,877, Volcani, Yanon; & Fogel, David B., "System and method for determining and controlling the impact of text", published June 28, 2001. 
  2. ^ a b Turney, Peter (2002). "Thumbs Up or Thumbs Down? Semantic Orientation Applied to Unsupervised Classification of Reviews". Proceedings of the Association for Computational Linguistics. pp. 417–424. arXiv:cs.LG/0212032Freely accessible. 
  3. ^ Pang, Bo; Lee, Lillian; Vaithyanathan, Shivakumar (2002). "Thumbs up? Sentiment Classification using Machine Learning Techniques". Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP). pp. 79–86. 
  4. ^ a b Pang, Bo; Lee, Lillian (2005). "Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales". Proceedings of the Association for Computational Linguistics (ACL). pp. 115–124. 
  5. ^ a b Snyder, Benjamin; Barzilay, Regina (2007). "Multiple Aspect Ranking using the Good Grief Algorithm". Proceedings of the Joint Human Language Technology/North American Chapter of the ACL Conference (HLT-NAACL). pp. 300–307. 
  6. ^ Vryniotis, Vasilis (2013). The importance of Neutral Class in Sentiment Analysis. 
  7. ^ Koppel, Moshe; Schler, Jonathan (2006). "The Importance of Neutral Examples for Learning Sentiment". Computational Intelligence 22. pp. 100–109. CiteSeerX accessible. 
  8. ^ Ribeiro, Filipe Nunes; Araujo, Matheus (2010). "A Benchmark Comparison of State-of-the-Practice Sentiment Analysis Methods". Transactions on Embedded Computing Systems. 9 (4). 
  9. ^ Taboada, Maite; Brooke, Julian (2011). "Lexicon-based methods for sentiment analysis". Computational Linguistics. 37 (2): 272–274. doi:10.1162/coli_a_00049. 
  10. ^ Thelwall, Mike; Buckley, Kevan; Paltoglou, Georgios; Cai, Di; Kappas, Arvid (2010). "Sentiment strength detection in short informal text". Journal of the American Society for Information Science and Technology. 61 (12): 2544–2558. doi:10.1002/asi.21416. 
  11. ^ Pang, Bo; Lee, Lillian (2008). "4.1.2 Subjectivity Detection and Opinion Identification". Opinion Mining and Sentiment Analysis. Now Publishers Inc. 
  12. ^ Mihalcea, Rada; Banea, Carmen; Wiebe, Janyce (2007). "Learning Multilingual Subjective Language via Cross-Lingual Projections" (PDF). Proceedings of the Association for Computational Linguistics (ACL). pp. 976–983. 
  13. ^ Su, Fangzhong; Markert, Katja (2008). "From Words to Senses: a Case Study in Subjectivity Recognition" (PDF). Proceedings of Coling 2008, Manchester, UK. 
  14. ^ Pang, Bo; Lee, Lillian (2004). "A Sentimental Education: Sentiment Analysis Using Subjectivity Summarization Based on Minimum Cuts". Proceedings of the Association for Computational Linguistics (ACL). pp. 271–278. 
  15. ^ Hu, Minqing; Liu, Bing (2004). "Mining and Summarizing Customer Reviews". Proceedings of KDD 2004. 
  16. ^ Cataldi, Mario; Ballatore, Andrea; Tiddi, Ilaria; Aufaure, Marie-Aude (2013-06-22). "Good location, terrible food: detecting feature sentiment in user-generated reviews". Social Network Analysis and Mining. 3 (4): 1149–1163. doi:10.1007/s13278-013-0119-7. ISSN 1869-5450. 
  17. ^ Liu, Bing; Hu, Minqing; Cheng, Junsheng (2005). "Opinion Observer: Analyzing and Comparing Opinions on the Web". Proceedings of WWW 2005. 
  18. ^ Zhai, Zhongwu; Liu, Bing; Xu, Hua; Jia, Peifa (2011-01-01). Huang, Joshua Zhexue; Cao, Longbing; Srivastava, Jaideep, eds. Constrained LDA for Grouping Product Features in Opinion Mining. Lecture Notes in Computer Science. Springer Berlin Heidelberg. pp. 448–459. doi:10.1007/978-3-642-20841-6_37. ISBN 978-3-642-20840-9. 
  19. ^ Titov, Ivan; McDonald, Ryan (2008-01-01). "Modeling Online Reviews with Multi-grain Topic Models". Proceedings of the 17th International Conference on World Wide Web. WWW '08. New York, NY, USA: ACM: 111–120. doi:10.1145/1367497.1367513. ISBN 978-1-60558-085-2. 
  20. ^ Liu, Bing (2010). "Sentiment Analysis and Subjectivity" (PDF). In Indurkhya, N.; Damerau, F. J. Handbook of Natural Language Processing (Second ed.). 
  21. ^ Cambria, E; Schuller, B; Xia, Y; Havasi, C (2013). "New avenues in opinion mining and sentiment analysis". IEEE Intelligent Systems. 28 (2): 15–21. doi:10.1109/MIS.2013.30. 
  22. ^ Ortony, Andrew; Clore, G; Collins, A (1988). The Cognitive Structure of Emotions (PDF). Cambridge Univ. Press. 
  23. ^ Stevenson, Ryan; Mikels, Joseph; James, Thomas (2007). "Characterization of the Affective Norms for English Words by Discrete Emotional Categories" (PDF). Behavior Research Methods. 39 (4): 1020–1024. doi:10.3758/bf03192999. PMID 18183921. 
  24. ^ Kim, S. M.; Hovy, E. H. (2006). "Identifying and Analyzing Judgment Opinions." (PDF). Proceedings of the Human Language Technology / North American Association of Computational Linguistics conference (HLT-NAACL 2006). New York, NY. 
  25. ^ Dey, Lipika; Haque, S. K. Mirajul (2008). "Opinion Mining from Noisy Text Data". Proceedings of the second workshop on Analytics for noisy unstructured text data, p.83-90. 
  26. ^ Cambria, E; Hussain, A (2012). Sentic Computing: Techniques, Tools, and Applications. Springer. 
  27. ^ Akcora, Cuneyt Gurcan; Bayir, Murat Ali; Demirbas, Murat; Ferhatosmanoglu, Hakan (2010). "Identifying breakpoints in public opinion". SigKDD, Proceedings of the First Workshop on Social Media Analytics. 
  28. ^ Borth, Damian; Ji, Rongrong; Chen, Tao; Breuel, Thomas; Chang, Shih-Fu (2013). "Large-scale Visual Sentiment Ontology and Detectors Using Adjective Noun Pairs". Proceedings of ACM Int. Conference on Multimedia. pp. 223–232. 
  29. ^ "Case Study: Advanced Sentiment Analysis". Retrieved 18 October 2013. 
  30. ^ Mozetič, Igor; Grčar, Miha; Smailović, Jasmina (2016-05-05). "Multilingual Twitter Sentiment Classification: The Role of Human Annotators". PLOS ONE. 11 (5): e0155036. doi:10.1371/journal.pone.0155036. ISSN 1932-6203. PMC 4858191Freely accessible. PMID 27149621. 
  31. ^ Galitsky, Boris; McKenna, Eugene William. "Sentiment Extraction from Consumer Reviews for Providing Product Recommendations". Retrieved 18 November 2013. 
  32. ^ Galitsky, Boris; Dobrocsi, Gabor; de la Rosa, Josep Lluís (2010). "Inverting Semantic Structure Under Open Domain Opinion Mining". FLAIRS Conference. 
  33. ^ Galitsky, Boris; Chen, Huanjin; Du, Shaobin (2009). "Inversion of Forum Content Based on Authors' Sentiments on Product Usability". AAAI Spring Symposium: Social Semantic Web: Where Web 2.0 Meets Web 3.0: 33–38. 
  34. ^ Ogneva, M. "How Companies Can Use Sentiment Analysis to Improve Their Business". Mashable. Retrieved 2012-12-13. 
  35. ^ Roebuck, K. (2012-10-24). Sentiment Analysis: High-impact Strategies - What You Need to Know: Definitions, Adoptions, Impact, Benefits, Maturity, Vendors. ISBN 9781743049457. 
  36. ^ a b Wright, Alex. "Mining the Web for Feelings, Not Facts", New York Times, 2009-08-23. Retrieved on 2009-10-01.
  37. ^ "Sentiment Analysis on Reddit". Retrieved 10 October 2014. 
  38. ^ Kirkpatrick, Marshall. ", ReadWriteWeb, 2009-04-15. Retrieved on 2009-10-01.
  39. ^ CORDIS. "Collective emotions in cyberspace (CYBEREMOTIONS)", European Commission, 2009-02-03. Retrieved on 2010-12-13.
  40. ^ Condliffe, Jamie. "Flaming drives online social networks ", NewScientist, 2010-12-07. Retrieved on 2010-12-13.
  41. ^ Tumasjan, Andranik; O.Sprenger, Timm; G.Sandner, Philipp; M.Welpe, Isabell (2010). "Predicting Elections with Twitter: What 140 Characters Reveal about Political Sentiment". "Proceedings of the Fourth International AAAI Conference on Weblogs and Social Media"
  42. ^ Tang, Huifeng, Songbo Tan, and Xueqi Cheng. "A survey on sentiment detection of reviews." Expert Systems with Applications 36.7 (2009): 10760-10773.
  43. ^ a b Jakob, Niklas, et al. "Beyond the stars: exploiting free-text user reviews to improve the accuracy of movie recommendations." Proceedings of the 1st international CIKM workshop on Topic-sentiment analysis for mass opinion. ACM, 2009.
  44. ^ Hu, Minqing, and Bing Liu. "Mining opinion features in customer reviews." AAAI. Vol. 4. No. 4. 2004.
  45. ^ Liu, Yang, et al. "Modeling and predicting the helpfulness of online reviews." Data mining, 2008. ICDM'08. Eighth IEEE international conference on. IEEE, 2008.
  46. ^ Bermingham, Adam, and Alan F. Smeaton. "Classifying sentiment in microblogs: is brevity an advantage?." Proceedings of the 19th ACM international conference on Information and knowledge management. ACM, 2010.