How tulsi12/recommendationsystembasedonsentimentanalysis works
This Flask app lets users request product recommendations by username or classify a review as positive or negative. Recommendation requests select candidate products for a known user, score their reviews with a trained sentiment model, and return the top products; review classification preprocesses the submitted text and predicts its sentiment. The graph reflects the sampled Flask and model code. The template and serialized assets are present in the tree, but their internals were not sampled.
Main entry points: model.py Product recommendations · app.py Flask routes · tfidf-vectorizer.pkl TF-IDF vectorizer · sentiment-classification-xg-boost-model.pkl Sentiment model
Components 11
Web interface
- Flask routes
app.py - Web form and results
templates/index.html
Recommendations
- Product recommendations
model.py
Sentiment analysis
- Review classification
model.py - Text preprocessing
model.py
Data and models
- User-product ratings
pickle/user_final_rating.pkl - Cleaned reviews
pickle/cleaned-data.pkl - Product details
dataset/sample30.csv - TF-IDF vectorizer
pickle/tfidf-vectorizer.pkl - Sentiment model
pickle/sentiment-classification-xg-boost-model.pkl
Other components
- User
Connections 13
- User → Flask routes: submits request
app.py - Flask routes → Web form and results: renders
app.py - Flask routes → Product recommendations: requests recommendations
app.py - Flask routes → Review classification: classifies review
app.py - Product recommendations → User-product ratings: reads ratings
model.py - Product recommendations → Cleaned reviews: filters reviews
model.py - Product recommendations → TF-IDF vectorizer: transforms reviews
model.py - Product recommendations → Sentiment model: predicts review sentiment
model.py - Product recommendations → Product details: joins product details
model.py - Review classification → Text preprocessing: preprocesses text
model.py - Review classification → TF-IDF vectorizer: transforms text
model.py - Review classification → Sentiment model: predicts sentiment
model.py - Text preprocessing → Text preprocessing: lemmatizes tokens
model.py