Project Idea | AI Therapist

23 Nov, 2021
Project Title : AI therapist
Introduction: Input is user provided description about how his day went in two-three lines. Using natural language processing, our program detects how user is feeling. He may be feeling depressed, feared, angry etc. Then a recommender system is used to show him content based on his current emotions. For example if user is feeling depressed, program will show him motivational thoughts, blogs etc.
Conceptual framework:The project will be a combination of natural language processing and recommender system. The pipeline model built through NLP will put user input in any one of the classes ‘A’, ’B’, ’C’, ’D’ .Class A: AngerClass B: Minor DepressionClass C: Serious DepressionClass D: FearAfter this the recommender system will recommend quotes and speeches pertaining to a particular class in order to assist user.
Code:
import numpy as npimport pandas as pdfrom pandas import Series, DataFrameimport matplotlib.pyplot as pltimport seaborn as sns%matplotlib inlineimport stringfrom nltk.corpus import stopwords  #data is our input dataset containing user input lines and it has a column of emotional class. #The code will not work in IDE as no dataset has been provided    #function to remove punctuations and stopwordsdef function_preprocess (mess):    nopunc = []    for char in mess :        if char not in string.punctuation:            nopunc.append(char)    nopunc=''.join(nopunc)    clean = []    for word in nopunc.split():        word = word.lower()        if word not in stopwords.words('english'):            clean.append(word)    return clean  from sklearn.pipeline import Pipeline from sklearn.naive_bayes import MultinomialNBfrom sklearn.feature_extraction.text import CountVectorizer as cvfrom sklearn.feature_extraction.text import TfidfTransformer  #building our NLP model using naive bayes as classifierpipeline = Pipeline([('bow', cv(analyzer=function_preprocess)),                    ('tfidf', TfidfTransformer()),                    ('classifier', MultinomialNB()),                    ])pipeline.fit(data, emotional_class)
Recommender system will be created using neighbour based collaborative filtering techniques as it would suggest the things which were helpful for similar users.
Tools Used:1. Language used: Python2. Algorithms : Collaborative filtering, Naive bayes, Natural Language Processing
Application:1. Can be used to identify people suffering from depression, anxiety etc and at the same time help them too.2. If user is suffering from depression, program will recommend him to visit a doctor and also inform his relatives about the same.3. If user is often angry, program will suggest him tips for anger management.4. This model will be helpful to psychiatrists and therapists for curing their clients.
Team members:1. Abhay Gupta2. Abhinav Tripathi
If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
surindertarika1234
ProGeek
Project
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
10 Best Web Development Projects For Your Resume
E-commerce Website using Django
Banking Transaction System using Java
Voting System Project Using Django Framework
Browser Automation Using Selenium
Setup Sending Email in Django Project
Handling Ajax request in Django
Student record management system using linked list
How to Build Portfolio Website And Host It on GitHub Pages?
College Management System using Django - Python Project