Student Information Chatbot Final Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Minor Research Project

OR

Student Information Chatbot

Final Report
Submitted to

P P Savani University
Surat

Submitted by
J enil Chaka1asiya(1sSS02lT00 2)
Smit Donda( i OSS0 2lT006)
Jaykumar Savani(inSS02lT031)
B. Sc.lT

P SAVANI

School of Engineering
P P Savani University
May, 2019-20
P P SAVANI
U N I V E R S I T Y

This is to certify that Mr . Savani kumar Enrollment

18SS02IT03 1 from the Department of B. Sc.lT has successfully

completed the Minor Project on the Student lnfoi’ination Chatbot

during Dec, 2019-May, 2020.

Date:

Name and Sign of Supervisor Dean, SOE


ACKNOWLEDGEMENT

It is indeed with a great pleasure and immense sense of gratitude that we


acknowledge the help of these individuals. We are highly indebted to our Dean Dr. Niraj
Shah, Dean, School of Engineering, P P Savani University, for the facilities provided to
accomplish this minor project.
We feel elated in manifesting our sense of gratitude to our project guides Bit.win
Rain. He has been a constant source of inspiration for us and we are very deeply thankful
to him for his support and valuable advice
We extremely grateful to our Departmental smff members, Lab technicians and Non
teaching staff members for their extreme help throughout our project.
Finally we express our thanks to all of our friends who helped us in successful completion
of this project.

Jenil Chakalasiya(18SS02IT002)
Smit Donda (18SS02IT006)
Jaykumar Savani (18SS02IT031)
ABSTRACT

Automatic conversation system is an intelligent human machine interaction using


natural language. Main goal of it is to allow the user and machine to make a natural
harmonious conversation. Thus, enabling the machine to recognize human motivation
and to respond accurately, is not only an important manifestation of advanced
intelligence, but also a very challenging work in harmonious human interaction field. A
conversation system consists of speech recognition, speech synthesis, and dialogue
management and conversation generation. In this research, we focus on automatic
generation of conversation between a computer and a human being with little knowledge
of the computer. In this paper, we influenced a PC to end up a preparation to accomplice
of a man who isn't great at discussion, to wind up a band together with a man. Therefore,
in this research, we are focusing specifically on "chat ' by developing which converse
mainly by using Python. Our main focus, is to build a Student chat bot which helps the
colleges to have 24*7 automated query resolution. This helps the users to have the right
information from the source.
1. INTRODUCTION.......................................................................................................................1
1.1 Introduction..................................................................................................................1
1.2 Problem introduction...............................................................................................1
1.S Motivation and Objective..............................................................................................1
2. REQUIREMENTS SPECIFICATION................................................................................................3
2.1 Introduction..........................................................................................................S
2.2 Hardware requirements...............................................................................................8
2.3 Software requirements.............................................................................................3
3. ANALYSIS...........................................................................................................................4
3.1 Existing System..................................................................................................................4
S.2 Proposed System...............................................................................................................4
4. DESIGN..........................................................................................................................................5
4.1 System Design..............................................................................................................5
4.1.1 1UML Diagrams of our project.............................................................................6
5. SYSTEM IMPLEMENTATI ON...................................................................................................................7
5.1 Sample code...................................................................................................................7
5.2 Sample data.........................................................................................................................1S
6. CONCLUSI ON AND FUTURE SCOPE
REFERNCES.......................................................................................................................................14
List of Figures/Tables

Sr. No Fig. Name/ Table Name Page. No.

Fig.4.1: Use Case Dia am of Chatbot Desi

Fig. 4.2: Sequence Diagram Representing UML of the Chatbot

3. Code.5.1: Sample code 7-1 2


4. Table. 5.1: Sample data 13
CHAPTER 1
INTRODUCTION

1.1Introduction
This A chatbot. ' is a computer program which conducts a conversation via textual
method. Such programs are often designed to convincingly simulate how a human would
behave as a conversational partner, thereby passing the Turing test. Chat bots are
typically used in dialog systems for various practical purposes including user service or
information acquisition. This system which will provide answers to the queries of the
users.
User interfaces for software applications can come in a variety of formats, ranging
from command-line, graphical, web application, and even voice. While the most popular
user interfaces include graphical and web-based applications, occasionally the need
arises for an alternative interface. Whether due to multi-threaded complexity, concurrent
connectivity, or details surrounding execution of the service, a chat bot-based interface
may suit the need.
Chat bots typically provide a text-based user interface, allowing the user to type
commands and receive text as well as text to speech response. Chat bots are usually a
stateful services, remembering previous commands (and perhaps even conversation) in
order to provide functionality. When chat bot technology is integrated with popular web
services it can be utilized securely by an even larger audience.

1.2 Problem introduction


Creating a chatbot able to answer every single question about This chatbot is not
possible to implement with current technology and within the duration of the project, so
the system will be able to answer questions about limited topics. The system will only
support questions in standard English.

1.3Motivation and Objective


This Chatbot receives questions from users, tries to understand the question, and
provides appropriate answers. It does this by converting an English sentence into a
CHAPTER 1
INTRODUCTION (continue)

machine-friendly query, then going through relevant data to find the necessary
information, and finally returning the answer in a natural language sentence. In other
words, it answers your questions like a human does, instead of giving you the list of
websites that may contain the answer. For example, when it receives the question 'what
is the age of Ravi ', it will give a response "I prefer Registration numbers. Since you have
been good to me, I'll show the results: Age of Ravi is 21 ’ The goal is to provide chatbot
students and faculty a quick and easy way to have their questions answered, as well as to
offer other developers the means to incorporate Chatbot into their projects.
CHAPTER 2
REQUIREMENT SPECIFICATION

2.1 Introduction
It takes a lot of work to turn a chatbot idea into a project. In fact, it requires a
complete step-by-step chatbot strategy starting from goal definition to publishing and
maintenance.
Once the bot is deployed for end users, it’s important to keep a check on its
performance and continue to refine its namral language understanding through further
training. The bot should be aware if a user is authorized and properly authenticated to
chat with it. This ensures that the bot is able to provide the right set of relevant services
for a particular user.

2.2 Hardware requirements


• Processor — i3
• Hard Disk — 5 GB
• Memory — 1GB RAM

2.3 Software requirements


• Windows 7 or higher
• Excel
• Spyder or Pycharm or IDLE
CHAPTER 3
ANALYSIS
3.1 Existing System
The creation and implementation of chatbots is still a developing area, heavily
related to python so the provided solutions, while possessing obvious advantages, have
some important limitations in terms of functionalities and use cases. However, this is
changing over time. As the database, used for output generation, is fixed and limited,
chatbots can fail while dealing with an unsaved queiy. But this chat bot cannot fail the
user can type query if the query cannot match with data so chat bot will massage; I do not
understand your questions. there are many popular chatbot in marketing for example
Alexa it works on the voice bot that resulted in largest revenues in our chat bot reply with
text form and quick replay all information form data. Analytics are often overlooked and
underappreciated when it comes to chatbots. While chatbot analytics are unlikely to
make or break the success of a chatbot, they can provide valuable insight into
opportunities for information about data allowing chatbot can help reply with text of
users.

3.2 Proposed System


A student information chatbot project is built using artificial algorithms that
analyses user’s queries and understand user’s message. users just have to query through
the bot which is used for chatting. The answers are appropriate what the user queries.
The user does not have to personally go to the college for enquiry.
CHAPTER 4
DESIGN
4.1 System Design
A Chatbot refers to a chatting robot. It is a communication simulating computer
program. It is all about the conversation with the user. The conversation with a Chatbot
is very simple. It answers to the questions asked by the user. During designing a Chatbot,
how does the Chatbot communicate to the user? And how will be the conversation
with the user and the Chatbot is very important. The design of a Chatbot is represented
using diagram as follows:

Fig. 4.1: Use Case Di agranz of’ Ch atb ot Design

In today’s world computers play an important role in our society. Computers give
us information; they entertain us and help us in lots of manners. A chatbot is a program
designed to counterfeit a smart communication on a text or spoken ground. But this paper
is based on the text only chatbot. Chatbot recognize the user input as well as by using
pattern matching, access information to provide a predefined acknowledgment. For
example, if the user is providing the bot a sentence like ' What is your name?’ The chatbot
is most likely to reply something like "My name is Chatbot.’ or the chatbot replies as "You
can call me Chatbot. ’ based on the sentence given by the user. When the input is bringing
into being in the database, a response from a predefined pattern is given to the user. A
Chatbot is implemented using pattern comparing, in which the order of the sentence is
recognized and a saved response pattern is acclimatize to the exclusive variables of the
sentence. They cannot register and respond to complex questions, and are unable to
perform compound activities.
CHAPTER 4
DESIGN (continue)

4.1.1 UML Diagrams of our project


UML is a general-purpose modelling language. The main aim of UML is to define a
standard way to visualize the way a system has been designed.

Fig. 4.2: Scquencc Diagram Repi cscnti nq UML of’ th c Chatbot

In this diagram can show User Communicate with Chatbot and User can input the
Questions. The Chatbot can receive the User Input and Compare Strings with Chatbot
Database and Return Output.
CHAPTER 5
SYSTEM IMPLEMENATION (continue)
5. l Sample
code
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
from chatterbot.trainers import ListTrainer

import pandas as pd

# Importing the dataset


dataset = pd.read_csv( student_dataset.csv , sep= , )

d_sex = dataset['Sex']
d_age = dataset['Age ]
d_regno = dataset['RegNo ]
d_name = dataset['Name
d_marks = dataset['Marks J
d_mobno = dataset['MobNo ]

# Create a new instance of a ChatBot


bot = ChatBot(
'Terminal ',
storage_adapter= 'chatterbot.storage.SQLStorageAdapter ',
logic_adapters=[
'chatterbot.logic.MathematicalEvaluation™,

import_path : chatterbot.logic.BestMatch

'import_path': 'chatterbot.logic.LowConfidenceAdapter',
CHAPTER 5
SYSTEM IMPLEMENATION (continue)
threshold': 0.50,
'default_response': 'I am sorry, but I do not understand.'

inpiit_adapter="chatterbot.input.TerminalAdapter™,
output_adapter = 'chatterbot.output.TerminalAdapter '

lowest_name =
lowest_regno = '
topper_name =
topper_regno =

no_of_people_90 = 0

for i in range(0,len(d_marks)):
if d_marks[i1 -- min(d_marks):
lowest_name = d_nam e[i1
lowest_regno = d_regno[i]

if d_marks[i] == max(d_marks):
topper_name = d_nam e[i1
topper_regno = d_regno[i]

if d_marks[i] < 40:


no of failures = no of failures + 1
failures = failures + , '+ d_name[i1 +' ('+d_regno[i]+ )
CHAPTER 5
SYSTEM IMPLEMENATION (continue)

if d_marks[i] >= 90:


no_of_people_90 = no_of_people_90 + 1

bot.set_trainer(ChatterBotCorpusTrainer)
bot.train("chatterbot.corpus.english ')
bot.set_trainer(ListTrainer)
for i in range(0,len(d_marks)):

bot.train([
'Give me the complete details of{} '.format(d_regno[i]),
'\nHere are the details:Registeration No.: {}; Name: (} Age: {} Sex: {} Marks: (}
Mobile No.: {} '.format(d_regno[i], d_name[i], d_age[i], d_sex[i], d_marks[i], d_mobno[ill .
'complete details of{} '.format(d_regno[i]),
'\nHere are the details:Registeration No.: {}; Name: {} Age: {} Sex: {} Marks: {}
Mobile No.: {} '.format(d_regno[i 1. d_name[i], d_age[iJ, d_sex[i], d_marks[i1. d_mobno[i]),
Ii

bot.train([
"what is the marks of{} '.format(d_regno[i]),
'Marks of{} - {} is {} '.format(d regno[i], d_name[i], d_marks[i]),])
bot.train([
'what is the age of{} '.format(d_regno[i ll .
'Age of{} - {} is {}".format(d_ name[i1. d_regno[i1. d_age[i]), j)
bot.train([
"what is the mobile number of{}".format(d_regno[i]),
"Mobile number of{} - {} is {} '.format(d_regno[i], d_name[i], d_mobno[i]),])
bot.train([
'what is the marks of{} '.format(d_name[i]),
CHAPTER 5
SYSTEM IMPLEMENATION (continue)

'I prefer Registeration numbers.. Since you have been good to me, I'll show the results :
Marks of{} - {} is {} '.format(d_regno[i], d_name[i], d_marks[i]),])
bot.train([
"what is the age of{}".format(d_name[i]),
"I prefer Registeration numbers.. Since you have been good to me, I'll show the
results :Age of{} - {} is {}".format(d_name[i], d_regno[i], d_age[ij),
II
bot.train([
'what is the mobile number of{} '.format(d_name[i]),
'I prefer Registeration numbers.. Since you have been good to me, I'll show the
results :Mobile number of{} - {} is {} '.format(d_regno[i 1. d_name[iJ, d_mobno[i]),

bot.train([
"what is the class average?',
'The class average is {} '.format(sum(d_marks)/len(d_marks))

bot.train([
"what is the lowest marks?",
'The Lowest marks is {} '.format(min(d_marks))

bot.train([
"how many failures?",
"These many guys got below 40 {}".format(no_of_failures)

bot.train([
CHAPTER 5
SYSTEM IMPLEMENATION (continue)

'who all failed?',


'Sad.. But these people could nt cross 40 {}".format(failures)

bot.train([
'what is the highest marks?',
'The highest marks is {} '.format(max(d_marks))

bot.train([
'who got the highest marks? ',
"The highest marks is {}, obtained by {} {} '.format(max(d_marks), topper_name,
topper_regno)
II

bot.train([
'who got the lowest marks? ',
'The lowest marks is {}, obtained by {} {} Feel sad for the
chap '.format(min(d_marks), lowest_name, lowest_regno)

bot.train([
'Who all got above 90 '
'{} '.format(no_of_people_90)

hot.train("chatterbot.corpus.english ')

CONVERSATI ON_ID = bot.storage.create_conversation()


CHAPTER 5
SYSTEM IMPLEMENATION (continue)
def get_feedback():
from chatterbot.utils import input_function

text = input_function()

if yes' in text.lowers.
return False
elif no in text.lower():
return True
else:
print( Please type either 'Yes ' or 'No ”)
return get_feedback()

print( '\n\n\ n\n\n\n\n\n\n\n\n\ n\n\n\ n\n\n\n\n\ n\n\n\ n\n\n\n\n\n\n\n\n\n\n


\n\n\n\n\n\n\n\n\n\n\nHi, I'm Silence - The Chatbot\nH ere to help!\n\n ')
from chatterbot.utils import input_function

while True:
try:
input_statement = boLinput.process_input_statement()
statement, response = bot.generate_response(input_statement, CONVERSATI ON_ID)
bot.output.process_response(response)
print('\n’)

except (Keyboardlnterrupt, EOFError, SystemExit):


break
CHAPTER 5
SYSTEM IMPLEMENATION (continue)
5.2 Sample data
RegNo Name Sex Age Marks MobNo
16BIS0D68 Yash M 19 91 93lDl48994
16BCB0011 Hitanshu M 20 85 9855748964
16BME02D5 Paresh M 19 71 958S87469S
16BNM2025 Ravi M 20 72 798S64329S
16BCE1450 Anjali F 21 75 858S7S954S
168tS0103 Keshav M 20 80 9658965896
16BCS0DD 1 Aisha F 2D 64 9856325623
16MIS201D Ankita F 18 9D 9413652789
1SBMED5D5 Ravi M 21 13 9586478569
14BCL1003 Sach M 22 39 9636963698
16BCJ05D1 Hari M 20 4D 9687412365
16BNI7465 Saanchi F- 20 65 9875461235
16BCY5469 Shiva M 20 81 9696968596
16BEC4650 Ambu M 21 70 9658522563
17BCV3205 Nitya F 2D 90 6985745896
168ME0999 Aalind M 21 69 9812365478
Table5,1:sanzple data f'or chatbot
CHAPTER 6
CONCLUSIONS AND FUTURE SCOPE

In this project, we have introduced a chatbot for student information that is able to
interact with faculty and student. This chatbot can answer queries in the textual user
input. 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 one-part simple users. A database was developed, which stores
information about questions, answers, keywords, logs and feedback messages. An
evaluation took place from data collected. after received feedback from the first
deployment, extra requirements were introduced and implemented.

ADVANTAGES:
• This application saves time for the student as well as teaching and non-teaching
staffs.
• User does not have to go personally to college office for the enquiry.
• Getting an instant response.
• Easy communication

FUTURE SCOPE
1. Linguistic and conversational ability must improve.
2. Voice interface.
3. Faster problem solving
4. Better insights & consumer analytics
REFERNCES

' Chatbot: chat robot, a computer program that simulates human conversation, or chat,
through artificial intelligence. Typically, a chat bot will communicate with a real person.
l*1UML:The Unified Modeling Language (UML) a general-purpose,
developmental, modeling language in the field of software engineering that is intended to
provide a standard way to visualize the design of a system.

You might also like