BACHELOR OF SCIENCE (COMPUTER SCIENCE)
A.I CHATBOT FOR BOOK E-COMMERCE SYSTEM
BY
ABHISHEK DOIPHODE
SEAT NUMBER – 01
Under the esteemed guidance of
MS. Vaishali Desai
DEPARTMENT OF COMPUTER SCIENCE
LORDS UNIVERSAL COLLEGE
(Affiliated to University of Mumbai)
MUMBAI – 400065
MAHARASHTRA
YEAR 2021 – 2022
VIKAS VIDYA EDUCATION TRUST’S
CERTIFICATE
This is to certify that the project titled NUTRITIONIST CHATBOT
A.I is undertaken at the Lords Universal College by
Abhishek Doiphode partial fulfilment of degree Bachelor of
Science in Computer Science (Sem-V). It is further certified that the
student has completed all required phases of the project.
__________________________ ________________________ ________________________
Head of Department External Examiner Internal Examiner
Date:
PROFORMA FOR THE APPROVAL PROJECT PROPOSAL
(Note: All entries of the proforma of approval should be filled up with appropriate and
complete information. Incomplete proforma of approval in any respect will be
summarily rejected.)
01
PNR No.: 2018016400332026 Roll no: _
1. Name of the Student
ABHISHEK SUHAS DOIPHODE
2. Title of the Project
NUTRITIONIST CHATBOT A.I
3. Name of the Guide
Ms. VAISHALI DESAI
[Link] experience of the Guide 5 YEARS
5. Is this your first submission? Yes No
Signature of the Student Signature of the Guide
Date: ………………… Date: …………………….
Signature of the Coordinator
Date: …………………
Acknowledgement
This Project being a maiden experience for me has been a big
confidence booster. I extend sincere thanks to all of them who
helped me with it.
In this endeavor, I acknowledge the valuable contribution and
expert guidance of our internal project and Coordinator
Ms. Vaishali Desai of Department of Computer Science.
Her continued and unending support, granting me the permission
to work on this project as well as her frank suggestion,
improvement, and innovative ideas have inspired me.
Last but not the least, my sincere thanks to our College
Dr. Bharat M Pithadia for giving me the opportunity to grab the
Knowledge
NUTRITIONIST CHATBOT
INDEX
Sr Content Page Sign
No. No.
1 Introduction
1.1 Project Description
1.2 About the Problem
2 OBJECTIVE
2.1 The primary reason to chose this
particular topic
03 Requirement Specification
3.1 Software Components
3.2 Hardware Components
4 System Design
4.1 METHODOLOGY
4.2 UML Diagram
4.2.1 ER DIAGRAM
4.2.2 ACTIVITY DIAGRAM
4.2.3 USECASE DIAGRAM
4.2.4 CLASS DIAGRAM
5 SYSTEM MODULES
5.1 BODY MASS INDEX(BMI)
FORMULA
What is a normal BMI?
5.2 FOODVALUES
For example:-
5.3 FOOD SUGGEST
There are 3 types of Diet
5.3.1 Balanced Diet
5.3.2 Weight Loss Diet
7.10 Search Product
08 Advantages and Disadvantages
8.1 Advantages
8.2 Disadvantages
09 Testing (Test Cases)
9.1 Test Case Report
9.2 Test Case ScreenShot
9.2.1 Login
9.2.2 Search Product
9.2.3 Change Password
9.2.4 Add to Cart
9.2.5 Cart
9.2.6 Payment
9.2.7 View Order
9.2.8 Manage Delivery
9.2.9 Register
10. Conclusion and Future Scope
10.1 Conclusion
10.2 Future Scope
11. REFERENCES
ABSTRACT
Inadequate and inappropriate intake of food is known to cause various health
issues and diseases. Due to lack of concise information about healthy diet, people
have to rely on medicines instead of taking preventive measures in food intake.
Therefore, a user-friendly conversational agent like chatbot can be implemented
for better user interaction which can give solutions to people’s common
questions like ‘what are some healthy meals to have in breakfast, lunch and
dinner?’, ‘how much calorie should be consumed in a day?’ and many more
questions related to individual’s health. This system attempts to build user’s
health profile and stores it in database and recommends food and diet with
consideration of the health profile constructed.
Also, one can check and calculate their BMI count, ideal body weight and
calorie count/consumption based on their information. It is a personalized
interactive food recommendation system.
CHAPTER 1- INTRODUCTION
1.1 Project Description
A chatbot (also known as a talkbots, chatterbot, Bot, IM bot, interactive
agent, or Artificial Conversational Entity) is a computer program or an
artificial intelligence which conducts a conversation via auditory or textual
methods.
Every day we make decisions of what food we are having and what
nutrition it consists of and these choices determine how healthy we will be
in long run. Right amount of food is required for us to be healthy because
too much food makes us obese while too less can make us malnourishment.
The proposed application ‘NUTRITIONAL CHATBOT’ provides solution
for the above decisions.
It provides you a clear picture of what your body is and how healthy you
are. This decision of is not only based on food that we have but also
considers your physical activity of a person. The system consists of three
major parts, input food, profile analysis and recipes. Profile analysis takes
up the present height and weight of a person and analyses if the person is
correct weight range or overweight or underweight.
Recipes section has several recipes that user can use based on his
requirement and interests. This is achieved using PYTHON AND
DISCORD API.
The online artificial dietician is a bot with artificial intelligence about
human diets. It acts as a diet consultant similar to a real dietician.
Dieticians are educated with nutrient value of foods. A dietician consults a
person based on his schedule, body type, height and weight. The system too
asks all this data from the user and processes it.
It asks about how many hour the user works, his height, weight, age etc.
The system stores and processes this data and then calculates the nutrient
value needed to fill up users needs. The system then shows an appropriate
diet to the users and asks if user is ok with it, ,else it shows other alternate
diets to fill up users needs.
1.2 About the Problem
One has to be sure about their details while entering fields like age
height weight working hours and many more otherwise this system
would give results that is not suitable for user if not sure about what
they entered.
Lack Emotions:-
Unlike humans, a chatbot has no emotions. However, they are
pretty essential to keep a conversation going the right way. Your
customer service executives can understand your customers’
emotions and respond accordingly, but a chatbot may not be able
to do so.
Bots can be too mechanical. With pre-programmed
conversations, they can handle customer requests when the flow
of the conversation follows a specific path. But they may not be
able to handle when the conversation takes an unexpected turn.
Since chatbots have no feelings and emotions, it can become
critical for them to effectively interact with humans in some
cases.
Difficult to Create:-
It is very challenging to create a chatbot from scratch. It requires
that you invest significant time and effort into creating it. You may
also need to have some coding knowledge to create a better-
functioning chatbot.
Require Maintainence:-
Chatbots require ongoing review, maintenance, and optimization
in terms of their knowledge base and the way they are supposed
to communicate with your customers.
You need to feed them with new, insightful data (content) that
they can use to respond to customer requests and questions. They
should be able to extract the most relevant and helpful content to
solve your customers’ problems.
For this, you need to analyze the conversations your bots have
and identify the most common questions that your customers ask
[Link] can then add answers to these questions to the
knowledge base.
But it isn’t easy to track and analyze every conversation your bot
has.
CHAPTER 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.
To create an application so that people don't have to consult a dietician
everytime. Saves time and money.
Chatbot applications streamline interactions between people and
services, enhancing customer experience. At the same time, they offer
companies new opportunities to improve the customers engagement
process and operational efficiency by reducing the typical cost of
customer service.
A healthy diet comprises a combination of different foods. These include:
Staples like cereals (wheat, barley, rye, maize or rice) or starchy tubers
or roots (potato,yam, taro or cassava).
Legumes (lentils and beans)
Fruit and vegetables.
Foods from animal sources (meat, fish, eggs and milk).
2.1 The primary reason to chose this particular topic:-
A career in nutrition is ideal for those seeking to promote a balanced
lifestyle and improve people's diets, while helping them to keep a healthy
weight, boost their immune system, increase their energy levels, and
reduce the risk of developing certain diseases.
In this busy world, it has become almost impossible for a person to take
care of his health. So, as the world is automating, user needs a system to
keep track of his health as well.
There are many existing nutritional websites but they rely on user
manual input of physical activity which may give scope for errors. So,
the idea of developing an application that would automatically sync his
activity with his/her food plan got me excited to work on this application.
To promote the importance of Health in our daily [Link] of
helathy meals etc.
CHAPTER 3 - Requirement Specification
3.1 Software Requirements:-
Windows Xp, Windows 7(ultimate, enterprise) or Higher
Visual studio 2008
DISCORD APP OR DISCORD SITE
FRONTEND:-
DISCORD APP
BACKEND:-
PYTHON
3.2 Hardware Components:-
Processor – i3 processor or higher
Hard Disk – 2TB
Memory – 1GB RAM
Internet Connection
CHAPTER 4 - System Design
System design is the process of defining the elements of a system such as the
architecture, modules and components, the different interfaces of those components and
the data that goes through that system. System design is a pictorial representation of the
functioning of the system. System design is dependent on the specified requirements. In
a nut shell, system design is a graphical representation of requirements document which
can be built using UML diagrams.
4.1METHODOLOGY:-
The Chatbots work based on three classification methods:
Pattern Matches: 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.
A simple example of Pattern matching is;
Workflow Diagram :-
Start
Obtaining and preparing data to
train
Analyzing data for intents
Analyzing data to build answer system
Designing User interface
Analyzing relevant entities in
questions and answers
Test the model
TOOLS USED:-
Python: for developing algorithms and chatbot backend development
Wikipedia API : for searching data on the internet and loading it in our
chatbot
Chatterbot: ChatterBot is a Python library that makes it easy to generate
automated responses to a user’s input.
Php: for developing a social media website to pick data
DISCORD APPLICATION
4.2 UML Diagram
4.2.1 ER DIAGRAM :-
4.2.2 ACTIVITY DIAGRAM:-
4.2.3 USECASE DIAGRAM:-
4.2.4CLASS DIAGRAM :-
CHAPTER 5- SYSTEM MODULES
5.1 BODY MASS INDEX(BMI):-
If a person's weight in kilograms divided by the square of height in meters. A
high BMI can indicate high body fatness. BMI screens for weight categories that
may lead to health problems, but it does not diagnose the body fatness or health
of an individual.
BMI is a useful measure of overweight and obesity. It is calculated from your
height and weight. BMI is an estimate of body fat and a good gauge of your risk
for diseases that can occur with more body fat.
What is a normal BMI?
For most adults, an ideal BMI is in the 18.5 to 24.9 range. For children and
young people aged 2 to 18, the BMI calculation takes into account age and
gender as well as height and weight.
BMI scores of 20 to 24.9 are considered normal, scores of 25 to 29.9 are
overweight, scores of 30 to 34.9 are obese, and scores above 35 are extremely
obese. Scores under 20 are considered underweight
IMPORTANT:-
BMI is not used for muscle builders, long distance athletes, pregnant
women, the elderly or young children.
FORMULA:-
BODY MASS INDEX(BMI):- BMI = kg/m2
KG is a person's weight in kilograms
M2 is their height in metres squared.
5.2 FOODVALUES:-
The food value of a particular food is a measure of how good it is for you, based
on its level of vitamins, minerals, or calories.
The nutritional value of a particular food.
For example:-
Cow milk 1 qt. 976 660 32 40 36 0 48 Dairy products
Milk skim 1 qt. 984 360 36 0 0 0 52 Dairy products
Buttermil
k 1 cup 246 127 9 5 4 0 13 Dairy products
energy water total carbohydrates fiber calcium iron viatmin
name (kcal/kj) (g) protein (g) fat (g) (g) (g) sugars (g) (mg) (mg) b3 (mg)
apple 48/200 86.7 0.27 0.13 12.7 1.3 10.1 5 0.07 0.091
apricot 48/201 86.4 1.4 0.39 11.12 2 9.24 13 0.39 0.6
avocado 160/670 73.23 2 14.7 8.53 6.7 0.66 12 0.55 1.738
banana 89/371 74.91 1.09 0.33 22.84 2.6 12.23 5 0.26 0.665
5.3 FOOD SUGGEST:-
There are 3 types of Diet
[Link] Diet :-
A balanced diet is a diet that contains differing kinds of foods in certain quantities and
proportions so that the requirement for calories, proteins, minerals, vitamins and
alternative nutrients is adequate and a small provision is reserved for additional
nutrients to endure the short length of leanness.
5.3.2. WeightLoss Diet:-
To lose weight you must burn more calories than you eat. Basic body functions (e.g.
breathing, manufacturing cells and maintaining body temperature) use 50-70% of your
calories. The rate at which your body uses calories for basic body functions is called the
Resting Energy Expenditure (REE).
5.2.3. WeightGain Diet:-
Overeating remains a prominent cause of weight gain. If you take in more calories than
you burn per day, you'll likely gain weight
Weight gain occurs when more energy (as calories from food and beverage
consumption) is gained than the energy expended by life activities, including normal
physiological processes and physical exercise.
SCOPE OF THE PROJECT
Better Programming Has Better Results
A chatbot programmed correctly has better outcomes than a chatbot with
poor programming. If a chatbot is programmed in the right way using
advanced frameworks like Keras, PyTorch, and TensorFlow, then it can
deliver your customers a quintessential experience.
They are Learning New Things
The R&D centers of various organizations are teaching chatbots to behave
as humans do. Chatbots are getting the skills of humans, and it will
increase the rate of satisfaction.
So chatbots are becoming more human for outstanding results while
benefiting the customers.
Top-notch Interface
The overall performance of a chatbot depends on its interface. If the
interface is poor, then the outcomes will be disappointing. Recent years
were rewarding for chatbots as their interface is getting better with each
day.
Their interface is making things easier for the businesses as well as for the
customers.
“More than 55% of the clients are interested in connecting
with chatbots due to their 24*7 availability”.
Advantages:
No need of consulting doctor for diet plans.
This system provides full details of the nutrient constitution in body and if
required more or not along with the plan by just answering to some queries.
Saves money and very effective and give accurate results as it is coded with
keeping diet chart in mind.
There are alternative diet chart provided by the system if the user don't like any.
Save time and money
Generate new leads
Guide users
It provides support 24 x 7
Individual can also use this software especially for themselves in home.
DISADVANTAGES
1. Chatbots sound too Mechanical:
o Chatbots are not human and so obviously they cannot interact as a human with
customers. They sound too mechanical and can only give answers to problems
that they have been programmed with.
o They cannot answer a customer according to the context and they cannot show
any emotions if needed.
o Chatbots also cannot maintain a natural-sounding conversation in-depth with
customers and that is why they are only useful in solving basic queries. But this
can create a disconnect with customers who prefer the human approach when
solving their problems.
2. Chatbots can only handle basic Questions:
o Chatbots are still a basic Artificial Intelligence technology and so they
can only answer the basic questions of customers and provide general
information that is already available to them.
o They cannot solve complicated queries or answer out of script questions
and companies need to have human customer service employees that can
manage these for them. However, this is changing with time and
currently, more and more advanced chatbots are entering the market.
3. Chatbots are Difficult to Create:
o Chatbots are created using Natural Language Processing which is
extremely popular for customer support applications.
o Natural Language Processing is a part of Machine Learning which can be
used to interact with the users in textual form and solve their queries.
However, this requires complex programming and is not easy for
companies. This becomes especially difficult if companies have to create
chatbots from scratch and that is why many online platforms help
companies to build and manage chatbots easily.
4. Chatbots require Constant Maintenance:
Companies cannot just create a
o chatbot and then leave it hoping that it will correctly answer customer
inquiries forever! The company products change with time and more
advanced Natural Language Processing capabilities are also developed
with time.
o All of these changes need to be programmed into the chatbot so that it
has the most up to date information. In addition to that, chatbots also
need to be periodically analyzed so that the most common questions that
customers have can be identified and then their answers updated for
future customers.
5. Exorbitant Installation
o Yes, chatbots save you a lot of money in the long run, but their installation cost
can break the bank. You need to hire professionals who have rightly
programmed chatbots to match the integrity of your business.
o And installing a chatbot service means your business should be ready for
substantial investment into Artificial Intelligence and Machine Learning.
IMPLEMENTATION
INFORMATION ABOUT THE CHATBOT
To Invite people
To get the food value
THE FOOD VALUE OF APPLE
HOW TO CALCULATE BMI(BODY MASS INDEX)
Example:-
Customer is OVERWEIGHT
CHATBOT WILL SUGGEST THE DIET
DIET PLAN
CONCLUSION
For many applications, the chatbot is connected to the
database. The database is utilized to sustain the chatbot
and provide appropriate responses to every user. NLP can
translate human language into data information with a
blend of text and patterns that can be useful to discover
applicableresponses.
There are NLP applications, programming interfaces, and
services that are utilized to develop chatbots. And make it
possible for all sort of businesses – small, medium or large-
scale industries. The primary point here is that smart bots
can help increase the customer base by enhancing the
customer support services, thereby helping to increase
sales.
SYSTEM TESTING
[Link] and Logout:-
[Link] Discord In The Browser
[Link] Activate
[Link] channel
[Link] Server
[Link] Complete Testing
Result
Sr. No Types of Testing Test Case Name Browser Name to Check Test Result
Performed Actual Output
01 Unit testing Login and Google Chrome Pass
Logout
02 Unit testing Open Discord Google Chrome Pass
In The Browser
03 Unit testing Chatbot Activate Google Chrome Pass
04 Unit testing Chatbot channel Google Chrome Pass
05 Unit testing Chatbot Server Google Chrome Pass
06 Integrated Project Complete Google Chrome Pass
testing Testing