Giter VIP home page Giter VIP logo

Comments (6)

gunthercox avatar gunthercox commented on May 14, 2024

ChatterBot currently supports two different dialogue algorithms.

The first is the closest match algorithm that determines the similarity between the statement provided by the user and a set of known statements. For example, based on the sample input you provided, there is a 65% similarity between "where is the post office?" and "looking for the post office". The closest match algorithm selects the highest matching known statements and returns a response based on that selection.

The second is the closest meaning algorithm. This algorithm uses the wordnet functionality of nltk to determine the similarity of two statements based on the path similarity between each token in each statement. The sum of the path similarities is used so that the statement that has the closest path similarity (basically the closeness of synonyms) is returned.

  • In the case of both algorithms and the training examples you provided, the input of "looking for the post office" would match close enough to "where is the post office?" to return "it is right behind you".

So, to answer your questions about what functionality is available:

  • enriching or at least retaining a context during a dialogue
    (Currently not present.) ChatterBot does retain a copy of the current conversation and it a parameter that is provided to all logic adapters. However, it is currently not used. I have plans to create a new logic adapter that uses the context of the current conversation to alter the decision of what result is returned. This feature is most likely to be added next.
  • learning from humans
    (Yes) ChatterBot does have a readonly mode where it will not learn, however by default the ChatterBot will add to it's known selection of responses as an individual communicates with it. It maintains the context of what the statement was and what it was in response to. It also records the number of times a given response has occurred, a useful metric when selecting the most likely response to a given statement.
  • making prediction or/and deduction based on available knowledge
    (Yes) The logic that is currently available is more deduction based, but it just comes down to how each selection is chosen in a given response algorithm. In all cases, the current selection of response algorithms always go with the most likely response.

Additionally, creating new response algorithms is fairly simple. To create one, just define a class that completed this interface:

class MyLogicAdapter(LogicAdapter):
    def get(self, text, statement_list, current_conversation):
        # TODO
        return selected_statement

from chatterbot.

muatik avatar muatik commented on May 14, 2024

👍 very detailed explanation. I couldn't find this information anywhere, maybe you can consider to present it in this project's wiki pages.

from chatterbot.

gunthercox avatar gunthercox commented on May 14, 2024

Thank you, I am planning on making these updates to the documentation soon.

from chatterbot.

gunthercox avatar gunthercox commented on May 14, 2024

I have updated these sections in the wiki. Thank you for posting these questions, please let me know if there is anything else I can improve or clarify.

from chatterbot.

muatik avatar muatik commented on May 14, 2024

In near future, I may make some contribution to this project because I am planning to use something similar to chatterbot in one of my spare time works. Thank you.

from chatterbot.

lock avatar lock commented on May 14, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from chatterbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.