Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A handful of documentation updates #938

Merged
merged 2 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions docs/django/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ If you need a ChatterBot API endpoint you will want to add the following to your
)


Sync your database
------------------
Migrations
----------

.. sourcecode:: sh

Expand All @@ -63,4 +63,15 @@ Sync your database
Looking for a working example? Check our the example Django app using
ChatterBot on GitHub: https://github.com/gunthercox/ChatterBot/tree/master/examples/django_app

MongoDB and Django
------------------

ChatterBot has a storage adapter for MongoDB but it does not work with Django.
If you want to use MongoDB as your database for Django and your chat bot then
you will need to install a **Django storage backend** such as `Django MongoDB Engine`_.

The reason this is required is because Django's storage backends are different
and completely separate from ChatterBot's storage adapters.

.. _Django documentation: https://docs.djangoproject.com/en/dev/intro/install/
.. _Django MongoDB Engine: https://django-mongodb-engine.readthedocs.io/
36 changes: 36 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,39 @@ There are a number of existing examples that show how to do this.

Additional details and recommendations for configuring Django can be found
in the :ref:`Webservices` section of ChatterBot's Django documentation.

What kinds of machine learning does ChatterBot use?
---------------------------------------------------

In brief, ChatterBot uses a number of different machine learning techniques to
generate its responses. The specific algorithms depend on how the chat bot is
used and the settings that it is configured with.

Here is a general overview of some of the various machine learning techniques
that are employed throughout ChatterBot's codebase.

1. Search algorithms
++++++++++++++++++++

Searching is the most rudimentary form of artificial intelligence. To be fair,
there are differences between machine learning and artificial intelligence but
lets avoid those for now and instead focus on the topic of algorithms that make
the chat bot talk intelligently.

Search is a crucial part of how a chat bot quickly and efficiently retrieves
the possible candidate statements that it can respond with.

Some examples of attributes that help the chat bot select a response include

- the similarity of an input statement to known statements
- the frequency in which similar known responses occur
- the likeliness of an input statement to fit into a category that known statements are a part of

2. Classification algorithms
++++++++++++++++++++++++++++

Several logic adapters in ChatterBot use `naive Bayesian classification`_
algorithms to determine if an input statement meets a particular set of
criteria that warrant a response to be generated from that logic adapter.

.. _naive Bayesian classification: https://en.wikipedia.org/wiki/Naive_Bayes_classifier