How himavanth51/aspect-based-product-review-analyser works
This repository is an aspect-based review rating system. Its user workflow accepts a review, splits it into sentences, classifies each sentence as product, delivery, or other, predicts a 1–5 rating conditioned on the aspect, and averages product and delivery ratings for display. The Streamlit app delegates inference to the shared analyzer; a separate script performs batch aspect labeling. The README also describes preprocessing and model-training stages, represented by their notebook paths. Model artifacts and notebook internals are not present in the supplied source excerpts, so those links reflect documented workflow only.
Main entry points: review_analyzer.py Review analyzer · 02_Aspect_classifier_Model_training.ipynb Aspect model training · streamlit_app.py Streamlit UI · 03_Aspect_rating_dataset.ipynb Rating dataset creation
Components 15
Data preparation
- Review preprocessing
notebooks/01_preprocessing.ipynb - Rating dataset creation
notebooks/03_Aspect_rating_dataset.ipynb - Prediction dataset preparation
notebooks/04_Aspect_prediction_dataset.ipynb
Model development
- Aspect model training
notebooks/02_Aspect_classifier_Model_training.ipynb - Rating model training
notebooks/05_Aspect_prediction_model.ipynb
Review analysis
- Streamlit UI
streamlit_app.py - Review analyzer
src/review_analyzer.py - Sentence segmentation
src/review_analyzer.py - Aspect classifier
src/review_analyzer.py - Rating predictor
src/review_analyzer.py - Aspect aggregation
src/review_analyzer.py - Ratings display
streamlit_app.py - Batch aspect labeling
scripts/predict_aspects.py
Other components
- Reviewer
- Trained models
Connections 14
- Reviewer → Streamlit UI: enters review
README.md - Streamlit UI → Review analyzer: calls analysis
streamlit_app.py - Review analyzer → Sentence segmentation: segments review
src/review_analyzer.py - Review analyzer → Aspect classifier: classifies sentence
src/review_analyzer.py - Review analyzer → Rating predictor: predicts rating
src/review_analyzer.py - Review analyzer → Aspect aggregation: averages ratings
src/review_analyzer.py - Review analyzer → Trained models: loads models
src/review_analyzer.py - Streamlit UI → Ratings display: renders results
streamlit_app.py - Review preprocessing → Aspect model training: prepares sentences
README.md - Aspect model training → Rating dataset creation: provides aspect labels
README.md - Rating dataset creation → Prediction dataset preparation: prepares rating data
README.md - Prediction dataset preparation → Rating model training: trains predictor
README.md - Aspect model training → Trained models: saves classifier
README.md - Rating model training → Trained models: saves predictor
README.md