Skip to content

Psychological python bot that uses sentiment analysis and Node.js

Notifications You must be signed in to change notification settings

TWright-28/PsychBot-Revamped

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Previous 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

 

Assignment 4 Documentation

Assignment 4 New Features

Google Translate API

>The bot is able to understand the users language and respond in the langauge of the user, using googletrans API.

Language : English Language : Finnish Language : Chinese

Wikipedia API

>User can interact with the bot and get information directly from wikipedia based off of the users input in any language.

English Link to a Wikipedia page

Both the API's were integrated together so you can use wikipedia in any language.

Different Languages using Wikipedia

New Methods

API Documentation file has more information regarding the uses and functionality of each of the API's.

A4: getLang function This function will get the language the user is using based on google translates certainty determining function and will return the language back to the bot.

A4: responseTranslate function This function will take in the users response and translate it to english so the response can be understood by the correct node.

A4: transNode function This function takes in the responce the bot will answer with and the users language that was determined from the getLang function and will translate the bot's response to the users language.

A4 Presentation

https://drive.google.com/file/d/1-9s3aBWBw8l101RgClK3metLziD5P6yQ/view

Contributors

About

Psychological python bot that uses sentiment analysis and Node.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages