Mindful Tweet Hub Project Details

  • Category: Natural Language Processing
  • Project date: Sept 2023 - Dec 2023
  • Project URL: GitHub Link

Mindful Tweet Hub

In the era of social media, mental health challenges like anxiety and depression are on the rise. This project first categorizes tweets into 10 mental health conditions: Eating Disorder, Schizophrenia, OCD, PTSD, Anxiety, Bipolar, Autism, Depression, ADHD, and Control using BERT classification. It then finds similar tweets within each category and presents them to users, fostering a sense of community and letting them know they're not alone in their struggles.

  • Created BERT embeddings from the model that we fine-tuned using BertForSequenceClassification
  • For all the tweets by removing the classification layer and getting the output bert embedding of CLS for each tweet.
  • These embeddings were used to create HNSWFlat indexes from FAISS . Later, the embeddings were added to the clusters.
  • Whenever the user enters a tweet, we calculate the BERT embedding for that user and search for the top 20 closest tweets in the HNSW. (It returns the distance, which we are using to get the similarity)
  • Using these tweets we are finding the Okapi BM25 score for each tweet with the query tweet.
  • The combined score of each embedding with these 20 tweets would be 0.8* (similarity from HNSW bert embedding matching) + 0.2"(bm25 similarity)
  • We now get the top similar tweets, we would use the unique classes in these tweets to do a zero shot classification to get the maximum probable class in which the tweet can fall into.