An open-source chat bot program written in Python.
Project description
ChatterBot is a machine-learning based conversational dialog engine build in Python which makes it possible to generate responses based on collections of known conversations. The language independent design of ChatterBot allows it to be trained to speak any language.
An example of typical input would be something like this:
user: Good morning! How are you doing?bot: I am doing very well, thank you for asking.user: Your welcome.bot: Do you like hats?
Installation
This package can be installed using
pip install chatterbot
Usage
from chatterbot import ChatBot
chatbot = ChatBot("Ron Obvious")
Getting a response to input text
response = chatbot.get_response("Good morning!")
print(response)
chatbot.log_directory = "path/to/directory/"
Terminal mode (User and chat bot)
from chatterbot import Terminal terminal = Terminal() terminal.begin()
Have the chat bot talk with CleverBot
from chatterbot import TalkWithCleverbot talk = TalkWithCleverbot() talk.begin()
Social mode (Have the bot respond to users on social media sites)
from chatterbot import SocialBot
log_dir = "path/to/conversation_engrams/"
TWITTER = {
"CONSUMER_KEY": "<consumer_key>",
"CONSUMER_SECRET": "<consumer_secret>"
}
chatbot = SocialBot(log_directory=log_dir, twitter=TWITTER)
You will need to generate your own keys for using any API. To use this feature you will need to register your application at Twitter’s developer website to get the token and secret keys.
Use Cases
Using ChatterBot in your app? Let us know! - Salvius (humanoid robot)
Notes
Sample conversations for training the chat bot can be downloaded from https://gist.github.com/gunthercox/6bde8279615b9b638f71
History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ChatterBot-0.0.4.tar.gz.
File metadata
- Download URL: ChatterBot-0.0.4.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0dd6d2f9bb0915c4a4e5c452a31fb6bd15a57bfe772aa315e49f44efe315555
|
|
| MD5 |
d977a41cb994ed32344777624fd871ad
|
|
| BLAKE2b-256 |
e65a84db8952b4208500b7760d23e60471447c1f0e9e568989750d571c494326
|
File details
Details for the file ChatterBot-0.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: ChatterBot-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21d27d57679d30b48e2a8ab72c0fac2722eb63d37c0711fae4f5868500d7537a
|
|
| MD5 |
813fe27e75e06e0302c3bd9349f69885
|
|
| BLAKE2b-256 |
71a582d3cb745ae01f1600c93d7379cff1630a1b22500e35a04b8bd7ccba6a70
|