vivianknee / PocketTherapist

Apache License 2.0
1 stars 0 forks source link

Ideation Feature Week #7

Open vivianknee opened 11 months ago

tanishapatil1234 commented 11 months ago

BACKEND TICKET

The following is a description of the work I (Tanisha Patil) have completed for our group passion project.

1. Backend Development

2. CRUD Functions

Read

Untitled_Project_V1

Update

screen-recording_V3

Delete

screen-recording_V2

3. AI Development

tanishapatil1234 commented 11 months ago

FRONTEND TICKET

isabelle926 commented 11 months ago

Feature: Your AI Therapist

Therapy is expensive, but using an AI chatbot is (mostly) free! For this week, I added a chatbot that acts as a therapist to users.

Frontend:

My commit can be found here.

On the home page (and other pages), there is a button that users can press to open a chat field.

Screen Shot 2023-10-18 at 11 00 56 AM

My code!

Screen Shot 2023-10-18 at 11 04 21 AM

This opens up a window that is connected to the backend.

Screen Shot 2023-10-18 at 11 02 36 AM

My code!

Screen Shot 2023-10-18 at 11 06 50 AM

Backend:

My commit can be found here.

For the backend, I decided to use Apache OpenNLP library, which is a machine learning toolkit that can process natural language text. Using an NLP is useful for our purposes since it allows for "communication" between a human and a machine. I decided to use Apache OpenNLP in particular because it's particularly useful for categorizing text into "human" categories, such as emotions.

Screen Shot 2023-10-18 at 11 12 11 AM

This process is known as lemmatization! Lemmatization is the process of grouping together different inflected forms of the same word. My chatbot goes through the following steps:

Screen Shot 2023-10-18 at 11 22 12 AM Screen Shot 2023-10-18 at 11 22 38 AM Screen Shot 2023-10-18 at 11 22 52 AM Screen Shot 2023-10-18 at 11 23 15 AM Screen Shot 2023-10-18 at 11 23 42 AM Screen Shot 2023-10-18 at 11 24 01 AM

What next?