<div align="center">
<img src="https://i.imgur.com/hA9YF2s.png" alt="Thomas" width="220" height="220">
<h1>Thomas the Chatbot</h1>
</div>
![Demo](https://i.imgur.com/Jet4UGh.gif)
# Installation
**Python 3.9+ is required**
This package can be installed from [PyPi](https://pypi.org/project/thomasthechatbot/) with:
```
pip install thomasthechatbot
```
## CLI
Type `ttc` to begin talking to Thomas.
# How does Thomas work?
I wrote a [medium article](https://medium.com/@principle105/creating-a-python-chatbot-that-learns-as-you-speak-to-it-60b305d8f68f) to explain how Thomas works.
# Usage
## Basic Usage
```py
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
```py
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
[Black](https://github.com/psf/black), [isort](https://github.com/PyCQA/isort) and [Prettier](https://prettier.io/) are used for formatting
Raw data
{
"_id": null,
"home_page": "https://github.com/principle105/thomasthechatbot",
"name": "thomasthechatbot",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "chatbot",
"author": "principle105",
"author_email": "principle105@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/64/e2/c147bb1610db68591bfcb1e52ff665eb2d603835c2bb9675fd4de788ff5c/thomasthechatbot-1.0.5.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <img src=\"https://i.imgur.com/hA9YF2s.png\" alt=\"Thomas\" width=\"220\" height=\"220\">\n <h1>Thomas the Chatbot</h1>\n</div>\n\n![Demo](https://i.imgur.com/Jet4UGh.gif)\n\n# Installation\n\n**Python 3.9+ is required**\n\nThis package can be installed from [PyPi](https://pypi.org/project/thomasthechatbot/) with:\n\n```\npip install thomasthechatbot\n```\n\n## CLI\n\nType `ttc` to begin talking to Thomas.\n\n# How does Thomas work?\n\nI wrote a [medium article](https://medium.com/@principle105/creating-a-python-chatbot-that-learns-as-you-speak-to-it-60b305d8f68f) to explain how Thomas works.\n\n# Usage\n\n## Basic Usage\n\n```py\nfrom ttc import Chatbot, Context, download_nltk_data\n\n# Only needs to be run once (can be removed after first run)\ndownload_nltk_data()\n\n# Creating the context\nctx = Context()\n\n# Initializing the chatbot\nchatbot = Chatbot()\n\ntalk = True\n\nwhile talk:\n msg = input(\"You: \")\n\n if msg == \"s\":\n talk = False\n else:\n # Getting the response\n resp = chatbot.respond(ctx, msg)\n\n # Saving the response to the context\n ctx.save_resp(resp)\n\n print(f\"Thomas: {resp}\")\n\n# Saving the chatbot data\nchatbot.save_data()\n```\n\n## Configurations\n\n```py\nchatbot = Chatbot(\n path=\"brain\",\n learn=False,\n min_score=0.5,\n score_threshold=0.5,\n mesh_association=0.5,\n)\n```\n\n# Contributing\n\nOpen to contributions, please create an issue if you want to do so.\n\n# Formatting\n\n[Black](https://github.com/psf/black), [isort](https://github.com/PyCQA/isort) and [Prettier](https://prettier.io/) are used for formatting\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python chatbot that learns as you speak to it.",
"version": "1.0.5",
"split_keywords": [
"chatbot"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ba2b196baa646d6b2966fd70538ec902",
"sha256": "54cf7e1cf242240735f46f9b9ef73ae08c0ba5ec8f66d7a7229ff1716c89495f"
},
"downloads": -1,
"filename": "thomasthechatbot-1.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ba2b196baa646d6b2966fd70538ec902",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 10633,
"upload_time": "2022-12-15T01:08:02",
"upload_time_iso_8601": "2022-12-15T01:08:02.095654Z",
"url": "https://files.pythonhosted.org/packages/b8/c6/5e11252ffd141eadae3e4da92f3e0682be546a2bbeb0e83b6fa98009f91a/thomasthechatbot-1.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "1613110f83372ce630b6fe160e823a56",
"sha256": "9524bc768c192f93edfb7800ccab29cc64b21ff2c1645f5e757a97a2fe44f624"
},
"downloads": -1,
"filename": "thomasthechatbot-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "1613110f83372ce630b6fe160e823a56",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 8345,
"upload_time": "2022-12-15T01:08:03",
"upload_time_iso_8601": "2022-12-15T01:08:03.700782Z",
"url": "https://files.pythonhosted.org/packages/64/e2/c147bb1610db68591bfcb1e52ff665eb2d603835c2bb9675fd4de788ff5c/thomasthechatbot-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-15 01:08:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "principle105",
"github_project": "thomasthechatbot",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "thomasthechatbot"
}