💬 Multilingual WhatsApp Chat Analyzer (Darija / French / English)
==================================================================
A Streamlit web application designed to parse, analyze, and visualize WhatsApp chat exports containing a mix of Moroccan Darija (Arabizi & Arabic script), French, and English. Powered by Google Gemini API for generating long-context AI executive reports.
✨ Features
----------
* **📊 Interactive Visual Analytics**:
* **Message Volume Breakdown**: Total, text, and media/audio message distributions per user.
* **Language & Code-Switching Detection**: Visual distribution of French, English, and Moroccan Darija usage.
* **Response Latency Analysis**: Track average response delay times per participant in minutes.
* **Activity Heatmaps**: Daily and hourly message density visualization.
* **Vocabulary & Slang Insights**: Analysis of top single words and 2-word expressions.
* **🧠 AI-Powered Full Executive Reports (Gemini 3.6 Flash)**:
* **Multi-Stage Chunk Pipeline**: Processes 100% of large, multi-year chat histories without token overflow errors.
* **Report Styles**:
* Executive Summary & Key Milestones
* Group Dynamics & Personality Deep-Dive
* Full Topic & Decision Timeline
* **Export Options**: Download generated reports directly in Markdown (.md) or PDF (.pdf) format.
* **🔍 Full-Text Search Engine**: Search chat history for specific keywords, slang, or topics (e.g., projet, fein, lol).
📁 Repository Structure
-----------------------
Darija-whats-analyzer/
├── .devcontainer/
│ └── devcontainer.json # VS Code dev container configuration
└── whatsapp-analyzer/
├── app.py # Streamlit application UI & core AI workflow
├── parser.py # WhatsApp chat log regex parser & preprocessor
├── nlp\_utils.py # NLP analytics (language ratio, response speed, n-grams)
└── requirements.txt # Python dependencies
🚀 Getting Started
------------------
### Prerequisites
* Python 3.10+ installed on your ma …