Skip to content

TWright-28/Psych-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psych Bot

Navigation

Project Setup

Pre-requisites - Install the latest version of Python on your computer (Python3 is strongly recommended), and the package management system (PIP). After cloning the repository to your computer, follow these steps to launch the program:

Step 1: Open the repository in your IDE (Visual Studio Code is recommended).
 

For Windows

 

Step 2: Open your Powershell command line tool.

Step 3: Create a virtual environment by running the following command:

python -m venv venv 

Step 4: Run a virtual environment by running the following command:

 ./venv/Scripts/activate.ps1

Step 5: Run the following to command to install all necessary dependecies:

pip install -r requirements.txt

Step 6: Start the program by running this command:

python app.py

 

For Unix Based Systems

 
Step 2: Open a terminal in your VSCode by going to Terminal > New Terminal
Step 3: Run the following to command to install all necessary dependecies:

pip install -r requirements.txt

Step 4: Start the program by running this command:

python3 app.py

 

Project Description

The project was created for the UBC Okanagan third year level course.

Psych Bot's goal is to give the user psychological advice*. This bot serves as an interactive conversational agent that takes the user's input (a sentence) and outputs an appropriate response. As this assignment does not require Machine Learning implementation, the chatbot may provide a reply that may not relate to the user's prompt.

*For legal reasons, neither the bot nor developers are certified to provide medical help.

Project Documentation

Unit Tests

For Windows

 

Step 1: Open your Powershell command line tool.

Step 2: To run the unit test in the Bot class run this command:

python tests/bot.test.py 

Step 3: To run the unit test in the FileReader class run this command:

python tests/fileReader.test.py

 

For Unix Based Systems

 

Step 1: Open a terminal in your VSCode by going to Terminal > New Terminal

Step 2: To run the unit test in the Bot class run this command:

python3 tests/bot.test.py

Step 3: To run the unit test in the FileReader class run this command:

python3 tests/fileReader.test.py

 

Features by Branch

Dialogue

Error case 1

In this case the bot does not understand the term "gang". The program has an issue with the response due to the limited capabilities of the library. The current word list in the library doesn't include enough dictionary to handle all possible words that user may provide to the bot.

Error case 2

In this case the bot does not correctly recoginize "goodd" as "good". This issue occurs due to the limitations of the library we are currently using - PorterStemmer. It has a limited data "object" of information on how to correctly "fix" the error unlike the larger companies(e.g., Google search).

Assignment 3 New Features

GUI

Synonym Recognition

>The bot is capable of detecting the synonyms of the words based on the user input

Word : Family Word : Folk

POS Tagging

>Replying with a question or a therapy word (anxiety / depression / suicide) Results in no more scheduled time

>Replying with just a question Results in the system not being able to help

>Replying with anything else Results in the system concluding the session

Question/Therapy words Just Question Other

Sentiment Analysis

>the program determines if the user's response has a positive or negative context

Negative Positive

Data Flow Diagrams

Data Flow Diagram level 0

This is a level 0 data flow diagram. It shows the abstract relationships between the user, our graphical user inferface and the bot interact.

Data Flow Diagram level 1

This is a level 1 data flow diagram. It shows a more specific relationship between the user, our graphical user inferface and the bot. This includes the process in which the bot recieves data from the GUI, processes that data through the Porterstemmer as well as many language toolkits to improve the response.

Project Demo

A2: Sample Demo #1

A2: Sample Demo #2

A2: Sample Demo #3

Presentation

Assignment 2

https://drive.google.com/file/d/1d1YoKrsMo2QLvyRmTXqykamdag-MjdqK/view

Assignment 3

https://drive.google.com/file/d/1ELe7H8BuCDFhErKWm7hDNFb-P9e7TTNP/view

Contributors

  • @d3li0n - GUI, Automated Unit Testing, Code Refactoring, Project Management.
  • @KentonMewling - Automated Unit Testing, Presentation.
  • @RyanG418 - Documentation, Presentation.
  • @vinui409 - Documentation, Presentation.
  • @OKThomas1 - PorterStemmer, POS, Sentimental Analysis, and Synonym Recognition development.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages