hansche afanyu237 commited on
Commit
f7711cd
·
verified ·
1 Parent(s): 1bd5399

Updated the ReadMe file (#4)

Browse files

- Updated the ReadMe file (8e96e9299197e1698cd81562640c6a6ba52296c5)


Co-authored-by: Bismark Bantar <[email protected]>

Files changed (1) hide show
  1. README.md +153 -14
README.md CHANGED
@@ -1,14 +1,153 @@
1
- ---
2
- title: SocialMediaFoci
3
- emoji: 📈
4
- colorFrom: green
5
- colorTo: pink
6
- sdk: streamlit
7
- sdk_version: 1.44.1
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- short_description: Whatsappchat analyser
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WhatsApp Chat Analyzer
2
+
3
+ A comprehensive tool for analyzing WhatsApp chat exports with sentiment analysis capabilities.
4
+
5
+ ## Table of Contents
6
+ 1. [System Overview](#system-overview)
7
+ 2. [Architecture](#architecture)
8
+ 3. [Components](#components)
9
+ 4. [Data Flow](#data-flow)
10
+ 5. [Installation](#installation)
11
+ 6. [Usage](#usage)
12
+ 7. [Analysis Capabilities](#analysis-capabilities)
13
+ 8.
14
+
15
+ ## System Overview
16
+
17
+ The WhatsApp Chat Analyzer is a Python-based application that processes exported WhatsApp chat data to provide:
18
+ - Message statistics and metrics
19
+ - Temporal activity patterns
20
+ - User engagement analysis
21
+ - Content analysis (words, emojis, links)
22
+ - Sentiment analysis capabilities
23
+ - Topics analysis in the group chats
24
+
25
+ Built with Streamlit for the web interface, it offers an interactive way to explore chat dynamics and analyze sentiment.
26
+
27
+ ## Architecture
28
+
29
+ The system follows a modular architecture with clear separation of concerns:
30
+
31
+ ```
32
+ Raw WhatsApp Chat → Preprocessing → Analysis → Visualization
33
+ ```
34
+
35
+ Key architectural decisions:
36
+ - **Modular Design**: Components are separated by functionality
37
+ - **Pipeline Processing**: Data flows through discrete processing stages
38
+ - **Interactive UI**: Streamlit enables real-time exploration
39
+
40
+ ## Components
41
+
42
+ ### 1. App Module (`app.py`)
43
+ - **Responsibility**: User interface and visualization
44
+ - **Key Features**:
45
+ - File upload handling
46
+ - User selection interface
47
+ - Visualization rendering
48
+ - Interactive controls
49
+
50
+ ### 2. Preprocessor (`preprocessor.py`)
51
+ - **Responsibility**: Data cleaning and structuring
52
+ - **Key Features**:
53
+ - Handles multiple date/time formats
54
+ - Extracts messages and metadata
55
+ - Filters system messages
56
+ - Creates structured DataFrame
57
+
58
+ ### 3. Helper Module (`helper.py`)
59
+ - **Responsibility**: Analytical computations
60
+ - **Key Features**:
61
+ - Statistical metrics
62
+ - Temporal analysis
63
+ - Content analysis
64
+ - Visualization data preparation
65
+
66
+ ### 4. Notebook (`whatsAppAnalyzer.ipynb`)
67
+ - **Responsibility**: Prototyping and experimentation
68
+ - **Key Features**:
69
+ - Initial pattern development
70
+ - Data exploration
71
+ - Algorithm testing
72
+
73
+ ## Data Flow
74
+
75
+ 1. **Input**: User uploads WhatsApp chat export (.txt)
76
+ 2. **Preprocessing**:
77
+ - Raw text is parsed using regex patterns
78
+ - Messages are categorized and timestamped
79
+ - Structured DataFrame is created
80
+ 3. **Analysis**:
81
+ - Selected metrics are computed
82
+ - Temporal patterns are identified
83
+ - Content features are extracted
84
+ 4. **Visualization**:
85
+ - Results are displayed in interactive charts
86
+ - User can explore different views
87
+
88
+ ## Installation
89
+
90
+ ### Prerequisites
91
+ - Python 3.8+
92
+ - pip package manager
93
+
94
+ ### Steps
95
+ 1. Clone the repository:
96
+ ```bash
97
+ git clone [repository-url]
98
+ cd whatsapp-analyzer
99
+ ```
100
+
101
+ 2. Install dependencies:
102
+ ```bash
103
+ pip install -r requirements.txt
104
+ ```
105
+
106
+ 3. Run the application:
107
+ ```bash
108
+ streamlit run srcs/app.py
109
+ ```
110
+
111
+ ## Usage
112
+
113
+ 1. Launch the application
114
+ 2. Upload a WhatsApp chat export file
115
+ 3. Select a user or "Overall" for group analysis
116
+ 4. Explore the various analysis tabs:
117
+ - Statistics
118
+ - Timelines
119
+ - Activity Maps
120
+ - Word Clouds
121
+ - Emoji Analysis
122
+
123
+ ## Analysis Capabilities
124
+
125
+ ### 1. Basic Statistics
126
+ - Message counts
127
+ - Word counts
128
+ - Media shared
129
+ - Links shared
130
+
131
+ ### 2. Temporal Analysis
132
+ - Daily activity patterns
133
+ - Monthly trends
134
+ - Hourly distributions
135
+
136
+ ### 3. User Engagement
137
+ - Most active users
138
+ - User participation rates
139
+ - Message distribution
140
+
141
+ ### 4. Content Analysis
142
+ - Most common words
143
+ - Emoji usage
144
+
145
+ ### 5. Sentiment Analysis
146
+ - Message sentiment scoring
147
+ - Sentiment trends over time
148
+ - User sentiment comparison
149
+ ## 5. Topics Analysis
150
+ - Topic modeling
151
+ - Common topics over time
152
+ - User interests
153
+