Sentiment Analysis Dashboard

Compare rule-based and neural network sentiment analysis in real-time

How do sentiment analysis models work? This demo compares two fundamentally different approaches:

Rule-Based (VADER-like)

Uses a sentiment lexicon with ~100+ words rated from -3 (very negative) to +3 (very positive).

  • Negation handling: "not good" → reverses sentiment
  • Intensifiers: "very good" → amplifies positive score
  • Diminishers: "somewhat good" → reduces intensity
  • Punctuation: Exclamation marks boost sentiment!

✓ Fast, interpretable, no training needed ✗ Limited vocabulary, misses context

Transformer (DistilBERT)

A neural network with 6 transformer layers, trained on the Stanford Sentiment Treebank (SST-2).

  • Contextual understanding: "The movie was not bad" understood as positive
  • Nuance detection: Handles sarcasm and complex sentences better
  • Pre-trained: Leverages knowledge from massive text corpora
  • Fine-tuned: Specifically trained for sentiment classification

✓ ~90% accuracy, handles nuance ✗ Slower, requires download, less interpretable

Input Text

0 characters

Rule-Based (VADER-like)

Fast

Overall Sentiment

Neutral 0%

Confidence Breakdown

😊 Positive 0%
😐 Neutral 0%
😞 Negative 0%

Transformer (DistilBERT)

Accurate

Overall Sentiment

Neutral 0%

Confidence Breakdown

😊 Positive 0%
😐 Neutral 0%
😞 Negative 0%

Word-Level Sentiment Contribution

Based on rule-based lexicon scores (transformer models don't provide word-level attribution)

Analyze text to see word-level sentiment contributions

Positive Neutral Negative

Emoji Analysis

Positive Emojis 0
Negative Emojis 0

Keyword Detection

Simple keyword matching - not aspect-based sentiment analysis

Keywords will appear here after analysis