Professional Documents
Culture Documents
Synopsis
on
BACHELOR OF TECHNOLOGY
DEGREE
Session 2018-19
in
Information Technology
By
DEEPANSHU SHARMA
(1503213041)
AYAAN SAMAD
(1503213036)
KASHISH SINGHAL
(1503213054)
AFFILIATED TO
U.P. TECHNICAL UNIVERSITY, LUCKNOW
1|P ag e
DECLARATION
We hereby declare that the work being presented in this report entitled
“Developing a Chatbot using Sequence Modelling” is an authentic record of
our own work carried out under the supervision of “Ms. Deepali Dev and Dr.
Kanika Gupta.”
The matter embodied in this report has not been submitted by us for the award of
any other degree.
Dated Signature:
Name:
Department:
Dated : Signature:
Name:
Department:
Dated : Signature:
Name:
Department:
This is to certify that the above statement made by the candidate(s) is correct to the
best of my knowledge.
Signature of Supervisor
Dr. Kanika Gupta
Associate Professor
IT Department
Date............................
2|P ag e
ACKNOWLEDGEMENT
We wish to extend our sincere gratitude to our project mentor, Ms.Deepali Dev
and Dr. Kanika Gupta, Department of Information Technology for their valuable
guidance and encouragement which has been absolutely helpful.
We are indebted to Dr.Amit Sinha (HOD, Department of Information
Technology) for his valuable support.
Deepanshu Sharma
1503213041
Kashish Singhal
1503213054
Ayaan Samad
1503213036
3|P ag e
ABSTRACT
4|P ag e
TABLE OF CONTENTS
4.1 Methodology 11
4.2 Tools Used 11
5|P ag e
LIST OF FIGURES:-
6|P ag e
1) INTRODUCTION-
7|P ag e
2.OBJECTIVE-
Our objective is to construct a chatterbot such that it will provide responses for a
person instead of people needing to attend the problems themselves and it will
answer based on the data provided by the user to avoid disturbance in many
matters.
The program selects the closest matching response by searching for the closest
matching known statement that matches the input, it then chooses a response
from the selection of known responses to that statement.
Example :
bot.train([
'How are you?',
'I am good.',
'That is good to hear.',
'Thank you',
'You are welcome.',
])
9|P ag e
2) STEPS FOR MODEL DEVELOPMENT-
The process of creating a chatbot follows a pattern similar to the development of a web
page or a mobile app. It can be divided into Design, Building, Analytics and Maintenance.
Design
The chatbot design is the process that defines the interaction between the user and the
chatbot. The chatbot designer will define the chatbot personality, the questions that will be
asked to the users, and the overall interaction. It can be viewed as a subset of the
conversational design. In order to speed up this process, designers can use dedicated
chatbot design tools that allow for immediate preview, team collaboration and video
export. An important part of the chatbot design is also centered around user testing. User
testing can be performed following the same principles that guide the user testing of
graphical interfaces.
Building
The process of building a chatbot can be divided into two main tasks: understanding the
user's intent and producing the correct answer. The first task involves understanding the
user input. In order to properly understand a user input in a free text form, a Natural
Language Processing Engine can be used. The second task may involve different approaches
depending on the type of the response that the chatbot will generate.
Analytics
The usage of the chatbot can be monitored in order to spot potential flaws or problems. It
can also provide useful insights that can improve the final user experience.
Maintenance
To keep chatbots up to speed with changing company products and services, traditional
chatbot development platforms require ongoing maintenance. This can either be in the
form of an ongoing service provider or for larger enterprises in the form of an in-house
chatbot training team. To eliminate these costs, some startups are experimenting
with Artificial Intelligence to develop self-learning chatbots, particularly in Customer
Service applications.
API's
There are lots of API's available for building your own chatbot like Wikipedia api which helps
us to get data from Wikipedia etc.
10 | P a g e
3) METHODOLOGY-
Start
Stop
Let’s say we want to scrape the New York Times’ Facebook page. We would send a request
to https://graph.facebook.com/v2.4/nytimes?access_token=XXXXX and we would get:
12 | P a g e
Fig4: code to scrap data from facebook
We just have to process each post. If you’re an avid Face book user, you know
that not all of these attributes are not guaranteed to exist. Status updates may
not have text or links. Since we’re making a spreadsheet with an enforced
schema, we need to validate that a field exists before attempting to process it.
Now we have a full plan for scraping, we query each page of Facebook Page
Statuses (100 statuses maximum per page), process all statuses on that page
and writing the output to a CSV file, and navigate to the next page, and repeat
until no more statuses left.
13 | P a g e
DATA FORMAT
14 | P a g e
KNN is a non-parametric learning algorithm, which means that it doesn't
assume anything about the underlying data. This is an extremely useful
feature since most of the real world data doesn't really follow any
theoretical assumption e.g. linear-separability, uniform distribution, etc.
15 | P a g e
Versatile: different Kernel functions can be specified for the decision
function. Common kernels are provided, but it is also possible to specify
custom kernels.
16 | P a g e
6.RESULT AND DISCUSSION
When the bot is unable to find the matching statement in its data set it returns the first line
of data. This problem can be seen in the below two tests we performed. Even though we
add large amount of data whenever we run out of data we can go to internet or use the
Wikipedia api to get a part of data from Wikipedia as result on the asked question.
When there are lots of matching for the same word we can use the regression algorithm to generate
the output which has the maximum amount of hits in the past. We can also create a list of responses
for a particular question to keep the chat interesting and keep changing the common correct
answers.
Example : when user reply hello we can reply back with hi, hello, good morning etc and we can also
initiate further Reponses like how are you ? Or what can I help you with? Etc.
17 | P a g e
7.CONCLUSION-
We have started collection data on different fields and have built a basic
sequence modeling chatbot in linux. We have also started designing a small
social networking site with limited features so as to show real time
modification of data and improved accuracy in generating results
We have a basic model developed and our applying algorithms on the model to
test the best algorithm. We have also starting planning to create our own
social media in php and directly read data from it and modify the data held
previously.
We have plans to add speech recognition using google api for speech to text
conversion and will try to add it into our project
We are also trying to use more api like Wolfram Alpha to make our search
results come faster and complexity is reduced
We are also trying to add a data classifier into our project so that when we
read data we can solve the problems if they are related to maths instead of
wasting time to search the whole database.
18 | P a g e
8.REFERENCES
19 | P a g e