Skip to content

fabianobizarro/pybot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pybot

A simple bot package in python.

This project is based on this post

How to use

# import the package
import pybot as bot

#define 
def greeting(*params):
    return "Hi!"


def how_are_you(*params):
    return "I'm fine and you?"


bot.train('./data.json')

bot.register_action('greeting', greeting)
bot.register_action('howareyou', how_are_you)

response = bot.interact('Hi')

print(response)

Training data

The training data file used on the package follows the structure:

[
    {
        "class": "greeting",
        "sentences": [
            "hi",
            "hello",
            "hey",
            "what's up"
        ]
    }
    ...
]

Dependencies

[Finish here]

Stemmer

[Finish Here]

About

A simple bot package in python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages