Articles → NLP → Sentiment Intensity Analyzer In NLTK
Sentiment Intensity Analyzer In NLTK
Purpose
Example
import nltk
from nltk.sentiment import SentimentIntensityAnalyzer
# Download VADER lexicon (only once)
nltk.download("vader_lexicon")
# Create analyzer
sid = SentimentIntensityAnalyzer()
# Analyze sentiment
text = "I really like this product, it is amazing!"
scores = sid.polarity_scores(text)
print(scores)
Output
| Key | Meaning |
|---|
| pos | Positive sentiment score |
| neu | Neutral sentiment score |
| neg | Negative sentiment score |
| compound | Overall sentiment (-1 to +1) |
Compound
| Posted By - | Karan Gupta |
| |
| Posted On - | Thursday, January 22, 2026 |