0% found this document useful (0 votes)
14 views16 pages

NLP Report Merged

Mlp report

Uploaded by

Saima khan
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)
14 views16 pages

NLP Report Merged

Mlp report

Uploaded by

Saima khan
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/ 16

Mini Project

ON

“Chatbot in Python”

Submitted in partial fulfillment of the requirements of the


degree
BACHELOR OF ENGINEERING IN COMPUTER
ENGINEERING

BY

Surve Sufiyan Khalil Ahmed ROLL NO.60

Ansari Tausif Ahmad Md Irfan ROLL NO.4

Tejaswini Baliram Rathod ROLL NO.47

UNDER THE GUIDANCE OF

PROF. Satish Manje

DEPARTMENT OF COMPUTER ENGINEERING

SHIVAJIRAO S. JONDHLE COLLEGE OF ENGINEERING AND


TECHNOLOGY,

ASANGAON 421601.

UNIVERSITY OF MUMBAI 2022-23


Project Report ChatBot in python

INTRODUCTION

Chatbot is an automated software program that interacts with humans using natural language.

Chatbot are programs that work on Artificial Intelligence (AI) & Machine Learning platform.

This software program conducts conversation with users via textual methods

In this project, Chatbot is developed using python programming language in google collabs.

SSJCET, Asangaon 1 Department of Computer Engg.


Project Report ChatBot in python

ABSTRACT

The application "CHATBOT USING PYTHON" is designed by python using JSON


Database structure.

A chatbot suits the user needs and requirements.

Chatbots are usually a stateful services, remembering previous commands in order to provide
functionality.

It gives answers to the user in a text-based commands. The questions could be regarding
college details.

SSJCET, Asangaon 2 Department of Computer Engg.


Project Report ChatBot in python

EXISTING SYSTEM

User need to personally visit the college and ask the college help desk, if the students have
any queries about the college.

It takes lot of time and money if the college is miles away from the student native place.

DISADVANTAGE:

The chat bot system is not known to people who do not have more knowledge about the
technology

Even if there exist a chatbot system, it is not much accurate in providing the answer or
solution

Also this process may lead to communication gap between student and college.

SSJCET, Asangaon 3 Department of Computer Engg.


Project Report ChatBot in python

PROPOSED SYSTEM

This application provides answer to the query of the student.

Students have to query through the bot which is used for chatting.

The system uses Built in tensorflow, tflearn libraries and NLP, Neural network concepts.

The answers are appropriate what the user queries.

ADVANTAGES OF PROPOSED SYSTEM

Chart bot can run on local computers and phones, smart devices.

Eliminates the requirement of any manpower during online interaction.

Chat bot is typically perceived as engaging software entity.

It is an extremely helpful and useful system for disabled people.

SSJCET, Asangaon 4 Department of Computer Engg.


Project Report ChatBot in python

SYSTEM REQUIREMENTS

Software requirements

Operating system : Windows 10

Coding language : Python 3.8

Tool Used : Google Colab

Front end : HTML 5.2, CSS3

Data Base : MySQL 8.0.21

HARDWARE REQUIREMENTS

Processor : intel core5

Hard disk : 250GB

Monitor : 15"LED

RAM : 4 GB

Input devices : Keyboard, Mouse

SSJCET, Asangaon 5 Department of Computer Engg.


Project Report ChatBot in python

MODULES

User Module:

Speech to Text: User will ask the computer to run command by giving input as speech.

Command Execution: Based on command receive from the user, system will execute the
command (if available).

Text to Speech: Once a command is received, application speaks the command.

Chatbot Module:

To make a conversation between both human and machine.

The machine has been embedded knowledge to identify the sentences and making a decision
itself.

User can chat with the bot it implies as if enquiring to the college person about college
related activities.

Information Module:

This system can answer the questions asked by the user.

The question relevant to college the system search and gives that particular college
information.

SSJCET, Asangaon 6 Department of Computer Engg.


Project Report ChatBot in python

DESIGN:

UML DIAGRAMS

USECASE DIAGRAM

CLASS DIAGRAM

SSJCET, Asangaon 7 Department of Computer Engg.


Project Report ChatBot in python

SEQUENCE DIAGRAM

ACTIVITY DIAGRAM

SSJCET, Asangaon 8 Department of Computer Engg.


Project Report ChatBot in python

Coding:

import re

import long_responses as long

def message_probability(user_message, recognised_words, single_response=False,


required_words=[]):

message_certainty = 0

has_required_words = True

# Counts how many words are present in each predefined message

for word in user_message:

if word in recognised_words:

message_certainty += 1

# Calculates the percent of recognised words in a user message

percentage = float(message_certainty) / float(len(recognised_words))

# Checks that the required words are in the string

for word in required_words:

if word not in user_message:

has_required_words = False

break

# Must either have the required words, or be a single response

SSJCET, Asangaon 9 Department of Computer Engg.


Project Report ChatBot in python

if has_required_words or single_response:

return int(percentage * 100)

else:

return 0

def check_all_messages(message):

highest_prob_list = {}

# Simplifies response creation / adds it to the dict

def response(bot_response, list_of_words, single_response=False, required_words=[]):

nonlocal highest_prob_list

highest_prob_list[bot_response] = message_probability(message, list_of_words,


single_response, required_words)

# Responses ----------------------------------------------------------------------------------------------
---------

response('Hello!', ['hello', 'hi', 'hey', 'sup', 'heyo'], single_response=True)

response('ChitChat!', ['what', 'are', 'you', 'doing'], single_response=True)

response('Congo,live a long life', ['Its', 'my', 'birthday', 'today'], single_response=True)

response('See you!', ['bye', 'goodbye'], single_response=True)

response('I\'m doing fine, and you?', ['how', 'are', 'you', 'doing'], required_words=['how'])

response('You\'re welcome!', ['thank', 'thanks'], single_response=True)

response('Thank you!', ['i', 'love', 'code', 'palace'], required_words=['code', 'palace'])

SSJCET, Asangaon 10 Department of Computer Engg.


Project Report ChatBot in python

# Longer responses

response(long.R_ADVICE, ['give', 'advice'], required_words=['advice'])

response(long.R_EATING, ['what', 'you', 'eat'], required_words=['you', 'eat'])

best_match = max(highest_prob_list, key=highest_prob_list.get)

# print(highest_prob_list)

# print(f'Best match = {best_match} | Score: {highest_prob_list[best_match]}')

return long.unknown() if highest_prob_list[best_match] < 1 else best_match

# Used to get the response

def get_response(user_input):

split_message = re.split(r'\s+|[,;?!.-]\s*', user_input.lower())

response = check_all_messages(split_message)

return response

# Testing the response system

while True:

print('Bot: ' + get_response(input('You: ')))

SSJCET, Asangaon 11 Department of Computer Engg.


Project Report ChatBot in python

OUTPUT:

SSJCET, Asangaon 12 Department of Computer Engg.


Project Report ChatBot in python

CONCLUSION:

This chatbot can answer to the queries in the textual user input.

JSON file (which contains questions and its respective answers) has been created and loaded
into the machine.

Chatbot can answer to the queries asked by the user.

In this project, chatbot contains the details about the college.

SSJCET, Asangaon 13 Department of Computer Engg.


Project Report ChatBot in python

FUTURE SCOPE:

It is getting more efficient day by day and the next scope is multilinguistic responses.

Voice-bots are also set to enhance the services.

Human alike.

Adoption of AI to make accurate predication for query.

SSJCET, Asangaon 14 Department of Computer Engg.


Project Report ChatBot in python

REFERENCES:

[1] Bayan Abu Shawar and Eric Atwell, 2007 "Chatbots: Are they Really Useful?"

[2] Bringing chatbots into education: Towards natural language negotiation of open learner
models. Know.-Based Syst. 20, 2 (Mar. 2007), 177-185.

[3] http://en.wikipedia.org/wiki/Chatterbot

[4] ALICE. 2002. A.L.I.C.E AI Foundation, http://www.alicebot.org/

[5] Kumar, M Naveen, PC Linga Chandar, A Venkatesh Prasad, and K Sumangali (2016).
"Android based educational Chatbot for visually impaired people". In: International
Conference on Computational Intelligence and Computing Research (ICCIC), 2016 IEEE,
IEEE, pp. 1–4.

[6] Ranoliya, Bhavika R, Nidhi Raghuwanshi, and Sanjay Singh (2017). "Chatbot for
University Related FAQs". In: 2017 International Conference on Advances in Computing,
Communications and Informatics (ICACCI). Udupi, pp. 1525–1530.

SSJCET, Asangaon 15 Department of Computer Engg.

You might also like