You are on page 1of 36

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/333893693

CHAPTER 1 INTRODUCTION 1.1 Motivation

Article · June 2019

CITATIONS READS
0 3,517

3 authors, including:

Ayush Banerjee
SRM Institute of Science and Technology
1 PUBLICATION   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

college enquiry chatbot system View project

All content following this page was uploaded by Ayush Banerjee on 20 June 2019.

The user has requested enhancement of the downloaded file.


CHAPTER 1

INTRODUCTION

1.1 Motivation

As we all know chatbots square measure a really fashionable approach of communication


between the user the system text interface. we have a tendency to wished to use this system to
implement college web site for a additional economical communication between the coed and
administration. Students will use school web site chatbot for Queries rather than about to
workplace or authorities directly for info. College web site based mostly bots square measure
accustomed develop effective communication between different branches and facilitate
management to produce innovative solutions. Our Project to create a university web site chatbot
would undoubtedly have a bright scope as this could bring a modification within the approach of
interaction between school and students

This Project would inspire alternative schools still to develop internet chatbots to Ease the
communication between Management and Students 1.2 drawback Definition: Traditionally, the
chat larva system isn't renowned to those who don't seem to be additional into the technology.
Even if there exist a talk larva system, it's not abundant correct in proving the solution or
solutions. Students got to manually visit to the school to induce their queries answered by the
school facilitate table. This method consumes ton of your time still as cash because the client
required to go to school if its miles removed from home. Also, this method might cause
communication gap between student and school.

Objective of Project: The purpose of faculty info chatbots is to support students and school in
their relations with school. Doing this helps save heaps of your time {for students|for school
kids|for college students} as they don’t ought to visit college workplace for info. Instead they'll
raise Queries to the Chatbots within the school web site and acquire info they need with Ease.
Our Aim is to use Chatbot Technology to develop our school web site for additional
economical approach of Communication between the school and Students. Students will use
school web site
chatbot for Queries rather than about to workplace or authorities directly for info. school web site
based mostly bots square measure accustomed develop effective communication between totally
different branches and facilitate management to produce innovative solutions. Our Project to
create {a school|a university|a school} web site chatbot would undoubtedly have a bright scope as
this could bring a modification within the approach of interaction between college and students.
This Project would inspire alternative schools still to develop internet chatbots to Ease the
communication between Management and Students.

Limitations of Project: Complex Interface – Chatbots square measure usually seen to be


sophisticated and need heaps of your time to grasp user’s demand. it's conjointly the poor process
that isn't able to filter ends up in time that may nettle folks. Inability to grasp – thanks to fastened
programs, chatbots are often stuck if AN lost question is given before of them. this may cause
client discontent and lead to loss. it's conjointly the multiple electronic communication that may
be heavy for users and deteriorate the general expertise on the web site. Time-Consuming –
Chatbots square measure put in with the motive to speed-up the response and improve client
interaction. However, thanks to restricted data-availability and time needed for self-updating, this
method seems additional time-taking and big-ticket.

Therefore, in situ of attending many customers at a time, chatbots seem confused


concerning a way to communicate with folks. Increased Installation value – Chatbots square
measure helpful programs that assist you save heaps of men by guaranteeing the incomparable
convenience and serving to many shoppers right away. however in contrast to humans, each
chatbot has to be programmed otherwise for a brand new business that will increase the initial
installation value. This conjointly will increase the time required to organize for the program and
arrange everything effectively. Considering the unpunctual changes that may perpetually happen,
this can be a risky investment as change the program can invite additional prices to that.

2
Zero decision-making – Chatbots square measure renowned for being ill-famed owing to
their inability to form choices. the same state of affairs has landed huge firms like Microsoft etc.
in bother once their chatbot went on creating a racist rant.
Therefore, it's important to confirm correct programing of your chatbot to forestall any such
incident which may hamper your whole. Poor Memory – Chatbots don't seem to be able to con
the past spoken language that forces the user to kind a similar issue once more . this may be
cumbersome for the client and nettle them owing to the trouble needed. Thus, it's necessary to
use caution whereas coming up with chatbots and certify that the program is in a position to
understand user queries and respond consequently.

Organisation of Documents: The Documentation of project contains the full clarification of


project in varied aspects. The Documentation is organized in AN order that a project ought to be.
the primary section contains the introduction of the project that explains concerning the
motivation, drawback definition, objectives and limitations of the project. The project
Introduction is followed by the literature survey that has existing systems that is followed by the
analysis section of the project that contains all the wants & diagrams of the project. Then comes
style|the planning|the look} section that explains concerning the diagramsconcerning the module
design of the project. The implementation and results section explains concerning the key
functions, output screens, tables and results of the project.

3
CHAPTER 2

LITERATURE STUDY

1.Emanuela Haller and Traian Rebedea, “Designing a Chat-bot that Simulates Associate in
Nursing Historical Figure”, IEEE Conference Publications, July 2013. There ar many
applications that ar incorporating a personality's look and meaning to simulate human dialog, but
in most of the cases informationrmation|the knowledge|the data} of the informal animate being is
hold on in an exceedingly} very info created by a personality's specialists. However, solely a
couple of researches have investigated the conception of constructing a chat-bot with an artificial
character and temperament starting from websites or plain text some of certain person. This
paper describes Associate in Nursing approach to the conception of distinctive the foremost very
important facts in texts describing the life (including the personality) of Associate in Nursing
historical figure for building a informal agent that will be used in middle-school CSCL things.

2.Maja Pantic, Reinier Zwitserloot, and Robbert New Style calendar month Grootjans, “Teaching
Introductory engineering practice Asimple Agent Framework”, IEEE Transactions On Education,
Vol. 48, No. 3, August 2005. This paper describes a flexible technique of teaching introductory
engineering (AI) using a completely unique, Java-implemented, simple agent framework
developed specifically for the wants of this course. although varied agent frameworks ar planned
inside the massive body of literature, none of these offered frameworks established to be simple
enough to be used by freshman students of computing. Hence, the authors acquire being to form
a singular framework that may be acceptable for the aims of the course, for the quantity of
computing skills of the meant cluster of students, and for the size of this cluster of students. The
content of the introductory AI course in question is also a group of assignments that desires the
students to use intelligent agents and totally different AI techniques to watch, filter, and retrieve
relevant knowledge from the earth Wide web.

4
It represents, therefore, a synthesis of the conventional objectivist approach and a real-world-
oriented, artist approach to teaching programming to novices. the foremost aim of implementing
such a pedagogy was to possess interaction the students in learning thereto they in the flesh relate
whereas attaining intellectual rigor. space experience indicates that students learn heaps of
effectively once the conventional objectivist approach is combined with an explicit person
approach than once this orthodox approach to teaching programming to novices is used alone.

2.1 Proposed System

A Student beast project is built practice artificial algorithms that analyzes user’s queries
and understand user’s message. this method is also a web application that has answer to the
question of the scholar. Students merely have to be compelled to question through the beast that's
used for chatting. Students can chat practice any format there is not any specific format the user
possesses to follow. The System uses integral technology to answer the question. The answers ar
acceptable what the user queries. If the answer found to invalid, user merely have to be
compelled to opt for the invalid answer button that is in a position to notify the admin regarding
the incorrect answer.

Admin can scan invalid answer through portal via login System permits admin to delete
the invalid answer or to feature a particular answer of that equivalent question. The User can
question any college connected activities through the system. The user does not have to be
compelled to nose to nose move to the varsity for enquiry. The System analyzes the question
therefore answers to the user. The system answers to the question as if it's answered by the
person. With the help of technology, the system answers the question asked by the students. The
system replies practice an honest Graphical program that suggests that as if a real person is
reproof the user. The user can question regarding the varsity connected activities through on-line
with the help of this web application. this method helps the scholar to be updated regarding the
varsity activities.

5
CHAPTER 3

SYSTEM ANALYSIS

A chatbot is also a bug that tries to simulate the voice communication or "chatter" of
somebody's being via text or voice interactions. A user will raise a chatbot a matter or
manufacture a command, and collectively the chatbot responds or performs the requested action.
it's everywhere, from recent ancient electronic text word pages to modern advanced social
networking . websites, and from commonplace computers to fashionable wise mobile devices.
Chat bots speak in nearly each major language. Their language (Natural Language methodology,
NLP) skills vary from very poor to essentially clever intelligent, helpful.

3.1 Proposed system

The principles outlined is terribly easy to terribly advanced. The bots will handle easy
queries however fail to manage advanced ones. The Self learning bots square measure those that
use some Machine Learning-based approaches and square measure positively additional
economical than rule-based bots. These bots is of any 2 types: Retrieval based There square
measure generally 2 variants of chatbots: Rule-Based and Self learning.

i) In retrieval-based models, a chatbot uses some heuristic to pick a response from a library of
predefined responses. The chatbot uses the message and context of oral communication for
choosing the most effective response from a predefined list of larva messages. The context will
embrace a current position within the dialog tree, all previous messages within the oral
communication, antecedently saved variables (e.g. username). Heuristics for choosing a response
is built in many alternative ways that, from rule-based if-else conditional logic to machine
learning classifiers.

ii) Generative bots will generate the answers and not invariably replies with one in every of the
answers from a collection of answers. This makes them additional intelligent as they take word
by word from the question and generates the answers.

6
3.2 Requirements

Hardware Requirement:

 Min i3 Processor Based Computer


 Min 4GB-Ram
 Hard Drive Storage
 Monitor

Software Requirement:

 Microsoft Visual Basis


 Windows 7
 Anaconda
 Jupyter Notepad
 Python Compiler
 security
3.3 Architecture and Modules

Figure 3.3.1 Architecture

7
Chatbots work based on three classification methods:

Pattern Matching

Bots utilize pattern matches to group the text and it produces an appropriate response from
the clients. “Artificial Intelligence Markup Language” (AIML), is a standard structured model of
these Patterns.For every sort of question, a remarkable pattern must be accessible in the database
to give a reasonable response. With a number of pattern combinations, it makes a hierarchical
structure. We utilize algorithms to lessen the classifiers and produce the more reasonable
structure.

3.4.1 Natural Language Understanding (NLU)

This NLU has 3 specific concepts as follows:

Entities: This basically represents a thought to your chatbot. for instance, it's going to be a
payment system in your E-commerce chatbot.
Context: once a linguistic communication understanding algorithmic program examines a
sentence, it doesn’t have the historical background of the user’s text language. this suggests that,
if it gets a response to an issue it's been recently asked, it won’t recall the inquiry. So, the phases
throughout the language of chat ar singly keep.

3.4.2 Natural Language Processing (NLP)

This NLU has three specific ideas as follows

1.Entities: This basically represents a thought to your chatbot. for instance, it's going
to be a payment system in your E-commerce chatbot.

2.Context: once a tongue understanding algorithmic program examines a sentence, it


doesn’t have the historical scene of the user’s text language. this means that, if it gets
a response to an issue it's been recently asked, it won’t recall the inquiry. So, the
phases throughout the language of chat square measure one by one

8
Figure 3.4.2 NLU Processing

Chatbot will have separate response generation and response choice modules, as shown
within the diagram below :

Stemming: Stemming is that the method of reducing inflected (or generally derived) words to
their stem, base or root kind — generally a word form. Example if we have a tendency to were to
stem the subsequent words: “Stems”, “Stemming”, “Stemmed”, “and Stemtization”, the result
would be one word “stem”.

Lemmatization: a small variant of stemming is lemmatization. the key distinction between


these is, that, stemming will typically produce non-existent words, whereas lemmas ar actual words.
So, your root stem, which means the word you finish up with, isn't one thing you'll simply hunt
during a wordbook, however you'll hunt a lemma. samples of Lemmatization ar that “run” could be
a base kind for words like “running” or “ran” or that the word “better” and “good” ar within the
same lemma so that they ar thought-about identical.

Keyword matching

Next, we have a tendency to shall outline a operate for a acknowledgment by the larva i.e
if a user’s input could be a acknowledgment, the larva shall come a acknowledgment response
.ELIZA uses a straightforward keyword matching for greetings. we'll utilize a similar construct
here.

9
GREETING_INPUTS = ("hello", "hi", "greetings", "sup", "what's up","hey",)
GREETING_RESPONSES = ["hi", "hey", "*nods*", "hi there", "hello", "I am glad! You are
talking to me"]
def greeting(sentence):

for word in sentence.split():


if word.lower() in GREETING_INPUTS:
return random.choice(GREETING_RESPONSES)

3.5 Generating Response

To generate a response from our larva for input queries, the conception of document
similarity are used. therefore we start by importation necessary modules. From scikit learn
library, import the file to convert a group of raw documents to a matrix of TF-IDF options.

We outline a operate response that searches the user’s auditory communication for one or
a lot of acknowledged keywords and returns one in every of many potential responses. If it
doesn’t realize the input matching any of the keywords, it returns a response:” i'm sorry! I don’t
perceive you”

def response(user_response):
robo_response=''
sent_tokens.append(user_response)
TfidfVec = TfidfVectorizer(tokenizer=LemNormalize, stop_words='english')
tfidf = TfidfVec.fit_transform(sent_tokens)
vals = cosine_similarity(tfidf[-1], tfidf)
idx=vals.argsort()[0][-2]
flat = vals.flatten()
flat.sort()
req_tfidf = flat[-2]
if(req_tfidf==0):
robo_response=robo_response+"I am sorry! I don't understand you"
return robo_response
else:
robo_response = robo_response+sent_tokens[idx]
return robo_response

10
Figure 3.5 Response code

flag=True
print("SRMHELP: My name is Robo. I will answer your queries about Chatbots. If you want to
exit, type Bye!")
while(flag==True):
user_response = input()
user_response=user_response.lower()
if(user_response!='bye'):
if(user_response=='thanks' or user_response=='thank you' ):
flag=False
print("SRMHELP: You are welcome..")
else:
if(greeting(user_response)!=None):
print("ROBO: "+greeting(user_response))
else:
print("SRMHELP: ",end="")
print(response(user_response))
sent_tokens.remove(user_response)
else:
flag=False
print("SRMHELP: Bye! take care..")

11
Figures 3.5.1 Respond Coding

3.6 Feasibility Study

Feasibility study is the test of a system proposal according to its workability, impact on
the organization, ability to meet user needs, and effective use of recourses. It focuses on the
evaluation of existing system and procedures analysis of alternative system. Feasibility analysis
was done to determine whether the system would be feasible. The development of a college
website based chatbot system or a product is more likely plagued by resources and efficiency.

Figure 3.6 Anatomy of a chatbot


12
CHAPTER 4

IMPLEMENTATION & RESULT

The Implementation phase of the Project Management process puts the project into action.
The Implementation phase consists of three sub-phases:

a) Execution.
b) Answering the queries.
c) Maintenance of server.

a) Execution: When a project moves into the Execution phase, the project team and the necessary
resources to carry out the project should be in place and ready to perform project activities.
During this phase the focus shifts from planning the project to participating in, observing, and
analyzing the work being done.

b) Answering the queries: Answering the queries plays a very important role in the successful

implementation of the project. This is accomplished through:


the front end and the backend connection done by the AJAX and the DJANGO.

c) Maintenance of server : Maintenance of server is very essential for the smooth functioning of
the chatbot. The chatbot purely works on the training that we have provided to it and the way we
have feeded the answers into the servers.

13
4.1 EXPLANATION OF KEY FUNCTIONS

There are few key functions in the project. They are

4 Var me () : it’s the user who is typing text into the bot.
5 Var you (): it’s the function for the bot, the reply that it provides.
6 Insert chat(): it’s the function that puts the time format at which any particular text is sent,
even mentioning the am/pm.
7 It will show the date, along with the person who is sending or receiving the chat, if it’s the
bot, then the chat box will start from the left
8 If the text is sent from the right side, then the chat box is from right side.
9 Reset chat() : reset chat sets the bot to initial position if a long interval of time passes by in
between the last chat and the current chat.

4.2 METHOD OF IMPLEMENTATION

4.2.1Output Screens:

Figure 4.2.1 opening the command prompt

14
Fig 4.2.2 Copying the location of the directory

Figure 4.2.3 starting the server at backend

15
Fig 4.2.4 opening the website link

Fig 4.2.4 The working of the bot

16
Figure 4.2.5 Backend working of the bot

4.3 Result Analysis:

Traditionally, the chat larva system isn't identified to those that don't seem to be a lot of into the
technology.
Even if there exist a conversation larva system, it's not a lot of correct in proving the solution or
solutions.
Students got to manually visit to the faculty to urge their queries answered by the faculty
facilitate table.
This method consumes ton of your time likewise as cash because the client required to go to
school if its miles far from home.
Also, this method might result in communication gap between student and school.

17
Proposed System:

A Student larva project is constructed mistreatment artificial algorithms that analyzes user’s
queries and perceive user’s message.
This System could be a internet application that provides answer to the question of the scholar.
Students simply have to be compelled to question through the larva that is employed for chatting.
Students will chat mistreatment any format there's no specific format the user needs to follow.
The System uses in-built computing to answer the question.
The answers ar acceptable what the user queries.
If the solution found to invalid, user simply got to choose the invalid answer button which is able
to give notice the admin regarding the inaccurate answer.
Admin will read invalid answer through portal via login
System permits admin to delete the invalid answer or to feature a particular answer of that
equivalent question.
The User will question any faculty connected activities through the system.
The user doesn't have to be compelled to in person move to the school for enquiry.
The System analyzes the question then answers to the user.

4.2.6 NLP layer

18
Security Analysis

Chatbot Security Threats and Concerns

Chatbots ar quickly turning into a norm among businesses to act with customers. several
firms have already been mistreatment or at the initial stages of deploying chatbots. though
chatbots provide various edges to businesses and customers, there ar many security threats
related to the utilization of chatbots.

We are at the emergent stage of chatbot development, current chatbot solutions don't seem
to be entirely secure and will expose the business to numerous cyber attacks. The vulnerabilities
gift in chatbots offer hackers direct access to associate degree organizations’ network,
applications, and databases.

In due course of your time, chatbots can eventually mature, and learn to gather additional
sensitive and private data through computing and machine learning capabilities. Hence, it's
crucial for any business to boost the safety of its chatbot platform at the muse level itself. It is
particularly essential for businesses to teach themselves and bear in mind of the risks related to
the utilization of chatbot. they need to take into account very important factors like sharing and
storing the knowledge, and most significantly WHO will access it.

To Protect Chatbot Data And User Privacy


Chatbots and also the knowledge that it handles may be secured exploitation technologies
like 2 issue Authentication (2FA), behavior analytics, biometry and computing (AI). These newer
technologies address the problems of authentication and encoding that have an effect on chatbots.

Chatbots offers businesses large potential for sales, marketing, and client service. so it's
crucial for businesses to handle any security vulnerabilities by applying the technologies
mentioned on top of.Another way to secure chatbots and forestall hacking makes an attempt is by
exploitation self-destructing messages. this can be a tested answer, sometimes utilized by
banking and every one quite monetary chatbots.

When sensitive knowledge is distributed through a chatbot, it will delete that confidential
message forever from the system when a selected amount of your time. This way, the chatbot,
user and also the company that uses the chatbot may be positive that every one the information
and data are going to be secured and untrod.

19
Apart from all the information mentioned on top of, a wonderful web site security answer like
Comodo cWatch can offer complete protection to all or any the websites.

Comodo cWatch is that the best web site security software package to scan an internet site for
malware. It will check your web site for malware and take away threats at intervals minutes.
With its powerful cloud-based malware scanning, Comodo cWatch will contain even the potent
security threats to your web site.

Performance Analysis

1. Entry sources

Determine where your users come from. Do they come from organic traffic sources? Do
you use advertising to drive additional traffic to your chatbot? Are there any other sources the
users are directed into the bot from? You need to know answers to all these questions to
understand which sources bring the most value to you and which ones are secondary.

2. Conversions

First of all, determine conversion points inside the bot flow. Which actions should be
considered conversions you’d like your users to make when they enter the bot? Do you direct
users to these conversion points directly? Are they easily accessible? If they are not you need to
rework the flow to make sure bot users do not have to wander through the whole bot flow to get to
them. All conversion actions should be available to users within the fist 3–5 steps of the bot flow,
otherwise you are simply losing your possible customers.

3. Funnels

Before launching the bot it would be a good practice to not only determine the conversions
but think about the typical funnels you’d like the majority of users to be directed into. These
funnels should be logical and include the conversion points you’ve determined before.

20
Figure 4.3.4 Funnels

4. Drop off

When conversions and funnels are thought through and well- structured, and the bot has
been launched, you should get to the data analysis. One of the main metrics to consider is the drop
off rate. Make sure you determine the drop off points at each step of the funnel and analyze why
the drop off happened. Did these users left the bot or did they exit the funnel and continued their
interactions? These insights will help you to understand how to convert users who have dropped
off and consequently increase the number of users who have successfully completed all steps in
the funnel or reached at least one of the conversion points. You should analyze the data and make
proper conclusions.

5. Retargeting

When you have thoroughly analyzed the data, it’s high time to think about retargeting. At
this point you should have determined the major sources of your traffic, conversion actions or
CTAs inside the bot flow and the drop off points that should be reduced.

Retargeting implementation should be based on the goals you want to reach Retargeting
messages should also be as personalized as possible to make every customer feel their interests are
important for the business and they are offered the best deals based on their personal liking. For
example, if you’d like to retarget a very specific group of users who have added a certain product
to their cart but didn’t complete the checkout, you may want to sent a retargeting message to them
with details about the product they have added into the cart and an ability to easily get in touch
with one of the support agents available online in case a customer has faced any technical
difficulties or has additional questions the bot could not handle.

21
CHAPTER 5

CONCLUSION

The main objectives of the project were to develop an algorithm that will be used to
identify answers related to user submitted questions. To develop a database were all the related
data will be stored and to develop a web interface. The web interface developed had two parts,
one for simple users and one for the administrator.

A background research took place, which included an overview of the conversation


procedure and any relevant chat bots available. A database was developed, which stores
information about questions, answers, keywords, logs and feedback messages. A usable system
was designed, developed and deployed to the web server on two occasions. An evaluation took
place from data collected by potential students of the University.
Also after received feedback from the first deployment, extra requirements were introduced and
implemented.

As the industry grows, more competitors will enter the market and growth will be
exponential. Chatbots will be almost indistinguishable from their human counterparts, if
anything, even better. According to Gartner, chatbots will power 85% of all customer service
interactions by the year 2030. In fact, the average person will have more conversations with bots
than with their spouse.

22
CHAPTER 6

FUTURE ENHANCEMENT

Our future work involves the further development of methodologies for handling
contextual data, behavioral monitoring based on user-to-system interactions, and appropriate
methods for the collaborative filtering of information and discovery of patterns. In particular, we
aim to provide a bot that will have answer within no time and will have a user friendly interface.

In our future work, we intend to carry on bot-based experiments to further verify the
effectiveness of the proposed framework.In addition we will try to add extra security to the
backend server such that the database can be strictly accessible to only the authorized personnel.

23
CHAPTER 7

REFERENCES

1. Emanuela Haller and Traian Rebedea, “Designing a Chat-bot that Simulates an


Historical Figure”, IEEE Conference Publications, July 2013.

2. Maja Pantic, Reinier Zwitserloot, and Robbert Jan Grootjans, “Teaching Introductory
Artificial Intelligence Using Asimple Agent Framework”, IEEE Transactions On
Education, Vol. 48, No. 3, August 2005.

3. S. Bird, "NLTK: the natural language toolkit." pp. 69-72, 2006.

4. Accenture. 2017. At Your Service: Embracing the Disruptive Power of Chatbots. Dublin:
Accenture.

5. Ubisend. 2017. 2017 Chatbot Survey: We now live in an on-demand society, time to get
prepared. Norwich: Ubisend.
6. Anon, (2016). [online] Available at: https://www.chatbots.org/ai_zone/ [Accessed 11 Dec.
2016].
7. Foundation, A. (2016). AIML - The Artificial Intelligence Markup Language. [online]
Alicebot.org. Available at: http://www.alicebot.org/aiml.html [Accessed 11 Dec. 2016].
8. Pandorabots.com. (2016). The Slashdot Interview. [online] Available at:
http://www.pandorabots.com/pandora/pics/wallaceaimltutorial.html [Accessed 11 Dec.
2016].
9. Vignesh Jayapalan, H. (2016). Android — Baking a simple ChatBot in 30 minutes
(AIML). [online] Medium. Available at:
https://medium.com/@harivigneshjayapalan/android-baking-a-simple-chatbot-in-30-
minutes-aiml-ff43c3269025#.q9zghn2tl [Accessed 11 Dec. 2016].
10. Wallace, R. (2016). AIML 2.0 Working Draft. [online] Docs.google.com. Available at:
https://docs.google.com/document/d/1wNT25hJRyupcG51aO89UcQEiG-
HkXRXusukADpFnDs4/pub [Accessed 11 Dec. 2016].
11. www.tutorialspoint.com. (2016). AIML Tutorial. [online] Available at:
http://dev.tutorialspoint.com/aiml/index.htm [Accessed 11 Dec. 2016].
12. Turing, A. (1950). Computing Machinery and Intelligence. 1st ed. Mind.
13. Ankitbko.github.io. (2017). Chatbot using Microsoft Bot Framework - Part 4 · F5. [online]
Available at: http://ankitbko.github.io/2016/09/ChatBot-using-Microsoft-Bot-Framework-
Part-4/ [Accessed 26 April 2017].
14. Anon, (2017). [online] Available at: http://streamcode.io/luis-in-depth/ [Accessed 4 April
2017].

24
15. Anon, (2017). Speed Is A Killer - Why Decreasing Page Load Time Can Drastically
Increase Conversions. [online] Available at: https://blog.kissmetrics.com/speed-is-a-killer/
[Accessed 14 April 2017].
16. Blog.pal.chat. (2017). Everybody is ready for chatbots — is Facebook?. [online] Available
at: https://blog.pal.chat/post/everybody-is-ready-for-chatbots-is-facebook [Accessed 1 May
2017].
17. Channel 9. (2017). Conversational UI using the Microsoft Bot Framework. [online]

25
APPENDIX

8.1 ANNEXURE I
8.1.1 USER MANUAL OF PROJECT

1. The project contains the use of tensor flow application.


2. The project contains Naïve Bayes algorithm.
3. The project has got a web page that has been primarily been designed in html
4. The backend development has been done in Python using anaconda and jupyter notebook.
5. The front end and the backend has been linked with AJAX and DJANGO.
6. It also uses NLP and NLU for pattern matching.
7. First open the anaconda command prompt, then enter into the directory where the file has
been originally stored.
8. Then start the server by typing the command of runserver.
9. Once the server is on, then go to the link of frontend to open it in the browser.
10. Then start asking the questions.
11. The bot gives reply accordingly.
12. If there is no reply for a long time, then the bot resets itself.
13. The link for the bot is file:///C:/Users/hp/Downloads/Chat_aavartan-master/index.html

26
CODING

SAMPLE SOURCE CODE OF SOFTWARE

Program
var me = {};
me.avatar = "robot.png";

var you = {};


you.avatar = "me.png";
function formatAMPM(date) {
var hours = date.getHours();
var minutes = date.getMinutes();
var ampm = hours >= 12 ? 'PM' : 'AM';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
return strTime;
}

//-- No use time. It is a javaScript effect.


function insertChat(who, text, time){
if (time === undefined){
time = 0;
}
var control = "";
var date = formatAMPM(new Date());

if (who == "bot"){

control = '<li style="width:100%">' +


'<div class="msj macro">' +
'<div class="avatar"><img class="img-circle" style="width:100%;" src="'+ me.avatar +'" /></div>' +
'<div class="text text-l">' +
'<p>'+ text +'</p>' +
'<p><small>'+date+'</small></p>' +
'</div>' +
'</div>' +
'</li>';
}else{

control = '<li style="width:100%;">' +


'<div class="msj-rta macro">' +
'<div class="text text-r">' +
'<p>'+text+'</p>' +
'<p><small>'+date+'</small></p>' +
27
'</div>' +
'<div class="avatar" style="padding:0px 0px 0px 10px !important"><img class="img-circle" style="width:100%;"
src="'+you.avatar+'" /></div>' +
'</li>';

loadDoc()
// loadDoc().then(trigger(), trigger());

}
setTimeout(
function(){
$("ul").append(control).scrollTop($("ul").prop('scrollHeight'));
}, time);

function resetChat(){
$("ul").empty();
}

$(".mytext").on("keydown", function(e){
if (e.which == 13){
var text = $(this).val();
if (text !== ""){
insertChat("me", text);
$(this).val('');
}
}
});

$(".submit_btn").on("click", function(e){
console.log("triggered submit button ")
var text = document.getElementById("mytext");
console.log(text)
if (text !== ""){
insertChat("me", text);
document.getElementById("mytext")="";

}
});

$('body > div > div > div:nth-child(2) > span').click(function(){


$(".mytext").trigger({type: 'keydown', which: 13, keyCode: 13});
})

//-- Clear Chat


28
resetChat();

//-- Print Messages


insertChat("bot", "Hello pal...", 0);

//-- NOTE: No use time on insertChat.

var btn = document.querySelector('#submit_btn')

function loadDoc() {
$.ajax({
type: 'POST',
url: 'http://127.0.0.1:8000/bot/',
data: {'que':document.getElementById("mytext").value},
dataType: 'json',
success: function (data) {
console.log(data)
insertChat("bot",data.ans,0)
if(data.sug1){
ans="<b>Here are some FAQ for your refernce</b><br><br><ol><a><li
class='sug1'>"+data.sug1+"</li></a><br><a><li class='sug2'>"+data.sug2+"</li></a><br><a><li
class='sug3'>"+data.sug3+"</li></a><br><a><li class='sug4'>"+data.sug4+"</li></a><br><a><li
class='sug5'>"+data.sug5+"</li></a></ol>"
insertChat("bot",ans,0)
setTimeout(
function(){
$('.sug1').click(function(){
console.log($(this).text())
document.getElementById("mytext").value=$(this).text()
insertChat("me", $(this).text(), 0)
document.getElementById("mytext").value=""

});
$('.sug2').click(function(){
document.getElementById("mytext").value=$(this).text()
insertChat("me", $(this).text(), 0)
document.getElementById("mytext").value=""
});
$('.sug3').click(function(){
document.getElementById("mytext").value=$(this).text()
insertChat("me", $(this).text(), 0)
document.getElementById("mytext").value=""
});

29
$('.sug4').click(function(){
document.getElementById("mytext").value=$(this).text()
insertChat("me", $(this).text(), 0)
document.getElementById("mytext").value=""
});
$('.sug5').click(function(){
document.getElementById("mytext").value=$(this).text()
insertChat("me", $(this).text(), 0)
document.getElementById("mytext").value=""
});
}, 1000);
}
}
});

btn.addEventListener('click',e=>{
e.preventDefault()
var text=document.getElementById("mytext").value;
if(text!==""){
insertChat("me",text,0);
document.getElementById("mytext").value="";
}

})

30
PLAGIARISM REPORT

31
32
project
ORIGINALITY REPORT

6 %
SIMILARITY INDEX
0%
INTERNET SOURCES
2%
PUBLICATIONS
5%
STUDENT PAPERS

PRIMARY SOURCES

1
Submitted to Arab Open University
Student Paper
4%
2
Submitted to The Chartered Insurance Institute
Student Paper
1%
Triantafyllidis, A., V. Koutkias, I. Chouvarda,
3
and N. Maglaveras. "A Pervasive Health 1%
System Integrating Patient Monitoring, Status
Logging and Social Sharing", IEEE
Transactions on Information Technology in
Biomedicine, 2012.
Publication

Emanuela Haller, Traian Rebedea. "Designing


4
a Chat-bot that Simulates an Historical Figure", <1%
2013 19th International Conference on Control
Systems and Computer Science, 2013
Publication

Submitted to Postgraduate Schools -


5
Limkokwing University of Creative Technology <1%
Student Paper

Submitted to University of Sydney


33
6
Student Paper <1%

Submitted to University of Wales Institute,


7
Cardiff <1%
Student Paper

34
STUDENT CONTRIBUTION

STUDENT NAME : Ayush Banerjee

Reg No : RA1511003010156

WORK DONE

 Worked on the back end development.


 Worked on the Naïve Bayes algorithm for implementation.
 Worked on the python data structure of tensor flow execution.
 Final finishing of implementation and debugging.

STUDENT NAME : Nikhit Reddy

Reg No : RA1511003010242

WORK DONE

 Worked on the front end development of the bot


 Worked on the designing of the website using php and html
 Worked on the linking of the backend server and the frontend by using
AJAX and DJANGO
 Worked on the implementation models and training the machine according
to the need of the user.

35

View publication stats

You might also like