Technologies Used

Python Streamlit VADER NLP

Understanding user sentiment is crucial in areas like customer feedback analysis, social media monitoring, and product reviews. I developed an interactive web application that performs real-time sentiment analysis using Python, Streamlit, and the VADER sentiment analysis model.

The application allows users to input text dynamically through a clean sidebar interface and instantly receive a detailed breakdown of sentiment scores β€” positive, negative, neutral, and compound. The compound score is then interpreted to determine the overall sentiment classification.

To improve usability and presentation, I implemented custom CSS styling within Streamlit, giving the application a clean, structured, and visually intuitive interface. The result is a lightweight yet powerful sentiment analysis tool that demonstrates both NLP integration and frontend customization using Python.

Key Features

  • Real-time sentiment analysis of user-provided text
  • Interactive and responsive Streamlit UI
  • Sentiment scoring breakdown (positive, negative, neutral, compound)
  • Automated overall sentiment classification
  • Custom CSS styling for enhanced user experience
  • Lightweight and easy-to-deploy architecture

Core Sentiment Analysis Logic

from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer

analyzer = SentimentIntensityAnalyzer()
sentiment_dict = analyzer.polarity_scores(user_input)

This integrates VADER’s pre-trained rule-based sentiment model to calculate polarity scores instantly.

Sentiment Interpretation Logic

if sentiment_dict['compound'] >= 0.05:
    st.markdown("<h4 class='positive'>Overall Sentiment: Positive</h4>", unsafe_allow_html=True)
elif sentiment_dict['compound'] <= -0.05:
    st.markdown("<h4 class='negative'>Overall Sentiment: Negative</h4>", unsafe_allow_html=True)
else:
    st.markdown("<h4 class='neutral'>Overall Sentiment: Neutral</h4>", unsafe_allow_html=True)

The compound score is evaluated against defined thresholds to determine the final sentiment category.