Skip to content

Lajdre/rev-analyzer

Repository files navigation

RevAnalyzer

RevAnalyzer is an NLP app designed for analyzing and interpreting product reviews. It combines transformer-based classification, traditional machine learning models, and interactive visualizations to help users explore review sentiment and content.

Live app:
https://rev-analyzer.streamlit.app/

Showcase

rev-analyzer_demo.mp4

Overview

RevAnalyzer allows users to input or select example product reviews and explore:

  • Product category classification using a fine-tuned DistilBERT model
  • Sentiment analysis using multiple approaches
  • Word embedding visualization for semantic exploration
  • Named entity extraction with optional Wikipedia lookup

The goal of the project is to demonstrate how different NLP techniques can be combined into a single, interactive analysis workflow.

Features

Review Classification
A DistilBERT-based model fine-tuned for review classification predicts the most likely category of the reviewed product and displays confidence scores.

Sentiment Analysis
Multiple sentiment approaches are available:

  • Naive sentiment analysis using VADER
  • Logistic Regression
  • Naive Bayes
  • Support Vector Machine

(All trained models output Positive or Negative sentiment.)

Word Vector Visualization
Reviews can be projected into a 2D space using GloVe word embeddings and PCA.
This helps visualize semantic relationships between words in the review.

Named Entity Recognition
Extracts people, products, organizations, locations, and works of art using spaCy. Extracted phrases can be searched directly via Wikipedia (beta).

Tech Stack

  • Python
  • Streamlit
  • Hugging Face Transformers
  • scikit-learn
  • NLTK
  • spaCy
  • Gensim (GloVe embeddings)
  • Plotly

Run Locally

  nix develop .#impure
  source .venv/bin/activate
  streamlit run 1_🔬_Analyzer.py

NLTK data is downloaded automatically on first run.

About

Got some spare reviews?

Resources

License

Stars

Watchers

Forks

Contributors