LLM output sentiment analyzer
Generated copy can drift more positive, negative, or flat than you intended. This tool scores the sentiment of LLM output against a bundled AFINN-style lexicon, all in the browser, and shows which words are pushing the tone each way — a fast way to sanity-check the emotional register of a response before you use it.
How it works
The text is tokenised into words, and each word is looked up in an AFINN-style lexicon that assigns integer valence scores from −5 (very negative) to +5 (very positive). A simple negation rule flips a word’s sign when a negator like “not” or “never” precedes it within a few words. Positive and negative scores are summed separately, combined into a net score, and normalised by the count of scored words to give an intensity figure and an overall label.
Tips and notes
- Use enough text. A few words give noisy results; a paragraph or more produces a steadier reading.
- Sarcasm and irony fool it. Lexicon methods read “oh great, another bug” as positive — verify edge cases by eye.
- Domain matters. Words neutral in one field can be loaded in another; treat the score as relative across your own outputs rather than absolute.
- Compare versions. Running the same prompt’s outputs through the analyzer is a cheap way to see whether a prompt edit shifted the tone.