Analyzing Sentiment in Social Media Communication and Its Effect on Mental Health

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

Analyzing Sentiment in Social Media Communication and Its Effect on Mental Health

1Assistant Professor, Dept. of Information Technology & Computer Science, D.G. Ruparel College, Mumbai 2,3,4Students, Bsc Comp. Sci., D.G. Ruparel College, Mumbai, Maharashtra, India ***

Abstract - This paper investigates the psychology of sentiment analysis & its effects on the mental well-being of communicationthroughsocialmedia.Throughanalyzingthe responses gathered by a Google Form survey, tweets from Sentiment 140 data-set from Kaggle and real time tweets retrieved via API’s applying NLP and logistic regression for classification. User sentiments are classified as positive, neutralandnegative,andevaluatetheircorrelationtomental health indicators. This research focuses on analyzing sentiment to provide a qualitative assessment of sentiment accuracy.

Key Words: Sentiment Analysis, Social Media, Mental Health, Emotion Detection, Online Communication

1. INTRODUCTION

1.1 Internet:

The internet is a vast system of interconnected networks that enables users to access and exchange data, websites, services, and content from anywhere in the world. The internet has profoundly shaped modern life, becoming an essentialsourceofnews,entertainment,andeducationfor people worldwide for over two decades. The internet has becomeanessentialpartofmodernlife,connectingpeople globallyandenablingaccesstoawealthofresources.

1.2 Social media

Socialmediareferstodigitalplatformsthatallowusersto createandsharecontentwiththeirnetworksonline.Popular platforms like Facebook, Twitter, Instagram, Snapchat, WhatsApp and LinkedIn provide an easy way for users to quicklyshareimages,links,ideasandmessages.However, the rise of social media has both positive and negative impactsonmentalhealth.

 Onthepositiveside,socialmediacanfosterasenseof belonging and support through meaningful interactions.

 On the other hand, negative experiences such as cyberbullying, social comparison, and online harassmentcancontributetomentalhealthissueslike depressionandanxiety.

1.3

Sentiment Analysis

Sentiment Analysis also known as opinion mining, is the systematic methodology of using natural language processing,machinelearningandcomputationaltechniques to identify and extract the emotional tone or sentiment expressed in a piece of text. The objective is to identify whether the sentiment expressed in the text is positive, negative,orneutral.

2. Literature Review

A significant amount of research has been conducted in sentimentanalysis,particularlywithinthefieldsofproduct reviews,moviereviews,andblogs.Severalstudieshighlight the impact of social media sentiment on mental health. Research suggests that excessive exposure to negative contentcanincreasepsychologicaldistress,whilepositive content enhances well-being.Sentimentanalysishasbeen widely applied in fields such as marketing, politics, and health,makingitavaluabletoolforunderstandingemotional trendsinsocialmediainteractions.Thisstudybuildsupon existing research by examining real-world responses and theirmentalhealthimplications.

3. Methods & Materials

By analysing the responses collected from a Google Form survey, tweets from the Sentiment 140 dataset on Kaggle andreal-timetweetsretrievedvia APIs,thisstudyapplies Natural Language Processing and logistic regression for sentimentclassification.Usersentimentsarecategorizedas positive, neutral, or negative, and their correlation with mentalhealthindicatorsisevaluated.Theresearchaimsto

fig.1:communicationintheageofsocialmediausing Internet

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

assesssentimentaccuracyqualitativelythroughsentiment analysis.

Itincludesthefollowingsixfields:

1. target:Thesentimentpolarityofthetweet (0:negative,2:neutral,4:positive)

2. ids:Theuniqueidentifierforthetweet

3. date:Thedatewhenthetweetwasposted

4. flag:Thequeryassociatedwiththetweet

5. user:Theuserwhopostedthetweet 6. text:Thecontentofthetweet

To analyze sentiment in tweets related to mental health, three main steps were employed using Python scripts to automateandoptimizetheanalysisprocess:

1. datacollection

2. textpreprocessing 3. modeltraining/evaluation.

3.1 Data Collection

WeusedthetweepylibrarytointeractwiththeTwitterAPI. The script (twitter_fetch.py) was configured with authentication credentials and a search query targeting mental health-related keywords (e.g., depression, anxiety, stress).Thecollecteddatasetconsistedof100tweets,which werethenusedforsentimentanalysis.

3.2 Text Preprocessing and Cleaning

Inthesentiment_analysis.pyandtwitter_analysis.pyscripts, thefollowingstepswereperformed:

a) Removal of URLs, mentions, hashtags, and special characters.

b) Conversionoftexttolowercasetostandardizethedata.

c) Removal of stopwords (commonly occurring words suchasthe,and,is).

The text cleaning ensured that only meaningful words remained,improvingtheaccuracyofsentimentanalysis.

3.3 Sentiment Classification Model

Weusedtwodifferentmachinelearningmodels:

 Logistic Regression was implemented in sentiment_analysis.py,wherethecleanedtweetswere vectorized using TF-IDF (Term Frequency-Inverse Document Frequency). The vectorized data was split into training and validation sets, and the logistic regressionmodelwastrainedonthetrainingdata.The model was evaluated using accuracy scores and a classificationreport.

 NaiveBayeswasusedintwitter_analysis.py,wherethe textwassimilarlypreprocessed,andthefeatureswere extracted using TF-IDF. A Multinomial Naive Bayes model was trained and evaluated on the sentiment data,andthetrainedmodel wassavedforfutureuse usingjoblib.

3.4 Evaluation

Toevaluatetheperformanceofthesentimentclassification metricswereusedasaccuracyandtheclassificationreport.

4. Results And Discussion

A Sentiment Distribution Bar Graph that displayed the distributionofdifferentsentimentlabels(positive,neutral, negative) within the dataset, providing insights into sentimenttrends.

4.1 Sentiment Distribution

fig.1Bargraphofsentimentdistribution

a) Positivesentimentinteractionswereassociatedwith increasedfeelingsofhappinessandsocialsupport.

b) Negativewithincreasedsadness,anxietyetc.

c) Neutralsentimentssuggestedindifferenceorlimited emotionalimpact.

fig.2Distributionof60,000tweets

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

4.2

Forthisstudy,datawascollectedthroughanonlinesurvey createdusingGoogleForms.Thequestionswerestructured to collect both quantitative and qualitative data, with the majority being multiple-choice, Likert scale and yes/no questions.

Thequestionsincluded:

1. Demographic Information:

a) Whatisyouragegroup?

b) Whatisyourgender?

c) Whatisyourprimaryoccupation?

2. Social Media Usage:

a) Howfrequentlydoyouusesocialmedia?

b) Howoftendoyouencounteremotionallycharged content(e.g.,positiveornegative)?

3. Impact of Social Media on Emotions:

a) Does social media content affect your mood or emotions?

b) Haveyoueverfeltoverwhelmedorstressedafter engagingwithsocialmedia?

c) Have you ever come across mental health-related campaignsonsocialmedia?

d) Do you think social media platforms provide adequatesupport/resourcesformentalhealth?

4. Personal Experiences:

a) Howlikelyareyoutosharepersonalmentalhealth experiencesonsocialmedia?

b) Howdoyouusuallyexpressemotionsinyourposts orcomments?

c) Haveyoueverfeltjudgedornegativelyimpactedby others'commentsorsentimentsonline?

d) In your opinion, how can social media better supportmentalhealthawareness?

e) Shareapersonalexperience(optional)wheresocial mediasignificantlyimpactedyourmentalhealth.

5. Consent:

a) Do you consent to your responses being used for academicresearchpurposes?

4.3 Key Findings

a) Social media influences mental health significantly, withbothpositiveandnegativeeffects.

b) Onlineinteractionsshapeemotionalwell-beingandcan actasbothasupportsystemandastressor.

c) Respondents who reported frequent exposure to negative sentiment were more likely to experience stressandanxiety.

d) Awarenesscampaignsanddigitalwell-beinginitiatives areessentialforpromotinghealthysocialmediausage.

4.4

Google Form Figures
fig.4AgeGroupRepresentation
fig.5GenderRepresentation
fig.6UsageofSocialMedia
fig.3ModelEvaluation
Correlation with Mental Health

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

fig.9Expressionofemotionsinpostsorcomments

Thisorganizesthedataclearlyandpresentsthekeyfindings aboutsocialmediausageandemotionalengagement.

 Accordingtodatacollected,56.1%ofindividualsaged 18-24usesocialmediasitesandapplications,

 28.8% of children under 18 are also active on these platforms.

 The gender distribution reveals that 65% of social mediausersarefemale,while35%aremale.

 79.3% of people engage with social media on a daily basis.

 In terms of emotional engagement, 20.7% of users frequently encounter emotions while interacting on socialmedia,

 while35%experiencesuchemotionsoften,and

 27.1%encounterthemoccasionally.

 Whenitcomestotheexpressionofemotionsinpostsor comments, 42.1% of users are influenced by emojis, 24.3% by text, 13.6% by memes and 7% by images/videocontent

5. CONCLUSIONS

This study highlights how sentiment analysis can help understand the psychological effects of social media. It emphasizes the importance of platforms taking responsibility for reducing harmful content and fostering positive interactions, which can lead to a healthier online environment.Withsocialmediabeingsuchapowerfultool for reaching diverse audiences, it's crucial for businesses, influencers, and organizations to carefully consider their targetaudience,themessagestheywishtoconvey,andthe platformthatbestsuitstheirobjectives.Byaligningcontent strategies with platform-specific dynamics and audience preferences,userscancreatemoreimpactfulandengaging interactions,ultimatelypromotingamoresupportivedigital space.

REFERENCES

[1] SocialMediaUseandPerceivedSocialIsolationAmong YoungAdultsintheU.SBrianAPrimack1,ArielShensa 2,JaimeESidani2,ErinOWhaite3,LiuYiLin4,Daniel Rosen 5, Jason B Colditz 2, Ana Radovic 6, Elizabeth Miller6

[2] Cyberpsychology, Behavior, and Social Networking, 20(6),BrendaK.Wiederhold,298-304.

[3] Socialmediasentimentanalysisanditsapplicationsin mentalhealthstudies.JournalofBiomedicalInformatics, 107,103443.DeChoudhury,M.,Gamon,M.,Counts,S.,& Horvitz,E.(2013).

[4] Predicting depression via social media.Proceedings of the7thInternationalConferenceonWeblogsandSocial Media(ICWSM2013).

[5] Analyzing social media to detect and predict mental health conditions: A survey.IEEE Access, 7, 151525151537.

[6] Socialmediaandmentalhealth:Astudyusingsentiment analysis.InternationalJournalofInnovativeTechnology andExploringEngineering(IJITEE)

[7] Kaggle Website: https://www.kaggle.com/datasets/kazanova/sentiment 140

Web:

[8] https:// www.ncbi.nlm.nih.gov/pmc/articles/PMC8603338

[9] https:// link.springer.com/ article/10.1007/s13278022-01000-9

fig.7Encounteremotionallycharged
fig.8Affectonmoodoremotions

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 03 | Mar 2025 www.irjet.net p-ISSN: 2395-0072

[10] https:// www.frontiersin.org/ journals/psychology/ articles/10.3389/fpsyg.2022.949881/full Books:

[11] SoYou'veBeenPubliclyShamedbyJonRonson

[12] MyBrainHasTooManyTabsOpenbyTanyaGoodin

[13] Beyond The Screen : The Impact Of Social Media On MentalHealthByHollyBritt GoogleFormLink:

[14] https://docs.google.com/forms/d/e/1FAIpQLSdR9TNI Dea7J6TaUzgNTy6Hz1mfKznMbWajtjZRJEZXtdd5g/vie wform?usp=sharing

BIOGRAPHIES

MsKomalSunilJadhav

M.Sc.InformationTechnology (UGC-NET)

Asst.Prof.,IT/CSDept.

DGRuparelCollege

MsNehaArjunNikam

StudentofSYBscComputerScience

DGRuparelCollege

MsRiyaLaxmikantPatil

StudentofSYBscComputerScience

DGRuparelCollege

MsRuchiVipinRane

StudentofSYBscComputerScience

DGRuparelCollege

2025, IRJET | Impact Factor value: 8.315 |

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Analyzing Sentiment in Social Media Communication and Its Effect on Mental Health by IRJET Journal - Issuu