miladrezazadeh / twitter_depression_detection

This app is able to detect depressive characteristics in a given tweets and the classify it into depressive and Non-depressive.
MIT License
7 stars 0 forks source link

Twitter Depression Detection

Table of Contents

Overview

Social media platforms such as Twitter, Instagram and Facebook play dominant roles in our day to day life. The popularity of these platforms has been significantly increased during the pandemic. Studies show that people are more likely to share their feelings and emotions on Twitter since the beginning of the Covid-19 pandemic. Positive emotions are not commonly associated with higher life satisfaction; however, negative emotions are more likely to express a person true feelings.

Depression is the most common mental disorder which is more than just being sad. Some signs of depression are lack of interest in daily activities, significant weight loss or gain, insomnia or excessive sleeping, lack of energy, inability to concentrate, feelings of worthlessness or excessive guilt and in severe cases recurrent thoughts of death or suicide. Auspiciously, depression is treatable. The treatment is a combination of therapy and antidepressant medication.

Background and Motivation

Goals

The goal of this project is to implement supervised machine learning techniques in order to detect tweets containing depressive characteristics.

Datasets

We need two types of datasets one with tweets containing depressive characteristic which is obtained from twitter API and the other one with random tweets.

  1. Data mining more than 20K tweets by using Twitter API and Tweepy library. The raw data retrieved from Twitter can be find here.

  2. Random tweets has been extracted from the Kaggle datasets.

Data Science Pipeline:

Usage

git clone https://github.com/miladrezazadeh/twitter_depression_detection.git 
python3 -m venv env
source env/bin/activate

Use the package manager pip to install requred libraries.

pip install -r requirements.txt

Download en_core_web_lg from Spacy

python -m spacy download en_core_web_lg
python clean.py <file_name> 

License

This repo has a MIT License.

References