0% found this document useful (0 votes)
10 views26 pages

AI Based Chatbot Using NLP to Facilitate Software Development Process

The project report titled 'AI Based Chatbot using NLP to Learn Software Development' by Chandan Kumar outlines the design and implementation of a chatbot system that utilizes Natural Language Processing (NLP) and Artificial Neural Networks (ANN) to assist students in learning software development. The chatbot aims to automate responses to user queries, enhancing efficiency in educational contexts. The report includes a comprehensive literature review, system design, implementation details, and future work suggestions.

Uploaded by

SoumyaRajGiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views26 pages

AI Based Chatbot Using NLP to Facilitate Software Development Process

The project report titled 'AI Based Chatbot using NLP to Learn Software Development' by Chandan Kumar outlines the design and implementation of a chatbot system that utilizes Natural Language Processing (NLP) and Artificial Neural Networks (ANN) to assist students in learning software development. The chatbot aims to automate responses to user queries, enhancing efficiency in educational contexts. The report includes a comprehensive literature review, system design, implementation details, and future work suggestions.

Uploaded by

SoumyaRajGiri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

AI BASED CHATBOT USING NLP TO LEARN

SOFTWARE DEVELOPMENT

A PROJECT REPORT

Submitted by

Chandan Kumar – 1801227171

in partial fulfillment for the award of the degree

of

BACHELOR OF TECHNOLOGY

in

Electronics and Telecommunication Engineering

Department of Electronics and Telecommunication Engineering

C.V. RAMAN GLOBAL UNIVERSITY

BHUBANESWAR - ODISHA – 752054

May 2022
C.V. RAMAN GLOBAL UNIVERSITY

BHUBANESWAR – ODISHA – 752054

BONAFIDE CERTIFICATE

Certified that this project report “AI Based Chatbot using NLP to Learn
Software Development” is the bonafied work of “Chandan Kumar” who
carried out the project work under my supervision.

SIGNATURE SIGNATURE
Dr. Prabodh Kumar Sahoo
Head of the Department Supervisor
ETC

i
C.V. RAMAN GLOBAL UNIVERSITY

BHUBANESWAR – ODISHA – 752054

CERTIFICATE OF APPROVAL

This is to certify that we have examined the project entitled “AI Based Chatbot
using NLP to Learn Software Development” submitted by Chandan Kumar,
Registration No. – 1801227171, C.V. Raman Global University, Bhubaneswar
Odisha. We here by accord our approval of it as a major project carried out and
presented in a manner required for its acceptance for the partial fulfillment for
the Bachelor Degree of Technology in Electronics and Tele-Communication
Engineering for which it has been submitted. This approval does not
necessarily endorse or accept every statement made, opinion expressed or
conclusions drawn as recorded in this major project, it only signifies the
acceptance of the major project for the purpose it has been submitted.

Project Guide External Examiner Internal Examiner

ii
ACKNOWLEDGEMENT

I take this opportunity to express my deep sense of gratitude to my thesis


supervisor, “--” for constant guidance and insightful comments during the
course of work. I shall always cherish my association with him for his constant
encouragement and freedom to thought and action that rendered to me
throughout the work.

I also wish to express my sincere thanks to prof. Prabodh Kumar Sahoo,


Head of the Department and all the faculty members of Electronics and
Telecommunication Engineering Department for their cooperation and valuable
suggestions in each stage of the thesis, which lead to successful completion of
my work.

Finally, I deem it a great pleasure to thank one and all who helped me directly
or indirectly in carrying out this thesis report.

iii
TABLE OF CONTENTS

CHAPTER No. TITLE PAGE No.

ABSTRACT VI

LIST OF FIGURES VII

LIST OF ABBREVIATIONS VIII

1. INTRODUCTION 1

1.1. Objective 2

2. LITERATURE REVIEW 3

2.1. Related Works 3

2.2. Frameworks 3-4

2.3. Artificial Neural Networks 4

3. SYSTEM DESIGN 5

3.1. Chatbot Design 5

3.2. Website Design 6

4. IMPLEMENTATION & TESTING 7

4.1. Corpus or Training Data 7

4.2. Data Pre – Processing 7

4.2.1 Text Case Handling 7

4.2.2 Tokenization 7

iv
4.3. Stemming 8

4.4. Generate Bag of Words 8

4.5. One Hot Encoding 8–9

4.6. Text Classifier 9

4.7. Chat Utility 9

4.8. Training Results 9

5. RESULTS & DISCUSSION 10 – 14

6. FUTURE WORKS 15

7. CONSLUSION 16

REFERENCES 17

v
ABSTRACT

Dialogue generation or intelligent conversational agents like chatbot system


attract huge interest in the recent years in many different fields. It is a computer
program, programmed in such a way that is capable of having a human-like
conversation with a user by receiving and sending text messages for the purpose
of automating a process. Chatbots can range from simple to advance.

Chatbots uses deep learning, natural language processing or different machine


learning techniques. These agents are generally used in an attempt to increase
the efficiency and shortening the process execution time replacing the human to
human conversation with a human to machine conversations and queries in
natural language. Earlier chatbots were used mainly by business firms but
slowly it is gaining popularity in education industry as well.

This project provides an interface that can solve queries of students while
learning the most in-demand technologies like Software Development, Website
Development etc. This thesis demonstrates and presents the design and
development of a Learning Chatbot software integrated with a website that
handles queries through defined intents. The thesis covers the chatbot system
with Artificial Neural Network (ANN) for dealing the language part and
predicting the answers. The aim is to have a balanced user interface that is easy
to access and customized to all the target users.

vi
LIST OF FIGURES

Fig. No. Description Page No.

1. Layers of Neural Network 4

2. Block Diagram of the Chatbot 5

3. Tokenization 7

4. Stemming 8

5. Bag of Words 8

6. One Hot Encoding 9

7. Training Results 9

8. Home Page of the Website 10

9. About Us Page 10

10. Contact Us Page 11

11. FAQ Page 11

12. Chatbot Utility Page 12

13. Initial Conversation 1 12

14. Initial Conversation 2 13

15. Initial Conversation 3 13

16. Initial Conversation 4 14

vii
LIST OF ABBREVIATIONS

Sl. No. Abbreviations Full Form

1. AI Artificial Intelligence

2. ANN Artificial Neural Network

3. BOW Bag of Words

4. CSS Cascading Style Sheets

5. FAQ Frequently Asked Question

6. HTML Hyper Text Markup Language

7. NLG Natural Language Generation

8. NLP Natural Language Processing

9. NLU Natural Language Understanding

10. PHP Hypertext PreProcessor

viii
CHAPTER – 1

INTRODUCTION

A chatbot is a piece of program that directs a discussion by means of printed techniques.


Such undertakings are consistently planned to convincingly reproduce how a human would
carry on as a conversational associate. Chatbot works by analysing and identifying the intents
of the user’s request to extract relevant entities. They work by adopting NLU and NLP
methods. Natural Language Understanding (NLU) is the capacity of the chatbot to
comprehend a human.

NLU follows three specific concepts. They are entities, context, and expectations. Entities
represents an idea to the chatbot. For example, it may be a refund system in an e-commerce
chatbot. Setting implies when a characteristic language understanding calculation identifies
the solicitation and it has no chronicled background of discussion, it won't have the option to
review the solicitation to give the reaction. Assumptions implies Bot should have the option
to fulfil the client assumptions when they make ask for or ask a question client says sends a
request.

Natural Language Processing (NLP) bots are designed to convert the text or speech inputs of
the user into structured data. The information is additionally used to pick an applicable
answer. It comprises Tokenization, Sentiment Analysis, Normalization, Entity Recognition,
and Dependency Parsing.

Types of chatbots:
The chatbots are of two types:
 Rule based chatbot.
 AI chatbot

Rule Based chatbot are the one which works on the set of predefined rules. In this sort of
bots, discussions map out to imagine what the user may ask and how the chatbot should
respond. They even can’t answer the question outside their scope, like outside the predefined

1
set of rules. They don’t gain from the historical backdrop of discussions. These bots are used
as an FAQ resource.

The AI software powered chatbots use both machine learning and NLP to provide a more
conversational experience. AI powered chatbots also learn with more interactions using a
process based on human reasoning. Machine learning describes algorithms specifically built
to self-improve over time. The algorithm takes in an analyses data based on the performance
of the platform. NLP accounts for the human nuances of the average conversation. It allows
the chatbot to process the context surrounding even a simple question, using inputs that can
range from user credentials to the type of language used.

1.1 Objectives
 The main objective of a chatbot is to engage with a user and provide the necessary
information which has been asked.
 But as the query length increases the accuracy decreases. So another objective is to
increase the accuracy of the chatbot so that if the user gives his/her query which is
long or comprises multiple sentences the chatbot gives an intelligent reply.

2
CHAPTER – 2

LITERATURE REVIEW

In today’s era digital technology is making our life simple and convenient. Either its finance,
retail, sports, transport, education or health care industry, technology has played an
exceptional role. Let’s take an example of banking industry. It contains multiple electronic
delivery channels to provide services to their customers, one of them is the facility of online
banking. People no more required to wait in the long queues to avail the banking services,
they can now control the bank through their phone. Artificial Intelligence is substantially
changing the world. Banks implement technology to strengthen their processing capacity,
acquire a larger market capital with customer base and expand the services they could offer.
It leads to a better customer experience, assistance and satisfaction of another level to the
customer. The chatbots plays an important role in providing better assistance to the
customers.

Chatbots can analyses and understand not only the content but also the context of the
customer’s questions. As the thesis involves various terms like chatbots, perception and
attitude it becomes imperative to explain each of them. Chatbots are defined as an artificially
conversational agent which is enough intelligent to initiate and simulate human like
conversation.

2.1 Related Work

A lot of work has already been done in this field including the development of conversational
specialist framework. Apart from traditional chatbot development techniques that use rule
based techniques, or simple machine learning algorithms. Many chatbots uses advanced
Natural Language Processing (NLP) techniques and Deep Learning Techniques such as
Artificial Neural Network (ANN).

2.2 Frameworks

There are many frameworks developed by different giants in the field of Artificial
Intelligence for creating and integrating bots. They are:
 Botkit from Howdy, based on Node.js. It provides different NLP services, messaging
platforms and databases.
 Chatterbot – it is a python library to implement conversational dialog engine for
chatbots using NLP and provides training and logic adapter to match the user input
3
against the training data.
 Botpress – it is a framework for creating bots using independent modules and third
parties.
 BotMan – it is a PHP library to build chatbot that can be used by itself or in a Laravel-
based bundle and supports several popular messaging channels as well as own drivers.

2.3 Artificial Neural Network (ANN)

ANN is derived from Biological Neural Networks that develop the structure of human brain.
It contains neurons that are interconnected to one another in various layers of the networks.
These neurons are known as nodes.

Fig. No. – 1: Layers of Neural Network

Input Layer: It accepts inputs in several different formats provided by the programmer.

Hidden Layer: It is present in-between input and output layers. It performs all the
calculations to find hidden features and patterns.

Output Layer: The input goes through a series of transformations using the hidden layer,
which finally results in output that is conveyed using this layer.
Chapter – 3

SYSTEM4 DESIGN

3.1 Chatbot Design

This system is designed considering the three-tier architecture of Software Development. It


contains a presentation layer where all the interactions of the chatbot with the user happens.
The second is the application layer where the intents are processed and responses are
predicted, the third and the last layer is the data layer it stores all the intents which helps the
bot to predict the output based on the inputs from the user.

Fig. No. – 2: Block Diagram of the chatbot

This block diagram depicts how the connection between different layers are done and what
processes are performed in a specific layer.

In the presentation layer the user input his/her query and gets the output of that query from
the bot.
In the application layer the query received from the user is processed by the NLP model and
depending on the intents data in data layer the response of the chatbot is predicted by the
NLG model and that response is displayed back to the user in the presentation layer.

3.2 Website Design


5
Every chatbot needs a platform for hosting. It may be an App, a website, facebook, whatsapp,
messenger etc. In this project, the chatbot will be hosted on a website.

The website is designed using the fundamental languages for website development like
HTML, CSS and a little amount of JavaScript. The website contains a navigation menu
through with users can navigate to and browse content of different parts of the website.

The chatbot is linked to the website using the flask server. The chat mode can be activated by
clicking on the message icon on the bottom right corner of the website. The chatbot has its
own interface designed using the same technology.
Chapter – 4

IMPLEMENTATION
6
& TESTING
This chatbot system has been implemented in several steps. These are:

4.1 Corpus or Training Data

Corpus means the data that could be used to train the NLP model to understand the human
language as text or speech and reply using the same medium. Corpus is usually huge data
with a lot of human interactions.

Corpus can be designed using one of the following methods:

 Manual
 Accumulated over time in an organised fashion

4.2 Data Pre – Processing

4.2.1 Text Case Handling

Before applying the NLP technique, the case of the corpus is converted either to upper
or the lower case. This will avoid any misrepresentation and misinterpretation of
words if spelt under lower or upper case.

4.2.2 Tokenization

Tokenization refers to the process of transforming plaintext data into a string of


characters known as tokens. It is one of the foremost step of Natural Language
Processing (NLP). It is important to develop the vocabulary of the machine learning
model.
Fig. No. – 3: Tokenization

4.3 Stemming

Stemming is done to find the similarity between words with the same root words. It helps in
7
reducing the bag or words by accessing similar words with their corresponding root words.

Fig. No. – 4: Stemming

4.4 Generate BOW (Bag of Words)

Since most of the statistical algorithms work with numerical data, therefore it is mandatory to
convert text into numbers. So it can be said that the bag of word is the representation of
words into vectors of numbers 0 (zero) and 1 (one). If the token is present in the given
original sentence the block corresponding to that token for the particular sentence will be
marked as 1 else 0.

Fig. No. – 5: Bag of Words

4.5 One Hot Encoding


One Hot Encoding is a process of converting a categorical data variable so they can be
provided to machine learning algorithms to improve predictions. Categorical data refers to
variables that are made up of label values, for e.g, a “color” variable could have the values of
“red”, “blue”, “green” etc. Most of the machine learning algorithm require any inputs or
outputs variables to be a number. This means that any categorical data must be mapped to
integers. With one-hot, each categorical value is converted into a new categorical column and
assign a binary value of 1 or 0 to those columns. All the values are zero, and the index is
marked with a 1. 8

Fig. No. – 6: One Hot Encoding

4.6 Text Classifier

A text classifier model is designed and trained on the corpus with respect to the target
variable i.e. the Tag from the corpus. Many classifiers can be used for this purpose like:

 Multinomial Naïve Bayes


 Support Vector Machine
 Neural Network Classifier

In this project, Neural Network Classifier, precisely Artificial Neural Network Classifier is
used. Neural Networks are one of the learning algorithms used within machine learning. They
consist of different layers for analysing and learning data.

4.7 Chat Utility

A chat utility function is designed to interact with the user till the user calls a ‘quit’. The
predicted response is stored in a response variable and is returned and displayed to the user as
many time as this utility function is called.

4.8 Training Result


from the result of the training it can be observed that after each successive iteration of
training the error is decreasing and hence the accuracy of the model will increase.

CHAPTER – 5
Fig. No. – 7: Training Results

RESULTS & DISCUSSION


9

After the implementation of the chatbot and linking it with the website the results obtained
are as follows:

Fig. No. – 8: Home Page of the website

This is the home page of the website. It has a navigation menu at the top right corner
using which the user can navigate through different section of the website.
Fig. No. – 10: Contact Us Page

This is the contact us page. If the user is facing any issue with the system, he/she can
contact the admin or the developer by the help of this form.
Fig. No. – 11: FAQ Page

This is the section for frequently asked questions. The content of this section can be
modified depending on the need.

11

Fig. No. – 12: Chatbot Utility Page

This is the window for chatting with bot. It is activated by clicking on the message icon
available at the bottom right corner of the website. User can write the message in the
space provided and can send it using the send button.
Fig. No. – 13: Initial Conversation 1

The next few figures provide an idea about the responses of the bot. It can be seen in this
image the user sent the message “Hi” to which the bot replied with a message “Hi There,
How Can I Help?”. The further images are the continuation of this chat session.

12

Fig. No. – 14: Initial Conversation 2

On asking the age the bot replied with “Few Months Old” and name it replied as “I’m
Jarvis”
Fig. No. – 15: Initial Conversation 3

13

Fig. No. – 16: Initial Conversation 4


CHAPTER – 6
14
FUTURE WORKS

 There is a scope of improvement in the accuracy of the system in predicting the


responses.

 User interaction can be improved using different modes of information like


emoticons, visual data etc.

 Voice bot integration can be done to increase the count of targeted audience.
CHAPTER – 7
15
CONCLUSION

 AI driven chatbots have already become an integral part of the technology stack in the
workplace.

 Organizations that have adopted AI chatbots have many benefits over those who have
not yet moved to machine learning, automation and artificial intelligence.

 AI based chatbots can contribute a lot to improvise the user experience and brand
recognition by offering an interactive tool to the users.
REFERENCES
16

[1] M. Adam, M. Wessel and A. Benlian, "AI-based chatbots in customer service and their effects on
user compliance," in Electronic Markets, Springer, 2021, pp. 427 - 445.

[2] A. Kumar, "AI - Based Chatbot to Improve Self - Guided Learning," IRJET, vol. 8, no. 07 July 2021,
pp. 1 - 8, 2021.

[3] Great Learning, "Basics of building an Artificial Intelligence Chatbot," Great Laerning, 1 Jan 2022.
[Online]. Available: https://www.mygreatlearning.com/blog/basics-of-building-an-artificial-
intelligence-chatbott.

[4] Geeks for Geeks, "Machine Learning," Geeks for Geeks, 11 April 2022. [Online]. Available:
https://www.geeksforgeeks.org/machine-learning/.

You might also like