0% found this document useful (0 votes)
20 views139 pages

AWS Major Project.docx (1)

The document discusses the challenges of resolving customer queries efficiently, highlighting the limitations of human support teams and the need for a technology solution. It proposes a specialized RNN-based chatbot utilizing natural language processing and machine learning to enhance query resolution speed and efficiency. The project aims to implement a universal chatbot that minimizes time latency and costs while effectively addressing user queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views139 pages

AWS Major Project.docx (1)

The document discusses the challenges of resolving customer queries efficiently, highlighting the limitations of human support teams and the need for a technology solution. It proposes a specialized RNN-based chatbot utilizing natural language processing and machine learning to enhance query resolution speed and efficiency. The project aims to implement a universal chatbot that minimizes time latency and costs while effectively addressing user queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 139

A QUERY RESOLVING CHATBOT USING SPECIALIZED RNN APPROACH

ABSTRACT

Query resolving especially solving customer queries became a challenging tasks


even though many technologies have been evolved. Especially when comes to customer
support team the main challenge is to solve the customer queries in a fast and efficient
manner. Even though there is a high man power to solve the queries a person can solve
only a single query when comes to queuing technique when two or more users post the
query at the same time there is chance of time latency and sometimes the query cannot
be solved. Here to address this problem there is a need of a technology medium which
can solve user queries in a fast and efficient manner. Conversation interface with the
help of machine learning models and a dataset should be considered in which a set of
question and answers should be entered such that when a user enter a query it involves
a set of phases which includes elimination of unnecessary symbols,special characters
which is called text preprocessing. To solve the problem natural language processing
along with built in tools like dialogue flow, rasa will be considered so that a universal
chatbot should be implemented to ensure fast query solving, time efficient and
cost-efficient manner.

Keywords: Text Preprocessing, Natural language processing, dialogue flow,


conversational interface, Knowledge base(KB).
CHAPTER NO TITLE

PAGE-NO VISION AND MISSION ii

VISION AND MISSION OF DEPARTMENT ii

POs, PSOs, PEOs and COs iii

EXPECTED OUTCOMES vi

ABSTRACT ix

LIST OF FIGURES xvi

LIST OF TABLES xviii

LIST OF ABBRIVATIONS xix

CHAPTER 1: INTRODUCTION 1-11


1.1 PREAMBLE 1

1.2 OVERVIEW OF THE PROJECT 1

1.2.1 Challenges in chatbot 1

1.3 BACKGROUND STUDY OF CHATBOT 2

1.3.1 Chatbot 2

1.3.2 Types of chatbots 3

1.3.2a Menu/button based chatbots 3

1.3.2b Linguistic based chatbots 4

1.3.2c Keyword based chatbots 4

1.3.2d Machine learning chatbots 5

1.3.2e The hybrid model 6

1.3.2f Voice bots 6

1.3.3 Importance of chatbot 6

1.3.4 Origin of chatbots 8


1.4 PROBLEM STATEMENT 9

1.5 AIM OF THE PROJECT 9

1.6 OBJECTIVE OF THE PROJECT 9

1.7 PROPOSED METHODOLOGY 9

1.8 SIGNIFICANCE OF THE WORK 10

1.9 LIMITATION OF THE WORK 10

1.10 ORGANIZATION OF THE REPORT 10

1.11 SUMMARY 11

CHAPTER 2: LITERATURE SURVEY 12-25

2.1 PREAMBLE 12

2.2 HUMAN SUPERVISED LEARNING 12

2.3 ARTIFICIAL NEURAL NETWORK 13

2.4 COGNITIVE BEHAVIOUR THEREPY(CBT) 14

2.5 SENTIMENTAL ANALYSIS 14

2.6 NATURAL LANGUAGE PROCESSING(NLP) 15

2.7 REINFORCEMENT LEARNING(RL) 16

2.8 COGNITIVE INFORMATICS 17

2.9 INTENT CLASSIFICATION 18

2.10 DEEP LEARNING 19

2.11 NEURAL NETWORK TRANSLATION 19

2.12 NATURAL ANSWER GENERATION 20

2.13 MULTITASK LEARNING 20

2.14 ATTENTION MECHANISM 21

2.15 COMPARISON TABLE OF EXISTING ALGORITHM 23

2.16 SUMMARY xii 25


CHAPTER NO TITLE PAGE-NO

CHAPTER 3: SYSTEM REQUIREMENTS 26-32


1.1 PREAMBLE 26

1.2 FRONT END TOOL 26

1.2.1 Google Co-lab 26

1.3 COMMMUNICATION INTERFACE 27

1.4 OPERATING SYSTEM 28

1.5 HARDWARE REQUIREMENTS 28

1.5.1 Processor 28

1.5.2 Ram 29

1.6 HARDWARE REQUIREMENT TOOLS 29

1.7 SOFTWARE REQUIREMENTS 29

1.7.1 Google colab initialization 29

1.7.2 Python libraries 30

1.8 DATASET 31

1.9 SUMMARY 32

CHAPTER 4: LITERATURE SURVEY 33-28

4.10 PREAMBLE 33

4.2 PROPOSED SYSTEM ARCHTECTURE DIAGRAM 33

4.2.1 Dataset 34

4.2.2 Data Preprocessing 34

4.3 HUMAN SUPERVISED LEARNING 35

4.3.1 Sentence Transformer 35


4.3.2 Cosine Similarity engine 35

4.4 SUMMARY 35

CHAPTER 5: IMPLEMENTATION 36-25

5.1 PREAMBLE 36

5.2 PROPOSED METHODOLOGY 36

5.3 MODULES OF PROPOSED SYSTEM 37

5.3.1 Dataset Collection 37

5.3.2 Classification 38

5.3.2a Data Preprocessing 39

5.3.2b Feature Extraction 39

5.3.2c Apply machine learning algorithm 39

5.4 MODULES OF CLASSIFICATION 40

5.4.1 Data Visualization 40

5.4.1a Input query 40

5.4.1b Tag name 40

5.4.1c Response 41

5.4.2 Data Preprocessing 41

5.4.3 Tokenization 41

5.4.3a Word Tokenization 42

5.4.4 Implementation of LSTM model 42

5.4.5 How LSTM works 42

5.5 SUMMARY 46
CHAPTER 6: EXPERIMENTAL RESULTS 46-25

6.1 PREAMBLE 47

6.2 RESULTS 47

6.3 RESULT COMPARISION 51

6.4 APPLICATIONS 54

6.5 SUMMARY 55

CHAPTER 6: EXPERIMENTAL RESULTS 46-25

6.1 PREAMBLE 47

6.2 RESULTS 47

6.3 RESULT COMPARISION 51

6.4 APPLICATIONS 54

6.5 SUMMARY 54

CHAPTER 7.1: EXPERIMENTAL RESULTS 46-25

7.1 CONCLUSION 55

7.2 FUTURE ENHANCEMENTS 55

REFERENCES 56-58

APPENDIX A SOURCE CODE

A1-A5 APPENDIX B SCREENSHOTS

B1-B4

APPENDIX C DATASET USED FOR THE PROJECT C1- C13


APPENDIX D STUDENT CONTRIBUTION D1

APPENDIX E PO, PSO, PEO AND CO RELEVANCE WITH PROJECT E1-E9


Figure No Figure Name Page No.

1.1 Illustration of chatbot 3

1.2 Illustration of menu based chatbot 36

1.3 Working of rule based chatbot 39

1.4 Illustration of keyword based chatbot 39

1.5 A picture of machine learning chatbot 43

1.6 Illustration of voice based chatbots 46

2.1 Picture illustrating cognitive behavior therapy 55

2.2 Picture demonstrating various types of emotions 55

2.3 Phases of natural language processing 56

2.4 Seq2Seq overview diagram of data transfer 57

3.1 Google Co-lab notebook 57

3.2 Google co-lab welcome window 60

3.3 Colab notebook initialization 61

4.1 Block diagram of the model 65

4.2 Architecture diagram of the model 66

5.1 Dataset 66

5.2 Classification of input & tag 66

5.3 Visualisation of input query 67

5.4 Visualisation of tag name field 67

5.5 Response visualization 68

5.6 Specialized RNN architecture 68

5.7 Layers of specialized RNN architecture 69


6.1 Model summary

6.2 Training accuracy

6.3 Training model accuracy

6.4 Output of validate phase

6.5 Output dataset data frame

6.6 Model accuracy graph


C
6.7
o
6.8
n
6.9
f
6.10
u

6.11 s
.
i

t
m C

a
6o
p

Overall accuracy of the model


m
Cl
pa
as
ris
sif
io
ic
n
ati
gr
on
ap
re
h
po

rt

of

all

cl

as

se

s
LIST OF TABLES

Table no Table name Page no

TABLE 2.1 COMPARISON OF LITERATURE SURVEY 23

TABLE 6.5 COMPARISON OF EVALUATION 55

PARAMETERS

TABLE D.1 STUDENT CONTRIBUTION TABLE D1


NOMENCLATURE

LIST OF ABBRIVATIONS

CNN - Convolutional Neural Network

ANN - Artificial Neural Network

NB - Naïve Bayes

ReLU - Rectified Linear Activation

KNN - K-Nearest Neighbour

SVM - Support Vector Machine

FCM - Fuzzy C-Means Clustering Algorithm

DNN - Deep Neural Networks

LSTM - Long Short term Memory

RNN - Recurrent Neural network

CBT - Cognitive Behavior therapy

NLP - Natural Language Processing

RL - Reinforcement Learning
CHAPTER 1

INTRODUCTION

1.1 PREAMBLE

Customer query solving is became a challenging task when comes to support team.
Especially when the main challenge comes to customer support team is to solve the
customer queries in a fast and efficient manner. Even though there is a high man power to
solve the queries a person can solve only a single query when comes to queuing technique
when two or more users post the query at the same time there is chance of time latency and
sometimes the query cannot be solved. Here to address this problem there is a need of a
technology medium which can solve user queries in a fast and efficient manner.
Conversation interface with the help of machine learning models and a dataset should be
considered in which a set of question and answers should be entered such that when a user
enter a query it involves a set of phases which includes elimination of unnecessary
symbols, special characters which is called text preprocessing.

1.2 OVERVIEW OF THE PROJECT

Query resolving became a challenging task when comes to support team. Fast query
solving in time-efficient is the most challenging task. Even though technologies have been
evolved there is huge latency when comes to customer service. Because a person can only
solve single query at a time but when two or more users enter a query at the same time
there is not a chance of solving the two or more queries at a time.Rasa interface is used to
built a chatbot service but this is time-consuming and cost- effective.

1.2.1 Challenges in chatbot

Chatbot design even though shows a unique challenges.

⮚ First and mainly, the query should be solved in time-efficient manner.


⮚ Second, the performance is influenced by response time when a query is
solved by the chatbot.
⮚ Third, there is a need of a database or a knowledge base in which the
data should be retrieved whenever necessary.
1.3 BACKGROUND STUDY OF CHATBOT

Machine learning (ML) is a center of artificial intelligence. It is the most common


method for creating smart computers. For the most part, AI depends on acceptance and
blending, allowing computers to learn new information by mimicking human learning
behavior. It restructures current learning to continuously increase computer
performance.Chatbot service can also be implemented by Deep learning (DL) which has
been proposed as a result of developments in neural networks. DL is not only a
development in neural networks but also a new branch in machine learning research. The
proper application of DL brings machine learning closer to human reasoning. As a result,
for each application, DL may be used to discover characteristics from a given dataset.
Traditional procedures, for the most part, depend on previous knowledge to focus on a
specific application. In this way, these algorithms are feature extraction procedures that
have been handcrafted. DL can identify new features that are reasonable to implement

Present-day development in machine learning algorithms, like deep learning and


neural networks that perform AI tasks like Image Recognition, tongue Generation, Speech
Recognition and Text to Speech Synthesis, that has gained momentum in human’s journey
towards the technological singularity. There square measure variety of latest styles of
machines and software package obtainable that square measure conjointly apprehend as
Bots. Bots square measure the pc program that simulates human oral communication
through voice commands or text chats or each. one among the final word goal within the
field of AI is to create laptop systems which will have human-like conversations with users.
Recently there square measure advances in AI technologies, that has USA nearer to
achieving this goal.

1.3.1 Chatbot
The Chatbots, or informal interfaces as they're additionally notable, gift a brand
new approach for people to act with pc systems. historically, to urge a matter answered
by a software system program concerned employing a computer programme, or filling
out a type. A chatbot permits a user to easily raise queries within the same manner that
they'd address a person.
Most industrial chatbots square measure keen about platforms created by the
technology giants for his or her tongue process. These embody Amazon Lex, Microsoft
psychological feature Services, Google Cloud tongue API, Facebook DeepText, and
IBM Watson. Platforms wherever chatbots square measure deployed embody Facebook
traveler, Skype, and Slack, among several others.
`

Fig 1.1 Illustration of a chatbot[1]

1.3.2 Types of chatbots

There are various types of chatbots in which it varies for various industries and fields.
1.3.2a Menu/button-based chatbots

Menu/button-based chatbots square measure the foremost basic form of chatbots


presently enforced within the market nowadays. In most cases, these chatbots square
measure authorized call tree hierarchies given to the user within the type of buttons.
just like the machine-driven phone menus we have a tendency to all move with on
nearly a day to day, these chatbots need the user to form many alternatives to dig
deeper towards the last word answer.While these chatbots square measure adequate for
responsive FAQs that makeup eightieth of support queries; they disappoint in
additional advanced eventualities during which there square measure too several
variables or an excessive amount of information at play to predict however users ought
to get to specific answers confidently. It’s conjointly value noting that menu/button-
based chatbots square measure the slowest in terms of obtaining the user to their
desired worth.
Fig 1.2 : Illustration of a menu-based chatbot[2]
1.3.2b Linguistic Based (Rule-Based Chatbots)

If you'll be able to predict the kinds of queries your customers might raise, a linguistic
chatbot could be the answer for you. Linguistic or rules-based chatbots produce
informal automation flows exploitation if/then logic. First, you have got to outline the
language conditions of your chatbots. Conditions may be created to assess the words,
the order of the words, synonyms, and more. If the incoming question matches the
conditions outlined by your chatbot, your customers will receive the acceptable
facilitate in no time. However, it’s your job to make sure that every permutation and
combination of every question is outlined, otherwise, the chatbot won't perceive your
customer’s input. this is often why a linguistic model, whereas implausibly common,
may be slow to
develop. These chatbots demand rigidity and specificity.

Fig 1.3 Working of a rule-based chatbot[3]

1.3.2c Keyword recognition-based chatbots

Unlike menu-based chatbots, keyword recognition-based chatbots will hear what users
kind and respond fitly. These chatbots utilize customizable keywords Associate in
Nursingd Associate in Nursing AI application - linguistic communication process
(NLP) to see a way to serve an acceptable response to the user.
These styles of chatbots disappoint once they have to be compelled to answer heaps of
comparable queries. The IP chatbots can begin to slide once there are keyword
redundancies between many connected queries.
It is quite standard to ascertain chatbot examples that ar a hybrid of keyword
recognition- based and menu/button-based. These chatbots offer users with the
selection to undertake to raise their queries directly or use the chatbot’s menu buttons if
the keyword recognition practicality is yielding poor results or the user needs some
steerage to search out their answers.
Fig 1.4: Illustration of a Keyword-based chatbot[4]

1.3.2d Machine Learning chatbots


Ever puzzled what's a discourse chatbot? A discourse chatbot is way additional
advanced than the 3 bots mentioned antecedently. These kinds of chatbots utilize
Machine Learning(ML) and computer science (AI) to recollect conversations with
specific users to find out and grow over time. in contrast to keyword recognition-based
bots, chatbots that have discourse awareness area unit sensible enough to self-improve
supported what users area unit requesting and the way they're asking it.

For example, a discourse chatbot that permits users to order food; the chatbot can store
the information from every oral communication and learn what the user likes to order.
The result's that eventually once a user chats with this chatbot, it'll bear in mind their
commonest order, their delivery address, and their payment data and simply raise if
they’d wish to repeat this order. rather than having to reply to many queries the user
simply needs to answer with ‘Yes’ and also the food is ready!

While this food ordering example is elementary, it's straightforward to check simply
however powerful oral communication context may be once controlled with AI and
cubic centimeter. the final word goal of ANy chatbot ought to be to supply an
improved user expertise over the choice of the establishment. investment oral
communication context is one amongst the simplest ways that to shorten processes like
these via these chatbots.
Fig 1.5 : A picture of a machine learning chatbot[5]

1.3.2e The hybrid model

Businesses love the sophistication of AI-chatbots, however don’t continuously have


the skills or the big volumes of information to support them. So, they pick the hybrid
model. The hybrid chatbot model offers the simplest of each worlds- the simplicity of
the rules-based chatbots, with the quality of the AI-bots.

1.3.2 f Voice bots

To make informal interfaces even a lot of vernacular, businesses area unit currently
setting out to use voice-based chatbots or voice bots. Voice bots are on the increase
for the last few years, with virtual assistants like Apple’s Siri, to Amazon’s Alexa,
and why? due to the convenience they carry. It’s abundant easier for a client to talk
instead of sort. A voice-activated chatbot brings resistance experiences on to the top
client.

Fig 1.6 : Illustration of a voice based chatbot[6]

1.3.3 Importance of chatbot

Can hold multiple conversations at once: Chatbots will converse at the same time
with thousands of consumers. This will increase business productivity and eliminates
wait
times.
Cost-effective: A chatbot may be a quicker and cheaper one-time investment than
making a zealous, cross-platform app or hiring extra staff. additionally, chatbots will
cut back pricey issues caused by human error. User acquisition prices conjointly
decrease with a chatbot's ability to retort inside seconds.
Saves time: Chatbots will alter tasks performed oft and at specific times. this offers
staff time to specialise in additional necessary tasks and prevents customers from
waiting to receive responses.
Proactive customer interaction: Within the past, organizations relied on passive
client interaction and waited for consumers to succeed in out 1st. With chatbots,
organizations will move proactively, as bots will initiate conversations and monitor
however customers use the websites and landing pages. Organizations will then use the
knowledge gathered from watching to supply specific incentives to consumers,
facilitate users navigate the location and answer future queries.

Monitors and analyzes consumer data: Chatbots collect feedback from every
interaction to assist businesses improve their services and product or optimize their
websites. Bots may record user information to trace behaviors and buying patterns.
This data offers organizations insight into a way to higher market their product and
services, yet as common obstacles that customers face throughout the shopping for
method.
Improves customer engagement: Most firms already engage their customers through
social media. Chatbots will build this engagement additional interactive. consumers
seldom see the individuals inside businesses, thus chatbots open a channel wherever
customers will have interaction while not the strain of interacting with another person.
Eases quantifiability to international markets: Chatbots will solve
client considerations and queries in multiple languages. Their 24/7 access permits
customers to use them notwithstanding time or geographical zone.
Expands the customer base: Chatbots will improve lead generation, qualification and
nurturing. Chatbots will raise queries throughout the buyer's journey and supply data
which will persuade the user and build a lead. Chatbots will then give potential client
data to the sales team, United Nations agency will have interaction with the leads. The
bots will improve conversion rates and make sure the lead's journey flows within the
right direction -- toward an acquisition.
Measures lead qualifications: Chatbots will facilitate sales groups confirm a lead's
qualifications mistreatment known key performance indicators, like budget, timeline
and
resources. this will forestall firms from holdup on unqualified leads and long customers.
1.3.4 Origin of chatbots

ELIZA: It's thought-about to be the primary chatbot within the history of computing
that was developed by Joseph Weizenbaum at Massachusetts Institute of Technology
(MIT). it had been in 1994 that the term ‘Chatterbot” was coined. ELIZA operates by
recognizing key words or phrases from the input to breed a response victimization
those keywords from pre-programmed responses. for example, if a person's says that
‘My mother cooks sensible food’. ELIZA would obtain the word ‘mother’, associated
respond by asking an open- over question ‘Tell Maine additional regarding your
family’. This created associate illusion of understanding associated having an
interaction with a true soul although the method was a mechanized one.

ALICE: It had been developed in 1995 by Richard Wallace. in contrast to Eliza, the
ALICE chatbot was able to use linguistic communication process, that allowed for
additional refined speech communication. it had been revolutionary, though, for being
ASCII text file. Developers may use AIML (artificial intelligence markup language) to
make their own chatbots battery-powered by ALICE.

JABBERWACKY: Jabberwacky may be a chatterbot created by British applied


scientist Hrolf Carpenter. Its expressed aim is to “simulate natural human chat in a
stimulating, entertaining and comical manner”. it's associate early try at making a man-
made intelligence through human interaction. The expressed purpose of the project was
to make a man-made intelligence that's capable of passing the mathematician take a
look at. it's designed to mimic human interaction and to hold out conversations with
users. it's not designed to hold out the other functions.Unlike additional ancient AI
programs, the training technology is meant as a type of amusement instead of getting
used for laptop support systems or company illustration. Recent developments do
permit a additional written, controlled approach to sit down atop the final colloquial
AI, getting to compile the most effective of each approaches, and usage within the
fields of sales and selling is afoot. the final word intention is that the program move
from a text primarily based system to be whole voice operated-learning directly from
sound and different sensory inputs. Its creator believes that it is incorporated into
objects round the home like robots or talking pets, intending each to be helpful and
entertaining , keeping folks company.

MITSUKU: Mitsuku may be a chatbot created from AIMLtechnology by Steve


Worswick. It claims to be associate 18-year-old feminine chatbot from city, England. It
contains all of Alice’s AIML files, with several additions from user generated
conversations, and is usually a piece current. Her intelligence includes the power to
reason with specific objects. as an example, if somebody asks “Can you eat a house?”,
Mitsuku appearance up the properties for “house”. Finds the worth of “made_from” is
ready to “brick” and replies “no”, as a home is not edible. she will be able to play
games and do magic tricks at the user’s request. In 2015 she conversed, on average, in
way over 1 / 4 of 1,000,000 times daily.

Research in AI has given rise to varied colloquial interfaces in machine learning and
linguistic communication process. Over the previous couple of years, there as been
associate exponential growth of tools to style, mock, build, deploy, manage, and
legalize chatbots.

1.4 PROBLEM STATEMENT

One of the major challenge in the field of customer support especially in query
resolving is one of the important challenge. To solve this challenge a service chatbot
has been implemented to solve user queries in fast and efficient manner.But a chatbot
only solves a query at a time and every chatbot differs in the operation and
performance. To improve this our goal is to implement a universal chatbot which can
solve queries in fast and efficient manner such that the service can solve many queries
for different industry.

1.5 AIM OF THE PROJECT

This project mainly focuses on implementing a chatbot service which is said to


be universal chatbot in which it can solve the queries of the customers in fast and
effiecient manner.

1.6 OBJECTIVE OF THE PROJECT

The objectives of the project are

⮚ To implement a universal chatbot which can solve user queries of various domains.
⮚ To evaluate the performance of the proposed model by response time of the
given user query.
⮚ To compare the performance of the proposed model with existing methods in the
current context.
1.7 PROPOSED METHODOLOGY

A chat bot is an artificial intelligence (AI) software that can simulate a natural
language conversation (or chat) with a user via messaging applications, websites and
mobile apps, or by telephone . A chat bot is a computer application that makes use of
auditory or textual techniques to conduct a communication in an herbal language,
apprehend the user’s purpose, and provide a response based totally on the
organization’s business policies and knowledge. The main character that lies in back
of chat bots is NLP and Machine Learning. When a question is presented to a chat
bot, a chain of complicated algorithms method the acquired input, recognize what the
person is asking, and based totally on that determines the answer suitable to the
query. Chat bot have to rely upon the capacity of the algorithms to come across the
complexity of each textual content and spoken words. Some chat bots perform
thoroughly to the human. However, handling complicated conversation is a big
challenge; where there may be a utilization of diversity figures of speech, it may be
difficult for machines to understand From all the existing methods every chatbot is
designed for only a particular type of service. But any chatbot main aim is to deliver
the response delivery to the user.But a chatbot can provide only particular set of
services when the implementation differs from application to application. To solve
this challenge and to deliver the response to the customers regardless with the
application a universal chatbot can be implemented to ensure any query can be
resolved in time and efficient manner.

1.8 SIGNIFICANCE OF THE WORK

⮚ Chatbot helps to resolve the queries faster and efficient in which a chatbot can
help more efficiently.

⮚ A chatbot is cost-effective when comes to performance response time for a


query solving is faster.

1.9 LIMITATION OF THE WORK

● This project deals only with voice based resolving is only applicable.
● This project is mainly deals with devices in which some situations which
is cost effective.

1.10 ORGANIZATION OF THE REPORT


The remainder of the chapter is laid out as follows.
Chapter 1: This chapter provides an introduction, problem statement,
project goal, methodology, work significance, and conclusion.

Chapter 2: This chapter offers a review of the literature as well as a comparison


of several strategies for implementing a chatbot.

1.11 SUMMARY

This chapter includes a brief introduction to an overview of the project. And


this chapter deals with the identifying problem statement, estimating the objective of
the project, a brief introduction about the methodology used in the project, the
significance of the project, organization of the project which includes the output of
every chapter introduction. The next chapter is the Literature review which discusses
various journal papers to obtain the specific problem statement by analyzing all the
relevant work and information mentioned in that reference paper to understand the
present problem statement existing in that particular area.
CHAPTER 2

LITERATURE SURVEY

2.1 PREAMBLE

The purpose of the literature survey is to obtain a clear understanding of the


existing problem in the particular area of the domain. Clearly understanding all the
previous development and their works will provide the best way to obtain the perfect
problem statement existing in the present condition.

The following section summarizes the history of those works which are done
previously, highlighting the strengths and weaknesses of each method. Various chatbot
implementation methods were proposed and reviewed here.
● Human supervised learning
● Artificial neural networks
● Cognitive behavior therepy
● Sentiment analysis
● Natural language processing
● Deep learning
● Reinforcement learning(RL)
● Cognitive informatics
● Intent classification
● Deep learning
● Neural machine translation
● Natural language generation with attention mechanism

In this chapter, several methods have been proposed for chatbot implementation.
Among the most recently published works are those presented as follows:

2.2 HUMAN SUPERVISED LEARNING

Supervised, unattended, and reinforcement learning area unit the 3 main classes
of machine learning. associate degree example of supervised learning is human-guided
machine learning, that creates a model employing a assortment of coaching knowledge
that has been labeled by humans. In supervised learning, the algorithmic rule picks up
a group of inputs and also the correct outputs that keep company with them. though the
believability of the coaching knowledge wont to generate a machine learning model is
probable to be oppose, the model should still be valid for accuracy before it are often
deployed. Active learning and semi-supervised learning area unit different subsets of
supervised learning wherever the machine learning model is improved with every new
correction or piece of knowledge gathered. Humans will play a job during this.
Subject matter specialists speed up the training method by instructing the
technology in period through a method referred to as human-guided machine learning.
as an example, an individual are often asked to weigh in and supply comments if the
machine learning model encounters any knowledge that it's unsure regarding. The
model then incorporates what it's learned from this input to supply a future prediction
that's a lot of correct. Humans area unit solely concerned once it's necessary for
coaching or validation. Human-guided machine learning builds data from the bottom
up by 1st using algorithms to try to to the labour-intensive method of discovering
relationships inside the info. this suggests that, inevitably, as machine learning
accuracy rises, thus can the quantity of your time somebody's has to pay corporal
punishment a given work.
Giovanni Almeida Santos et.al [2] proposed the Chatbot Management method,
technique for content management on chatbot systems. The planned methodology
relies on the experiences nonheritable with the event of Evatalk, the chatbot for the
Brazilian Virtual faculty of presidency. the main focus of this technique is to evolve the
chatbot content through the analysis of user interactions, permitting a cyclic and
human-supervised method. we tend to divided the planned methodology into 3 distinct
phases, namely, manage, build, and analyze. Moreover, the planned methodology
presents a transparent de_nition of the roles of the chatbot team. we tend to validate the
planned methodology beside the creation of the Evatalk chatbot, whose quantity of
interactions was of twenty- two,771 for the one,698,957 listed attendees within the
Brazillian Virtual faculty of presidency in 2020. the appliance of the methodology on
Evatalk's chatbot brought positive results: we tend to reduced the chatbot's human
hand-off rate from forty four.43% to 30.16%, the chatbot's content examples
accumulated by a hundred and sixtieth while maintaining a high proportion of
con_dence in its responses and keeping the user satisfaction collected in conversations
stable.

2.3 ARTIFICIAL NEURAL NETWORKS


The biological neural networks that shape the structure of the human brain are
where the phrase "artificial neural network" originates. Artificial neural networks
also feature neurons that are interconnected to one another in different levels of the
networks, much like the human brain, which has neurons that are interconnected to
one another. Nodes are the name for these neurons. Artificial neural networks are
used in artificial intelligence to simulate the network of neurons that make up the
human brain, giving computers the ability to comprehend information and make
decisions in a manner similar to that of a person. Computers are programmed to
function exactly like a network of interconnected brain cells to create an artificial
neural network.

2.4 COGNITIVE BEHAVIOUR THERAPY(CBT)

According to its definition, psychological feature activity medical care is


"psychotherapy that integrates psychological feature medical care with behaviour
medical care by distinguishing incorrect or maladaptive patterns of thought, emotional
response, or behaviour and replacement them with desired patterns. The goal of
psychological feature activity medical care is to change the automated negative beliefs
that may exacerbate our emotional issues, like melancholy and anxiety, and contribute
to them. Our mood is negatively wedged by these uncontrollable unpleasant
thoughts.Through CBT, false beliefs area unit exposed, refuted, and replaced with a lot
Correct realistic beliefs.

Fig 2.1 : Picture illustrating cognitive behavior therepy[7]

2.5 SENTIMENTAL ANALYSIS


A machine learning technology known as sentiment analysis examines texts for
polarity, starting from positive to negative. Machine learning technologies
willmechanically learn the way to recognise sentiment while not human input by being
trained with samples of emotions in text. merely aforesaid, machine learning permits
computers to select up new skills while not being specifically programmed to try to to
thus. Sentiment analysis models may be schooled to browse on the far side
straightforward definitions and comprehend things like context, sarcasm, and incorrect
word usage. Computers will mechanically method text knowledge and are aware of it
similar to an individual's would exploitation sentiment analysis, saving many employee
hours.
Kerstin Denecke et.al[13] introduces SERMO, a mobile application with a
constitutional chatbot that uses psychological feature behaviour medical aid (CBT)
techniques to assist unsound folks manage their emotions and thoughts. Every day,
SERMO prompts the user to answer questions on recent events and emotions.
exploitation lexicon-based analysis and linguistic communication process, it
mechanically detects the user's elementary feeling from the input of linguistic
communication. SERMO suggests an appropriate activity, like activities or
attentiveness exercises, looking on the feeling. associate feeling journal, an inventory
of pleasurable activities, attentiveness exercises, and details on emotions and CBT
normally area unit further options. The User expertise form was accustomed study user
expertise with twenty one folks (UEQ).

Fig 2.2 : Picture demonstarating various types of emotions[8]

2.6 NATURAL LANGUAGE PROCESSING(NLP)

The field of applied science referred to as "natural language processing" (NLP)


is additional significantly the sphere of "artificial intelligence" (AI) that's involved
with providing computers the capability to grasp written and spoken words in a very
manner just like that of humans. NLP blends applied math, machine learning, and
deep learning models with machine linguistics—rule-based modelling of human
language. With the utilization of those technologies, computers area unit currently
able to method human language within the kind of text or audio knowledge and
absolutely "understand" what's being aforesaid or written, as well as the speaker's or
writer's intentions and
sentiment. pc programmes that translate text between languages, reply to spoken
commands, and quickly summarise huge amounts of text—even in real time—are all
battery-powered by NLP. there is a extended chance that you have used NLP in
voice- activated GPS systems.

Fig 2.3 : Phases of Natural language processing[9]

2.7 REINFORCEMENT LEARNING(RL)

Machine learning includes the discipline of reinforcement learning. It involves


acting befittingly to maximise reward in a very bound circumstance. it's utilized by a
spread of programmes and machines to see the optimum course of action to pursue
in a very given circumstance. there's no correct answer in reinforcement learning,
however the reinforcement agent selects what to try and do to complete the work.
this can be totally different from supervised learning, wherever the coaching
information includes the answer key and also the model is trained thereupon answer.
it's obliged to achieve data from its expertise within the absence of a coaching
dataset.
There are two distinct categories of reinforcement:
Positive reinforcement is once a behaviour is bolstered by a happening that happens
as a results of that behaviour, increasing its strength and frequency. In different
words, it influences behaviour in a very favourable manner.

The following benefits of reinforcement learning:


● Boosts Performance
● Maintain amendment for a extended amount
The results may be weakened by an excess of states brought on by excessive
reinforcement.
● Negative - Negative Reinforcement is that the strengthening of a behaviour as
a results of preventing or avoiding a negative state.
● Reward-based learning has many advantages.
● Boosts Behavior
● Show disobedience to the specified minimal level of performance
● It solely offers what's necessary to satisfy the minimum normal of behaviour.
● Reinforcement learning applications in many contexts
M. Firdaus et al.'s[15] novel Polite made-to-order Dialog Generation (PoPe-DG)
framework, that makes use of a strengthened deliberation network, give a completely
unique task of generating polite individualized dialogue responses in accordance with
the user profile and compatible with the colloquial history. so as to introduce politeness
variance within the generated responses for the given task, the author developed
human- annotated politeness templates supported user profiles. Specifically, the fusion
attention along side dialogue utterances to get context is employed to rework and
normalise the temperament profile into a vector. To initialise the deliberation decoder,
context modules and annotated templates area unit to boot inserted. Our projected
approach instils civility in responses in accordance with the user profile and colloquial
history, in step with experimental study.

2.8 COGNITIVE INFORMATICS

Cognitive informatics is a relatively recent field of multidisciplinary research


that examines how people absorb information and how those processes and
mechanisms connect to technology.The main objective of cognitive informatics is to
design computing systems that best match how people process information, leading
to a more seamless integration of people and systems.The attention, memory,
learning, comprehension, visual processing, and decision-making limitations that can
hinder human information processing are also addressed in systems developed using
cognitive informatics.An interdisciplinary methodology that draws inspiration from
fields like psychology and behavioural science, neurology, artificial intelligence, and
linguistics

forms the basis of cognitive informatics.A set of foundational theories that serve as
the basis for information and knowledge-based science and engineering disciplines
can be developed from this by cognitive informatics.
A modular cognitive agent architecture for instructional question-answering that
includes social dialogue (small talk) and is enhanced for a particular knowledge topic
was proposed by D. Carlander-Reuterfelt et al [14]. As a personal assistant, this
system has been set up to help students understand data science and machine learning
skills. A human-like interface is used to train machine learning models and natural
language understanding algorithms as part of its implementation.

2.9 INTENT CLASSIFICATION

In the field of AI, ML, and chatbots, intent classification refers to the process
of categorising the customer's intent using language analysis. For example, a
consumer who asks, "How can I locate my order status?" in a chat window is
probably seeking, well, order status. The machine recognises this purpose and directs
the user to a human or automated system that can answer their question. Classifying
consumer intent correctly up front results in a lot speedier and more frictionless
experience for the customer, hence intent classification is important (as well as any
agents involved). Poorly formulated customer inquiries do not waste the time of the
agent, and more significantly, they do not waste the time of the consumer. Effective
intent classification goes beyond merely determining the client's requirements.
In conversational systems, the initial stage is typically intent classification. It is the
technique of assigning queries to a known class and is designed to make user query
comprehension easier. Different extraction procedures may be raised by query
classes. The approach taken to find the solution to a question like "Who is Alan
Turin?" is probably different from the approach taken to find the solution to a
question like "Who invented the Turing machine?" The first question asks for a
description, more specifically a definition of "Alan Turing," whereas the second
anticipates the name of a specific person, "Alan Turing."
In order to create an interactive user interface, Addi Ait-Mlouk et al. [10] first design
and develop an architecture. Second, we provide a machine learning strategy based
on intent classification and NLU to comprehend user intents and produce SPARQL
queries. We specifically process a new social network dataset (i.e., myPersonality)
and include it into the current knowledge bases to increase the chatbot's capacity for
processing analytical inquiries. The system is flexible, allows for the intuitive
formulation and execution of various activities for a wide range of topics, has several
knowledge bases, and can be expanded with a new domain if needed. Additionally,
evaluation and application cases for the chatbot are offered to demonstrate how it
enables interactive semantic data for a variety of real-world application scenarios and
highlights the suggested method for a knowledge.
2.10 DEEP LEARNING

Machine learning, that is solely a neural network with 3 or additional layers,


could be a set of deep learning. These neural networks build an endeavor to mimic
however the human brain functions, but they fall so much wanting having the ability
to match it, facultative it to "learn" from Brobdingnagian volumes of information.
further hidden layers will facilitate to tune and refine for accuracy albeit a neural
network with just one layer will still build approximation predictions. several
computing (AI) apps and services ar high-powered by deep learning, which boosts
automation by ending mental and physical tasks while not the necessity for human
intervention. Deep learning is that the technology that powers each established and
rising technologies, like voice-activated TV remote controls, digital assistants, and
mastercard fraud detection (such as self-driving cars).
Artificial neural networks, conjointly called deep learning neural networks, build an
endeavor to imitate the human brain through the employment of information inputs,
weights, and bias. Together, these elements accurately determine, categorise, and
characterize things within the knowledge. Deep neural networks ar created of several
layers of interconnected nodes, every of that improves upon the prediction or
categorization created by the one beneath it. Forward propagation refers to the
movement of calculations through the network. A deep neural network's visible
layers ar its input and output layers. The deep learning model ingests the information
for process within the input layer, and also the final prediction or classification is
performed within the output layer.
Back propagation could be a totally different technique that uses techniques like
gradient descent to calculate prediction errors before dynamical the function's
weights and biases by iteratively going back through the layers in an endeavor to
coach the model. A neural network will build predictions and build necessary
corrections for any faults because of forward propagation and back propagation
operating along. The rule incessantly improves in accuracy over time.

2.11 NEURAL NETWORK TRANSLATION

Text translation from one language to another is the main goal of the
computational linguistics discipline known as machine translation (MT). Neural
Machine Translation (NMT) has emerged as the most potent algorithm to carry out
this task because to the strength of deep learning. Tech businesses all across the
world are
investing heavily in NMT, even though Google Translate is the main industry
example. This cutting-edge approach uses deep learning to develop a model that can
translate between any two languages by using enormous datasets of translated
sentences. Numerous NMT variants are currently being researched and used in the
industry as a result of the extensive research conducted in recent years. one of the
more traditional and established forms of NMT.
Numerous studies have sought to train neural networks on symbolic processing in
order to use it for inference since the advent of deep learning. Additionally, research
comparable to the present study have been performed to learn propositional logic,
first- order predicate logic, and to do unification. However, because they couldn't be
put into practise, these research were only able to offer method suggestions. Studies
to train symbolic processing with graph networks and feedforward networks have
been carried out and reported with the advent of deep learning. When using graph
networks for symbolic learning, it was necessary to assume that forms of formulae
were already present in the data and to give the networks preliminary versions of
atomic formulas or formulas. With regard to symbolic learning.
A system similar to Prolog is employed for symbolic processing. When a Prolog
processing system receives a query, it makes use of knowledge base facts and rules to
deduce an answer. A question has one or more objectives. A Prolog processing
system uses backward reasoning to infer goals.The actions that a Prolog processing
system takes to deduce responses are briefly described.

2.12 NATURAL ANSWER GENERATION

Natural answer generation (NAG) is additional and additional common in real-


world cognitive content question respondent (KBQA) systems for having the ability
to mechanically generate linguistic communication answers with structured KB.
Large- scale community QA-pairs crawled from the net may well be directly wont to
train NAG models.

2.13 MULTITASK LEARNING

A branch of machine learning referred to as "multi-task learning" uses the


similarities between many tasks to try to resolve many various issues promptly. this
will increase learning effectiveness and function a regularizer, that we tend to shall
name later. Formally, Multi-Task Learning (MTL) can assist in rising the educational
of specific model by exploitation the information contained altogether of the n tasks
if
there area unit n tasks (conventional deep learning approaches aim to resolve simply
one task exploitation one particular model) wherever these n tasks or a set of them
area unit associated with one another however not specifically identical.In order to
forecast an exact price exploitation deep learning models, we tend to usually try and
learn an honest illustration of the options or qualities of the input file. Formally, we
try to optimise for a selected operate by coaching a model and adjusting the
hyperparameters till the performance will not be improved.Through the utilization of
MTL, it's going to be possible to more improve performance by requiring the model
to be told a additional generalised illustration because it learns (updates its weights)
for a range of tasks as against only 1.
2.14 ATTENTION MECHANISM
The encoder-decoder model for AI was given a performance boost by the
addition of the eye mechanism. the aim of the eye mechanism was to permit the
decoder to use the foremost pertinent parts of the input sequence during a versatile
method by combining all of the encoded input vectors during a weighted manner,
with the foremost pertinent vectors receiving the best weights. Bahdanau et al. (2014)
developed the eye technique to resolve the bottleneck issue that happens once
employing a fixed-length cryptography vector since the decoder would solely have
restricted access to the input's info. this is often expected to become more difficult for
prolonged and/or advanced sequences as a result of the representation's spatiality
would got to match.
Kulothunkan Palasundram[20] proposed a Question-answering mechanism. The
potential for chatbots to help individuals during a sort of tasks is gigantic. Either rule-
based or machine learning-based strategies ar accustomed implement them. Machine
learning-based chatbots ar additional scalable than the previous. one among the
foremost well-liked strategies for machine learning-based chatbots is sequence-to-
sequence (Seq2Seq) learning, that has created important strides since its debut in
2014. Seq2Seq learning-based chatbots have a disadvantage in this they regularly
manufacture answers that ar general and unrelated to the inquiries, rendering them
useless and maybe lowering the adoption rate of chatbots. 3 problems—question
encoder explicit, response generation explicit, and language model influence—can be
infernal for this deficiency. Multitask learning (MTL) may be a modern technique
accustomed solve this flaw. However, there's just about very little progress within the
current MTL models.

Instead of single-task learning, wherever they still manufacture standardized and


irregular responses. The Seq2Seq learning model's SEQ2SEQCC that consists of a
utile encoder, a solution decoder, a solution encoder, and a ternary classifier is
conferred during this study as a unique MTL technique. to boot, SEQ2SEQCC makes
use of a unique attention mechanism dubbed the whole attention mechanism
additionally as a dynamic tasks loss weight mechanism for MTL loss computation. so
as to check the performance of the planned model to 2 alternative models that have
recently been planned, experiments were run on the Narrative and SQuAD datasets.
per the experimental findings, SEQ2SEQCC considerably outperforms the opposite 2
models in terms of word error rate, Distinct-2 metrics, and bilingual analysis
understudy.

Fig 2.4: Seq2Seq overview diagram of data transfer[10]


2.15 COMPARISON TABLE OF EXISTING ALGORITHM

TABLE 2.1: COMPARISON OF LITERATURE SURVEY

S.NO Authors Problem Statement Algorithms/method Advantages Disadvantages


s
01 Giovanni To design an approach human supervised Interface and It does not cover
Almeida chatbot management learning tools for post all the necessary
Santos in content deployment of the responsibilities
et.al [2] management chatbot. to apply.
02 Biplav To design Personalized Machine Learning AI can help to Important to
Srivastava Chatbot Trustworthiness algorithms and solve ethical check if these
et.al [7] Ratings conversation issues that relate issues bring
systems. to how they additional
trained,designed requirements
and interms of
developed.Fairnes chatbot rating.
s and bias can be
resolved to ensure
data consistency.

03 Tendai Entertainment Chatbot for Conversational Perform large- Contextual


Makasi the Digital Inclusion of agents, classification scale analysis,Get words and
et.al [9] Elderly People Without and text a more objective phrases and
Abstraction Capabilities recognisation and accurate homonyms,
analysis,Streamlin Synonyms,Irony
e processes and and
reduce costs sarcasm,Ambigu
ity, Errors in text
or speech.

04 Addiait- A Knowledge Graph Based Machine learning Chatbot for law There should be
mlouk ChatBot for Natural algorithms and firm helps you a scope to add
et.al [10] Language Understanding SPARQL capture accurate more text-based
Over Linked Data of case details. data sources
Analyze answers with privacy
to improve client preservation and
service with law integrating with
helpdesk bot. social based
apps.
05 Mary A chat messaging service Conversational The use of study does not
Bates [11] that helps doctors and other interfaces with chatbots in the attempt to
health professionals obtain AI&ML algorithms field of medical evaluate an
information about the safety with NLP. analysis helps to exhaustive list of
of drugs. diagnose existing health
according to chatbots
different users.
06 Vorada A design to act as a Natural language Improve Chatbot
Socatiyan precedent for other works at processing with engagement with should be able
urak et.al home and abroad to addition to LAW chatbot for law to solve many
[12] perpetuate awareness of codes related to act. firms queries of the
sexual violence. users by more
interaction.
07 Daniel Advances in cognitive Training of machine Advantages of Need an
Carlander computing enable a new learning models and cognitive improvement
- natural language assistants in of human-
way of interaction that interactions in
Reuterfelt processing involves education and the
accelerates insight from chatbots.
[14] for building human- corresponding
existing information interaction based challenges in
sources, thereby chatbots. implementation.
contributing to the process
of learning.
08 Hiroshi To learn symbolic Symbolic processing Able to learn Symbolic
Honda processing with deep performed by the symbolic processing to
[16] learning and to build prolog processing processing with analyse large-
question answering systems system with neural deep learning and scale data
by means of learned models. machine translation. to build question present on the
answering Web and
systems by inductive
means of learned inference
models. with deep
learning-base
d symbolic
processing
09 Kapil Chatbot must provide Windows Azure Widespread of Time efficient
Tajane services to the customers in Compute , Windows use of chatbots chatbots should
et.al [24] many aspects for delivering Azure Storage can increase the be made to
the data. ,Fabric Controller , interactions. decrease time
Microsoft SQL complexity.
Azure, Windows
Azure Platform
AppFabric , Content
Delivery Network
,Connect

10 Achmad The chatbot application Selenium feature The chatbot will Raspberry Pi
Ramaditiy system is crucial, especially with python be able to read all that is unable to
a et.al for quickly and effectively programming. the messages at access
[26] conveying information to a once and reply to WhatsApp
large number of consumers. the messages. should have its
This the WhatsApp operating system
application for the purposes replaced with
of this Chatbot technology. either Windows
10 or Linux.
2. 16 SUMMARY

After carefully analyzing the methods proposed in the current literature, It is


identified that all the chatbots were based on traditional algorithms and machine
learning algorithms which are not ideal enough to meet challenges in chatbot service
deliver. Therefore, a hybrid method for early diagnosis of chatbot is proposed by the
combination of ML and NLP algorithms for both implementing universal chatbot to
give a better service delivery in the user query resolving mechanisms. In this proposed
model, the text preprocessing,natural language processing and inbuilt tools to design a
best chatbot service is the ultimate goal for the project.
CHAPTER 3

SYSTEM REQUIREMENTS

3.1 PREAMBLE

The previous chapter describes the literature review related to different types
of methods and algorithms which helps to build the chatbot which have been proposed
in the earlier paper, comparision of the models in existing papers and feature
comparision to give an brief insight in chapter 2. This chapter describes the different
kinds of tools used and different requirements to develop the proposed system.
Software and hardware requirements vary based on the development model. This
works provides details about tools used like front-end tools, back-end tools, hardware
tools, and different system requirements like hardware and software requirements of
the system.

3.2 FRONT END TOOL

3.2.1 Google Co-Lab

Google Co-lab is a free open-source interactive web tool known as a


computational notebook that researchers can use to combine all this software code,
computational output, explanatory text, and multimedia resources in a single
document or a file. Jupiter notebook provides you with easy-to-use interactive data
science and environment across many programming languages that do not only work
like an IDE but also as a presentation tool or educational tool. Jupiter notebook is not
included with python so if you want to try it out, you will need to install Jupiter then
any distributions of python language.

Google Co-lab notebook consists of two components. Users input


programming code or text in rectangular cells on a front-end web page. The browser
then passes that code to a back-end ‘kernel’, which runs the code and returns the
results. A Co-lab Notebook document is a JSON document with an ordered collection
of input/output cells that can contain code, text (using Markdown), mathematics,
graphs, and rich media, and typically ends with the ".ipynb" extension.
Figure 3.1: Google Co-lab Notebook

3.3 COMMUNICATION INTERFACE

Python is a general-purpose interpreted, interactive, object-orientated, and


high- level programming language. It changed into created with the aid of using
Guido van Rossum at some point in 1985- 1990. Like Perl, Python supply code is
likewise to be had below the GNU General Public License (GPL). Python is a
high-level, interpreted, interactive, and object-orientated scripting language. Python is
designed to be tremendously readable. It makes use of English key phrases often
while different languages use punctuation.

⮚ Python is Interpreted - Python is processed at runtime with the aid of using


the interpreter. You do now no longer want to assemble your software earlier
than executing it. This is much like PERL and PHP.

⮚ Python is Interactive - You can take a seat down at a Python activate and
have interaction with the interpreter immediately to jot down your programs.

⮚ Python is Object-Oriented − Python supports the Object-Oriented style or


technique of programming that encapsulates code within objects.

⮚ Python is a Beginner's Language − Python is a great language for beginner-


level programmers and supports the development of a wide range of
applications from simple text processing to WWW browsers to games.
Characteristics of Python

Python is very easy to learn the language as compared to other languages


like c, c#, JavaScript, java, etc.

⮚ Python language is freely available on the official website and


you can download it from the www.python.org website.
⮚ It provides very high-level dynamic data records and supports
dynamic type checking.
⮚ Portable, Python can run on a wide variety of hardware platforms and
has the same interface for all programs.
⮚ Scalable, Python provides a better structure and support for large
programs than shell scripting.
⮚ It may be without difficulty incorporated with C, C++,
COM, ActiveX, CORBA, and Java.

3.4 OPERATING SYSTEM

It is an interface between a computer user and computer hardware. An


operating system is software that performs all the basic tasks like file management,
memory management, process management, handling input and output, and
controlling peripheral devices such as disk drives and printers. It is a time-sharing
operating system that schedules tasks for efficient use of the system and may also
include accounting software for cost allocation of processor time. In this proposed
work we use Windows operating system. Windows is a series of operating systems
developed by Microsoft. Each version of Windows includes a graphical user interface,
with a desktop that allows users to view files and folders in windows. For the past two
decades, Windows has been the most widely used operating system for personal
computers and PCs. We can use the versions such as Windows 7 and the above
versions such as Windows 10.

3.5 HARDWARE REQUIREMENTS

3.5.1 Processor

A processor is an integrated electronic circuit that performs the calculations


that run the computer. A processor performs arithmetical, logical, input/output (I/O),
and
other basic instructions that are passed from an operating system (OS). The Intel Core
i5 Processor was used for mainstreamx86 architecture microprocessor from Intel from
2006 to 2009 when it was renamed Core i5. The processors are based on either the 32-
bit or 64-bit, and it was targeted at mobile or desktop computers. In terms of features,
price, and performance at a given clock frequency, Core i5 processors were positioned
above Celeron microprocessors in Intel's product range. The Core i5 was also a very
popular choice for overclocking, as it can deliver high performance (when
overclocked) at a low price

3.5.2 RAM (Random access memory)

Random-access memory (RAM) is a form of computer memory that can be


read and changed in any order, typically used to store working data and machine code.
A random-access memory device allows data items to be read or written in almost the
same amount of time irrespective of the physical location of data inside the memory.
RAM contains multiplexing and demultiplexing circuitry, to connect the data lines to
the addressed storage for reading or writing the entry. Usually, more than one bit of
storage is accessed by the same address

3.6 HARDWARE REQUIREMENTS TOOLS

⮚ System: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz 2.50 GHz


⮚ Hard Disk :1 TB
⮚ Memory (RAM) : At least 8GB
⮚ OS: Windows 7/Windows 10
⮚ System type: 64-bit Operating System
⮚ Input devices: Keyboard, Mouse
3.7 SOFTWARE REQUIREMENTS

⮚ Coding Language: Python


⮚ IDE: Google Colab Notebook
⮚ Built in tool for Bot flow

3.7.1 Google Colab initialization.

⮚ The following are the steps to create a notebook in Google Colab.


Figure 3.2: Google CoLab Welcome Window

Figure 3.3: CoLab Notebook initialisation

⮚ Step1: Click on Google Chrome and on the address block type Google Colab.
⮚ Step 2: Then click on new notebook on file menu and give the
file name to the notebook.

⮚ Step 3: Succesfully created the notebook.

3.7.2 Python Libraries

⮚ NumPy: NumPy is the fundamental package for scientific computing in


python. NumPy arrays give advanced mathematical and other types of
operations on large numbers of data. Typically, such operations are executed
more efficiently and with less code than is possible using Python's built-in
sequences.
⮚ Matplotlib: Matplotlib. Py plot is a collection of functions that make
matplotlib work like MATLAB. Each py plot function makes some change to a
figure: e.g., creates a figure, creates a plotting area in a figure, plots some lines
in a plotting area, decorates the plot with labels, etc.
⮚ Pandas: Pandas are mainly used for data analysis. Pandas allow all importing
data from various file formats such as comma-separated-values, JSON, SQL,
and Microsoft Excel. Pandas allow various applications that are data
manipulation operations such as merging, reshaping, selecting, as well as data
cleaning, and data wrangling features.
⮚ Scikit-Learn: Scikit-learn is a free machine learning library for the Python
programming language. It features various algorithms like support vector
machines, random forests, and k-neighbors, and it also supports
Python numerical and scientific libraries like NumPy and SciPy.

⮚ Tensorflow: Tensor Flow is an open-source library for fast numerical


computing. It was created and is maintained by Google and released under the
Apache 2.0 open-source license. The API is nominally for the Python
programming language, although there is access to the underlying C++ API.
TensorFlow was designed for use both in research and development and in
production systems.
⮚ Keras: Keras is a high-level neural networks API, written in Python and
capable of running on top of TensorFlow. It allows for easy and fast
prototyping (through user-friendliness, modularity, and extensibility). Supports
both convolutional networks and recurrent networks, as well as combinations
of the two. Runs seamlessly on CPU and GPU.
3.8 DATASET
● An FAQ dataset contains list of questions and responses to the
particular questions.

● The FAQ and a normal dataset contains more queries and responses in which
it should be able to respond to the particular queries.

● All the responses and questions are related to many domains and it is not
permitted to one service of a domain so as to make a universal solver.

3.9 SUMMARY

This chapter introduced the software and hardware requirements of the


system. The above requirements are required for the successful implementation of the
project. Python is the programming language chosen for the implementation of brain
tumor segmentation and classification using natural language processing with random
forest algorithms with the help of machine learning for better implementation and
accurate results using most Jupiter notebooks. A system with the 64-bit Windows
operating system and an Intel core Processor device. The hardware requirements are
the basic ones that are required for the execution of any regular python script.
CHAPTER 4

SYSTEM DESIGN

4.1 PREAMBLE

The previous chapter describes the different requirements and tools used for
developing the proposed system. It also consists of the hardware requirements like
processor, memory, and software requirements like python and frontend and backend
tools. This chapter deals with the design of the proposed system. It includes thesystem
architecture, block diagram, and various diagrams to represent the design of the
system.

4.2 PROPOSED SYSTEM ARCHITECTURE DIAGRAM

The system architecture is the conceptual model that defines the structure,
behavior, and views of a system. An architecture description is a formal description
and representation of a system, organized in a way that supports reasoning about the
structures and behaviors of the system.

The below diagram represents the system architecture for the phases of flow of
the query response to the user. The proposed system consists of two basic steps:
training and validation of the model. The procedure is as follows: In the first phase
training of the knowledge base is involved. After the data has been stored in the
knowledge base the second step in the training phase involves data analysis in which
it checks which kind of data is present in the KB and checks if the data requires any
necessary cleaning or organizations. After the data analysis phase the third step
involves data preprocessing technique in which natural language processing pipeline
plays a keyrole in which it cleans the data by removing unnecessary
symbols,punctions etc.,. After cleaning of the dataset it moves to the sentence
transformer which is a machine learning technique in which it converts the data into
vector or machine understandable form.When the data is converted in embedded form
the embedded data will be stored in the embedded data storage.It can be explained in
the figure 4.1 given below.
When the first phase has been completed the old dataset will be converted into
a new dataset which is fully cleaned and organised.
Figure 4.1: Block Diagram of the Model
A system architecture can consist of a system and the sub-systems developed,
that will work together to implement the overall system.

Above figure explains the training phase.The second phase of the architecture
is testing of the system. The data which is stored in the embedded storage should be
fetched. When the data is fetched it is forwaded to the similarity engine in which in
this phase cosine similarity technique is considered in which it compared the given
user query and stored embedded query and stored into the lookup table.These steps
are performed before the user have entered the query.When the user enters the query it
first enters into the data analysis and next to preprocessing phase and next to sentence
transformer in which after this phase it will be moved to similarity engine phase and
remaining phases will be performed. Compared with the query given by the user the
related response will be given to the user by lookup table as in fig 4.2.

4.2.1 Dataset

A new dataset should be made with frequently asked questions in which the
dataset queries which is related to different domains.The datasets should contains
more number of queries inorder to solve more number of queries.
4.2.2 Data Pre-processing

The FAQ dataset which contains the data should not contain unnecessary
punctuations, unnecessary symbols, numerical digits in which it forms more fuzzy in
organizing the data. For data pre-processing essential python libraries like linguistic
libraries should be imported to remove the unnecessary punctuations and symbols.

4.3 ARCHITECTURE FOR QUERY RESPONSE

Figure 4.3: Architecture Model using Specialized RNN

4.3.1 Sentence transformer

Sentence transformer is a python framework which is used to form embedded


data from given textdata. Sentence transformer converts pre-processed data into
vector form or machine understandable data format.

4.3.2 Cosine similarity engine

Cosine similarity engine is a machine learning technique in which the original


data is compared with stored embedded data.When the original data is entered into the
cosine similarity engine it checks with the embedded data and produces response to
the queries given the user.
4.4 SUMMARY

The design of the system is explained in chapter 4. This chapter provides information about the
system design. Here, the system architecture diagram of the proposed system has been
discussed. This chapter deals with the design of the proposed system.It includes the system
architecture, to represent the design of the system. This chapter contains main architecture,
sub-systems of the architecture which have been discussed above in the proposed system.
CHAPTER 5

IMPLEMENTATION

5.1 PREAMBLE

In the previous chapter, the proposed system design for developing a chatbot
model has been discussed. Once when the model design and requirements are known,
the next step is implementation. The implementation is the first step in the phase of
development. This chapter briefly discusses the step-by-step process of
implementation for the development of the proposed system.

5.2 PROPOSED METHODOLOGY

In this model, text classification and pattern recognition is done by using


LSTM methodology to classify and recognize the text pattern to generate the
response. Pattern recognition is a technique to classify and finds the pattern. This
model helps in query resolving which helps in fast response generation.

The proposed is implemented in Google Co-lab platform which is a python


integrated interface. The proposed work consists of python 3.6.4 with libraries numpy,
pandas, matplotlib, tensor flow along with keras dependencies and nltk and other
mandatory libraries. There are many applications of LSTM and tensor flow. LSTM are
mainly used to learn, process and classify sequential data because those networks can
learn long term dependencies between time-steps of data. Common applications include
sentimental analysis, language modelling etc., . when coming to tensorflow, a library for
multiple machine learning tasks, while keras is a high level neural network library that
runs on top of tensor flow. The previous methodology is based on RNN where the
accuracy and level of recognition is not better.

To solve this problem and to improve the model accuracy LSTM algorithm in deep
learning can be introduced which helps to learn long term dependencies and helps in
pattern recognition. After training the model and testing of the model, the model
computes model accuracy, overall accuracy and all the confusion matrix metrics, f1_score
as evaluation parameters. The dataset consists of queries along with necessary responses
in the form of Json file.

The Proposed system for pattern recognition helps to resolve the queries faster accurately
and the evaluated results have been found.

5.3 MODULES OF THE PROPOSED SYSTEM

The proposed method has 7 main modules which are dataset collection, data
visualization, data pre-processing, tokenization, LSTM model preparation, model
validation and computing evaluation parameters. First the dataset is collected in the
form of raw data which are queries along with corresponding responses. The second
module is all about data visualization and all the modules are as follows. The modules
are given below:

1. Dataset collection
2. Data Visualization
3. Data Pre-processing
4. Tokenization
5. Implementation of LSTM model
6. Working of LSTM model
7. Computing evaluation parameters

5.3.1 Dataset Collection

The dataset considered here is in the form of Json file and it consists of
different types of queries and responses. The Json file consists of Non-Preprocessed
data. There is only a single Json file and the data should be pre-processed.
In this study, the training and testing have been done by the model on the
dataset which includes and corresponding responses. The testing of the model
includes training of the model with the Json file.

Fig 5.1 : Dataset


5.3.2 Classification

In this model, classification refers to predicting the responses to the query


given by the user. In the next phase, the data will be classified by inputs and tags. The
classified data will be converted into a data frame which includes inputs with
corresponding tags.

Fig 5.2 Classification of inputs and tag

⮚ Conventional Machine Learning-Based Approach

Machine learning is a paradigm where a machine is given a task where its


performance improves with experience. Machine learning techniques are commonly
grouped into three major types: supervised, unsupervised, and reinforcement learning.
Supervised learning is based on training a data sample from the data source with
correct classification already assigned by domain experts, whereas, in unsupervised
learning, the algorithm finds hidden patterns from the unlabeled data. On the other
hand, reinforcement learning is carried out by making a sequence of decisions using
reward signals. Therefore, the algorithm learns by receiving either rewards or
penalties for the actions it performs. Machine learning has been used in the
classification of brain tumors from MRI images, and promising classification
performance has been reported.
1. Dataset Pre-processing
2. Region of Intrest (ROI) Detection
3. Feature Extraction
4. Applying Machine learning algorithms

The following are explained below with brief summary starting from the
dataset pre-processing, to the machine learning algorithm

5.3.2a Dataset Pre-processing

The dataset consists of queries with responses in which the input data is in the
form of raw data or unprocessed data. In the dataset, the data consists of unnecessary
words, symbols and punctuations. These punctuations and unnecessary symbols
creates unnecessary space in the memory. The increase in memory space can create
huge time complexity. To reduce this and to make the data clear and precise data
preprocessing should be done on the dataset.

5.3.2b Feature Extraction

The feature extraction techniques are mathematical models based on various text
processing properties. The different types of features include process of converting
raw data into numerical features that can be processed while preserving the
information in the original dataset. This type of feature extraction can be used by
applying different machine learning techniques on raw data.

5.3.2 c Applying Machine learning algorithms

Classification is the process of recognizing, understanding, and grouping ideas


and objects into preset categories or “sub-populations.” Using pre-categorized training
datasets, machine learning programs use a variety of algorithms to classify future
datasets. Classification algorithms in machine learning use input training data to
predict the likelihood that subsequent data will fall into one of the predetermined
categories. the classification in this model is a multilevel classification which is used
to classify the different classes in the sample it is done through the confusion matrix
through a true positive to the pre-classified data and finally printing the classified data
with the labels actual and predicted labels and finally, accuracy (ACC),precision,
recall, f1_score, true positives, true negatives, false positives, false negatives for all
the classes which measures the ability of a model incorrectly identifying all class or
pixels, no matter if it is positive or negative.
5.4 MODULES OF CLASIFICATION

The proposed work has four main modules which are dataset collection,
dataset pre-processing, Feature Extraction, and applying Machine learning algorithms
for classification. First, the dataset will be loaded. The dataset collected will then be
pre- processed and the pre-processed data will be followed to training of the model
with the dataset. Later, Machine learning algorithms are used for the classification of
input data. Lastly, the results from the various machine learning algorithms are
evaluated. The modules are given below:

5.4.1 Data Visualization

Data visualization is the process of displaying the input dataset. There are 3
different classes for a single data. They are:

6. Input Query
7. Tag name
8.Response

5.4.1a Input Query

Input Query is nothing but a question form which helps in pattern recognition.
Depending on the input query the response is generated. The input query given here in
the json file will be the intents for training of the model.

Figure 5.3: Visualization of input query

5.4.1b Tag Name

Tag name refers to the value which identifies which query or input data refers
to which tag value. The tag name is said to be the key to identify the output values. A
tag is simply an indicator. If users are tagged as customers they are filter customers
otherwise they are not related to customers. Tag are single name entities that can be
attached to the conversation.

Figure 5.4: Visualization of Tag Name Field


5.4.1 c Response

Response is defined as the value in which it depends on the input query. Depending
on the input the output response is given. If the model initiates a conversation it is
said to be proactive message.

Figure 5.5: Response Visualisation

5.4.2 Data Pre-processing

Pre-processing data is a common first step in the deep learning workflow to


prepare raw data in a format that the network can accept. In this data pre-processing
step, the data is appended to the input data list to group all the different classes of an
image for continuous data flow of specific data.
Different combinations of pre-processing techniques were explored for the
performance improvement. Removal of unwanted spaces, symbols and punctuations
involves in preprocessing.
The next step in data pre-processing is data concatenation which helps in
visualizing the different classes present in the input data which is maintaining the
continuous flow of input data to be processed.

5.4.3 Tokenization

Tokenization is a process in which it takes raw data as input and converts it


into useful data string. Tokenization is one of the main process in NLP. Tokenization
is mainly considered to split paragraphs and sentences into smaller sentences which
can easily assigned meanings. The main challenge in tokenization while breaking
down the sentences and paragraphs seems simpler but it can be more complex when
to machine learning approaches.
A large challenge in tokenization is to be able to segment words when spaces
or punctuations marks don’t define the boundaries of the word. Tokenization is the
start of NLP process, converting sentences into understandable bits of data that a
program
can work with.
5.3.5a Word Tokenization

Word Tokenization is the most common version of tokenization. It takes


natural breaks like breaks in speech or spaces in text snd split the words into
delimiters which is the simplest way to separate speech/text into parts. It is different
for word tokenization to separate unknown words. This is often solved by replacing
unknown words with a single token that communicates.

5.4.4 Implementation of LSTM model

There are five different atomic operations involved in implementing the


LSTM architecture. There are defining a network, compiling the network, fit the
network, evaluate the network, make predictions. There are continuously applied to
the input data in the sequence of input, embedding, dense, Globalmaxpooling1D,
Flatten.
LSTM is said to be long short-term memory is an artificial neural network
which are mostly used in the fields of artificial intelligence and deep learning. Unlike
standard or general feed forward neural network, LSTM has feedback connections. A
model of recurrent neural network (RNN) can help to process not only single data
points such as images but also can process entire sequences of data points such as
speech etc. This type of feature makes LSTM model unique and ideal for processing
and data prediction. LSTM is mainly applicable to tasks such as machine translation,
speech recognition, and pattern recognition.
The name LSTM refers to the analogy that a standard RNN has both long-term
memory and short-term memory. The connection weights and biases network change
once for every training and how changes store long-term memories.
The activation patterns in the change of network once per time-step determine
how the moment-moment change in patterns in the brain store short-term memories.

5.4.5 How LSTM works

A common LSTM unit is composed of a cell, an input gate, an output gate and
a forget gate. The cell is essential to remember values over an arbitrary intervals of
time and the three gates are used to regulate the information into and out of the cell.
Forgets gates decide what information to discard from a previous state by assigning a
previous state, compared to a current input in which it values are between 0 and 1.
A rounded value of 1 means to keep the information in the cell and the value 0
means to discard it. Inputs gates are essential to decide which set of information to
store in the current state, using the same system as forget states. Output gates are used
to control which type of information in the current state to output by assigning a value
from 0 to 1 to the information, considering the previous and current states. Selectively
outputting the relevant information from the current state allows the LSTM network
to maintain useful information and long-term dependencies which help to make
predictions both in current and future time-steps.

Figure 5.6: Specialized RNN Architecture

There are five different atomic operations involved in implementing the


LSTM architecture. There are defining a network, compiling the network, fit the
network,
evaluate the network, make predictions. There are continuously applied to the input
data in the sequence of input, embedding, dense, Globalmaxpooling1D, Flatten.

The below flow chart shows the working process of a LSTM algorithm with
five types of layers which are continuously repeated for the input.

The main idea is to implement a unique ideal network which can store long-
term dependencies. The main difference between RNN and LSTM is which can store
information in the memory for long periods of time. In this LSTM has an advantage
over RNN such that LSTM can handle the information in memory for longer periods
of time as compare to RNN. RNNs consists of feedback loops in the recurrent layer.
This type of network helps to maintain information in the memory for over time. But
it is very difficult to train standard RNNs to solve problems which require learning if
long- term dependencies. This is because the gradient of the loss function decays
exponentially with time known as varnishing gradient problem.

Figure 5.7: Layers of Specialized RNN architecture


When comes to LSTM, it is a type of networks are a type of RNN which uses special
units in addition to standard units. LSTM units include a memory cell which can
maintain information in memory for longer periods of time. This memory cell helps to
learn long-term dependencies. LSTMs deals with vanishing and exploding gradient
problem by introducing new gates, such as input and forget gates which can help to
allow for a better control over the gradient flow and enable better storage of long-term
dependencies.

​ Sigmoid

The purpose of sigmoid layer function in an LSTM network is to control the


flow of information through the cell state, which is the memory of the network. The
sigmoid function is also known as the gate, is used to determine which information
is allowed into the cell state.

​ Hidden layer

Hidden layer is simply defined as the layer between input layers and output
layers, where artificial neurons take in a set of weighted inputs and produce an
output through an activation function. The size of the hidden layer would be near to
512 units for each LSTM cell.

The purpose of hidden layer in which it is just a feed-forward network which


is used as an additional input RNN at the next time step.

​ Activation Layer

The activation function is a simple mathematical function that transforms the


given input to the required output that has a certain range. From their name, they
activate the neuron when the output reaches the set threshold value of the function.
They are responsible for switching the neuron ON/OFF. The neuron receives the sum
of the product of inputs and randomly initialized weights along with a static bias for
each layer. The activation function is applied to this sum, and an output is generated.
Activation functions introduce a non-linearity, to make the network learn complex
patterns in the data such as in the case of images, text, videos, or sounds. Without an
activation function, our model is going to behave like a linear regression model that
has limited learning capacity.
The main purpose of tanh activation function is that it produces a
zero-centered output, thereby supporting the back propagation process. The tanh
function mostly used in recurrent neural network for natural language processing
tasks.
Mathematically, it is expressed as: F(z)=tanh(z)

5.5 SUMMARY

In this chapter, we briefly discussed the implementation of all the modules,


methodologies, and algorithms that are used in this proposed work. Implementation is
the main framework in the project and it is the main thing that gives the result of our
work. So, using the best algorithms gives the best results and this is why we compare
different algorithms which leads to the success of the project.
CHAPTER 7

CONCLUSION AND FUTURE ENHANCEMENT

7.1 CONCLUSION

This project “A Query Resolving Chatbot using Assistive Technology


Approach” has been implemented using LSTM algorithm. This project is used in the
fields of technical and businesses. Query resolving is one of the challenging task in
most of the industries. So to introduce a mode which helps to classify the queries
which helps in fast response of queries to the customers. The proposed work has an
advantage and a modification model than the previous models such that the proposed
model classifies and makes the training process faster and efficient. The proposed
work helps to learn long-term dependencies to help in query resolving, the model
should be trained by using preprocessed data. The raw data consists of unprocessed
data in which the raw data should be preprocessed such that the preprocessed data
helps to improve the training accuracy. Here in the proposed system, by using the
LSTM architecture consists of layers in which the layers helps to learn long term
dependencies and the model is capable of training from past data or past
dependencies. The proposed model gives the output as the responses to the query. The
model provides multiclass classified data as the output sample dataset which contains
the input queries and responses. In the proposed work, we have obtained the model
accuracy of approximately 98 percent and overall accuracy after predictions of about
93 percent accuracy by using LSTM algorithm. The proposed model compares the
accuracy of the training gain and loss with the help of plotting the graph.

7.2 FUTURE ENHANCEMENT

This project mainly focuses on the quick query resolving by implementing a


unique model with the best accuracy. In the future, this project can be further
extended by acquiring better machine learning support and making it better in query
resolving and improving the accuracy of the model which can help to make the model
to give better

55
CHAPTER 6

EXPERIMENTAL RESULTS

6.1 PREAMBLE

The previous chapter discussed the implementation of the project and the
different modules while implementing the project. In this chapter, we discuss the
experimental results of the developed model. And the experimental results of a few
existing systems are being compared to know the efficiency of the proposed system

6.2 RESULTS

To generate and give the responses to the Queries using Assistive Technology.
The model A query Resolving Chat Bot Using Assistive Technology Approach using
LSTM algorithm was proposed this model makes use of FAQ dataset in the form of
Json file. The Json file contains intents and the intents contains three files. a) tag ,b)
input , c)responses and every tag represents the key value There is only one folder i.e.,
training json file. The validation of the model will be performed by the validate given
by the user.

Query Resolving using the LSTM model. the performance of the model of the
LSTM Design was optimized based on the performance of previously produced
architecture. This study resulted in a new model .By using LSTM architecture, the
performance of the model is increasing and produces the results efficiently.

The model summary is shown below, which has the description of the layersof
the model and their output shapes, parameters, and also which layer it is going to
connect. The layers of the model are namely the Input layer, LSTM layer, Flatten
layer, Dense layer, and these layers are fully explained in the previous chapters. The
model summary is shown as:

The model summary explains how each layer of the model is functioning.
Depending on the layers in the model the output shape depends. For every layer the
activation function helps to perform the operations within the range of the activation
function.
Figure 6.1: Model Summary

Figure 6.2: Training Accuracy

Train model took 400 iterations or epochs and using this module will plot the
accuracy, loss graph of the model at each epoch/iteration

Figure 6.3: Training model Accuracy

After the training has been completed, for testing the model it should be
validated and the validation will be done by the validate (i.e., input) given
by the user. During validation the user will give a query as input and the
trained model will generate the response which is exactly related to the
query given by the user. Below figure shows how the responses have been
given by the model to the validate.
Figure 6.4: Output of the validate phase

And the results of the output dataset is shown below, which displays the result
of the output dataset consists of actual and predicted values along with probabilities.

Figure 6.5: Output Dataset dataframe

Below is the graphs of the Accuracy, and Loss of training of data of around
400 Epochs.

In the below graph x-axis represents EPOCH and the y-axis represents
accuracy, loss values in the below graph blue line represent training accuracy, and loss
and the orange line represents training set loss. In the below graph at each iteration the
training accuracy is increasing whereas the training loss graph is decreasing.
Figure 6.6: Model Accuracy Graph
To determine the overall accuracy of the model a confusion matrix will be generated from the
output dataset. The output dataset as mentioned in figure 6.5 is used to generate the confusion matrix as shown
in below.

Figure 6.7: Confusion Matrix

To visualize the confusion matrix clearly a heat map is generated for the
confusion matrix which helps to visualize the data as shown in below figure.
Figure 6.8: Heatmap

From the above heatmap the overall accuracy of the model will be calculated
as mentioned in below figure.

Figure 6.9: Overall Accuracy of the Model


Figure 6.9 heat map demonstrates the true positives, true negatives, false
positives and false negatives for every class.

6.3 RESULTS COMPARISONS

When comparing the evaluation parameter of the proposed system with the
existing systems the proposed system gives the efficient values as it is shown in the
below table.

⮚ Sensitivity (True Positives):

The chance of a positive test, conditioned on it being positive, is known


as sensitivity (true positive rate).

⮚ Specificity:

The chance of negative test if it is negative is referred to as specificity


(true negative rate).
⮚ Precision:

Precision is the amount of information provided by a number in terms of its


digits; it indicates how closely two or more measurements are related. It is
indifferent by accuracy.
Precision=TP/(TP+FP)

⮚ Accuracy:

The measure of performance is to use accuracy. The accuracy is the percentage


of correctly identified cases (both genuine and fake users) in the total number
of examined cases, which can be calculated using the equation.

Accuracy= (TP+TN)/(TP+FP+FN+TN)
⮚ Recall:
The ability of the model to find all the relevant cases within a dataset. The recall is
the percentage that can define the number of true positives divided by number of
true positives plus number of false negatives, which can be calculated using the
formula.

Recall=TP/(TP+FN)
⮚ F1 Score:
The harmonic mean of precision and recall which is better measure than accuracy.
F1 Score becomes high only when both precision and recall are high.

F1_Score= (2*precision*recall)/ (precision+recall)

⮚ False Positives :
The Positive outcomes that the model predicted incorrectly is known as
False positives.

FP= (Rowwise FP) - TP

⮚ False Negatives:
The false negative is an outcome where the model incorrectly predicts
the negative class.
FN= (Colwise FN)- TP
TABLE 6.1: CLASSIFICATION OF EVALUATION PARAMETERS

Fig 6.10 : Classification report of all classes


When comparing the proposed LSTM algorithm with Simple RNN algorithms.
In this project, the LSTM algorithm has performed very well which helps to get the
responses exactly from the model and got an accuracy of 92.7 %. By comparing with
simple , seeing the existing algorithm does not give higher accuracy. So, the proposed
system gives higher accuracy than the existing ones.
Figure 6.11: Comparison Graph

6.4 APPLICATIONS

⮚ Sentiment Analysis
⮚ Speech Recognition
⮚ Language Modelling

TABLE 6.5: COMPARISON OF EVALUATION PARAMETERS


6.6 SUMMARY

This chapter discusses the experimental results of the proposed work and
also explains the graphs and comparison results of the proposed system.
APPENDIX A

SOURCE CODE

19CSEA016.ipynb

import tensorflow as tf
import numpy as np
import pandas as pd
import json
import nltk
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.layers import Input, Embedding, LSTM, Dense, GlobalMaxPooling1
D, Flatten
from tensorflow.keras.models import Model
import matplotlib.pyplot as plt

Data into lists

#getting data into


lists tags=[]
inputs=[]
responses={
}
for intent in data1['intents']:
responses[intent['tag']]=intent['responses'
] for lines in intent['input']:
inputs.append(lines)
tags.append(intent['tag']
)

#converting into dataframe


data=pd.DataFrame({"inputs":inputs,"tags":tags}
)

#print the
data data

#pre-processing

#removing
punctuations import
string
data['inputs']=data['inputs'].apply(lambda wrd:[ltrs.lower() for ltrs
i n wrd if ltrs not in string.punctuation])
data['inputs']=data['inputs'].apply(lambda wrd: ''.join(wrd))
data

#tokenize the data


from tensorflow.keras.preprocessing.text import
Tokenizer tokenizer=Tokenizer(num_words=200000)
tokenizer.fit_on_texts(data['inputs'])
train=tokenizer.texts_to_sequences(data['inputs'])

#apply padding to data


from tensorflow.keras.preprocessing.sequence import
pad_sequences x_train=pad_sequences(train)

#encoding the outputs


from sklearn.preprocessing import
LabelEncoder le=LabelEncoder()
y_train=le.fit_transform(data['tags'])

input_shape=x_train.shape[1
] input_shape

#define vocabulary

vocabulary=len(tokenizer.word_index)
print("number of unique words : ",
vocabulary)
output_length=le.classes_.shape[0]
print("output length : ",output_length)
print('unique words : ',tokenizer.word_index)

#creating the model

i=Input(shape=(input_shape,))
x=Embedding(vocabulary+1,10)(i)
x=LSTM(10,return_sequences=True)(x)
x=Flatten()(x)
x=Dense(output_length,activation="softmax")(x
) model=Model(i,x)
model.summary()

#commpiling the

model

model.compile(loss="sparse_categorical_crossentropy",optimizer='adam',
m etrics=['accuracy'])

#train the model

train=model.fit(x_train,y_train,epochs=400

) #plotting model accuracy


plt.plot(train.history['accuracy'],label='training set accuracy')
plt.plot(train.history['loss'],label='training set
loss') plt.legend()
plt.title('Model graph after training')
plt.xlabel('Epoch(iterations)',
fontsize=20) plt.ylabel('(%Accuracy)',
fontsize=20)

#Generate Heatmap
import seaborn as
sn
from sklearn.metrics import
classification_report import pandas as pd

#make predictions
model_pred=pd.read_excel("/content/output.xlsx",index_col=[0])
model_pred1=pd.read_excel("/content/Model2_Output.xlsx",index_col=[0])
model_pred.head()

#confusion matrix
confusion_model=pd.crosstab(model_pred.Predicted,model_pred.Actual)
confusion_model1=pd.crosstab(model_pred1.Predicted_class,model_pred1.A
c tual_class)

#heatmap
fig=plt.figure(figsize=(17,9)
) ax1=plt.subplot(121)
sn.heatmap(confusion_model,annot=True,cmap='Blues')
ax1.set_title('Output Model 1')
ax2=plt.subplot(122)
sn.heatmap(confusion_model1,annot=True,cmap='Blues'
) ax2.set_title('Output Model 2')

#sum of diagonal elements


np.diag(confusion_model).sum(
) confusion_model.sum().sum()

#overall accuracy for smodel 1


accuracy=np.diag(confusion_model).sum()/confusion_model.sum().sum()
print('Overall Accuracy : ',accuracy)

#overall accuracy for model 2


accuracy=np.diag(confusion_model1).sum()/confusion_model1.sum().sum()
print('Overall Accuracy : ',accuracy)

for i in
range(confusion_model.shape[0]):
TP=confusion_model.iloc[i,i]
FP=confusion_model.iloc[i,:].sum()-TP
FN=confusion_model.iloc[:,i].sum()-TP
TN=confusion_model.sum().sum()-TP-FP-F
N
accuracy=(TP+TN)/confusion_model.sum().sum(
) precision=TP/(TP+FP)
recall=TP/(TP+FN)
F1_score=(2*precision*recall)/(precision+recall
) print('class : ',confusion_model.index[i])
print('True positive for class '+confusion_model.index[i]+ ': ',TP)
print('False positive for class '+confusion_model.index[i]+ ':
',FP) print('False negative for class '+confusion_model.index[i]+
': ',FN) print('True negative for class '+confusion_model.index[i]+
': ',TN) print('Accuracy : ',accuracy)
print('Precision :
',precision) print('recall :
',recall) print('F1 Score :
',F1_score)

pd.DataFrame(classification_report(model_pred.Actual,model_pred.Predic
t ed,output_dict=True)).T
#pd.DataFrame(classification_report(model_pred1.Actual_class,model_pre
d 1.Predicted_class,output_dict=True)).T

#comparision graph of Simple RNN and


LSTM import numpy as np
import matplotlib.pyplot as plt

# creating the dataset


data = {'Simple RNN':87.2671, 'LSTM':92.32142857142858}
model = list(data.keys())
accuracy =
list(data.values())
fig = plt.figure(figsize = (10,

5)) # creating the bar plot

plt.bar(model, accuracy, color


='blue', width = 0.4)

plt.xlabel("model")
plt.ylabel("Accuracy of the
model")
plt.title("Model Comparision of Simple RNN and
LSTM") plt.show()

#model testing
print('welcome to spark AI chatbot(type exit to quit')

#testing the
model import
random while True:
texts_p=[]
prediction_input=input('you :
') if prediction_input=='exit':
print('Thank
you') break
#removing punctuations and converting into lower case
prediction_input=[letters.lower() for letters in prediction_input
if
letters not in string.punctuation]
prediction_input=''.join(prediction_input
) texts_p.append(prediction_input)

#tokenizing and padding

prediction_input=tokenizer.texts_to_sequences(texts_p)
prediction_input=np.array(prediction_input).reshape(-1)
prediction_input=pad_sequences([prediction_input],input_shape
)

#getting output from model


output=model.predict(prediction_input
) output=output.argmax()

#find the right tag and prediction

response_tag=le.inverse_transform([output])[0]
print("spark :
",random.choice(responses[response_tag]))
APPENDIX B

SCREENSHOTS

Open Anaconda Navigator then click launch Jupiter notebook. Once


Jupiter notebook had launched then any python code can be implemented.

Below are the input data of the dataset

. Figure B1.1: Input format

In the below screen at the final epoch LSTM accuracy is 0.9831%, and now
see the main output in the below screen.

Figure B1.2: Accuracy Iterations

Figure B1.3 : Accuracy Graph


Fig B2.3 Model Summary

Fig B2.4 Model Accuracy

Fig B2.5 : Heatmap


Fig B3.6 Confusion Matrix

Fig B3.7 : Overall accuracy

Fig B3.8 : Classification report of all classes


Fig B4.8 : Output of the model

Fig B4.9 : Comparision graph between Simple RNN and LSTM

In the above graph x-axis represents model and the y-axis represents accuracy
of the model.
APPENDIX D

DATASET USED FOR THE PROJECT

%%writefile content.json

{"intents"
: [
{
"tag":"greetings",
"input":["hello","hi there","nice to meet you","hi","hey there"
,"hi there"],
"responses":[
"hi, welcome",
"this is spark how can i help
you", "hello how may i help you",
"hello my friend, how can i help you"
]
},
{
"tag":"whoareyou",
"input":["who are you?","what is your name?","are you a chatbot
?","what can i call
you?"],
"responses":[
"I am a virtual assistant",
"my name is spark, i am a virtual
assistant", "you can call me spark"
]
},
{
"tag":"ai",
"input":["what is artificial intelligence?","what is ai?","arti
ficial
intelligence?","ai"],
"responses":[
"The theory and development of computer systems able to
perfo rm tasks normally requiring human intelligence, such as visual
percep tion, speech recognition, decision-
making, and translation between languages.",
"Artificial intelligence is the simulation of human
intellige nce processes by machines, especially computer systems.",
"AI is the ability of a machine to display human-
like capabilities such as reasoning, learning, planning and creativit
y. AI enables technical systems to perceive their environment, deal
w ith what they perceive, solve problems and act to achieve a
specific goal."
]
},
{
"tag":"ml",
"input":["what is machine learning?","what is ml?","tell me abo
ut machine
learning?","ml"],
"responses":[
"Machine learning is a branch of artificial intelligence
(AI) and computer science which focuses on the use of data and
algorithms to imitate the way that humans learn, gradually
improving its accura
cy.",
"Machine learning is a subfield of artificial intelligence,
w hich is broadly defined as the capability of a machine to imitate
int elligent human behavior. Artificial intelligence systems are
used to perform complex tasks in a way that is similar to how humans
solve pr oblems.",
"Machine learning (ML) is a type of artificial intelligence
( AI) that allows software applications to become more accurate at
pred icting outcomes without being explicitly programmed to do so.
Machine learning algorithms use historical data as input to predict
new outp
ut values."
]
},
{
"tag":"computer vision",
"input":["what is computer vision?","tell me about computer vis
ion?","computer
vision"],
"responses":[
"A field of artificial intelligence (AI) that enables
compute rs and systems to derive meaningful information from digital
images, videos and other visual inputs.",
"Computer vision is a field of artificial intelligence that
t rains computers to interpret and understand the visual world.
Using d igital images from cameras and videos and deep learning
models, machi nes can accurately identify and classify objects — and
then react to what they see",
"Computer vision is a field of AI that trains computers to
ca pture and interpret information from image and video data. By
applyin g machine learning (ML) models to images, computers can
classify obje cts and respond—
like unlocking your smartphone when it recognizes your face.",
"Computer vision is used to detect and classify objects (e.g.
, road signs or traffic lights), create 3D maps or motion estimation,
and played a key role in making autonomous vehicles a reality. Self-
driving cars collect data on their surroundings from sensors and came
ras, interpret it, and respond accordingly."
]
},
{
"tag":"nlp",
"input":["what is nlp?","what is natural language processing?",
"tell me about natural language processing?","natural language
proces sing?","nlp"],
"responses":[
"The application of computational techniques to the
analysis and synthesis of natural language and speech.",
"Natural language processing (NLP) refers to the branch of
co mputer science—
and more specifically, the branch of artificial intelligence or AI—
concerned with giving computers the ability to understand text and
sp oken words in much the same way human beings can.",
"NLP drives computer programs that translate text from one
la nguage to another, respond to spoken commands, and summarize
large vo lumes of text rapidly—even in real time."
]
},
{ "tag":"computer",
"input":["what is computer?","tell me
about computer?","compute
r"],
"responses":[
"A computer is a device that accepts
information (in the form
of digitized data) and manipulates it for some result based on a
pro gram, software, or sequence of instructions on how the data is
to be processed.",
"A computer is an electronic machine that processes raw
data to give information as output."
]
},
{
"tag":"cpu",
"input":["what is cpu?","tell me
"], about cpu","cpu","types of cpu

"responses":[
"CPU is considered as the brain of
the computer. · CPU perfor
ms all types of data processing operations.",
"Central Processing Unit (CPU) The CPU is the brain of a
comp uter, containing all the circuitry needed to process input,
store dat a, and output results.",
"The major types of CPU are classified as single-core,
dual- core, Quad-core, Hexa core, Octa-core, and Deca core
processor."
]
},
{
"tag":"alu",
"input":["what is alu?","tell me about alu?","natural language
processing?","alu"],
"responses":[
"An arithmetic-
logic unit is the part of a central processing unit that carries out
arithmetic and logic operations on the operands in computer
instructi on words.",
"An arithmetic logic unit (ALU) is a digital circuit used to
perform arithmetic and logic operations. It represents the
fundamenta l building block of the central processing unit (CPU) of
a computer."
,
"The ALU performs simple addition, subtraction,
multiplicatio n, division, and logic operations, such as OR and AND.
The memory sto res the program's instructions and data."
]
},
{ "tag":"python",
"input":["what is python?","modules in
python","python","module
s"],
"responses":[
"Python is an interpreted,
object-oriented, high-
level programming language with dynamic semantics.",
"python modules are os,sys,data time,math,random,JSON"
]
},
{
"tag":"html",
"input":["html","what is html?","tell me about
html"], "responses":[
"HTML is an acronym which stands for Hyper Text Markup Langua
ge which is used for creating web pages and web applications",
"HTML is the standard markup language for creating Web pages.
HTML describes the structure of a Web page. HTML consists of a
serie s of elements."
]
},
{
"tag":"sql",
"input":["what is
sql?","sql"], "responses":[
"SQL stands for Structured Query Language. It is the
standard language used to maintain the relational database and
perform many d
ifferent data manipulation operations on the data.",
"it is the standard language for relational database
manageme nt systems. SQL statements are used to perform tasks such
as update d ata on a database, or retrieve data from a database."
]
},
{
"tag":"types in sql",
"input":["what are the types in sql","types in
sql"], "responses":[
"Data Definition Language, Data Query Language, Data Manipula
tion Language, Data Control Language,Transaction Control Language."
]
},
{
"tag":"dbms",
"input":["what is dbms?","tell me about
dbms?","dbms"], "responses":[
"DBMS is a collection of programs that facilitates users to c
reate and maintain a database.",
"A database management system (or DBMS) is essentially
nothin g more than a computerized data-keeping system"
]
},
{
"tag":"types in dbms",
"input":["types in dbms","dbms
types"], "responses":[
"Relational database,Object oriented database,Hierarchical da
tabase,Network database."
]
},
{
"tag":"oops",
"input":["what is
oops","oops"], "responses":[
"Object-
oriented programming is based on the concept of objects In object-
oriented programming data structures, or objects are defined, each
wi th its own properties or attributes"
]
},
{
"tag":"pillars of oops",
"input":["four pillars of oops","pillars of
oops"], "responses":[
"Abstraction ,Inheritance ,Polymorphism ,Encapsulation"
]
},
{
"tag":"cancer",
"input":["what is a
cancer","cancer"], "responses":[
"Cancer is a disease caused when cells divide uncontrollably
and spread into surrounding tissues"
]
},
{
"tag":"causes of cancer",
"input":["main causes of cancer","cause of
cancer"], "responses":[
"Leading risk factors for preventable cancers are smoking, ge
tting too much ultraviolet (UV) radiation from the sun or tanning
bed s, being overweight or having obesity, and drinking too much
alcohol. "
]
},
{
"tag":"cardiology",
"input":["what is cardiology","cardiology","What is the role of
cardiology"],
"responses":[
"Cardiology is a medical specialty and a branch of internal
m edicine concerned with disorders of the heart.",
"Cardiology is the study of the heart. In medicine,
cardiolog y is a branch of medicine that deals with disorders of the
heart and the cardiovascular system.",
"Cardiologists diagnose, assess and treat patients with
defec ts and diseases of the heart and the blood vessels, which are
known a s the cardiovascular system."
]
},
{
"tag":"cardiovascular disease",
"input":["what is cardiovascular disease","cardiovascular disea
se","tell me about cardiovascular
disease","cvd"], "responses": [
"Heart and blood vessel disease (also called heart disease)
i ncludes numerous problems, many of which are related to a process
cal led atherosclerosis",
"Cardiovascular disease (CVD) is a general term that
describe s a disease of the heart or blood vessels. Blood flow to
the heart, b rain or body can be reduced because of a: blood clot
build-
up of fatty deposits inside an artery, leading to the artery
hardenin g and narrowing"]
},
{
"tag":"symptoms",
"input": ["symptoms of cardiovascular disease","main cause of
c ardiovascular disease"],
"responses":[
"Chest pain, chest tightness, chest pressure and chest
discom fort (angina)",
"Shortness of breath.Pain in the neck, jaw, throat, upper
bel ly area or back,Pain, numbness, weakness or coldness in the legs
or a rms if the blood vessels in those body areas are narrowed.",
"High blood pressure, high blood cholesterol, and smoking
are key risk factors for heart disease"]
},
{
"tag":"effects",
"input":["effects of cardiovascular disease","effects of
cvd"], "responses":[
"The most important behavioural risk factors of heart
disease and stroke are unhealthy diet, physical inactivity, tobacco
use and
harmful use of alcohol.",
"The effects of behavioural risk factors may show up in
indiv iduals as raised blood pressure, raised blood glucose, raised
blood l ipids, and overweight and obesity",
"Patients with history of CVD may experience various
physical and emotional symptoms such as fatigue, edema, and sleeping
difficul ties that limit their physical and social activities which
will in tu
rn result in poor quality of life."]
},
{
"tag":"treatments for cardiovascular disease",
"input":["treatments for cardiovascular disease"],
"responses":["Eat a healthy diet. Maintaining a heart healthy
d
iet is key for preventing heart disease.Exercise regularly ,Control
y our blood pressure ,Keep cholesterol under control ,Maintain a
health y weight,Limit alcohol intake ,Don't smoke ,Manage stress."]
},
{
"tag":"ophthalmology",
"input":["what is
ophthalmology","ophthalmology"], "responses":[
"An ophthalmologist is a medical or osteopathic doctor who
sp ecializes in eye and vision care",
"Ophthalmology is a surgical subspecialty within medicine
tha t deals with the diagnosis and treatment of eye disorders."]
},
{
"tag":"types of ophthalmology diseases",
"input":["types of ophthalmology
ses"], diseases","ophthalmology disea

"responses":[
"Refractive Errors ,Age-
Related Macular Degeneration ,Cataract ,Diabetic Retinopathy
,Glaucom a ,Amblyopia ,Strabismus.",
"These refractive errors are the most common eye problems
are Refractive errors include nearsightedness (myopia),
farsightedness (
hyperopia) and distorted vision at all distances (astigmatism)."]
},
{
"tag":"treatments for ophthalmology",
"input":["treatments for
ophthalmology","treatment"], "responses":[
"Prescription of glasses or contact lenses to improve vision
,Medical treatment with pharmaceutical agents ,Surgical procedures
su ch as complex microsurgery.",
"Ophthalmologists prescribe medications to treat eye diseases
, implement laser therapy, and perform surgery when needed.
Ophthalmo logists provide both primary and specialty eye care -
medical and sur gical."]
},
{
"tag":"dermatology",
"input":["what is
dermatology","dermatology"], "responses":[
"A dermatology is a medical doctor who specializes in
treatin g the skin, hair, and nails. Dermatologists care for people
of all ag es",
"Dermatology is the branch of medicine dealing with the
skin. It is a speciality with both medical and surgical aspects. A
dermato logist is a specialist medical doctor who manages diseases
related to
skin, hair, nails, and some cosmetic problems."]
},
{
"tag":"paraben",
"input":["what is
paraben","paraben"], "responses":[
"Parabens are a class of widely used preservatives in
cosmeti c and pharmaceutical products. Chemically, they are a series
of parah ydroxybenzoates or esters",
"Parabens are a group of chemicals widely used as
artificial preservatives in cosmetic and body care products."]
},
{
"tag":"aws",
"input":["what is
aws","aws"], "responses":[
"AWS (Amazon Web Services) is a comprehensive, evolving
cloud computing platform provided by Amazon that includes a mixture
of inf
rastructure-as-a-service (IaaS), platform-as-a-
service (PaaS) and packaged-software-as-a-service (SaaS)
offerings.", "Amazon Web Services (AWS) is the world's most
comprehensive
and broadly adopted cloud platform, offering over 200 fully
featured services from data centers globally."]
},
{
"tag":"cloud computing",
"input":["what is cloud computing","cloud
computing"], "responses":[
"Cloud computing is the on-
demand delivery of IT resources over the Internet with
pay-as-you- go pricing",
"Cloud computing is the on-
demand availability of computer system resources, especially data
sto rage (cloud storage) and computing power, without direct active
manag ement by the user."]
},
{
"tag":"electrical engineering",
"input":["what is electrical
engineering","eee"], "responses":[
"Electrical engineering is an engineering discipline
concerne d with the study, design, and application of equipment,
devices, and systems which use electricity ,electronics, and
electromagnetism",
"Electrical engineers design, develop, test and manage the
ma nufacturing of electrical equipment, from electric motors and
navigat ion systems to power generation equipment and the electrical
componen ts of vehicles and personal devices."]
},
{
"tag":"ece",
"input":["what is
ece","ece"], "responses":[
"ECE is Electronics and Communication Engineering. ECE is an
engineering branch that includes the production, design, research
and
testing of electronic devices and technology issues related to
telec ommunications systems, electronics, computers and related
industrial sectors.",
"Electronics and Communications Engineering (ECE) involves
re searching, designing, developing, and testing electronic
equipment us ed in various systems. Electronics and Communications
engineers also conceptualize and oversee the manufacturing of
communications and bro adcast systems."]
},
{
"tag":"cse",
"input": ["what is
"], cse","cse","computer science and
engineering

"responses":[
"The full form of CSE is Computer
Science Engineering. It is
an engineering course that involves several computer science
aspects essential for the creation of the computer system.",
"Computer Science engineering is a course that deals with
var ious aspects of computer science and its applications such as
designi ng, developing, and implementing softwares, websites,
networking, alg orithms, and more."]
},
{
"tag":"physics",
"input":["what is
physics","physics"], "responses":[
"Physics is the branch of science that deals with the
structu re of matter and how the fundamental constituents of the
universe int eract.",
"Physics is the natural science that studies matter, its
fund amental constituents, its motion and behavior through space and
time,
and the related entities."]
},
{
"tag":"chemistry",
"input": ["what is
chemistry","chemistry"], "responses":[
"Chemistry is a branch of natural science that deals
principa lly with the properties of substances, the changes they
undergo, and the natural laws that describe these changes.",
"Chemistry is a science that deals with the composition,
stru cture, and properties of substances and with the changes that
they go
through. : chemical composition, properties, or processes."]
},
{
"tag":"web development",
"input":["what is web development","web
development"], "responses":[
"Web development refers to the creating, building, and
mainta ining of websites. It includes aspects such as web design,
web publis hing, web programming, and database management.",
"It is the creation of an application that works over the
int ernet i.e. websites.",
"Web development is the work involved in developing a
website for the internet or an interanet (a private network). Web
developmen t can range from developing a simple single static page
of plain next to complex web application, electronic businesses, and
social networ
k services."]
},
{
"tag":"paralysis",
"input":["what is
paralysis","paralysis"], "responses":[
"Paralysis occurs when you're unable to make voluntary
muscle movements. A nervous system problem causes paralysis.",
"Paralysis is the loss of the ability to move some or all of
your body. It can have lots of different causes, some of which can
be
serious."]
},
{
"tag":"brain tumor",
"input":["what is brain tumor","brain
tumor"], "responses":[
"A brain tumor is a collection, or mass, of abnormal cells
in your brain. Your skull, which encloses your brain, is very
rigid.",
"A brain tumor is a mass or growth of abnormal cells in your
brain. Many different types of brain tumors exist. Some brain tumors
are noncancerous (benign), and some brain tumors are cancerous
(malig nant)."]
},
{
"tag":"lung cancer",
"input": ["what is lung cancer","lung
cancer"], "responses":[
"Cancer is a disease in which cells in the body grow out of
c ontrol. When cancer starts in the lungs, it is called lung
cancer.",
"Lung cancer is a type of cancer that begins in the lungs.
Yo ur lungs are two spongy organs in your chest that take in oxygen
when
you inhale and release carbon dioxide when you exhale."]
},
{
"tag":"blood cancer",
"input":["what is blood cancer","types of blood
cancer"], "responses":[
"Blood cancer is a type of cancer that affects your blood
cel ls. Leukaemia, lymphoma and myeloma are some of the most common
types
of blood cancer.",
"Lymphoma ,Myelodysplastic Syndromes (MDS)
,Myeloproliferativ e Disorder (MPD) ,Multiple Myeloma."]
},
{
"tag":"skin cancer",
"input":["what is skin
cancer","cancer"], "responses":[
"Skin cancer is the out-of-
control growth of abnormal cells in the epidermis, the outermost
skin layer, caused by unrepaired DNA damage that triggers.",
"Skin cancer that forms in melanocytes (skin cells that make
pigment) is called melanoma. Skin cancer that forms in the lower
part
of the epidermis (the outer layer of the skin) is called basal
cell carcinoma."]
},
{
"tag":"malaria",
"input":["what is
malaria","malaria"], "responses":[
"Malaria is a disease caused by a parasite. The parasite is
s pread to humans through the bites of infected mosquitoes."]
},
{
"tag":"virus",
"input":["what is
virus","virus"], "responses":[
"A virus is an infectious microbe consisting of a segment
of nucleic acid (either DNA or RNA) surrounded by a protein coat",
"A virus is a submicroscopic infectious agent that
replicates only inside the living cells of an organism."]
},
{
"tag":"population",
"input":["population of india","india
population"], "responses":["140.76 crores"]
},
{
"tag":"largest country",
"input":["which is the largest country in the world","largest c
ountry in the world"],
"responses":["russia"
]
}
]
}
APPENDIX D

STUDENT CONTRIBUTION
S.No ACTIVITY 19K61A0549 19K61A0530 19K61A0505 20K65A0506
1 Title Conformation ✔ ✔ ✔ ✔
2 Literature Survey ✔ ✔ ✔ ✔
3 Problem ✔ ✔ ✔ ✔
Formulation
4 Requirements ✔ ✔ ✔ ✔
Gathering
5 Designing ✔ ✔
6 Implementation ✔ ✔
7 Documantation ✔ ✔ ✔ ✔
APPENDIX E

PO, PSO, PEO, AND CO RELEVANCE WITH PROJECT

CO-PO MAPPING SHEET


COURSE OUTCOMES

OUTCOME
DESCRIPTION
NO
Develop problem formation and design skills for engineering and real-
CO1
world problems.
Collect and Generate ideas through literature survey on current
CO2 research areas which help to analyse and present to impart knowledge
in different fields.
Import knowledge on software & hardware to meet industry
CO3
perspective needs and standards.
Create interest to carry out research on innovative ideas as a lifelong
CO4
learning.
Ability to work with team, and enrich presentation and communication
CO5
skills.
CO6 Create a platform that makes students employable.

SUMMARY OF CO MAPPING TO PROGRAM OUTCOMES

COs/POs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2

CO1 3 0 0 1 0 1 1 1 3 3 0 1 0 0

CO2 3 3 0 0 0 2 0 0 3 2 0 0 0 0

CO3 2 0 1 1 3 0 0 0 3 2 0 0 0 0

CO4 3 0 0 3 3 0 3 1 3 3 1 1 0 0

CO5 2 0 0 0 2 0 0 0 3 3 0 3 0 0

CO6 2 1 0 0 3 1 0 3 3 2 2 2 0 0

Overall
3 1 1 1 2 1 1 0 3 2 1 1 0 0
Course
PROGRAM OUTCOMES (POs)

POs PROGRAM OUTCOMES RELEVANCE


Engineering Knowledge:
This project needs a mathematics and
Apply knowledge of mathematics, Computer Science and Engineering
PO1 science, engineering fundamentals, andan specialization background to perform
engineering specialization to the solution calculations in the classification task.
of complex engineering problems.
Problem Analysis:
Identity, formulates, research literature,
and analyze complex engineering For this project ruderous literature
PO2 problems reaching substantiated survey is conducted to analyze the
conclusions using first principles of existing systems problems.
mathematics, natural sciences,
and engineering sciences.
Design/ Development of Solutions:
Design solutions for complex Once the formulation of the problem
engineering problems and design system has been completed, the design of
PO3 the solution relevant to the problem
components or processes that meet
is created to meet the needs of the
specified needs with appropriate problem in all aspects.
consideration for public health and
safety, cultural, societal, and
environmental considerations.
Conduct investigations of complex
problems:
Referred to similar kinds of
Using research-based knowledge and
experiments to gain the knowledge
PO4 research methods including design of
of fixing parameters and framing the
experiments, analysis, and interpretation
conclusions.
of data, and synthesis of the information
to provide valid conclusions.
Modern Tool Usage:
Create, select and apply appropriate
techniques, resources, and modern Recent methods like Jupiter notebook
PO5 engineering and IT tools including have been used to solve the stated
prediction and modeling to complex problem
engineering activities with an
understanding of the limitations.
The Engineer and Society:
Apply to reason informed by the This problem provides a solution to
PO6 contextual knowledge to assess societal, the people without depletion of any
health, safety, legal and cultural issues cultural, social, health, safety, and
and the consequent responsibilities legal issues.
relevant to professional engineering
practice.
Environment and Sustainability:
Understand the impact of professional
engineering solutions in societal and This Project doesn’t deteriorate any
PO7
environmental contexts and demonstrate sort of environmental issues.
knowledge of and need for sustainable
development.
Ethics:
This project has been executed by
Apply ethical principles and commit to
PO8 following proper ethics as stated in
professional ethics and responsibilities
the engineering practice.
and norms of engineering practice.
Individual and Team Work:
This project is carried out with
Function effectively as an individual, and
PO9 collective teamwork by making the
as a member or leader in diverse teams
entire project into proper segments.
and multidisciplinary settings.
Communication:
Communicate effectively on complex
engineering activities with the
engineering community and with society Complete information related to the
PO10 at large, such as being able to comprehend project has been documented for clear
and write effective reports and understanding.
design documentation,
make effective
presentations and give and receive clear
instructions.
Life-long Learning:
Recognize the need for and have the
PO11 preparation and ability to engage in
----
independent and life-long learning in the
broadest context of technological change.
Project Management and Finance:
Demonstrate knowledge and
This work can be enhanced to a larger
understanding of engineering and
extent concerning time and other
PO12 management principles and apply these to
factors.
one’s work, as a member and leader in a
team, to manage projects and in
multidisciplinary environments.
PROGRAM SPECIFIC OUTCOME (PSOs)

PSOs Program Specific Outcome Relevance

Mobile & Web Application


PSO1 Development: Ability to develop -----
mobile & web applications using
J2EE, Android, and J2ME.
Cloud Services: To deploy
virtualized and cloud-based services -----
PSO2
in the organization.

PROGRAMME EDUCATIONAL OBJECTIVES (PEOs)

Programme Educational
RELEVANCE
PEOs Objectives
To get the project executed, all
Graduates will be able to analyze, the team have done analysis and
PEO 1 design, and develop advanced research-oriented surveys to
computer applications to provide a frame the solution and identify
solution to real-world problems. the limitations.

As implemented the problem


with Deep Learning, is the latest
Graduates are well-trained, confident,
trend that leads to being well
PEO 2 research-oriented, and industry-ready accustomed to the recent
professionals who are intellectual,
technological standards as per
ethical, and socially committed.
industry requirements.

After completing the project


successfully, all the team
Graduates will have the technical,
members can be able to reach a
PEO 3 communication skills and characterthat satisfactory level in explaining
will prepare them for technical and
technical aspects with effective
leadership roles.
communication.
COURSE OUTCOME (COs)

POs, PSOs, and


COs Course Outcome
PEOs Mapped
Develop problem formation and design skills for PO1, PO2,
CO1
engineering and real-world problems PO3, PSO2
Collect and Generate ideas through literature surveys PO2, PO3,
CO2 on current research areas which help to analyze and PO5, PO6
Import knowledge of software & hardware to meet PO5, PO7,
CO3
industry perspective needs and standards. PO8, PO9
Create interest to research innovative ideas as lifelong
CO4 PO11
learning.
Ability to work with a team, and enrich presentation
CO5 PO10
and communication skills.
PO5, PO9,
CO6 Create a platform that makes students employable. PO11, PO12,
PSO2
RELEVANCE TO POs

CO PO PI Relevance

Apply different statistics and numerical techniques to


PO1 1.2.1
solve the problem.

Understand the problem and applied the


PO4 4.4.2
proper algorithm.

This is challenges state to assess societal, safety and


PO6 6.4.1
legal issues.

Identified the risks/impacts in the life-cycle of an


PO7 7.3.1
product and activity.

Identified situations of unethical professional conduct


PO8 8.3.1
and propose ethical alternatives.
CO1

PO9 9.5.2 This work is carried out by all the team members.

PO10 10.4.2 Produced the work in well-structured form.

This work can be enhanced to larger extent with


PO12 12.5.2
respect to the time and other factors.

Uses the engineering fundamentals to complete


PO1 1.6.1
the work.

Compared and select alternative solutions/methods to


0PO2 2.6.4
select the best methods.
Interpret legislation, regulations, codes, and
PO6 6.4.1 standards relevant to your discipline and explain
CO2 their contribution to the protection of the public.

PO9 9.5.2 Treat other team members respectfully.

PO10 10.4.2 Produced the work in a well-structured form.

Applied the knowledge of discrete structures, linear


PO1 1.2.1 algebra, statistics, and numerical techniques to solve
problems.
Ability to produce a variety of potential design
PO3 3.6.2
solutions suited to meet functional requirements.

Ability to choose appropriate hardware/software


PO4 4.4.3
tools to conduct the experiment.

Identify the strengths and limitations of tools for (i)


acquiring information, (ii) modelling and simulating,
PO5 5.5.1
(iii) monitoring system performance, and
CO3 (iv) creating engineering designs.
Implement the norms of practice (e.g. rules, roles,
PO9 9.4.2 charters, agendas, etc.) of effective team work, to
accomplish a goal.

Read, understand and interpret technical


PO10 10.4.1
and nontechnical information.

Apply laws of natural science to an engineering


PO1 1.5.1
problem.

Critically analyse data for trends and correlations,


PO4 4.6.2
stating possible errors and limitations.

Verify the credibility of results from tool use with


PO5 5.6.2 reference to the accuracy and limitations, and the
assumptions inherent in their use.

Describe management techniques for sustainable


PO7 7.4.1
development

CO4 Examine and apply moral & ethical principles to


PO8 8.4.2
known case studies

PO9 9.5.2 Treat other team members respectfully

Deliver effective oral presentations to technical and


PO10 10.5.2
nontechnical audiences

Analyze different forms of financial statements to


PO11 11.4.2
evaluate the financial status of an engineering project
PO1 1.6.1 Apply engineering fundamentals

Demonstrate proficiency in using discipline


PO5 5.5.2
specific tools.

PO9 9.5.3 Listen to other members ure in difficult situations

CO5 Listen to and comprehend


PO10 10.5.1
information, instructions, and viewpoints of
others
Analyze sourced technical and popular
PO12 12.6.2 information for feasibility, viability, sustainability,
etc.
Apply theory and principles of computer science
PO1 1.7.1
engineering to solve an engineering problem.

PO2 2.6.2 Identifies functionalities and computing resources.

Discuss limitations and validate tools, techniques


PO5 5.6.1
and resources

Identify and descrsibe various engineering roles;


PO6 particularly as pertains to protection of the public
6.3.1
and public interest at global, regional and local
level.

Identify situations of unethical


PO8 8.3.1
professional conduct and propose ethical
alternatives.
Demonstrate effective communication, problem
PO9 9.5.1
CO6 solving, conflict resolution and leadership skills

Listen to and comprehend


PO10 10.5.1
information, instructions, and viewpoints of
others
Identify the tasks required to complete an
PO11 11.6.1 engineering activity, and the resources required to
complete the tasks.

Source and comprehend technical literature and


PO12 12.6.1
other credible sources of information.
CO PSO Relevance

CO1 - -

CO2 - -

CO3 - -

CO4 - -

CO5 - -

CO6 - -

D9

You might also like