This notebook takes your Whatsapp group chat and parses all the messages to show interesting insights.
.py
/ .ipynb
file respectively) or you can simply use an online tool like Colab.Export chats from Whatsapp mobile application. This will give you a file with a name like WhatsApp Chat with Sushil Khairnar.txt
17/06/20, 20:05 - Aditya Daftari Coep:
17/06/20, 20:05 - Sim-rum Melvani: Hahaha feels like ages ago
17/06/20, 20:06 - Aditya Daftari Coep: Yes 😂
17/06/20, 20:06 - Sim-rum Melvani: Kya photo hai😂
17/06/20, 20:07 - Aditya Daftari Coep:
17/06/20, 20:07 - Aditya Daftari Coep: Sponge Bob with the sponge ball😂
17/06/20, 20:07 - Anoushka Kundu: 😂😂😂😂 look at his fists
17/06/20, 20:07 - Aditya Daftari Coep: 😂
17/06/20, 20:07 - Anoushka Kundu: SonjBob
17/06/20, 20:08 - Aditya Daftari Coep: No
17/06/20, 20:08 - Aditya Daftari Coep: Sponge Bob bhi bolte the hum 😂
17/06/20, 20:08 - Anoushka Kundu: But there lies an opportunity to call him sonjbob 😂
The cleaned message is the one sent to Google’s natural language API for classification. Thus, that’s what sentiment score and magnitude are based on.
Cleaned message + (Links + Emoticons + Emojis* + Tagged people + Garbage characters) = Original message *Emojis are conected to their text equivalent in the cleaned message. Eg: 😓 –> downcast_face_with_sweat
<media ommitted>
that corresponds to images ad GIFsHey @919167023114, are you going for the party?
. A simple function to map this number to your mobile’s contacts (export as csv) can reveal name of the person and provide another interesting dimension to the analysis about who tags whom etc..txt
that you can export.chat.txt
.