Skip to content

amansethhh/ReviewSense-Analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

142 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ReviewSense Analytics

Production-ready multilingual sentiment intelligence platform

Hybrid Transformer Routing โ€ข Confidence-Aware Decisions โ€ข Explainable AI


โญ If you like this project, consider giving it a star!


๐ŸŽฌ Live Demo

ReviewSense Demo

Real-time multilingual sentiment analysis โ€ข Bulk CSV processing โ€ข Explainability โ€ข Interactive dashboard


๐ŸŒ Why This Matters

  • Businesses receive multilingual, mixed-language feedback daily
  • Traditional models fail on code-switched (Hinglish) inputs
  • Translation errors silently degrade prediction quality
  • Incorrect sentiment โ†’ wrong business decisions

ReviewSense solves this with reliable, explainable, multilingual intelligence


โšก Key Highlights

  • Hybrid transformer routing (RoBERTa + XLM-R + NLLB)
  • Hinglish normalization for real-world inputs
  • Translation trust validation (fail-safe fallback)
  • Margin-based decision layer (ambiguity control)
  • Entropy-based confidence calibration
  • Explainability via LIME + ABSA
  • Real-time + bulk processing pipeline

๐Ÿงฉ Use Cases

  • E-commerce product review analysis
  • Social media sentiment monitoring
  • Multilingual customer feedback systems
  • Market research & brand intelligence

๐ŸŽฏ Problem

  • Multilingual input breaks traditional models
  • Translation introduces hidden errors
  • Confidence scores are misleading
  • Ambiguous predictions are mishandled
  • Lack of explainability

๐Ÿ’ก Solution Overview

Layer Purpose
Language Routing Detect English / Hinglish / Multilingual
Hinglish Normalization Clean code-mixed input
Translation (NLLB) Convert multilingual โ†’ English
Validation Layer Verify translation quality
Model Layer RoBERTa / XLM-R inference
Decision Layer Margin-based ambiguity handling
Confidence Layer Entropy calibration
Explainability LIME + ABSA

๐Ÿง  Core Innovations

  • Model-first architecture (no heuristics)
  • Margin-based ambiguity detection
  • Entropy-based confidence (not softmax)
  • Translation trust gating system

๐Ÿงฉ Architecture Diagram


๐Ÿ“Š Performance

MetricValue
Accuracy~91%
Precision~0.92
Recall~0.91
F1 Score~0.90

Evaluated on mixed multilingual dataset (real-world inputs)


๐Ÿ–ผ๏ธ UI Preview


Home

Live Prediction

Model Dashboard

Multilingual Analysis

๐Ÿ—๏ธ Tech Stack

Layer Technology
Backend FastAPI, Uvicorn
Frontend React, TypeScript
Models RoBERTa, XLM-R
Translation Meta NLLB
Explainability LIME, ABSA
ML Stack PyTorch, Transformers
Data Pandas, NumPy

๐Ÿ“‚ Project Structure (Engineering-Level)

ReviewSense-Analytics/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ schemas/
โ”‚   โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ””โ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ tests/
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ””โ”€โ”€ styles/
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ pipeline/
โ”‚   โ”œโ”€โ”€ preprocessing/
โ”‚   โ”œโ”€โ”€ translation/
โ”‚   โ”œโ”€โ”€ decision/
โ”‚   โ””โ”€โ”€ predict.py
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ images/
โ”‚
โ”œโ”€โ”€ scripts/
โ”œโ”€โ”€ reports/
โ”œโ”€โ”€ data/
โ””โ”€โ”€ start.ps1

๐Ÿ”Œ API Overview

Method Endpoint Description
GET /health Health check
POST /predict Real-time sentiment
POST /bulk Bulk CSV processing
GET /metrics Model metrics
POST /feedback Feedback logging

๐Ÿ›  Setup Instructions

๐Ÿ”ง Prerequisites

Ensure your system has:

  • Python 3.10+
  • Node.js 18+
  • npm or yarn
  • Git

๐Ÿ“ฅ Clone Repository

git clone https://github.com/amansethhh/ReviewSense-Analytics.git
cd ReviewSense-Analytics

โš™๏ธ Backend Setup (FastAPI)

cd backend

# Create virtual environment
python -m venv venv

# Activate environment
# Windows
venv\Scripts\activate

# macOS / Linux
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

โ–ถ Run Backend Server

uvicorn app.main:app --reload --port 8000

Backend running at:

http://localhost:8000

๐ŸŒ Frontend Setup (React + TypeScript)

cd frontend

npm install

โ–ถ Run Frontend

npm run dev

Frontend running at:

http://localhost:5173

๐Ÿ”— Environment Configuration

Create a .env file inside frontend/:

VITE_API_URL=http://localhost:8000

๐Ÿงช How to Use

  • ๐Ÿ” Live Prediction
    Enter multilingual or Hinglish text โ†’ get sentiment, confidence, explanation

  • ๐Ÿ“ฆ Bulk Analysis
    Upload CSV file โ†’ process batch sentiment predictions

  • ๐Ÿ“Š Dashboard
    View analytics, insights, and model outputs


๐Ÿ“ System Flow

Input โ†’ API โ†’ NLP Pipeline โ†’ Model โ†’ Decision Layer โ†’ Output โ†’ Dashboard


๐Ÿ“ Notes

First run may take time due to model loading Ensure internet connection for translation models (NLLB) Use small datasets initially for faster testing


โš ๏ธ Design Principles

  • No heuristics
  • Model-first decisions
  • Deterministic outputs
  • Translation-aware routing
  • Fully traceable pipeline

๐Ÿ”ฎ Future Work

  • Domain-specific fine-tuning
  • Advanced translation scoring
  • Sarcasm detection upgrade
  • CI/CD + deployment pipeline

๐Ÿ“œ License

MIT License


Built with โค๏ธ by amansethhh