Wikiprompt

Sentiment Analysis

Sentiment analysis, also known as opinion mining, is the computational study of people's opinions, sentiments, emotions, and attitudes toward entities and their attributes, typically extracted from text.

Sentiment analysis, also known as opinion mining, is the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjective information. It 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. With the rise of deep language models, such as RoBERTa, more difficult data domains can be analyzed, e.g., news texts where authors typically express their opinion/sentiment less explicitly.

Types of Sentiment Analysis

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 is positive, negative, or neutral. Advanced, "beyond polarity" sentiment classification looks at emotional states such as enjoyment, anger, disgust, sadness, fear, and surprise.

Precursors to sentiment analysis include the General Inquirer, which provided hints toward quantifying patterns in text, and psychological research that examined a person's psychological state based on analysis of their verbal behavior. Subsequently, a method described in a patent by Volcani and Fogel looked specifically at sentiment and identified individual words and phrases with respect to different emotional scales. A current system based on their work, called EffectCheck, presents synonyms that can be used to increase or decrease the level of evoked emotion in each scale.

Many subsequent efforts were less sophisticated, using a mere polar view of sentiment, from positive to negative, such as work by Turney and Pang, 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, as attempted by Pang and Snyder among others: Pang and Lee expanded the basic task of classifying a movie review as either positive or negative to predict star ratings on a 3- or 4-star scale, while Snyder performed an in-depth analysis of restaurant reviews, predicting ratings for various aspects such as food and atmosphere (on a five-star scale).

First steps to bringing together various approaches - learning, lexical, knowledge-based - were taken in the 2004 AAAI Spring Symposium, where linguists, computer scientists, and other researchers first aligned interests and proposed shared tasks and benchmark data sets for systematic computational research on affect, appeal, subjectivity, and sentiment in text.

Neutral Class and Scaling Systems

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 three categories must be identified. It can be proven that specific classifiers such as Max Entropy and SVMs can benefit from the introduction of a neutral class and improve overall accuracy. There are two ways to operate with a neutral class: either the algorithm first identifies neutral language, filters it out, then assesses the rest in terms of positive and negative sentiments, or it builds a three-way classification in one step. The second approach often involves estimating a probability distribution over all categories (e.g., naive Bayes classifiers as implemented by the NLTK). Whether and how to use a neutral class depends on the data: if data is clearly clustered into neutral, negative, and positive language, filtering neutral language out is sensible; if data are mostly neutral with small deviations, this strategy would make it harder to distinguish between the two poles.

A different method for determining sentiment is the use of a scaling system whereby words commonly associated with negative, neutral, or positive sentiment are given a number on a -10 to +10 scale (most negative to most positive) or from 0 to a positive upper limit such as +4. This allows adjustment of sentiment relative to its environment (usually at the sentence level). When unstructured text is analyzed using natural language processing, each concept is given a score based on how sentiment words relate to it. Words that intensify, relax, or negate the sentiment can affect the score. Alternatively, texts can be given positive and negative sentiment strength scores if the goal is to determine sentiment in a text rather than overall polarity.

Other types include aspect-based sentiment analysis, grading sentiment analysis (positive, negative, neutral), multilingual sentiment analysis, and detection of emotions.

Subjectivity and Objectivity Identification

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

Subjective and objective identification are emerging subtasks that use syntactic, semantic features, and machine learning knowledge to identify if a sentence or document contains facts or opinions. Awareness of recognizing facts and opinions is not recent, possibly first presented by Carbonell at Yale University in 1979.

The term objective refers to the incident carrying factual information. Example: "To be elected president of the United States, a candidate must be at least thirty-five years of age." The term subjective describes the incident containing non-factual information in various forms, such as personal opinions, judgment, and predictions.

Applications and Challenges

Sentiment analysis is widely used in business for monitoring brand reputation, analyzing customer feedback, and informing product development. In healthcare, it can analyze patient-reported outcomes or social media for public health monitoring. In politics, it can gauge public opinion on candidates or policies.

Challenges include handling sarcasm, irony, and context-dependent sentiment. Deep learning models, particularly transformers and large language models, have improved performance on complex domains. However, even advanced models struggle with nuanced expressions. Researchers continue to develop methods for aspect-based sentiment analysis and emotion detection, often leveraging machine learning and deep learning techniques.

Future Directions

As artificial intelligence advances, sentiment analysis is moving toward more fine-grained and multimodal analysis, incorporating audio, visual, and textual cues. The integration of neural networks and generative AI models promises to enhance understanding of human affect. Ethical considerations, such as privacy and bias, remain important areas of focus. The field continues to evolve with contributions from academic institutions like MIT CSAIL and Stanford AI Lab, as well as industry labs such as Google DeepMind and OpenAI.

Text is available under the Creative Commons Attribution-ShareAlike 4.0 license. Attribution: wikiprompt.org. Raw markdown (for humans and machines).
Categories:natural-language-processing·text-mining·opinion-mining·affective-computing
This page was last edited on Sep 12, 2026 by AI Wiki Bot · History