Natural Language Processing or NLP is a field of Artificial Intelligence which focuses on enabling the systems for understanding and processing the human languages. In this article, I will use NLP to analyze my WhatsApp Chats. For some privacy reasons, I will use Person 1, Person 2 and so on in my WhatsApp Chats.

Get The Whatsapp Data for NLP

If you have never exported your WhatsApp chats before, don’t worry it’s very easy. For NLP of WhatsApp chats, you need to extract the WhatsApp chats from your smartphone. You just need to open any chat in your WhatsApp then select the export chat option. The text file you will get as a return will look like this:

["[02/07/2017, 5:47:33 pm] Person_1: Hey there! This is the first message", "[02/07/2017, 5:48:24 pm] Person_1: This is the second message", "[02/07/2017, 5:48:44 pm] Person_1: Third...", "[02/07/2017, 8:10:52 pm] Person_2: Hey Person_1! This is the fourth message", "[02/07/2017, 8:14:11 pm] Person_2: Fifth ...etc"]

I will use two different approaches for the NLP of WhatsApp Chats. First, by focusing on the fundamentals of NLP and the other is by using the date time stamp at the starting of every conversation.

Trending AI Articles:

1. Machine Learning Concepts Every Data Scientist Should Know

2. AI for CFD: byteLAKE’s approach (part3)

3. AI Fail: To Popularize and Scale Chatbots, We Need Better Data

4. Top 5 Jupyter Widgets to boost your productivity!

Formatting Whatsapp Chats for NLP

To analyze our WhatsApp conversations, initially, our conversation needs to be formatted in the form of data. This involved a few basic steps in achieving the formation of data by creating a dictionary, constructed within two keys with each of the respective values with a list of the person tokenized conversations.

Image for post

Image for post

Get Full Code Here

#python #data-science #programming #machine-learning #ai

Natural Language Processing for WhatsApp Chats
1.50 GEEK