Skip to content

FDSGAB/nagonbot

Repository files navigation

nagonbot (1.0.0)

Japanese Chatbot.

Summary

About the Project

nagonbot is a simple chatbot that "speaks" japanese. The name is a reference to a Heian period japanese writer.

The overall base program structure and the Tensor Flow model was inspired from Neural Nine's video on how to make a chatbot. He also has a repository here on GitHub with an automatic bot builder (English) called neuralintents if you want to check it.

If you want to know more about the name/inpiration of the bot or anything else about the project, you can check the project's Wiki!

Project Current Status

🤖 Version 1.0.0

✅ The bot is fully functional!

✅ You can now install it with PIP! (although some issues regarding the installation have been brought up (┬┬﹏┬┬))

❌ The required packages do not install automatically with the bot's installation (needs to be done manually).

❌ Some functions like BGM are not available in the release.

🛠 I'm always working on the bot to make it even better (adding functions, bettering the model, updating the package)

Setup

I recommend using a vitual environment (venv) for this project, since it's libraries are not fully optimized.

Mehod #1 - dowloading the source code (✅ Works!!)

Steps:

  1. Click the "<> Code" green button on nagonbot's GitHub repository.
  2. Click the "Download ZIP" option.
  3. Extract the project's code to a location of your liking.
  4. Open the extracted project folder in an IDE of your liking.
  5. Create a virtual environment inside the project folder.
py -m venv ./myvenv
  1. Activate the virtual environment created in the last step.
.\myvenv\Scripts\activate
  1. Install the necessary libraries.
python -m pip install -r requirements.txt
  1. Run the test_nagonbot.py file
  2. Exit the virtual environment when done.
deactivate

Method #2 - pip install (❌ Still doesn't work)

Steps:

  1. Create a virtual environment in a test folder.
py -m venv ./myvenv
  1. Activate the virtual environment.
.\myvenv\Scripts\activate
  1. Install the bot inside the virtual environment as a package for simpler usage (the package is not functional yet).
pip install nagonbot
  1. Run the program inside the virtual enviroment.
from nagonbot.bot import Main

Main()
  1. Exit the virtual environment when done.
deactivate

Required Libraries

Note
Please, while the package does not install all the packages automattically, install the following libraries (inside a virtual environment).

For more information on the libraries, please refer to the Required Libraries Wiki Page

Install:

python -m pip install -r requirements.txt

or

pip install tensorflow
pip install pygame
pip install keras
pip install numpy
pip install playsound==1.2.2
pip install fugashi
pip install beautifulsoup4
pip install gTTS
pip install unidic-lite
pip install mecab-python3
pip install selenium
pip install webdriver_manager

Uninstalling all pip libraries from your virtual environment:

Warning
DO NOT RUN THESE COMMANDS IF YOU'RE NOT IN A VIRTUAL ENVIRONMENT OR ELSE, IT WILL DELETE ALL THE LIBRARIES YOU'VE PIP INSTALLED IN YOUR BASE PYTHON!!!

Creates a .txt file with all current libraries installed with pip

pip freeze > pip_libs.txt

Deletes all the libraries listed inside the pip_libs.txt previously created asking wheter or not to delete each library

pip uninstall -r pip_libs.txt

Deletes all the libraries at once listed inside the pip_libs.txt previously created without asking what to do with each library

pip uninstall -r pip_libs.txt -y

Project Packages

Official Packages

You can find this project's official packages here on the PyPi site.

Test Packages

For information about test packages, please refer to the Project Test Packages Wiki Page.

Project's Wiki

If you want to know more about:

  • the code structure
  • the project itself
  • functions of the bot
  • model and data files

Please refer to the Project's Wiki page.