Professional Documents
Culture Documents
Submitted by
KALAIPRIYA B (312018104029)
SOWMIYA V (312018104058)
In
1. KALAIPRIYA B
HOLD ON-
Web
NUTHAKKI MITHALI Application on
2.
suicide
MARYAH
prevention and
awareness
SOWMIYA V
3.
The Reports of the project work submitted by the above students in partial
fulfillment for the award of Bachelor of Engineering Degree in Computer Science
and Engineering of Anna University, Chennai were evaluated and confirmed to
be reports of the work by the above students and then evaluated.
Submitted on …………
I
ABSTRACT
II
TABLE OF CONTENTS
ABSTRACT II
LIST OF FIGURES V
LIST OF ABBREVIATIONS VI
1. INTRODUCTION 1
1.1 OVERVIEW
2. REQUIREMENT ANALYSIS 2
2.1 REQUIREMENTS FOR PYCHARM 2
2.2 SPECIFIACTIONS FOR FLASK 2
2.3 SOFTWARE REQUIREMENTS 2
2.4 INSTALLATIONS 2
2.5 LANGUAGES USED 2
III
4. SYSTEM IMPLEMENTATION 7
4.1 SYSTEM MODULES 7
4.1.1 Depression Screening 7
4.1.2 Data Analysis 10
4.1.3 Sentimental Analysis 12
5. SYSTEM TESTING 15
5.1 FUNCTIONALITY TESTING 15
5.2 USABILITY TESTING 15
5.3 INTERPHASE TESTING 15
5.3.1 Sentiment Analysis Module 15
5.3.2 Depression Screening Module 16
5.4 COMPATABILITY TESTING 16
REFERENCES 19
APPENDIX I - SOURCE CODE 20
APPENDIX II – SCREENSHOTS 26
IV
LIST OF FIGURES
V
LIST OF ABBREVIATIONS
VI
Chapter 1
INTRODUCTION
1.1 ABOUT
Depression and suicide thoughts are the two of the most frightening things that
one can face in their lifetime. Unfortunately acting on those suicidal thoughts is
a far too common decision many make across the world. People who have
attempted suicide often quote that “They are emotions that never seems to end,
to a point they see no other option than to commit suicide.”
There are many reasons as to why a person tries to commit suicide or has suicidal
thoughts. The most common reason is that the depressed person was not able to
covey exactly what difficulty he/she was fasting at that moment to anyone
including their loved one as they themselves are not aware of what is troubling
them. A long and difficult research has been found that the basic motivation for
suicide is the feeling of not expressing their loneliness and hopelessness. But
there are several other reasons so as to why a person attempts suicide, each
individual has a different coping mechanism when it comes to hardships for some
people it might be very overwhelming and might not be able to deal with difficult
situations and hence choose this very sad and frightful option.
This website is helpful for those who need to overcome their suicidal thoughts,
depression and to relieve themselves from their sufferings. This website is also
designed to be recommended to a friend or a family member who you are worried
about or suspect to be on the verge of killing or harming themselves. This website
helps one to have a clear differentiation between myths and facts; the web page
also contains several helpline numbers that may come in handy at any point of
time.
1
Chapter 2
REQUIREMENT ANALYSIS
2.1 Specification for PYCHARM:
• RAM -4GB
2.4 INSTALLATIONS
• NLTK (pip install nltk)
2
Chapter 3
3
3.3 UML DIAGRAMS
3.3.1 Use-Case Diagram
Fig 3.1
3.3.2 Activity Diagram
Fig 3.2
4
3.4 DATA FLOW DIAGRAM
Fig 3.3
Fig 3.4
5
3.4.3 Second Level Data Flow Diagram
Fig 3.5
6
Chapter 4
IMPLEMENTATION
4.1 SYSTEM MODULE
4.1.1 MODULE 1(DEPRESSION SCREENING)
o MODULE INTRODUCTION
7
o DFD/FLOW DIAGRAM WITH EXPLAINATION
STAR
T
Continu
e No
Yes
Display questions
SUBMIT
Calculate Score
Display Score
Stop
Fig 4.1
o EXPLAINATION
9
4.1.2 MODULE 2 (DATA ANALYSIS)
o MODULE INTRODUCTION
Display dataset
details
Display
graphs
Stop
Fig 4.2
10
o ALGORITHM/PROCEDURE
Step 1: Start the program
Step 2: Open Jupyter Notebook
Step 3: Import the necessary libraries.
Step 4: Import the dataset
Step 5: Display the dataset in a tabular form to better understand the
dataset, its columns and rows.
Step 6: Check for columns having Null values and delete the columns that
have excessive null values.
Step 7: Plot and display each graph.
Step 8: Stop
o EXPLAINATION
The website contains a data exploratory module which is divided into two
pages as mental health analysis and suicide rate analysis.
In mental health analysis, the libraries and the dataset from survey.csv from
Kaggle is imported in Jupyter notebook. The dataset is displayed in a tabular form
to better understand the dataset. Check for columns having null values and delete
the columns having excessive null values. The graphs are plotted and displayed.
In suicide rate analysis, the libraries and the dataset from survey.csv from Kaggle
is imported in Jupyter notebook. The dataset is displayed in a tabular form to
better understand the dataset. Check for columns having null values and delete
the columns having excessive null values. The graphs are plotted and displayed
in each group as
11
4.1.3 MODULE 3 (SENTIMENT ANALYSIS)
o MODULE INTRODUCTION
Analysis to get the user’s feelings as input and analyze their mental health
and predict their nature of thought i.e., positive or negative.
o DFD/FLOW DIAGRAM WITH EXPLAINATION
Start
Yes
Word is present
in the emotion
arrayelists
Yes No
Score[neg]
>score[pos
]
STOP
Fig 4.3
12
o ALGORITHM/PROCEDURE
Step 13: The Html Page receives the message from the main.py page and
displays the result in a modal
Step 14: We can now click on the result button to see the result.
Step 15: Stop The Program.
13
o EXPLAINATION
14
Chapter 5
TESTING
5.1 Functionality Testing
All the links and buttons have been tested and all the navigations are
working as expected.
Buttons present the Project work as expected without any delay, and
produce the results.
Test Case 1:
Input:
I hate life, the pandemic has affected my mental health and I don’t
feel good about myself.
Output:
You are currently having some Negative thoughts Thank you for
trying out our Sentiment Analyzer hope you get clarity on your thoughts and
feelings.
15
Test Case 2:
Input:
I am positive that I’m doing well on all aspects of my life, and am
loving every second of this beautiful adventure.
Output:
You are currently having some Negative thoughts Thank you for
trying out our Sentiment Analyzer hope you get clarity on your thoughts.
16
Chapter 6
Our data exploratory page is designed to display the data analysis on depression
and suicide cases that has segregated by age, education and marital status to
deeply know the causes of depression and suicides.
Helpline page has been added to provide Indian helpline numbers and numbers
of NGOs that rescues people from depression. Also added some links of useful
blogs. Get-to-know module is present to display information all about
depression with some myths and facts.
17
Chapter 7
This dissertation is dealt with the design and development process of awareness
creating web-application. We have implemented our project with data analysis
on depression and suicide cases - a get to know page where we can know all about
depression and a helpline page availing Indian helpline number and for specific
cities.
Our website also focuses on analyzing the user’s mental health and mood with a
sentiment analysis module. A screening page is present to analyze more about
their mental health. This helps to have an interactive relationship with the user
and the website.
As a part of our mini project, we are visualizing the usage of this app for people
who are suffering from depression and may have a threat of committing suicide.
This app can be used for screening ourselves and can be recommended to our
friends and family for their benefits as well. With the help of this project, we hope
that we can at least reduce the number of suicides, and prevent thoughts.
18
REFERENCES
[1] Open Sourcing Mental Illness Ltd is a non-profit Indiana corporation with
501(c)(3) tax-exempt status. EIN: 81-3587896.
[2] Principal Software Engineer at Accion Labs India Private Limited
[3] BI India Bureau- International Suicide Prevention Day: These are the suicide
prevention helpline numbers in India
[4]Liu B. Sentiment analysis and opinion mining. Synthesis Lectures Human
Language Technologies 2012;5:1–167
19
APPENDIX
APPENDIX I - SOURCE CODE
return render_template('analysis.html')
20
Depression Screening:
let que_count = 0;
let que_numb = 1;
let userScore = 0;
let counter;
let counterLine;
let widthValue = 0;
21
const quit_quiz = result_box.querySelector(".buttons .quit");
//creating a new span and div tag for question and option and passing the
value using array index
let que_tag = '<span>'+ questions[index].numb + ". " +
questions[index].question +'</span>';
let option_tag = '<div class="option"><span>'+ questions[index].options[0]
+'</span></div>'
+ '<div class="option"><span>'+ questions[index].options[1]
+'</span></div>'
22
+ '<div class="option"><span>'+ questions[index].options[2]
+'</span></div>'
+ '<div class="option"><span>'+ questions[index].options[3]
+'</span></div>';
que_text.innerHTML = que_tag; //adding new span tag inside que_tag
option_list.innerHTML = option_tag; //adding new div tag inside option_tag
if(userAns == "Not at all"){ //if user selected option is equal to array's correct
answer
userScore += 0; //upgrading score value with 1
}
else if(userAns == "Several days"){
userScore += 1;
}
else if(userAns == "More than half the days"){
23
userScore += 3;
}
else if(userAns == "Nearly every day"){
userScore += 4;
function showResult(){
info_box.classList.remove("activeInfo"); //hide info box
quiz_box.classList.remove("activeQuiz"); //hide quiz box
result_box.classList.add("activeResult"); //show result box
const scoreText = result_box.querySelector(".score_text");
if (userScore < 14 ){
let scoreTag = '<span class="result_text"><p>RESULT: <br/></p>
<p>You are completely fine, no need to get riled up at all</p></span>';
scoreText.innerHTML = scoreTag; //adding new span tag inside
score_Text
}
else if(userScore >=14 && userScore< 20 ){
let scoreTag = '<span class="result_text"><p>RESULT: <br/></p> <p>
You might be facing borderline depression, get out there and have some fun
with friends and family.</p></span>';
scoreText.innerHTML = scoreTag;
}
else if(userScore >=20 && userScore< 29 ){
let scoreTag = '<span class="result_text"><p>RESULT:
<br/></p><p>There is a high probability you are depressed, try consulting a
24
specialist, there is nothing to be alarmed about, there are chances of not being
true also. </p></span>';
scoreText.innerHTML = scoreTag;
}
else{
let scoreTag = '<span class="result_text"><p>RESULT: <br/></p><p>
Consult a physician as soon as possible, there is a high chance you might be
Depressed. </p></span>';
scoreText.innerHTML = scoreTag;
}
}
function queCounter(index){
//creating a new span tag and passing the question number and total question
let totalQueCounTag = '<span><p>'+ index +'</p> of <p>'+ questions.length
+'</p> Questions</span>';
bottom_ques_counter.innerHTML = totalQueCounTag; //adding new span
tag inside bottom_ques_counter
}
25
APPENDIX II – SCREEN SHOTS
HOME PAGE:
HELPLINE:
26
DEPRESSION SCREENING:
SENTIMENT ANALYSIS:
EXPLORATRY ANALYSIS:
27