Sentiment Analyzer
Detect positive or negative sentiment in any text using AI — runs entirely in your browser, nothing uploaded.
Sentiment Analyzer — AI-Powered Text Sentiment Detection
This tool uses DistilBERT fine-tuned on the Stanford Sentiment Treebank 2 (SST-2) dataset to classify text as positive or negative. DistilBERT is a lightweight transformer model that retains 97% of BERT's accuracy at 40% of the size, making it practical for in-browser inference via WebAssembly. The model (~70 MB) downloads once and is cached locally. Use it to analyse customer reviews, social media posts, survey responses, or any free-text feedback. Results include a confidence percentage for each class. Nothing is uploaded; all inference runs on your device.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Getting a rough read on the tone of a batch of feedback.
- Checking whether a draft reads more negatively than intended.
- Sorting responses into rough buckets before reading them.
- Comparing the tone of two pieces of copy.
- Screening a long comment thread for the most negative entries.
Frequently Asked Questions
- What model is doing the classification?
- DistilBERT fine-tuned on SST-2, running in your browser through Transformers.js. It is a binary classifier — positive or negative — trained on movie-review sentences, which is the corpus that shapes what it is good and bad at.
- Why is there no neutral option?
- Because SST-2 is a two-class dataset, so the model has no neutral to output. A genuinely neutral sentence is forced into one side with a confidence near 50%, which is why a low-confidence result should be read as "no opinion detected" rather than a weak verdict.
- What does it get wrong?
- Sarcasm, negation at a distance, and domain shift. "Not bad at all" and a glowing review of a terrible product are both classic failures, and text from a domain far from movie reviews — clinical notes, legal writing — degrades noticeably.
- Is the confidence score a probability?
- It is a softmax output, which behaves like one and is not calibrated like one. Models of this size are routinely overconfident, so treat the number as a ranking signal — useful for sorting a list of comments, unreliable as "87% likely to be positive".
- Is my text uploaded?
- No. The model downloads once and then runs entirely in the tab via WebAssembly, so the text never leaves the machine. That is the practical reason to run a small model locally rather than call an API — it works on content you would not send anywhere.
Common errors and gotchas
- Trusting the label on sarcasm or irony, which sentiment models handle badly.
- Applying it to domain language where 'negative' words are neutral, such as a bug report.
- Treating a score as a measurement rather than a rough classification.
- Running it on very short text, where there is too little signal.
- Making a decision about a person based on a model's read of one message.