Giter VIP home page Giter VIP logo

sentimental-chatbot's Introduction

Sentimental chatbot

This allows to create conversation scripts as trees that will flow according to the evaluated sentiment of the user's responses.

The only implemented script retrieves a product review from a user.

Design

Core

The core modules are conversation and nlp. The conversation module is responsible for managing the conversation flow and the nlp module is responsible for the sentiment analysis.

Conversations are made out of Interactions organized in a tree structure where each interaction presents a statement/question that may follow a positive, neutral or ambivalent answer.

Sentiment analysis can use either a lexicon or a machine learning model to evaluate if the responses can be considered positive, neutral or negative. The definition of the script allows us to set which kind of analysis we want to use on each statement/question.

Per the tests realized during building, I learned that closed, yes or no questions tend to work better with lexicon analysis, while open questions tend to work better with machine learning models.

Scripts

Scripts embed Conversation and carry any specific information that needs to be collected from the user.

Transport

Transport layers need to implement the Transport interface, which is made out of a single method Input(string)string.

Data models

conversation.Interaction is the most important model, it composes the conversation trees by defining the possible flows, specifies which kind of sentiment analysis should be used and accept functions to extract information from the messages.

scripts.ReviewConversation embeds conversation.Conversation and add the fields specific to this kind of dialog by embedding scripts.Review.

sentimental-chatbot's People

Contributors

cristhiano avatar

Watchers

 avatar

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.