How clive0707/cinematic-sentiment-analysis works
Marathi movie-review sentiment analysis web app: users submit a review through the dashboard, Flask routes it to the prediction engine, and the dashboard presents two model results, agreement, and similar reviews. Users can also download a PDF report; a separate training workflow builds the classifiers and evaluation metrics from the review dataset. The prediction source is partial, so internal prediction steps follow the documented features and visible calls without assuming additional module wiring.
Main entry points: predict.py Prediction engine · train_model.py Training and evaluation · app.py Flask application · index.html Review dashboard
Components 15
Web interface
- Review dashboard
templates/index.html - Dashboard interactions
static/script.js - Flask application
app.py
Sentiment analysis
- Prediction engine
predict.py - Marathi text cleaning
preprocess.py - Naive Bayes model
models/sentiment_model.pkl - Logistic Regression model
models/logistic_regression_model.pkl - TF-IDF vectorizer
models/tfidf_vectorizer.pkl - Similar-review matching
predict.py - Agreement and evidence
predict.py
Model training
- Review dataset
dataset/marathi_movie_reviews.csv - Training and evaluation
train_model.py - Evaluation metrics
models/metrics.json
Reports
- PDF report generator
pdf_generator.py
Other components
- Reviewer
Connections 20
- Reviewer → Review dashboard: enters review
- Review dashboard → Dashboard interactions: uses interactions
- Review dashboard → Flask application: submits review
- Flask application → Prediction engine: requests prediction
- Prediction engine → Marathi text cleaning: cleans review
- Prediction engine → TF-IDF vectorizer: transforms review
- Prediction engine → Naive Bayes model: loads and predicts
- Prediction engine → Logistic Regression model: loads and predicts
- Prediction engine → Similar-review matching: matches reviews
- Prediction engine → Agreement and evidence: compares outputs
- Similar-review matching → Review dataset: searches corpus
- Flask application → Review dashboard: renders results
- Flask application → PDF report generator: generates report
- Flask application → Evaluation metrics: provides metrics
- Training and evaluation → Review dataset: reads reviews
- Training and evaluation → Marathi text cleaning: cleans corpus
- Training and evaluation → TF-IDF vectorizer: fits and saves
- Training and evaluation → Naive Bayes model: trains and saves
- Training and evaluation → Logistic Regression model: trains and saves
- Training and evaluation → Evaluation metrics: evaluates and saves