Sentiment Analysis Demo

Analyze the emotional tone of text using lexicon-based scoring

Text Input

How It Works

This sentiment analysis tool uses a lexicon-based approach:

  • Lexicon-Based Scoring: Each word is matched against a sentiment dictionary with pre-assigned scores
  • Word Scoring: Positive words contribute positive scores (0 to +1), negative words contribute negative scores (-1 to 0)
  • Aggregate Score: The overall sentiment is calculated by averaging all word scores
  • Normalization: The final score is normalized to range from -1 (very negative) to +1 (very positive)
  • Text Processing: Text is tokenized, converted to lowercase, and stripped of punctuation for accurate matching
Understanding the Results
  • Score Range: -1.00 to +1.00
  • Very Positive: Score above +0.5
  • Positive: Score between +0.1 and +0.5
  • Neutral: Score between -0.1 and +0.1
  • Negative: Score between -0.5 and -0.1
  • Very Negative: Score below -0.5
Limitations
  • Does not understand context, sarcasm, or irony
  • Treats negations simplistically (e.g., "not good" may not be properly handled)
  • Limited to the words in the sentiment lexicon
  • Does not consider sentence structure or grammar
  • Best suited for straightforward sentiment expression