
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
![]()

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
Varsha B N1 , Charan H S 2 , Naman Nikshap C N 3 , Rekha P4
1 Dept of ECE, BNMIT, Bengaluru, India, 22ece001@bnmit.in
2 Dept of ECE, BNMIT, Bengaluru, India, 22ece127@bnmit.in
3 Dept of ECE, BNMIT, Bengaluru, India, 22ece005@bnmit.in
4 Dept of ECE, BNMIT, Bengaluru, India, rekhap@bnmit.in
Abstract - The rapid expansion of social media has created new opportunities for understanding mental health through digital footprints. This study explores methods for assessing psychological risks such as depression, anxiety, and suicidal ideation by analyzing user activity on platforms like Twitter. By integrating machine learning, sentiment analysis, andselfreported data, the proposed system combines linguistic cues, emotional tone, and behavioral patterns to detect early warning signs of distress. The framework employs Tweepy for live tweet collection, TextBlob for sentiment scoring, and a Tkinter-based questionnaire for direct symptom reporting, with results visualized using Matplotlib. Sentiment polarity thresholds and questionnaire responses are fused to classify risk levels ranging from low to high. Experimental results demonstrate the ability to identify potential depression risk and provide user-friendly visual summaries to support interpretation. While AI-driven tools can augment early detection and clinical decision-making, ethical considerations such as privacy, consent, and transparency remain critical. This work highlights the promise of combining social media analytics with self-assessmenttoolsforscalable,proactive,and responsible mental health monitoring.
Key Words: Twitter, Social media, depression, anxiety, Tweepy,MentalHealth.
Intoday’sdigitalera,socialmediaplatformsaremorethan justspacesforsocialinteraction theyarerichreservoirsof behavioural data. This phenomenon has led to growing interest in mental health risk assessment based on social media activity. By analysing linguistic patterns, posting frequency, sentiment, image content, and interaction dynamics,researchersandcliniciansstrivetoidentifyearly warning signs of conditions like depression, anxiety, self harm,andsuicidalideation.Acompellingbodyofevidence linksexcessiveorcompulsivesocialmediause notmerely total screentime toheightenedpsychological distress. A longitudinal study found that adolescents exhibiting problematicusagepatterns weretwotothreetimesmore likely to experience suicidal thoughts and emotional difficulties[16].Toadvancethisfield,cutting-edgeartificial intelligence(AI)modelsarebeingdeveloped.Forinstance,a multimodal deep-learning algorithm analysing nearly a millionsocialmediapostsachievedan89%accuracyratein
detectingmentalhealthcrisesupto aweekbeforehuman evaluation[17].Elsewhere,hybridneuralnetworks suchas CNN–BiLSTMwithattentionmechanisms haveimproved suicidal ideation detection to over 94% accuracy while offeringinterpretability.Thesetoolspromisetimely,datadriveninsightstosupportclinicaldecision-making.Ethical andprivacyconcernsloomlarge:usersmaybeunawareof ongoing analysis, and data usage skirts consent and transparency. Moreover, lack of clear regulation around psychological inferences intensifies fears of misuse. This article uncovers how digital footprints linguistic cues, emotiveimagery,postingrhythms arebeingharnessedfor mental health evaluation. It delves into the scientific foundations, the technological tools, and the ethical frameworksshapingthis emergentfield,highlightinghow responsible, privacy-grounded AI could offer early interventionwithoutcompromisingtrust.
Mental Health Risk Assessment Based on Social Media Activity is a growing interdisciplinary research area that leveragesmachinelearning,naturallanguageprocessing,and behavioralsciencetodetectsignsofpsychologicaldistress through digital footprints. With the rising prevalence of mental health issues and widespread use of social media, researchers are exploring automated systems to identify usersatriskofconditionssuchasdepression,anxiety,and suicidal ideation[13-15,19-22]. Following classification summarizesthesurveyintherelateddomain.
Theroleofsocialmediaasadigitalindicatorofpsychological well-beinghasbeenextensivelystudied.Earlyresearch[1], [2] established that platforms like Twitter and Facebook providevaluabledataformonitoringemotionalstates.These studies highlighted that linguistic patterns, frequency of posts,anduserengagementlevelscancorrelatestronglywith depressivesymptomsandanxietydisorders.Buildingupon this foundation, researchers in [3] demonstrated how sentiment analysis techniques applied to user posts can reveal subtle mood variations that may escape clinical observation.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
With the availability of large-scale social media datasets, machine learning has become a dominant approach. Classifiers such as SVM, Naïve Bayes, and deep learning modelsweretestedin[4,5,18],achievingpromisingaccuracy indetectingdepressivesignals.Similarly,theuseoflexiconbased tools like TextBlob and VADER was explored in [6], enabling sentiment polarity scoring as an interpretable method for risk prediction. These approaches are further supportedbyhybridmodels[7],wherelinguisticfeaturesare combinedwithbehavioralmetrics,demonstratingimproved detectionperformance.
While automated sentiment tracking provides valuable insights, combining it with self-reported assessments enhances reliability. The work in [8] proposed integrating structured questionnaires with social media-derived sentimentscorestocross-validateresults.Studiessuchas[9] and[10]furtheremphasizedthathybridmethodsnotonly improve diagnostic accuracy but also increase user engagementinself-care.
Despitetechnologicaladvances,concernsremainregarding privacy, ethical use of user data, and transparency in AIdriven assessments. Authors in [11], [12] cautioned that whilepredictivemodelscanprovideearlywarningsignals, misuseofsensitivementalhealthdatamayresultinadverse consequences.Thus,futureresearchmustbalanceinnovation with responsibility by embedding ethical safeguards into monitoringframeworks.
While significant progress has been made in developing modelsandsystemsformentalhealthriskassessmentusing social media data, much of the current research remains experimentalandlimitedtocontrolleddatasets.Thereisa noticeable gap in real-world validation, large-scale deployment,andintegrationwithmentalhealthservicesor crisis intervention platforms. Few studies address crossculturalgeneralizability,ethicalcompliance,orlongitudinal analysis. Future work must focus on building robust, interpretable models, ensuring user privacy, and creating scalablesystemsthatcanoperatereliablyindynamic,realworldsocialmediaenvironments.
Theproposedframeworkformentalhealthriskassessment integrates social media analysis with self-reported data to classifypsychologicalwell-beingintodistinctriskcategories. Themethodologyisdividedintothefollowingstages:
Data Acquisition (Tweepy APITwitter Data
Visualization
Matplotlib Graphs & Charts
Pre-processing
Cleaning & Normalization
Risk Classification
Low/Moderate/Hi gh
Sentiment Analysis
Textbob Polarity & Subjectivity Scores
Self-Assessment Module -Tkinter based Questionnaire
3.1
Twitter data was collected in real-time using the TweepyAPI,whichenablestheextractionofuserposts based on relevant keywords and hashtags. This ensuredcontinuousmonitoringofuseractivitywhile maintainingcompliancewithplatformpolicies.
3.2 Pre-processing
Extractedtweetswerecleanedtoremovenoisesuchas URLs, stopwords, emojis, and punctuation. Tokenization and lowercasing were applied to normalizethedata.Thisstepimprovestheaccuracyof downstreamsentimentanalysisandmachinelearning classification.
3.3 Sentiment Analysis
ThecleanedtweetswereanalyzedusingtheTextBlob library,whichassignsbothpolarity(positive,negative, neutral) and subjectivity scores. Threshold-based categorizationwasthenappliedtoquantifyemotional tendencies,identifyinguserswithconsistentlynegative orneutralsentimentaspotentialat-riskcases.
3.4 Self-Assessment Module
Tocomplementsocialmediaanalysis,aTkinter-based GUIquestionnairewasdesigned,drawingonstandard depression and anxiety screening instruments. Responses were scored on a scale to provide an independentmeasureofpsychologicalrisk.
3.5 Risk Classification
Sentimentscoresfromsocialmediaactivitywerefused withquestionnaireresultstogenerateacompositerisk profile.CategoriesincludedLowRisk,ModerateRisk, andHighRisk,basedonweightedthresholds.
3.6 Visualization
The final outputs were visualized using Matplotlib, providing bar graphs and pie charts that illustrate both sentiment distribution and questionnaire

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
outcomes.Thisensuresresultsareinterpretablefor bothresearchersandend-users.
To validate the proposed framework, experiments were conducted by integrating both social media sentiment analysisandself-assessmentquestionnaires. TheexperimentutilizesbothrealandsampleTwitterdatato assesspotentialdepressionrisk.Tweetsarecollectedintwo ways:
Live Twitter Data: If valid Twitter API credentials are supplied,theapplicationfetchesupto100ofthemostrecent tweetsfromthetargetuser'spublictimeline.
FallbackSampleDataset:Iflivedatacannotbeobtained(due toauthenticationoraccountrestrictions),tweetsareloaded fromalocalCSVfile(sample_tweets.csv)or,ifunavailable, fromasetofpredefinedsampletweets.
Each tweet is analyzed using theTextBloblibrary, which computesasentimentpolarityscorerangingfrom-1(most negative)to+1(mostpositive). Foreachtweet:
Thecoderecordsthetextandassociatedpolarityscore.
Sentiment distribution is visualized using a line plot, distinguishingpositive,neutral,andnegativepatterns.
Toassessdepressionriskfromtweets:
Theaveragesentimentpolaritycalculated. Depressionrisklevelsareclassifiedas:
Highrisk:avg.polarity<-0.6
Moderaterisk:-0.6≤avg.polarity<-0.3
Lowrisk:-0.3≤avg.polarity<0 Norisk:avg.polarity≥0
Participantsarethenpresentedwithan8-itemquestionnaire focused on common depression and anxiety symptoms. ResponsesarecollectedthroughaTkinter-basedGUI,with optionsfor"Yes"or"No"foreachquestion.
Responsesaretallied,andriskisclassifiedas:
Highrisk:6–8"Yes"responses
Moderaterisk:4–5"Yes"responses
Lowrisk:2–3"Yes"responses
Norisk:0–1"Yes"responses
A bar chart visualizes the distribution of "Yes" and "No" responsesperquestion.
The results from tweet sentiment analysis and the questionnaireareintegratedtogenerateanoverallmental health risk feedback report. This combined assessment provides an indication of potential depression symptoms,
supported by both textual behavioral data anddirectselfreport.
TheexperimentisimplementedinPythonusingthefollowing technologies:
Tweepy:TwitterAPIintegration.
TextBlob:Sentimentanalysis.
Tkinter:userinterfaceandquestionnairedelivery.
o Matplotlib:visualization.
o Pandas:datahandling.
All analyses and visualizations are conducted within the custom-builtGUI.Thisenablescomprehensive,user-friendly evaluation of depression risk based upon social media activityandstandardizedquestionnaireresponses.
Theapplicationdisplaysaninformationdialogasshownin Figure 1, indicating "Using internal sample tweets for analysis." A predefined set of internal tweets is used for mentalhealthsentimentanalysis.

Fig 1:Infobox

Fig 2: SentimentPolarityGraph
TheplotinFigure2displaysthesentimentpolarityscores offiveanalyzedtweets,rangingfromnegativetopositive values. Each point represents an individual tweet, with the blue line connecting sentiment scores in sequence. The red dashed line marks neutral sentiment, helping visualizefluctuationsinemotionaltoneacrossthetweets.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072

Fig 3: In-builtanalysedtweets
Theoutputwindowdisplaysindividualtweetswiththeir calculatedsentimentpolarityscores.Itsummarizesthe analysis,reportingthat5tweetswereevaluatedandthe averagesentimentpolarityis0.214.

Fig 4: Questionnaire1
It asks the user, "Are you feeling sad frequently?" with "Yes"and"No"responsebuttons.Thisinteractivefeature asshowninFigure4collectsself-reporteddataonmood andmentalhealthsymptomsforriskassessment.

Fig 5: Questionnaire2
The questionnaire window shown in Figure 5 presents thequestion,"Doyouhavetroublesleeping?"Userscan respond by clicking "Yes" or "No" to indicate their experiencewiththissymptom.Thisstepispartofamultiquestionassessmenttoevaluatepotentialmentalhealth concerns.

Fig 6: Questionnaire3
Thequestionnairenextasks,"Areyoulosinginterestin yourregularactivities?" questionasshowninFigure6. Participants can answer this mental health screening questionwith"Yes"or"No."Eachresponsehelpsgauge possiblesymptomsofdepressionoremotionaldistress.

Fig 7: Questionnaire4
The question, "Do you feel anxious often?" shown in Figure7,letsUserstoselect"Yes"or"No"toindicatetheir experiencewithfrequentanxiety.Thiscontinuesthestepby-step assessment to screen for mental health risk factors.

Fig 8:Questionnaire5
The questionnaire shown in Figure 8 asks, "Are you experiencingmoodswings?"aspartofthementalhealth assessment.Theuserrespondsbyclickingeither"Yes"or "No"toindicateiftheyfacethissymptom.Thisinteractive

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
approachhelpscollectrelevantinformationonemotional well-beingforanalysis.

Fig 9: Questionnaire6
The questionnaire in Figure 9 prompts the question, "Have you noticed changes in your appetite?" Users can select "Yes" or "No" to report if they have experienced this symptom. Collecting such responses helps evaluate possible indicators of depression or emotionaldistress.

Fig 10: Questionnaire7
ThequestionnaireinFigure10asks,"Doyoufeelhopeless about the future?" The user chooses "Yes" or "No" to indicate their feelings regarding hopefulness. This questiontargetsakeysymptomofdepression,aidingin comprehensivementalhealthassessment.

Fig 11: Questionnaire8
The questionnaire in Figure 11 presents the question, "Are you finding it hard to focus?" Users respond by selecting either "Yes" or "No" to describetheirrecentconcentrationlevels.Thisitemhelps screenforcognitivesymptomscommonlyassociatedwith depressionoranxiety.

Fig 12: Questionnaireresultgraph
ThebarchartinFigure12displaysresponsestoeachof the eight questionnaire questions. Green bars indicate "Yes"responseswhileredbarsrepresent"No"responses for each question. This visual summary helps quickly identifywhichmentalhealthsymptomstheuserreported is experiencing.

Fig 13: Questionnaireresult
The results window in Figure 13 summarizes the questionnaire, noting that 4 out of 8 questions were answered"Yes,"indicatingamoderateriskofdepression. the questionnaire points to potential depression symptomsatamoderaterisklevel.
6. Conclusion
Thismentalhealthriskassessmentapproachunderscoresthe growing potential of digital technologies in psychological well-beingmonitoring.Byanalyzinglanguageandemotional tonewithinsocialmediaposts,thesystemcandetectsubtle negativepatternsorshiftsinmoodovertime,whichmight act as early warning signs of depression or emotional distress.Theinclusionofastructuredquestionnairefurther strengthens the analysis by capturing direct self-reported

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072
symptomsthatmaynotalwaysbeevidentfromsocialmedia activity alone. The visualizations provided, like sentiment trend plots and questionnaire response charts, facilitate intuitive understanding for both users and professionals, enabling them to track changes and risks at a glance. The combinationofobjectivedigitalanalysisandsubjectiveselfreportpromotesamorenuancedunderstandingofmental health risk, helping to identify individuals who might not otherwise seek help. It also encourages proactive conversations about mental health, reduces the stigma associatedwithseekingsupport,andprovidesapathwayfor connecting those at risk with professionals or resources. Ultimately, this technology-driven strategy highlights the growing role of artificial intelligence and big data in supportingpublichealth,earlyintervention,andindividual well-being.
[1] Moreno, M. A., Ton, A., Selkie, E., & Evans, Y. (2018). “Secret Society 123: Understanding the Language of SelfHarm on Instagram.” Journal of Adolescent Health, 62(4), 496–502.
[2] De Choudhury, M., Counts, S., & Horvitz, E. (2013). “PredictingPostpartumChangesinEmotionandBehavior viaSocialMedia.”ProceedingsofCHI,3267–3276.
[3]Reece,A.G.,&Danforth,C.M.(2017).“Instagramphotos revealpredictivemarkersofdepression.”EPJDataScience, 6(15),1–12.
[4]Prieto,V.M.,Matos,S.,Álvarez,M.,Cacheda,F.,&Oliveira, J. L. (2014). “Twitter: A Good Place to Detect Health Conditions.”Proceedingsofthe6thInternationalConference onDigitalHealthConference,51–60.
[5] Shen, J. H., & Rudzicz, F. (2017). “Detecting Anxiety through Reddit.” Proceedings of ACL Workshop on ComputationalLinguisticsandClinicalPsychology,58–65.
[6]Hutto,C.J.,&Gilbert,E.(2014).“VADER:AParsimonious Rule-Based Model for Sentiment Analysis of Social Media Text.”ProceedingsofICWSM,216–225.
[7]Deshpande,M.,&Rao,V.(2017).“DepressionDetection UsingEmotionArtificialIntelligence.”InternationalJournal ofComputerApplications,182(16),1–4.
[8]Park,M.,Cha,C.,&Cha,M.(2012).“DepressiveMoodsof Users Captured in Twitter.” Proceedings of ACM SIGKDD WorkshoponHealthcareInformatics,1–8.
[9]Lin,H.,Jia,J.,Guo,Q.,Xue,Y.,Huang,J.,Cai,L.,&Feng,L. (2014). “User-Level Psychological Stress Detection from Social MediaUsing Deep Neural Network.” Proceedings of ACMMultimedia,507–516.
[10]Tsugawa,S.,Kikuchi,Y.,Kishino,F.,Nakajima,K.,Itoh,Y., &Ohsaki,H.(2015).“RecognizingDepressionfromTwitter Activity.”ProceedingsofCHI,3187–3196.
[11]Chancellor,S.,Birnbaum,M.L.,Caine,E.D.,Silenzio,V. M.B.,&DeChoudhury,M.(2019).“ATaxonomyofEthical Tensions in Inferring Mental Health States from Social Media.”ProceedingsofCSCW,1–29.
[12] Benton, A., Coppersmith, G., & Dredze, M. (2017). “Ethical Research Protocols for Social Media Health Research.”ProceedingsofACLWorkshoponEthicsinNLP, 94–102.
[13] J. Pokrywka, J. I. Kaczmarek, and E. J. Gorzelańczyk, “EvaluatingTransformerModelsforSuicideRiskDetection onSocialMedia,”in2024IEEEInternationalConferenceon BigData(BigData),2024.IEEE.
[14] A. Al-Harrasi, S. N. Mohd Khatim, and A. Al-Shukaili, “FinetuningLargeLanguage ModelsforSuicideRisk Level AssessmentonSocialMedia,”JournalofComputerScience, vol.20,pp.1349–1356,2024.
[15]. J. V. Verlenden, L. R. Norris, K. Price, and E. Ethier, “MentalHealthandSuicideRiskAmongCollegeStudents:A DetailedExplorationofContributingFactors,”CDCMMWR Supplements,vol.73,no.4,pp.65–76,2024.
[16]. S. Subramani, V. Kumaravel, and M. I. Lavanya, “Artificial Intelligence-driven Solution for Prompt Identification of Mental Health Concerns in Adolescents,” in2024 13th International Conference on Computing Communication and Networking Technologies (ICCCNT), 2024.IEEE.
[17]. M. Kowalewski, M. Stroinski, K. Kwarciak, and V. Laptiev, “End-to-end multimodal system for depression detection from online recordings,” in2022 IEEE International Conference on Acoustics, Speech and Signal Processing(ICASSP),2022.IEEE.
[18].S.Islam,M.S.A.Forhad,andH.Murad,“BanglaSAPM:A DeepLearningModelforSuicidalAttemptPredictionUsing SocialMediaContentinBangla,”in202225thInternational Conference on Computer and Information Technology (ICCIT),2022.IEEE.
[19].S.Jain,S.P.Narayan,R.P.Yadav,A.Roy,andS.P.Singh, “AMachineLearningbasedDepressionAnalysisandSuicidal Ideation Detection System using Questionnaires and Twitter,” inProceedings of the 2022 3rd International Conference on Intelligent Engineering and Management (ICIEM),pp.199–204,2022.IEEE.
[20].U.Naseem,M.Khushi,J.Kim,andA.Dunn,“HybridText RepresentationforExplainableSuicideRiskIdentificationon SocialMedia,”in2022IEEEInternationalConferenceonBig Data(BigData),2022.IEEE.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
[21]. P. D. Sagar and D. P. Asha, “Stacked Atrous ConvolutionalBasedResidualNetwork-50withLongShortTerm Memory for Suicide Detection on Balanced Social MediaData,”InternationalJournalofIntelligentEngineering andSystems,vol.14,no.6,pp.580–593,2021.
[22].A.ZafarandS.Chitnis,“SurveyofDepressionDetection usingSocialNetworkingSitesviaDataMining,”in202010th InternationalConferenceonCloudComputing,DataScience &Engineering(Confluence),2020.IEEE.
Volume: 12 Issue: 10 | Oct 2025 www.irjet.net p-ISSN: 2395-0072 © 2025, IRJET | Impact Factor value: 8.315 | ISO 9001:2008