Skip to content

ShivaniRGandhi/Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Percy the Chatbot

Introduction

Percy is a chatbot with data on Greek Gods and Goddesses. The chatbot has a knowledge base with basic information on who the Gods, Goddesses, and Monsters are. In addition, the bot makes use of the Wikipedia library in Python to perform live look ups for additional information on topics the user requests.

Getting Started

The code can be run from an IDE (PyCharm, Visual Studio Code..etc) or terminal.

Make sure to have the following libraries and dependencies installed before running the code:

Screen Shot 2021-04-03 at 5 55 18 PM

NOTE: If running for the first time, you will also need to run the following two lines with the imports and dependencies:

  • nltk.download('punkt')
  • nltk.download('wordnet')

NOTE: If running the code through terminal, you may need to install wikipedia as follows:

Screen Shot 2021-04-03 at 6 02 12 PM

Next, make sure the knowledge base (kb.txt) is in the same directory as the Chatbot.py file.

Screen Shot 2021-04-03 at 5 57 34 PM

From here, if you are running the code in an IDE, you can simply run the Chatbot.py file.

If you are running the code from terminal, run as follows:

Screen Shot 2021-04-03 at 6 00 29 PM

Upon compiling, you should receive the following message:

Screen Shot 2021-04-03 at 6 03 00 PM

You are now ready to chat with Percy! Have fun!

Tips on How to Ask Percy Questions

Percy is capable of carrying a limited conversation. To get the most out of Percy, ask questions such as the following:

  • Who is Zeus?
  • Who is Athena?
  • Who is the oldest god?
  • Who killed Medusa?
  • What is a centaur?
  • Who is the god of war?
  • Who is the god of oceans?
  • Who is a Poseidon?
  • Who is the goddess of beauty?

Sometimes, asking a question in a certain way will not yield the correct results, but rewording the question may. For example, " Who did Hera marry" can be reworded as follows:

  • Who married Hera?
  • Who was Hera married to?

Upon getting an answer, you will see that Hera was married to Zeus. This allows you to ask the same question in the following way to get the same answer.

  • Who did Zeus marry?
  • Who was Zeus married to?
  • Who married Zeus?

Lastly, when all else fails in giving you the answer you want, try using the live search feature of Percy by asking questions on topics in the following format:

  • Tell me about ancient Greece
  • Tell me about Hercules
  • Tell me about Medusa
  • Tell me about Artemis

Features of Percy

Percy provides customized responses to the user, addressing them by their name and addressing the topics they input with each response.

In addition, Percy keeps a user profile for each unique user. For each unique user, a text file is created in which the user's name and inputs are logged in order to keep track of usage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages