Gmail & Google Chat Sentiment Analyzer
Phrase-based sentiment analysis across Google Workspace communications.
Gmail & Google Chat Sentiment Analyzer was designed and built by Yadnyesh Mulay, an AI-first full-stack developer based in Nashik, India. A comprehensive sentiment analysis tool that searches Gmail and Google Chat messages for specific phrases, analyzes sentiment polarity and subjectivity using TextBlob, and generates detailed 6-panel visualization dashboards with CSV export.
The problem
Teams and individuals need to understand emotional tone in written communication but existing tools only do keyword search or full-message analysis without phrase-level context.
The approach
Phrase-specific context extraction (10 words before/after) combined with dual-metric sentiment (polarity + subjectivity) and rich constraint-based filtering.
How it was built
This Python application connects to Gmail and Google Chat APIs via OAuth 2.0, searches for user-specified phrases, extracts 10-word context windows around each match, and runs sentiment analysis using TextBlob's lexicon-based NLP. Results are filtered through 8 constraint types (sentiment labels, source platform, score ranges, subjectivity thresholds, date ranges) and visualized in a 6-panel matplotlib/seaborn dashboard: sentiment distribution pie, source comparison stacked bar, timeline line chart, score histogram, top senders horizontal bar, and subjectivity vs sentiment scatter plot with quadrant analysis.
The architecture follows a hybrid functional-OOP pattern: OOP for API fetchers and visualizers, functional pipeline for text cleaning, context extraction, sentiment calculation, and constraint filtering. Data classes define Message, SentimentResult, AnalysisConstraints, and AnalysisSummary types.
Where the AI sits
Lexicon-based NLP sentiment analysis (TextBlob), rule-based, not LLM. Foundation for understanding how ML-based sentiment differs from lexicon approaches.
Stack
- Python
- TextBlob
- Google APIs (Gmail, Chat)
- OAuth 2.0
- Pandas
- Matplotlib
- Seaborn
- NLTK
Links
More work by Yadnyesh Mulay: all projects · about Yadnyesh Mulay · home