0% found this document useful (0 votes)
35 views4 pages

WhatsApp Sentiment Analysis with R

The document summarizes a research paper presented at the 2022 3rd International Conference for Emerging Technology on sentiment analysis of WhatsApp data using R. The paper aims to analyze chat conversations on WhatsApp to determine whether the sentiment is positive or negative. By analyzing the sentiment, users can better decide which WhatsApp groups to participate in or leave. The document provides background on WhatsApp and sentiment analysis. It also briefly discusses different types of data like structured, semi-structured, and unstructured data that are relevant to the topic.

Uploaded by

DEADSHOT GAMING
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

WhatsApp Sentiment Analysis with R

The document summarizes a research paper presented at the 2022 3rd International Conference for Emerging Technology on sentiment analysis of WhatsApp data using R. The paper aims to analyze chat conversations on WhatsApp to determine whether the sentiment is positive or negative. By analyzing the sentiment, users can better decide which WhatsApp groups to participate in or leave. The document provides background on WhatsApp and sentiment analysis. It also briefly discusses different types of data like structured, semi-structured, and unstructured data that are relevant to the topic.

Uploaded by

DEADSHOT GAMING
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

2022 3rd International Conference for Emerging Technology (INCET)

Belgaum, India. May 27-29, 2022

Whatsapp Sentiment Analysis Using R


[Link] Rani [Link] [Link] Ida Chellam
AP/IT, AP/IT, AP/IT,
Sri Ramakrishna Engineering College, Sri Ramakrishna Engineering College, Sri Ramakrishna Engineering College,
Coimbatore-22 Coimbatore-22 Coimbatore-22
2022 3rd International Conference for Emerging Technology (INCET) | 978-1-6654-9499-1/22/$31.00 ©2022 IEEE | DOI: 10.1109/INCET54531.2022.9824603

Corresponding Author:
[Link]@[Link],
jansiranis89@[Link]

Abstract: In today’s internet era, there are many chat The purpose of this study is to utilise R to estimate chat
application are used for conversions like whatsapp. Every smart sentiment and provide useful information to users.
phone user uses the Whatsapp application for private and group
messaging, as well as video calling. Users join a variety of desired II. LITERATURE REVIEW
and undesirable WhatsApp groups, resulting in confusion, low
storage capacity, and unmonitored issues. Sentiment analysis is
progressively driving the design and delivery of more products
Types of Data:
and services that match customers' demands, from mining tweets Big Data [5] is defined as a large volume, high velocity,
to Facebook postings to scraping online reviews. It is somewhat and diverse set of data. Structured data, semi-structured data,
easier to do nowadays, because of improved packages in popular and unstructured data are the three types.
programming languages. In this paper on Sentimental analysis of
whatsapp data done by using R. This brings nature of the Structured Data: For effective analysis, structured data
whatsapp group whether the conversion is positive or negative. has elements that can be handled. It's been organised into a
Based on the result users can deliberate on those whatsapp database, which is a standardised repository. It refers to all data
group. that can be stored in a SQL database as a table with rows and
columns. They have relational keys and are simple to map into
Keywords: Sentimental Analysis, R, Whatsapp data pre-designed fields. Those data are presently the most
commonly processed in the development and easiest approach
I. INTRODUCTION
to managing information. One example is relational data.
In the internet world, everything is simple and quick. There
are many chat applications available for messaging and chat. Semi- Structured Data: Semi-structured data is data that
One such free application is whatsapp. WhatsApp appears to is not stored in a relational database but has organisational
be gaining in popularity as a conversation application as well qualities that make it easier to examine. Some processes can be
as a messaging service[1]. WhatsApp is the world's most stored in a relation database (though this may be difficult for
popular social media app. The amount of messages delivered semi-structured data), but semi-structured data exists to save
on a daily basis is increasing as the user base grows. [2] space. E-mail, XML and other markup language are an
WhatsApp is an excellent data source for analysing a wide example.
range of patterns and correlations between two or more people Unstructured Data: Unstructured data is data that isn't
conversing privately or in teams. Thus, the large amount of the arranged in a preset way or doesn't have an established data
chat data can be visualized using sentimental analysis and text model, making it unsuitable for a traditional relational
analysis.[3] "It provides an evaluation of how "positive" or database. So there are other platforms for storing and managing
"negative" a piece of text is," according to sentiment analysis, unstructured data; it is becoming more common in IT systems
also known as subjectivity analysis or opinion mining.[4] One and is utilised by businesses in a number of business
key notion pertinent to this work as a starting assumption is intelligence and analytics applications. Word, PDF, Text, and
sentiment visualisation, which visually depicts the sentiment Media logs are just a few examples.
analysis results.
Sentiment analysis is done on data taken from Twitter and
The paper's aim is divided into three parts: Stock Twits in this study[6]. The information is evaluated in
(1) Getting the Chat Data from WhatsApp order to determine the mood of the user's comment. These
responses are divided into four groups: joyful, up, down, and
(2) Sentimental analysis of chat data using R rejected. To predict the outcomes, an artificial neural network
is fed the polarity index together with market data.
(3) Create Word Cloud
This study employs Python and Tableau to do sentiment
The paper has organized as follows:
analysis of the text and semantically classify the keywords into
Section2 describes the literature survey on Sentimental actionable insights. Data was collected from Amazon website
analysis. Section3 tells how to get data from WhatsApp. reviews (n=3,413) of the most popular product (Trigger Point
Section 4 describes R Process with visualization. Grid Foam Roller) in five different colours from 2018 to 2019.

978-1-6654-9499-1/22/$31.00 ©2022 IEEE 1


Authorized licensed use limited to: VIT University. Downloaded on December 30,2023 at 07:42:10 UTC from IEEE Xplore. Restrictions apply.
(black, camo, pink, orange, and lime). The black colour has the
most optimistic attitude when compared to the other colours.
Additionally, SpaCy's named entity recognition for the
object also detected clusters of people, places, and things, or
events.
III. COLLECTION OF CHAT DATA FROM WHATSAPP:
To collect the chat data from WhatsApp, the following are
the instructions,
From iPhone WhatsApp:
x On your iPhone, open a chat with a person or a group.
x Simply touch on the person's or group's profile.
Fig. 2. No. of Messages per day
x There's an option to export chat down below.
Step 4:
From Android WhatsApp:
To get most often used words from chat data.
x On your Android, open a chat with a person or a group.
x Toggle between the three dots above.
x More information can be found by clicking here.
x Select Export Chat from the drop-down menu.
When exporting chat, notice an opportunity to connect
media. It is better not to attach media for the sake of simplicity.
Finally, input chat to email address, and WhatsApp
conversation will appear in given inbox.
Sentimental Analysis Using R:
Step 1: Install dplyr package: The dplyr package in the R Fig. 3. Most used words
Programming Language is a data manipulation structure that
provides a consistent collection of verbs for resolving the most Step: 5
common data manipulation issues. Use Syuzhet packages: Sentiment Derived Plot and
Step 2: Sentiment are extracted from text. Text is used to extract plot
arcs. Extracts sentiment and sentiment-derived plot arcs from
Load the chat text data into chat object which has 411 text using a number of sentiment dictionaries that are elegantly
observations of 7 varaiables packed for consumption by R users.

Fig. 1. Load data

Step 3:
R Lubridate package that makes it easier to work with dates
and times. To visualize the [Link] messages per day.

Fig. 4. Sentiment with count

2
Authorized licensed use limited to: VIT University. Downloaded on December 30,2023 at 07:42:10 UTC from IEEE Xplore. Restrictions apply.
Step 6: Visualize the Sentiment

Fig. 5. Visualize the sentiment Fig. 7. Word frequency

Fig 5 shows the visualization of chat data. From the plot it x Build word cloud
shows that positive conversion in the chat is high with the
value 441. Also, disguist and other negative chat is less. It is
concluded that, user can retain in the group.
Step 7: Create word cloud

Fig. 8. Word Cloud

From the Figure 8, it shows that the word link occurrences


are 147.
IV. CONCLUSION:
Because everyone uses WhatsApp in their day-to-day lives,
the data on it is rising every day. Users can also join numerous
groups, such as known and unknown people. As a result, it is
necessary to organize all of the groups and to leave the
unwelcomed ones. This paper explains how to conduct
sentimental analysis and create a word cloud. The user can
Fig. 6. Steps for creation of word cloud
choose to stay in the group or leave it based on the results of
the analysis.
x Load the data as corpus: docs <- REFERENCES:
Corpus(VectorSource(text))
[1] [Link]
x Text transformation using tm_map(), replace all chat-a906105917f4
“/”,”@”,”|” with space [2] [Link] p-chat-sentiment-
analysis-using-python/
x Build term-document matrix [3] M., Wattenberg and D. Fisher. “Analyzing Perceptual Organization in
Information Graphics,” Information Visualization, vol 3, no.2, PP. 123-
133., 2004, doi: 10.1057/[Link].9500070
[4] K. Kucher, C. Paradis and A. Kerren, “The state of the art in sentiment
visualization,” Computer Graphics Forum, vol. 37, no. 1, pp. 71-96, Jun.
2017, doi: 10.1111/cgf.13217.

3
Authorized licensed use limited to: VIT University. Downloaded on December 30,2023 at 07:42:10 UTC from IEEE Xplore. Restrictions apply.
[5] [Link]
structured-and-unstructured-data/
[6] Sunil Kumar Khatri , Ayush Srivastava, “Using Sentimental Analysis in
Prediction of Stock Market Investment”, pp. 566-569, DOI:
10.1109/ICRITO.2016.7785019.
[7] Hanan Alasmari,” Sentimental Visualization: Semantic Analysis of
Online Product Reviews Using Python and Tableau”, Dec-2020, DOI:
10.1109/BigData50022.2020.9391769
[8] [Link]
fundamentals-in-r-5-simple-steps-you-should-know

4
Authorized licensed use limited to: VIT University. Downloaded on December 30,2023 at 07:42:10 UTC from IEEE Xplore. Restrictions apply.

Common questions

Powered by AI

When conducting sentiment analysis for WhatsApp chat data, several ethical considerations must be addressed, primarily revolving around data privacy and consent. Users should ensure that data is collected and analyzed in compliance with privacy laws such as GDPR, which mandates user consent and the protection of personal data . Participants in a chat must be informed about the data usage and provide explicit consent before analysis . The sensitivity of information shared in WhatsApp data also necessitates secure storage and restricted access to prevent unauthorized data exposure. Anonymizing data is crucial to mitigate privacy risks while balancing ethical obligations against the insights gained from analysis .

The concept of structured, semi-structured, and unstructured data is crucial for sentiment analysis because it dictates how data can be processed and analyzed. Structured data is organized in specific fields within a database, making it easily accessible for analysis . Semi-structured data, like emails or XML, contains some organization but lacks the rigidity of a database schema, allowing for more flexible analysis but requiring pre-processing to handle its variability . Unstructured data, which encompasses text or media logs like those from WhatsApp, does not have a predefined schema, so specialized techniques and tools are needed to extract relevant information for sentiment analysis . Understanding these distinctions helps in selecting appropriate methods and tools to preprocess and analyze WhatsApp chat data efficiently.

Visualization is paramount in interpreting sentiment analysis results as it translates complex data into understandable graphical formats. For WhatsApp chat data, visualization helps in quickly identifying sentiment trends, prominent words, and overall emotional tone of conversations. Some methods used for visualization include sentiment plots, which graphically depict the sentiment distribution over time, making mood shifts or outliers easily noticeable . Word clouds are another method, highlighting the most frequent terms in chats, thereby illuminating predominant topics or concerns . These visual tools enhance comprehension and facilitate decision-making based on sentiment analysis insights.

The combination of sentiment analysis and text analysis enhances the understanding of communication patterns in WhatsApp groups by providing both quantitative sentiment trends and qualitative insights into the context and content of conversations. Sentiment analysis quantifies the emotional tone, distinguishing between positive, neutral, and negative conversations which helps in assessing the overall group mood . Concurrently, text analysis enables the identification of key topics, frequent terms, and conversational structures, offering deeper insights into user interactions and prevalent themes . This dual analysis approach allows for a comprehensive evaluation of group dynamics, facilitating better management and participation strategies within WhatsApp groups.

The Syuzhet package in R plays a crucial role in the sentiment analysis of WhatsApp chat data by extracting sentiment and sentiment-derived plot arcs from the text. This package uses several sentiment dictionaries that help categorize the sentiment embedded within the data into emotional valences such as positive, negative, etc. . It allows for a detailed breakdown and visualization of sentiment trends over time by offering sentiment plots that provide insights into how the mood and tone of conversations evolve, highlighting potential mood shifts or patterns . This enables users to perform both quantitative and qualitative analysis of text data efficiently.

Sentiment analysis of WhatsApp chat data can provide actionable insights by determining the emotional tone of various group conversations. By identifying whether conversations are predominantly positive or negative, users can decide on their engagement levels within these groups. For instance, in a group with predominantly negative sentiment, a user may choose to leave to avoid negative interactions, whereas a positive sentiment group may encourage more active participation . Additionally, insights into dominant topics or frequent words help users understand the focus of the group conversations and align them with their interests or detach if misaligned . This analysis assists users in optimizing their group interactions according to personal preferences and emotional well-being.

The key steps in performing sentiment analysis on WhatsApp chat data using R involve several stages: (1) Installing necessary packages: Installing the dplyr package in R aids in manipulating data due to its consistent collection of functions . (2) Loading the chat data: The chat text data is loaded into an R object which allows for data manipulation and analysis . (3) Using R's Lubridate package: This is used to work with dates and times, critical for visualizing the number of messages per day which can indicate active chat periods . (4) Identifying most used words: This helps to understand common topics or concerns in the chat . (5) Utilizing Syuzhet package: Extracts sentiment and sentiment-derived plot arcs from text, enabling the analysis of the sentiment flow over time . (6) Visualizing the sentiment: This step provides a visual representation of the sentiment distribution, highlighting the prevalence of positive or negative tones . (7) Creating a word cloud: Converts data into a graphical format to emphasize frequent terms, enabling quick insights into the primary themes of the conversation .

Using R for performing sentiment analysis on WhatsApp data offers several advantages. R provides extensive packages like dplyr for data manipulation and Syuzhet for sentiment extraction which are specifically designed to handle unstructured text data effectively . Its comprehensive package ecosystem allows for seamless integration of various data visualization tools necessary for interpreting results. Furthermore, R's powerful statistical analysis capabilities ensure robust result analysis; it is particularly advantageous for academic or research-oriented projects where statistical validation is essential. Compared to other languages, R excels in detailed, exploratory data analysis and offers community support tailored towards data science applications .

To collect WhatsApp chat data for analysis, distinct steps must be taken depending on whether the user is on an iPhone or Android device. For iPhone users, the process involves opening a chat, tapping the profile, and selecting the option to export chat . Meanwhile, for Android users, one must open the chat, toggle the three dots menu, access more options, and then select 'Export Chat' . Both methods offer the option to include or exclude media, but for simplicity in initial analysis, it is recommended to exclude media . These steps help in transferring chat data to a preferred platform for subsequent analysis.

The use of word clouds enhances the understanding of sentiment analysis in WhatsApp chat data by highlighting the frequency of word occurrences in a visually appealing and easily interpretable format. This allows users to quickly identify common topics or concerns within conversations, which can aid in understanding group dynamics or predominant themes . However, this method has limitations, such as its inability to convey the context in which words are used or to account for sentiment nuances since negative and positive words might appear with the same frequency but in different contexts . Such visualization might oversimplify complex data, requiring careful interpretation alongside more detailed analyses.

You might also like