Production-ready multilingual sentiment intelligence platform
Hybrid Transformer Routing โข Confidence-Aware Decisions โข Explainable AI
โญ If you like this project, consider giving it a star!
Real-time multilingual sentiment analysis โข Bulk CSV processing โข Explainability โข Interactive dashboard
- 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
- 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
- E-commerce product review analysis
- Social media sentiment monitoring
- Multilingual customer feedback systems
- Market research & brand intelligence
- Multilingual input breaks traditional models
- Translation introduces hidden errors
- Confidence scores are misleading
- Ambiguous predictions are mishandled
- Lack of explainability
| 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 |
- Model-first architecture (no heuristics)
- Margin-based ambiguity detection
- Entropy-based confidence (not softmax)
- Translation trust gating system
| Metric | Value |
|---|---|
| Accuracy | ~91% |
| Precision | ~0.92 |
| Recall | ~0.91 |
| F1 Score | ~0.90 |
Evaluated on mixed multilingual dataset (real-world inputs)
| 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 |
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| 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 |
Ensure your system has:
- Python 3.10+
- Node.js 18+ (with npm)
- Git
git clone https://github.com/amansethhh/ReviewSense-Analytics.git
cd ReviewSense-Analytics# Create virtual environment
python -m venv venv
# Activate it
# Windows (PowerShell)
.\venv\Scripts\Activate.ps1
# macOS / Linux
source venv/bin/activate
# Install backend dependencies
pip install -r backend/requirements.txt# Install root orchestration tools (concurrently, wait-on)
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..Tip: You can also run
npm run install:allfrom the project root to install both root and frontend dependencies in one command.
From the project root, run one of these:
# Option A โ npm (starts backend + frontend together)
npm start# Option B โ PowerShell script (Windows)
.\start.ps1Both methods will:
- Kill any existing processes on ports 8000, 5173, 5174
- Start the FastAPI backend on
http://localhost:8000 - Wait for the backend to become healthy
- Start the Vite React frontend on
http://localhost:5173
If you prefer to start services individually:
Terminal 1 โ Backend (FastAPI)
# From the project root (with venv activated)
python backend/start_backend.pyOr directly with uvicorn:
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Terminal 2 โ Frontend (Vite + React)
cd frontend
npm run dev| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| Backend API | http://localhost:8000 |
| API Docs (Swagger) | http://localhost:8000/docs |
| Health Check | http://localhost:8000/health |
The .env files are pre-configured. If you need to customize them:
| File | Key Variable | Default |
|---|---|---|
.env (root) |
BACKEND_URL |
http://localhost:8000 |
frontend/.env |
VITE_API_URL |
http://localhost:8000 |
-
๐ 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
Input โ API โ NLP Pipeline โ Model โ Decision Layer โ Output โ Dashboard
First run may take time due to model loading Ensure internet connection for translation models (NLLB) Use small datasets initially for faster testing
- No heuristics
- Model-first decisions
- Deterministic outputs
- Translation-aware routing
- Fully traceable pipeline
- Domain-specific fine-tuning
- Advanced translation scoring
- Sarcasm detection upgrade
- CI/CD + deployment pipeline
MIT License
Built with โค๏ธ by amansethhh





