NLP Sentiment Analysis (Pretrained Models)


Project Technical Information

Project Name:
NLP Sentiment Analysis (Pretrained Models)
Project Type:
Sentiment & Emotion Analysis Pretrained Transformer Models Full NLP Pipeline + Visualization & Export
Tech Stack:
Python Flask Flask‑SQLAlchemy Transformers spaCy NLTK PyTorch SQLite Chart.js wordcloud Bootstrap 5
Models:
DistilBERT SST‑2 (distilbert‑base‑uncased‑finetuned‑sst‑2‑english) Twitter RoBERTa (cardiffnlp/twitter‑roberta‑base‑sentiment) GoEmotions DistilRoBERTa (j‑hartmann/emotion‑english‑distilroberta‑base)

Project Summary

An interactive Flask web app for sentiment and emotion analysis using pretrained Transformer models. It applies a full NLP pipeline (cleaning, tokenization, lemmatization, POS, NER), runs inference with multiple models, generates a word cloud, persists results in SQLite, and provides a downloadable analysis report.

Skills Demonstrated

Sentiment Analysis Emotion Classification NLP Preprocessing (POS, NER) Visualization (Word Cloud) Flask Web App SQLite Persistence Reporting / Export

Tools Used

Python Flask Flask‑SQLAlchemy Transformers spaCy NLTK PyTorch SQLite Chart.js wordcloud Bootstrap

Solution

Users enter text or upload a file, select a model (DistilBERT SST‑2 / Twitter RoBERTa / GoEmotions). The app runs preprocessing, performs inference to get sentiment/emotion labels, visualizes a word cloud, stores results in SQLite, and allows downloading a comprehensive TXT report.

Approach

  1. Input: Accept raw text or uploaded file.
  2. Preprocess: Clean, normalize, tokenize, lemmatize; run POS/NER.
  3. Model: Run selected pretrained Transformer to get sentiment/emotion.
  4. Visualize: Generate word cloud and charts (Chart.js).
  5. Persist: Save analysis into SQLite via SQLAlchemy.
  6. Export: Provide downloadable TXT report.

Designed and Developed by Aradhya Pavan H S