How sanskarkudache9317-cloud/ai-sentiment-analyzer works
This is a review sentiment analyzer with web and CLI entry points. A review is submitted or entered, checked and scored by a selected engine, mapped to a sentiment label, then presented with score, confidence, and explanation; the web app also keeps recent results. The custom lexicon and VADER engines are distinct analysis paths, with VADER falling back to the custom engine when unavailable. The README documents CLI demo and batch modes and the web history/result features. Unsampled templates are included based on documented routes and rendering; implementation details beyond shown code are not inferred.
Main entry points: app.py Flask routes · main.py CLI modes · vader_engine.py VADER engine · lexicon_engine.py Custom lexicon engine
Components 12
User Interfaces
- CLI modes
main.py - Flask routes
app.py - Review validation
app.py
Sentiment Analysis
- Custom lexicon engine
sentiment/lexicon_engine.py - VADER engine
sentiment/vader_engine.py - Score classifier
sentiment/classifier.py
Results and Guidance
- Recent web history
app.py - Review form and results
templates/index.html - Scoring explanation
templates/about.html - CLI report
main.py
Sentiment Data
- VADER lexicon data
nltk_data/sentiment/vader_lexicon.zip
Other components
- Review submitter
Connections 18
- Review submitter → Review form and results: enters review
README.md - Review form and results → Flask routes: submits form
app.py - Flask routes → Review validation: validates input
app.py - Review validation → Custom lexicon engine: analyzes review
app.py - Review validation → VADER engine: selects engine
app.py - Custom lexicon engine → Score classifier: clamps score
sentiment/lexicon_engine.py - VADER engine → Score classifier: clamps score
sentiment/vader_engine.py - VADER engine → Custom lexicon engine: falls back
sentiment/vader_engine.py - Flask routes → Score classifier: labels score
app.py - Flask routes → Recent web history: records result
app.py - Flask routes → Review form and results: renders result
app.py - Flask routes → Scoring explanation: renders page
README.md - Review submitter → CLI modes: enters review
README.md - CLI modes → Custom lexicon engine: analyzes review
main.py - CLI modes → VADER engine: selects engine
main.py - CLI modes → Score classifier: labels score
main.py - CLI modes → CLI report: prints report
main.py - VADER engine → VADER lexicon data: loads lexicon