How musabellur/moviecomments-sentimentanalysis-chatbot works
This is a Flask chatbot for classifying Turkish film comments as positive or negative. The main flow is comment submission, text cleaning, TF-IDF transformation, Logistic Regression prediction, confidence-to-star conversion, and a JSON response; the app also serves a browser page. A separate script trains and evaluates a model from the spreadsheet. The README documents dark mode and emoji-based sentiment presentation, but the template and stylesheet were not excerpted, so their internal behavior and browser-to-endpoint wiring remain unverified.
Main entry points: chatbot.py Flask routes · istatistic.py Training and evaluation · index.html Chat interface · tfidf_vectorizer.pkl TF-IDF vectorizer
Components 11
Chatbot web app
- Flask routes
chatbot.py - Chat interface
templates/index.html - Dark-mode styling
static/style.css
Sentiment inference
- Text preprocessing
chatbot.py - TF-IDF vectorizer
tfidf_vectorizer.pkl - Logistic Regression
logistic_regression_model.pkl - Confidence and stars
chatbot.py
Model preparation
- Labeled comments
dataset.xlsx - Training and evaluation
istatistic.py - App model training
chatbot.py
Other components
- Browser user
Connections 16
- Browser user → Flask routes: opens app
README.md - Flask routes → Chat interface: renders
chatbot.py - Browser user → Chat interface: uses interface
README.md - Chat interface → Flask routes: submits comment
- Flask routes → Text preprocessing: cleans input
chatbot.py - Flask routes → TF-IDF vectorizer: transforms text
chatbot.py - Flask routes → Logistic Regression: predicts sentiment
chatbot.py - Flask routes → Confidence and stars: calculates stars
chatbot.py - Flask routes → Browser user: returns JSON
chatbot.py - App model training → Labeled comments: reads comments
chatbot.py - App model training → Text preprocessing: cleans training text
chatbot.py - App model training → Logistic Regression: trains and saves
chatbot.py - App model training → TF-IDF vectorizer: fits and saves
chatbot.py - Training and evaluation → Labeled comments: reads comments
istatistic.py - Training and evaluation → Logistic Regression: trains and evaluates
istatistic.py - Training and evaluation → TF-IDF vectorizer: fits and saves
istatistic.py