Definition:
Sentiment analysis, also known as opinion mining, is a set of methods that identifies and classifies opinions, attitudes or evaluations expressed in text. It can be applied to reviews, surveys, customer service messages, social posts and other written sources.
Its output commonly indicates positive, negative or neutral polarity, although it may also locate opinions about specific aspects or estimate emotions and degrees of intensity. These tasks are not equivalent and must be defined before the data is interpreted.
The analysis may be performed manually or through rules, statistical models and artificial intelligence techniques. Automated classification represents an estimate, not an unambiguous reading of each person’s intention.
Table of contents
How sentiment analysis works
The process begins by defining the question, source and unit to be classified. Analysing a complete document, a sentence or a specific aspect, such as price, delivery or support, does not produce the same result.
A common workflow includes these five stages:
- Collection: select relevant texts and retain the necessary information about language, date, channel and context.
- Preparation: correct formats, detect the language and handle duplicates, noise or fragments that cannot be interpreted.
- Representation: transform the text into features that a rule-based or machine learning system can process.
- Classification: assign a category, score or multiple labels according to the defined objective.
- Evaluation: compare a sample against human annotations and review errors, coverage and changes in performance.
Lexicon-based approaches associate words or expressions with a predefined orientation. Trained models learn patterns from labelled examples. Hybrid systems can combine both methods and add rules specific to a language or field.
Aspect-based analysis attempts to link an evaluation to the element it concerns. A review may be positive about a camera and negative about its weight; a single label for the entire text would hide that difference.
Applications of sentiment analysis
The technique can summarise large sets of opinions and locate cases that require review. Its common applications include these five:
- Customer experience: group comments about products, deliveries, support or processes to identify recurring topics.
- Brand monitoring: observe how expressed evaluations vary across defined channels and periods without confusing mentions with representativeness.
- Product research: identify praised or criticised aspects and compare versions when the samples are equivalent.
- Service and prioritisation: flag potentially urgent or negative messages for human review.
- Market research: complement surveys, interviews or a focus group with opinions produced in other contexts.
Sentiment analysis describes what is expressed in the available data. It does not by itself demonstrate the satisfaction of an entire population, the success of a campaign or the cause of a commercial change.
Limitations and evaluation
Language depends on context. Negation, irony, sarcasm, comparisons and implicit references can reverse or qualify the apparent meaning of a sentence. Emojis, spelling errors and switches between languages create further difficulty.
A model trained in one field may misinterpret another. Words such as unpredictable or aggressive can carry different evaluations when used about a film, an illness or an investment. The domain, language and period of the data must correspond to the intended use.
Quality is evaluated against a reference sample using metrics suited to the class distribution. Overall accuracy can be misleading when one category dominates the dataset; precision, recall, errors by class and disagreement between annotators should also be reviewed.
The data may also contain biases or exclude certain groups. Human review remains necessary when a classification affects people, prioritises incidents or supports consequential decisions. Results should retain their context and limitations rather than being presented as an objective measure of public mood.
