Git Product home page Git Product logo

cosc310_team3's Introduction

Hudson's Drip™ customer service AI Chatbot

We created an Artificial-intelligence powered chatbot to serve the customers of our online clothing store: Hudson's Drip. We used an agile SDLC methodology, with our development cycle consisting of two scrums.

Our software consists of two input JSON files used to train the neural network and make personalized answers based on customer information. The training.py imports data from intents.py and trains the neural network. training.py outputs words and classes pk1 files, which are used by the predict.py module to estimate the probability that a user input addresses a particular topic in the intents.JSON. A random response from the most likely topic is outputted by the chatbot. Our bot is also able to empathize with the user and take into account the mood of the user when generating responses.

Several libraries were used: tkntr, random, json, pickle, numpy, nltk (Porterstemmer, word net lemmatizer, Sentiment intensity analyzer), and tensorflow.

JIRA Roadmap.
Reference material.

COSC 310 Group members:

  • Guiherme Durvan António Zandamela
  • Lakshay Karnwal
  • Abdulaziz Almutlaq
  • Ravil Bigvava
  • Jordan onwuvuche

Assignment 3 tasks:

GUI Implementation

GUI Screenshot

The GUI was implemented using the Python tkinter module for graphical interfaces. Using this module we created a text box where the user enters their query/text. This helps the app become intuitivey easy-to-use for the user.

Test cases implementation

The Automated Unit Testing Framework used for this was pytest due to its easy to use module functions. We created multiple test cases for all the important functions which checks if all the functions are working as desired. You can run the Unit testing file using the pytest command. After running the test file, pytest displays a summary of failed and passed functions. If the functions do not pass that means the chatbot will have errors, if all the functions pass that means the program is working as desired.

Unit Testing Screenshot

In the screenshot example above, one of the functions failed because the value of probability was not correct. This is a useful feature as it reduces effort to debug the code.

Sentiment analysis

We used a natural language toolkit "Sentiment intensity analyzer" to obtain positivity and negativity scores from the words in the user input. This information was used to make conditional statements in which the response of the bot is either complemented or replaced (depending on the intensity) by a response designed to address the sentiment of the user.

Sentiment analysis demo

Word stemming in ambiguous cases

Word stemming was used in addition to unstemmed input. Our algorithm stems the user input if the bot is not able to find a probable intent (probability > 0.50). This helps to prevent inaccurate responses and can address suffixes.

Sentiment analysis demo

Flickr API: The Flickr API helps the user to show what the words used by the chatbot mean and it shows the associated images with that particular word used in the conversation held. It displays relevant pictures about the words on request made by the customer.

Wikipedi API: The Wikipedia API helps the user be redirected to a Wikipedia page if they want to learn more about something. The user is being given a link to read and learn more. This helps the customers get more information on request and help them make wise decisions.

cosc310_team3's People

Contributors

durvanz avatar lakshaykarnwal avatar r4vil avatar uchej-coder avatar

Watchers

 avatar

cosc310_team3's Issues

Training algorithm

  • - Research
  • - Development and debugging
  • - Unit testing
  • - Testing with predict.py

Prediciton algorithm

  • - Research
  • - Development and debugging
  • - Unit testing
  • - Testing with Train.py @

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.