Skip to content

srinchanagowda/SentimentPulse

Repository files navigation

SentientPulse: Real-Time Brand & Social Sentiment Intelligence

🚀 Live Demo

SentientPulse is an airline-focused sentiment intelligence dashboard that analyzes customer tweets, classifies sentiment, and highlights operational issues such as delays, baggage problems, cancellations, and service complaints.

Business Value

  • Tracks airline customer sentiment in near real time.
  • Helps surface high-impact service issues quickly.
  • Provides an executive-friendly dashboard for monitoring brand health.
  • Supports issue-level insights beyond basic sentiment classification.

Dataset

This project uses the Twitter US Airline Sentiment dataset. The key columns are:

  • text: tweet content.
  • airline_sentiment: sentiment label.
  • negativereason: optional field for negative issue analysis.

Technical Architecture

  • Training script: model_trainer.py
  • Inference dashboard: app.py
  • Feature extraction: TF-IDF
  • Classifier: Linear SVM
  • Visualization: Streamlit + Plotly
  • Persistence: Joblib

Project Workflow

  1. Load the raw CSV dataset.
  2. Remove missing rows and empty labels.
  3. Normalize tweet text.
  4. Train a TF-IDF + Linear SVM classification pipeline.
  5. Save the pipeline as sentiment_pipeline.joblib.
  6. Load the model in Streamlit.
  7. Predict sentiment for new text.
  8. Show live sentiment stream and airline aspect analysis.

Setup

1. Create a virtual environment

python -m venv venv

2. Activate it

# Windows
venv\Scripts\activate

# macOS/Linux
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Prepare the dataset

Place your CSV file in the project root as data.csv.

Required columns:

  • text
  • airline_sentiment

Optional column:

  • negativereason

5. Train the model

python model_trainer.py

6. Launch the dashboard

streamlit run app.py

Notes on Production Readiness

  • Missing values are dropped before training.
  • Empty labels are removed.
  • Text is normalized consistently in both training and inference.
  • The model is saved as a reusable pipeline.
  • The dashboard gracefully handles model-loading failures.

Future Enhancements

  • Connect to live Twitter/X or RSS data.
  • Add probability calibration.
  • Replace keyword-based aspect analysis with trained ABSA.
  • Add deployment with Docker and cloud hosting.

📝 License

This project is licensed under the MIT License.

About

Real-time airline sentiment intelligence platform. Analyses passenger feedback patterns using NLP and Scikit-Learn to empower data-driven customer experience improvements. Built for scalability and production-ready inference.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages