You are on page 1of 21

VELLORE INSTITUTE OF

T E C H N O L O G Y, B H O PA L

CHATroBOT
PROJECT EXHIBITION II [DSN2099]
REVIEW-II
GROUP NO.117
Team Members:
MANISH PRASAD 20BCE10009
A N A N YA S H A R M A 20BCE10218
M U S K A N L A LWA N I 20BCE10293
A R J I TA C H O U R A S I A 20BCE10319
ADITI SAHU 20BCE10339
What is a chatbot?
A chatbot is a computer program
that uses artificial intelligence (AI)
and natural language processing
(NLP) to understand customer
questions and automate responses to
them, simulating human
conversation
Problem
Statement
Create a simple application
based chatbot that will be
used to answer FAQs by
customers and generate
response from the company
say a cookie shop
To make it easy for customers to interact with shop

Objective owners
To make it easy for shop owners to be able to interact with
multiple customers at the same time.

To make it possible for the chatbot to be able to


predict the most accurate answer even if the question
is not present in the dataset

To make a unique dataset that caters enough to vast variety of


queries.

To develop a website where customers and shops can


communicate using the chatbot
Overall Architecture Skeleton
Module
Explanation
➔External Python Libraries
• NLTK
• Tensorflow
• TFlearn
Natural Language
Toolkit(NLTK)

●A platform used for building Python programs for


working with human language data.
●Includes easy-to-use corpora and lexical resources
along with various text processing libraries.
●NLTK libraries used in this project:
○Tokenization
○Stemming
Tensorflow

●Google’s Tensorflow is a
framework for machine-learning
calculations.
●TensorFlow operates on
multidimensional arrays or
tensors represented as tf.Tensor
objects.
TFlearn

●Deep learning library built on top


of TensorFlow.
●It offers a higher level of
abstraction on top of TensorFlow
for training machine learning
models using neural networks.
Module-SPLIT UP
AND
EXPLANATION
➔User defined Modules
• Data preprocessing
• Chatbot Model
• Chatbot Framework
• Chatbot Frontend
JSON file containing “intents” based on which the deep learning
model will be trained.
Data preprocessing
●NLP (Natural Language
Processing): The main
strategy is to break down the
●JSON (JavaScript Object ●This makes it very easy in
process of understanding
Notation) is a lightweight serializing structured data and
English into small chunks and
data interchangeable format exchanging it over a network,
use machine learning to solve
for representing JavaScript and therefore, is widely used
each smaller piece separately:
object literals, arrays, and in applications that involves
○Word Tokenization: breaking
scalar data. electronic data interchange,
the sentences into separate
●JSON is relatively easy to like client-server web
words or tokens.
read and write, while also applications.
○Lemmatization/Stemming:
being easy for the software to
reducing the inflectional
parse and generate.
forms of each word into a
common base or root.
●Transform data further: from documents of words into ■Lancaster Stemming
tensors of numbers. Algorithm (NLTK)
○Create bag-of-words: Vector containing 1’s and 0’s
indicating if a particular word exists in the sentence or not.
Chatbot Model
●Next the hidden layers of
●Preprocessed training data
our ANN is created with
used to generate chatbot
given no. of nodes/neurons.
model using artificial neural
●Then we apply regression
networks/deep learning.
(linear or logistic) to the
●We input our training data ●Next we instantiate a Deep Neural
provided input, gradient
as tflearn.input_data object Network: tflearn.DNN with our network,
descent optimizer -
which creates the input and with a tensorboard parameter to enable
'optimizer' that will minimize
output layers of our ANN logging.
the provided loss - function
from the training data. ●And finally we fit our model with the
'loss' (which calculate the
training data:
errors).
○We are iterating through cycles ‘epochs’
to get our error (‘cost’) rate low and then
our model is ready.
Chatbot Framework
●We now can use our model ●Next we create functions that will
to predict output, but before do the job of a response generator
we can begin processing for the chatbot:
intents, we need a way to ○We predict the intent of the user
produce a bag-of-words from input sentence by assigning
user input. probabilities to all different classes
of sentences.
○Next we output a random
●We create functions for this response corresponding to the
process which takes the user’s intent with the highest probability.
query as input and outputs the
corresponding bag-of-words.
Chatbot Frontend
●This module creates a web-based GUI application through
which the user can easily interact with the chatbot:
○Consists of a input field which the user can use to ask
questions to the chatbot.
○The chat window displays all previous chat records for
the current instance.
Timeline Of Our Project Work

1 2 3

REVIEW-1
REVIEW -11 REVIEW-III
Pre-processing of data and looking
Advancing the chatbot template A complete working model of
for motivation through available
created in review-1 and building the chatbot and development of
machine learning sources and
a connection between AI/ML the web application to access
deciding on which modules and
aspect and the python file the chatbot activities.
functions to be included in the
created along with the training
chatbot implication and creating a
of the chatbot.
generalized template of the
chatbot .
Reference
s
https://www.tensorflow.org/guide
http://tflearn.org
https://www.nltk.org
https://medium.com/@ritidass29/the-essential-guide-to-how-nlp-works-
4d3bb23faf76
https://chatbotslife.com/deep-learning-in-7-lines-of-code-7879a8ef8cfb
https://chatbotslife.com/tensorflow-demystified-80987184faf7
Thankyou for the
opportunity!!

We are eager to learn something new through


this project.

You might also like