https://github.com/tirkarthi/chat-analyzer
A simple script to analyze WhatsApp and Hike chats. You can export chat as text file through email chat option.
https://github.com/tirkarthi/chat-analyzer
Last synced: 6 months ago
JSON representation
A simple script to analyze WhatsApp and Hike chats. You can export chat as text file through email chat option.
- Host: GitHub
- URL: https://github.com/tirkarthi/chat-analyzer
- Owner: tirkarthi
- License: mit
- Created: 2018-04-12T15:01:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T15:20:43.000Z (about 7 years ago)
- Last Synced: 2024-12-28T03:41:53.486Z (6 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat analyzer
A simple script to analyze WhatsApp and Hike chats. You can export chat as text file through email chat option.
## Usage
```
➜ chat-analyzer git:(master) ✗ python3 analyze.py -h
usage: analyze.py [-h] --filename FILENAME [--app {whatsapp,hike}]
[--entity {word,emoji}] [--min-word-limit MIN_WORD_LIMIT]
[--common COMMON]Process whatsapp messages
optional arguments:
-h, --help show this help message and exit
--filename FILENAME
--app {whatsapp,hike}
Name of the app. E.g. whatsapp or hike
--entity {word,emoji}
Entity to count. E.g. word or emoji
--min-word-limit MIN_WORD_LIMIT
Minimum word limit for processing
--common COMMON Number of top items
```## Demo
Print top 5 words in the chat
```
➜ chat-analyzer git:(master) ✗ python3 analyze.py --filename sample.txt --entity word --common 5
Analyzed 31 messages
{'Bar': {'top': OrderedDict([('good', 2),
('howdy', 1),
('you?', 1),
('free?', 1),
('well,', 1)]),
'total': 18},
'Foo': {'top': OrderedDict([('good', 2),
('hello,', 1),
('yes?', 1),
('happy', 1),
('now?', 1)]),
'total': 11}}
```Print top 5 emojis in the chat
```
➜ chat-analyzer git:(master) ✗ python3 analyze.py --filename sample.txt --entity emoji --common 5
Analyzed 31 messages
{'Bar': {'top': OrderedDict([('😁', 4), ('😂', 3), ('👆', 1)]), 'total': 8},
'Foo': {'top': OrderedDict([('🏻', 5), ('😁', 2), ('💦', 1)]), 'total': 8}}
```Print top 5 emojis in the chat for hike
```
➜ chat-analyzer git:(master) ✗ python3 analyze.py --filename sample-hike.txt --entity emoji --common 5 --app hike
Analyzed 31 messages
{'Bar': {'top': OrderedDict([('😁', 4), ('😂', 3), ('👆', 1)]), 'total': 8},
'Foo': {'top': OrderedDict([('🏻', 5), ('😁', 2), ('💦', 1)]), 'total': 8}}
```## TODO
* Response times
* Message count distribution through years and time of the day
* Messages sent to reply received ratio
* Amazing docs
* Tests## Thanks
This was written to tell my friend how basic analysis of chats would look when done by companies. I also took motivation from [facebook_data_analyzer](https://github.com/Lackoftactics/facebook_data_analyzer)
## LICENSE
MIT license Copyright (c) 2018 Karthikeyan S