Skip to content
Rating gauge illustrating sentiment analysis applied to reviews and online mentions

What is sentiment analysis?

Sentiment analysis is software that reads a piece of text and assigns it a polarity, usually positive, negative or neutral, sometimes with a confidence value. Two method families do the work: lexicon based systems that score words against a dictionary with rules for negation and emphasis, and machine learning classifiers trained on labelled examples, including large language models asked to label directly. Both are useful in aggregate and unreliable on any single item. This page explains how each method decides, where both break, and how to find out what accuracy you are actually getting.

What sentiment analysis does

Sentiment analysis takes a span of text and returns a judgement about the attitude expressed in it. In reputation work the input is usually a review, a social post, a support ticket or a news sentence, and the output is usually one of three labels with a confidence value attached.

Two families of method dominate, and they fail in different ways, so knowing which one you are running matters more than the vendor name on the dashboard.

Lexicon based scoring

A lexicon is a dictionary of words and phrases with a valence value attached, plus rules for the things that flip or amplify it. Excellent scores strongly positive, awful scores strongly negative, and a rule layer handles intensifiers, capitalisation, punctuation, emoji and simple negation so that not good does not score as good. The score for a document is a function of the scores of its parts. Rule based tools built this way, including well known open source lexicons designed for social text, remain in wide use.

The appeal is real: no training data, near zero cost, deterministic output, and full auditability. You can point at the exact word that produced a score and change it. The weakness is equally real. A lexicon knows nothing about your industry, so sick, killer, cheap, aggressive and complex all carry the general purpose valence rather than the one your customers mean. It handles negation across a short span and fails across a long one. It cannot read an implication.

Machine learning classifiers

The second family learns from examples. Somebody labels a corpus of text, and a model learns the mapping from text to label. Earlier systems learned from word counts; current ones are transformer based language models fine tuned on labelled examples, and increasingly a general purpose large language model asked to label directly with no task specific training at all.

Classifiers handle context far better. They pick up phrasing a lexicon cannot see, they cope with longer negation spans, and they can be trained on your own reviews so that your vocabulary means what you mean by it. The trade offs are explainability, cost and dependence on the labelled data. A model trained on one domain carries that domain's assumptions into yours, and it will keep producing confident labels while doing so. The published work behind all of this is largely open: the ACL Anthology of natural language processing research hosts the papers, the benchmark datasets and the error analyses, and reading a couple of the error analyses is the fastest cure for over trusting a dashboard.

Lexicon based Trained classifier General purpose language model
How it decides Word and phrase valence plus rules Patterns learned from labelled examples Instruction following over learned language
What it needs A dictionary A labelled corpus A prompt, and cost per call
Transparency Full, traceable to a word Limited Limited, and it varies between runs
Adapts to your domain Only by hand editing Yes, with labelled data Partly, by describing the domain
Typical failure Negation, sarcasm, jargon Domain drift, skewed training data Inconsistency, confident wrong labels

Where sentiment analysis breaks

These are not edge cases. In review text they are common.

  • Sarcasm and irony. Great, another rescheduled appointment is positive by every surface signal in it.
  • Negation and its scope. I would not say the staff were rude carries a negation two clauses away from the word being negated.
  • Domain drift. A model trained on film reviews reading dental reviews will treat painless, quick and numb as weak or negative signals.
  • Comparatives and conditionals. Better than last time is a compliment from a low base and a complaint from a high one, and would have been perfect if is a complaint wearing a compliment.
  • Mixed aspects. The food was outstanding and the service was appalling is one document and two opinions. Aspect based sentiment analysis exists to split them, and most reporting dashboards do not run it.
  • Language and code switching. Multilingual performance is uneven, and text mixing two languages is worse.
  • The neutral class. Neutral absorbs everything the model is unsure about, factual statements, and questions. A rising neutral share usually means the classifier is struggling, not that opinion is softening.

How accurate is sentiment analysis

Honestly: nobody can tell you, in advance, for your data. Accuracy figures published with a method are measured on a specific benchmark corpus in a specific domain, and they do not transfer to your reviews. Any vendor number quoted without naming the dataset and the label scheme behind it is unfalsifiable.

There is also a ceiling nobody can cross. Human annotators labelling the same reviews disagree with each other on a meaningful share of them, particularly around neutral, so there is no clean ground truth for a model to reach. What that means practically is that a model can only be as consistent as the humans who defined the labels.

The measurable alternative is small and worth the afternoon it costs. Pull a random sample of a few hundred of your own reviews or mentions, label them by hand against a written definition of each class, run your tool over the same sample, and compare. Check the classes separately: in a corpus that is mostly positive, a system that labels everything positive scores well overall and is useless, so look at how it performs on the negatives specifically. Repeat it when you change vendors, and when your product or language changes.

What the output is not for

A polarity label is a routing signal, not a conclusion and not evidence. It does not establish that a statement is false, and it has no bearing on whether anything is actionable: a claim about a false statement of fact runs through defamation law and, if it goes anywhere, through the civil courts, which the federal judiciary explains plainly in its overview of how civil cases work in the federal courts. A dashboard turning red is not a legal event.

It also does not decide your visibility. Google's guidance on local ranking factors names review count and review score among the inputs to prominence, and says nothing about the sentiment of the text. The platform that most affects whether people find you is counting stars, not reading feelings.

Using it well

Use sentiment analysis where its weaknesses matter least: high volume, directional, aggregated. It is good at telling you that something changed in week 32 and worth a look. It is poor at telling you what any individual customer meant.

Three habits carry most of the benefit. Report the topic breakdown alongside the polarity, because knowing that negative mentions are about billing rather than staff is what makes the number actionable. Always read the negative tail by hand; it is usually small enough and it is where the specifics live. And keep the method fixed, because a change of vendor or model version moves the line for reasons that have nothing to do with your customers.

The business metric built on top of this method is covered separately in what is brand sentiment, which deals with how to report it. If you would rather start from what people can actually see about you than from a classifier's output, that is where a reputation audit begins.

Questions about sentiment analysis for reputation

What is sentiment analysis?

It is software that assigns an attitude label to text, typically positive, negative or neutral. It is used to summarise large volumes of reviews, mentions or tickets without reading each one.

How accurate is sentiment analysis?

There is no single answer, and any figure quoted without naming the dataset behind it is meaningless. Published accuracies come from benchmark corpora and do not transfer to your data. The only reliable number comes from labelling a sample of your own text by hand and comparing.

What is the difference between lexicon based and machine learning sentiment analysis?

A lexicon scores words against a dictionary with rules for negation and emphasis, so it is transparent and cheap but blind to context. A trained classifier learns from labelled examples, handles context better, and inherits whatever bias its training data carried.

Why does sentiment analysis get sarcasm wrong?

Because sarcasm reverses meaning using signals that are not in the words themselves, such as shared context or tone. Every surface feature the model reads points the wrong way, so it labels the sentence confidently and incorrectly.

Is a positive, negative or neutral label enough?

Rarely. Three labels discard the subject, the severity and the fix. Two one star reviews, one about double billing and one about a wait, get the same label and need entirely different responses, so report topics alongside polarity.

Have your case reviewed

A read of what people actually wrote about you, not a polarity label.