A Python chatbot that learns as you speak to it.
Project description
Thomas the Chatbot
Installation
Python 3.9+ is required
This package can be installed from PyPi with:
pip install thomasthechatbot
CLI
Type ttc to begin talking to Thomas.
How does Thomas work?
I wrote a medium article to explain how Thomas works.
Usage
Basic Usage
from ttc import Chatbot, Context, download_nltk_data
# Only needs to be run once (can be removed after first run)
download_nltk_data()
# Creating the context
ctx = Context()
# Initializing the chatbot
chatbot = Chatbot()
talk = True
while talk:
msg = input("You: ")
if msg == "s":
talk = False
else:
# Getting the response
resp = chatbot.respond(ctx, msg)
# Saving the response to the context
ctx.save_resp(resp)
print(f"Thomas: {resp}")
# Saving the chatbot data
chatbot.save_data()
Configurations
chatbot = Chatbot(
path="brain",
learn=False,
min_score=0.5,
score_threshold=0.5,
mesh_association=0.5,
)
Contributing
Open to contributions, please create an issue if you want to do so.
Formatting
Project details
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 thomasthechatbot-1.0.5.tar.gz.
File metadata
- Download URL: thomasthechatbot-1.0.5.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Linux/5.15.0-1024-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9524bc768c192f93edfb7800ccab29cc64b21ff2c1645f5e757a97a2fe44f624
|
|
| MD5 |
1613110f83372ce630b6fe160e823a56
|
|
| BLAKE2b-256 |
64e2c147bb1610db68591bfcb1e52ff665eb2d603835c2bb9675fd4de788ff5c
|
File details
Details for the file thomasthechatbot-1.0.5-py3-none-any.whl.
File metadata
- Download URL: thomasthechatbot-1.0.5-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.0 Linux/5.15.0-1024-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54cf7e1cf242240735f46f9b9ef73ae08c0ba5ec8f66d7a7229ff1716c89495f
|
|
| MD5 |
ba2b196baa646d6b2966fd70538ec902
|
|
| BLAKE2b-256 |
b8c65e11252ffd141eadae3e4da92f3e0682be546a2bbeb0e83b6fa98009f91a
|