ChatterBot


NameChatterBot JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryChatterBot is a machine learning, conversational dialog engine
upload_time2025-02-19 13:13:50
maintainerNone
docs_urlNone
authorGunther Cox
requires_python~=3.9
licenseCopyright (c) 2016 - 2025, Gunther Cox All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ChatterBot nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords chatterbot chatbot chat bot natural language processing nlp artificial intelligence ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![ChatterBot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png)

# ChatterBot

ChatterBot is a machine-learning based conversational dialog engine built 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.

[![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/)
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Django 2.0](https://img.shields.io/badge/Django-2.0-blue.svg)](https://docs.djangoproject.com/en/2.1/releases/2.0/)
[![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot)
[![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot)
[![Join the chat at https://gitter.im/chatterbot/Lobby](https://badges.gitter.im/chatterbot/Lobby.svg)](https://gitter.im/chatterbot/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)

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:** You're welcome.  
> **bot:** Do you like hats?  

## How it works

An untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to. As ChatterBot receives more input the number of responses that it can reply and the accuracy of each response in relation to the input statement increase. The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then returns the most likely response to that statement based on how frequently each response is issued by the people the bot communicates with.

# [Documentation](https://docs.chatterbot.us)

View the [documentation](https://docs.chatterbot.us)
for ChatterBot.

## Installation

This package can be installed from [PyPi](https://pypi.python.org/pypi/ChatterBot) by running:

```bash
pip install chatterbot
```

## Basic Usage

```python
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer

chatbot = ChatBot('Ron Obvious')

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

# Train the chatbot based on the english corpus
trainer.train("chatterbot.corpus.english")

# Get a response to an input statement
chatbot.get_response("Hello, how are you today?")
```

# Training data

ChatterBot comes with a data utility module that can be used to train chat bots.
At the moment there is training data for over a dozen languages in this module.
Contributions of additional training data or training data
in other languages would be greatly appreciated. Take a look at the data files
in the [chatterbot-corpus](https://github.com/gunthercox/chatterbot-corpus)
package if you are interested in contributing.

```python
from chatterbot.trainers import ChatterBotCorpusTrainer

# Create a new trainer for the chatbot
trainer = ChatterBotCorpusTrainer(chatbot)

# Train based on the english corpus
trainer.train("chatterbot.corpus.english")

# Train based on english greetings corpus
trainer.train("chatterbot.corpus.english.greetings")

# Train based on the english conversations corpus
trainer.train("chatterbot.corpus.english.conversations")
```

**Corpus contributions are welcome! Please make a pull request.**

# Examples

For examples, see the [examples](https://docs.chatterbot.us/examples/)
section of the documentation.

# History

See release notes for changes https://github.com/gunthercox/ChatterBot/releases

# Development pattern for contributors

1. [Create a fork](https://help.github.com/articles/fork-a-repo/) of
   the [main ChatterBot repository](https://github.com/gunthercox/ChatterBot) on GitHub.
2. Make your changes in a branch named something different from `master`, e.g. create
   a new branch `my-pull-request`.
3. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/).
4. Please follow the [Python style guide for PEP-8](https://www.python.org/dev/peps/pep-0008/).
5. Use the projects [built-in automated testing](https://docs.chatterbot.us/testing.html).
   to help make sure that your contribution is free from errors.

# License

ChatterBot is licensed under the [BSD 3-clause license](https://opensource.org/licenses/BSD-3-Clause).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ChatterBot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": "ChatterBot, chatbot, chat, bot, natural language processing, nlp, artificial intelligence, ai",
    "author": "Gunther Cox",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/09/4c/099d376dc7b9235be893c797551fc2bbcb3a334b668819063fa205c9e8c0/chatterbot-1.2.1.tar.gz",
    "platform": null,
    "description": "![ChatterBot: Machine learning in Python](https://i.imgur.com/b3SCmGT.png)\n\n# ChatterBot\n\nChatterBot is a machine-learning based conversational dialog engine built in\nPython which makes it possible to generate responses based on collections of\nknown conversations. The language independent design of ChatterBot allows it\nto be trained to speak any language.\n\n[![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/)\n[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![Django 2.0](https://img.shields.io/badge/Django-2.0-blue.svg)](https://docs.djangoproject.com/en/2.1/releases/2.0/)\n[![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot)\n[![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot)\n[![Join the chat at https://gitter.im/chatterbot/Lobby](https://badges.gitter.im/chatterbot/Lobby.svg)](https://gitter.im/chatterbot/Lobby?utm_source=badge&utm_medium=badge&utm_content=badge)\n\nAn example of typical input would be something like this:\n\n> **user:** Good morning! How are you doing?  \n> **bot:**  I am doing very well, thank you for asking.  \n> **user:** You're welcome.  \n> **bot:** Do you like hats?  \n\n## How it works\n\nAn untrained instance of ChatterBot starts off with no knowledge of how to communicate. Each time a user enters a statement, the library saves the text that they entered and the text that the statement was in response to. As ChatterBot receives more input the number of responses that it can reply and the accuracy of each response in relation to the input statement increase. The program selects the closest matching response by searching for the closest matching known statement that matches the input, it then returns the most likely response to that statement based on how frequently each response is issued by the people the bot communicates with.\n\n# [Documentation](https://docs.chatterbot.us)\n\nView the [documentation](https://docs.chatterbot.us)\nfor ChatterBot.\n\n## Installation\n\nThis package can be installed from [PyPi](https://pypi.python.org/pypi/ChatterBot) by running:\n\n```bash\npip install chatterbot\n```\n\n## Basic Usage\n\n```python\nfrom chatterbot import ChatBot\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\nchatbot = ChatBot('Ron Obvious')\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train the chatbot based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Get a response to an input statement\nchatbot.get_response(\"Hello, how are you today?\")\n```\n\n# Training data\n\nChatterBot comes with a data utility module that can be used to train chat bots.\nAt the moment there is training data for over a dozen languages in this module.\nContributions of additional training data or training data\nin other languages would be greatly appreciated. Take a look at the data files\nin the [chatterbot-corpus](https://github.com/gunthercox/chatterbot-corpus)\npackage if you are interested in contributing.\n\n```python\nfrom chatterbot.trainers import ChatterBotCorpusTrainer\n\n# Create a new trainer for the chatbot\ntrainer = ChatterBotCorpusTrainer(chatbot)\n\n# Train based on the english corpus\ntrainer.train(\"chatterbot.corpus.english\")\n\n# Train based on english greetings corpus\ntrainer.train(\"chatterbot.corpus.english.greetings\")\n\n# Train based on the english conversations corpus\ntrainer.train(\"chatterbot.corpus.english.conversations\")\n```\n\n**Corpus contributions are welcome! Please make a pull request.**\n\n# Examples\n\nFor examples, see the [examples](https://docs.chatterbot.us/examples/)\nsection of the documentation.\n\n# History\n\nSee release notes for changes https://github.com/gunthercox/ChatterBot/releases\n\n# Development pattern for contributors\n\n1. [Create a fork](https://help.github.com/articles/fork-a-repo/) of\n   the [main ChatterBot repository](https://github.com/gunthercox/ChatterBot) on GitHub.\n2. Make your changes in a branch named something different from `master`, e.g. create\n   a new branch `my-pull-request`.\n3. [Create a pull request](https://help.github.com/articles/creating-a-pull-request/).\n4. Please follow the [Python style guide for PEP-8](https://www.python.org/dev/peps/pep-0008/).\n5. Use the projects [built-in automated testing](https://docs.chatterbot.us/testing.html).\n   to help make sure that your contribution is free from errors.\n\n# License\n\nChatterBot is licensed under the [BSD 3-clause license](https://opensource.org/licenses/BSD-3-Clause).\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2016 - 2025, Gunther Cox\n        All rights reserved.\n        \n        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n        \n        * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n        \n        * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n        \n        * Neither the name of ChatterBot nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n        \n        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n        ",
    "summary": "ChatterBot is a machine learning, conversational dialog engine",
    "version": "1.2.1",
    "project_urls": {
        "Documentation": "https://docs.chatterbot.us",
        "Repository": "https://github.com/gunthercox/ChatterBot"
    },
    "split_keywords": [
        "chatterbot",
        " chatbot",
        " chat",
        " bot",
        " natural language processing",
        " nlp",
        " artificial intelligence",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9996e951b2ee8e34c0cde58e7495d074785d1b76ada4138565c0a28f5c71852e",
                "md5": "8da56963e810d984658c8f1395c51ddf",
                "sha256": "ff7c4f7a43adcaeb8420edd1cde520e52c2079f87dcf8670cc23cf1c99671327"
            },
            "downloads": -1,
            "filename": "ChatterBot-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8da56963e810d984658c8f1395c51ddf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 67298,
            "upload_time": "2025-02-19T13:13:48",
            "upload_time_iso_8601": "2025-02-19T13:13:48.277530Z",
            "url": "https://files.pythonhosted.org/packages/99/96/e951b2ee8e34c0cde58e7495d074785d1b76ada4138565c0a28f5c71852e/ChatterBot-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "094c099d376dc7b9235be893c797551fc2bbcb3a334b668819063fa205c9e8c0",
                "md5": "da7d2dcc79e0258a63efb737508f38c2",
                "sha256": "ac190e79a09b0224dfd188832e549784ae126a575562d0e273a824ef565172bc"
            },
            "downloads": -1,
            "filename": "chatterbot-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "da7d2dcc79e0258a63efb737508f38c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 58621,
            "upload_time": "2025-02-19T13:13:50",
            "upload_time_iso_8601": "2025-02-19T13:13:50.216468Z",
            "url": "https://files.pythonhosted.org/packages/09/4c/099d376dc7b9235be893c797551fc2bbcb3a334b668819063fa205c9e8c0/chatterbot-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-19 13:13:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gunthercox",
    "github_project": "ChatterBot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chatterbot"
}
        
Elapsed time: 0.50892s