100% found this document useful (1 vote)
2K views69 pages

Medibot Using NLP Seminar Report PDF

This document is a seminar report on developing a medical chatbot using natural language processing (NLP). It discusses NLP and its components, including natural language understanding and natural language generation. It then covers tasks in NLP and applications of NLP like chatbots. The report proposes developing a medical chatbot named Medibot that uses NLP to understand users' medical queries and respond with relevant answers to help users without having to visit a hospital. It discusses the proposed system and method for developing Medibot and concludes with the future scope and importance of medical chatbots.

Uploaded by

Dileep Nlk
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
100% found this document useful (1 vote)
2K views69 pages

Medibot Using NLP Seminar Report PDF

This document is a seminar report on developing a medical chatbot using natural language processing (NLP). It discusses NLP and its components, including natural language understanding and natural language generation. It then covers tasks in NLP and applications of NLP like chatbots. The report proposes developing a medical chatbot named Medibot that uses NLP to understand users' medical queries and respond with relevant answers to help users without having to visit a hospital. It discusses the proposed system and method for developing Medibot and concludes with the future scope and importance of medical chatbots.

Uploaded by

Dileep Nlk
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/ 69

INSTITUTE OF PRINTING TECHNOLOGY &

GOVERNMENT POLYTECHNIC COLLEGE


SHORANUR, KERALA

Department Of Computer Engineering


2019-2020

S​eminar report on
MEDIBOT USING NLP

Submitted by
MUHAMMED JASIR.P
Reg no: 17130679

Guided by
Mrs. SAANI H
Seminar Report 2019-2020 Medibot using NLP
INSTITUTE OF PRINTING TECHNOLOY
& GOVERNMENT POLYTECHNIC
COLLEGE SHORANUR, KERALA

Certificate

This is to certify that seminar report entitled ​MEDIBOT USING


NLP submitted by ​MUHAMMED JASIR.P ​, ​Reg.No : 17130679 ​to the
Department of computer engineering, Institute Of Printing Technology
& Government Polytechnic College Shoranur, Kerala​, ​in partial
fulfilment of the requirement for the award of diploma under the
Directorate of Technical Education, Government of Kerala is a bonafide
record of the work carried out by him.

Guided By Head of Department

Internal Examiner External Examiner

​ lace :
P
Date :

Seminar Report 2019-2020 Medibot using NLP


ACKNOWLEDGEMENT 
 

First of all I thank the Almighty for showering his infinite


blessing throughout my life. I extend my sincere thanks especially
to Mrs. Asha .G. Nair, head of department for her co-operation and full
support .

I would like to express my sincere and propound gratitude to the staff in


charge Mrs. Saani H, lecturer in computer engineering and all other
supporting staffs for remaining source of inspiration and encouragement
throughout to enable me to succeed in the endeavour

​MUHAMMED JASIR.P
​Reg.No: 17130679
Seminar Report 2019-2020 ​1 ​ Medibot using NLP
CONTENTS 
 
​ bstract
A
​ 1. Introduction ……………………………………………3
2. What is NLP ? …………………………………………5
3. Components of NLP…………………………………..7
​3.1. Natural language understanding ………………………….7
3.2. Natural language generation …………………………….10
4. Tasks in NLP ……………………………………......12
5. Applications of NLP ………………………………....14
6. What is chatbot ? ...........................................................16
7. How chatbots work ? .....................................................18
8. Where can we use chatbots ? .........................................22
9. Importance of medical chatbot ………………………..24
10. Medibot technology …………………………………..26
​10.1. Proposed system………………………………………...26
10.2. Proposed method ………………………………………..27
11. Future scope …………………………………………..32
12. Conclusion ……………………………………………33
13. References …………………………………………….34
Seminar Report 2019-2020 ​2​ Medibot using NLP 
 
ABSTRACT 

Normally Users are not aware about all the treatment or


Symptoms regarding the particular disease. For small problem user
have to go personally to the hospital for check-up which is more
time consuming. Also handling the telephonic calls for the complaints
is quite hectic . Such a problem can be solved by using medical
ChatBot by giving proper guidance regarding healthy living.

The medical chat-bots functioning depends on Natural language


processing that helps users to submit their problem about the health .
The User can ask any personal query related to health care through
the chat-Bot without physically available to the hospital . By Using
Google API for voice-text and text-voice conversion. Query is sent to
ChatBot and gets related answer and display answer on android app .
The System’s major concern behind developing this web based
platform is analyzing customer’s sentiments.

Keywords :- Medical Chatbot Natural Language Processing , Porter


Stemmer Algorithm, Word Order Similarity Between Sentences
 
Seminar Report 2019-2020 ​3​ Medibot using NLP
​1.INTRODUCTION 
 

This report actually gives an overview about a chatbot that can


use in medical field , The main purpose of the scheme is to build
the language gap between the user and health providers by giving
immediate replies to the Questions asked by the user. Today’s people
are more likely addicted to internet but they are not concern about
their personal health . They avoid to go in hospital for small
problem which may become a major disease in future . Establishing
question answer forums is becoming a simple way to answer those
queries rather than browsing through the list of potentially relevant
document from the web. Many of the existing systems have some
limitation such as , There is no instant response given to the patients
they have to wait for experts acknowledgement for a long time.
Some of the processes may charge amount to perform live chat or
telephony communication with doctors online

​This system allows computer to communication between human to


computer by using natural language processing (NLP) . There are
three analyses which understand natural language i.e. identification
of main linguistic relations is completed to parse subject into object
of the sentences . After that description of the texts is done . The
semantic interpretation uses knowledge of word meaning

Chatbot is an Entity which imitate human discussion in its


particular accepted set-up together with a text or vocal language with
techniques such as Natural Language Processing (NLP). The aim of
this system is to replicate a person’s discussion . The development
of chatbot application canbe done with making a user interface to
Seminar Report 2019-2020 ​4​ Medibot using NLP
send input and receive response . It is a system that interact with user by
keeping the track of the state of interaction and recollecting the
preceding commands to give functionality.

The medical chat-bots can be developed by using artificial algorithms


that scrutinize user's queries and recognize it and give reply to related
query . A big disease can start from small problems such as headache
which feels normal but it may beginning of big disease such as brain
tumor , most of the disease can be identified by common symptoms so
the disease can be predicted if the patient body is analyzed
periodically . The system give response by use of an efficient Graphical
User Interface such that if actual person is chatting with the user.
Chatterbot that can be used in various fields like education, healthcare,
and route assistance . The central part of the chat-bots includes MySQL.

It is an interactive system solve users query regarding medicine. so


they can get correct guidance for treatment through android app by
using Google API.
Seminar Report 2019-2020 ​5​ Medibot using NLP
2. What is NLP ?

​ atural language processing (NLP) is a subfield of ​linguistics ,


N
computer science​, ​information engineering​, and ​artificial intelligence
concerned with the interactions between computers and human (natural)
languages, in particular how to program computers to process and analyze
large amounts of ​natural language​ data.

NLP is a field that covers computer understanding and manipulation of


human language, and it’s ripe with possibilities for newsgathering,
Natural language processing came into existence to ease the user’s work
and to satisfy the wish to communicate with the computer in natural
language. Since all the users may not be well-versed in machine specific
language, NLP caters those users who do not have enough time to learn
new languages or get perfection in it.

NLP entails applying algorithms to identify and extract the natural


language rules such that the unstructured ​language data​ is converted into a
form that computers can understand .When the text has been provided, the
computer will utilize algorithms to extract meaning associated with every
sentence and collect the essential data from them .Sometimes, the
computer may fail to understand the meaning of a sentence well, leading
to obscure results
Seminar Report 2019-2020 ​6​ Medibot using NLP
The goal of Natural Language Processing is to accommodate one or
more specialities of an algorithm or system. The metric of NLP assess on
an algorithmic system allows for the integration of language
understanding and language generation. It is even used in multilingual
event detection Rospocher et al , purposed a novel modular system for
cross-lingual event extraction for English, Dutch and Italian texts by using
different pipelines for different languages. The system incorporates a
modular set of foremost multilingual Natural Language Processing
(NLP) tools. The pipeline integrates modules for basic NLP processing
as well as more advanced tasks such as cross-lingual named entity
linking, semantic role labelling and time normalization.

​Figure 1 : ​Basic structure of a NLP Application

NLP is characterized as a difficult problem in computer science.


Human language is rarely precise, or plainly spoken. To understand
human language is to understand not only the words, but the concepts and
how they’re ​linked together to create meaning​. Despite language being
one of the easiest things for the human mind to learn, the ambiguity of
language is what makes natural language processing a difficult problem
for computers to master.
Seminar Report 2019-2020 ​7​ Medibot using NLP
3. Components of NLP

Natural Language Processing basically can be classified into two


parts i.e. Natural Language Understanding and Natural Language
Generation which evolves the task to understand and generate the text
(Figure 2).

​Figure 2. Broad Classification of NLP

Linguistics is the science of language which includes Phonology that


refers to sound, Morphology word formation, Syntax sentence structure,
Semantics syntax and Pragmatics which refers to understanding.

3. 1. Natural language understanding

NLU refers to mapping the given input of natural language in


to useful representation and analyzing those aspects of the language in
simple it is what do the user say .Understanding is usually harder than
the Natural language Generation because it take lot of time & lot of
thinks to usually understand the particular language .

The difficulty in NLG termed as ambiguity ,it means multiple solutions


at the time of understanding . The major ambiguities are
Seminar Report 2019-2020 ​8​ Medibot using NLP
Lexical ambiguity , Syntactical ambiguity & Referential ambiguity.

NLP also Linguistic is the science which involves meaning of


language , language context and various forms of the language. The
various important phases of Natural Language Processing & NLU
steps are: -

1. Phonology
Phonology is the part of Linguistics which refers to the
systematic arrangement of sound . The term phono- which means voice
or sound , and the suffix –logy refers to word or speech, whereas it could
be explained as, "phonology proper is concerned with the function,
behaviour and organization of sounds as linguistic items. Phonology
include semantic use of sound to encode meaning of any Human
language.

2. Morphology
The different parts of the word represent the smallest units of
meaning known as Morphemes . Morphology which comprise of Nature
of words , are initiated by morphemes . The interpretation of morpheme
stays same across all the words, just to understand the meaning humans
can break any unknown word into morphemes . For example, adding
the suffix –ed to a verb, conveys that the action of the verb took place
in the past . The words that cannot be divided and have meaning by
themselves are called Lexical morpheme (e.g.: table, chair) The words
(e.g. -ed, -ing, -est, -ly, -ful) that are combined with the lexical morpheme
are known as Grammatical morphemes (eg. Worked, Consulting,
Smallest, Likely, Use) . Those grammatical morphemes that occurs in
combination called bound morphemes ( eg. -ed, -ing) Grammatical
morphemes can be divided into bound morphemes and derivational
morphemes​.
Seminar Report 2019-2020 ​9​ Medibot using NLP

3. Lexical
In Lexical , humans, as well as NLP systems , interpret the meaning
of individual words , the first of these being a part-of-speech tag to each
word. In this processing , words that can act as more than one
part-of-speech are assigned the most probable part-of speech tag based on
the context in which they occur. At the lexical level, Semantic
representations can be replaced by the words that have one meaning . In
NLP system, the nature of the representation varies according to the
semantic theory deployed.

4. Syntactic
This level emphasis to scrutinize the words in a sentence so as to
uncover the grammatical structure of the sentence. Both grammar and
parser are required in this level. The output of this level of processing is
representation of the sentence that divulge the structural dependency
relationships between the words . Not all NLP applications require a full
parse of sentences .Syntax conveys meaning in most languages because
order and dependency contribute to connotation. For example, the two
sentences: ‘The cat chased the mouse.’ and ‘The mouse chased the cat.’
differ only in terms of syntax, yet convey quite different meanings.

5. Semantic
In semantic most people think that meaning is determined,
however, this is not it is all the levels that bestow to meaning. Semantic
processing determines the possible meanings of a sentence by pivoting on
the interactions among word-level meanings in the sentence. This level of
processing can incorporate the semantic disambiguation of words with
multiple senses , For example, amongst other meanings, ‘file’ as a noun can
mean either a binder for gathering papers, or a tool to form one’s
fingernails, The semantic level scrutinizes words for their dictionary
elucidation, but also for the elucidation they derive from the milieu of the
sentence. Semantics milieu that most words have more than one
Seminar Report 2019-2020 ​10 ​ Medibot using NLP
elucidation but that we can spot the appropriate one by looking at the rest of
the sentence.

6. Discourse
While syntax and semantics travail with sentence-length units, the
discourse level of NLP travail with units of text longer than a sentence
i.e, it does not interpret multi sentence texts as just sequence
sentences, apiece of which can be elucidated singly.

7. Pragmatic:
Pragmatic is concerned with the firm use of language in
situations and utilizes nub over and above the nub of the text for
understanding the goal and to explain how extra meaning is read into
texts without literally being encoded in them . This requisite much
world knowledge , including the understanding of intentions, plans,
and goals

3.2. Natural language generation

Natural Language Generation (NLG) is the process of producing


phrases, sentences and paragraphs that are meaningful from an internal
representation. It is a part of Natural Language Processing and happens in
four phases: identifying the goals, planning on how goals maybe achieved
by evaluating the situation and available communicative sources and
realizing the plans as a text . It is opposite to Understand ,Components of
NLG are as follows:

Speaker and Generator :


​To generate a text we need to have a speaker or an application
and a generator or a program that renders the application’s intentions
into fluent phrase relevant to the situation.
Seminar Report 2019-2020 ​11 ​ Medibot using NLP

Components and Levels of Representation​ ​:


The process of language generation involves the following interweaved
tasks.
​Content selection: ​Information should be selected and included in the set
. Depending on how this information is parsed into representational units ,
parts of the units may have to be removed while some others may be
added by default.
​Textual Organization​: The information must be textually organized
according the grammar , it must be ordered both sequentially and in
terms of linguistic relations like modifications.
​Linguistic Resources: To support the information’s realization, linguistic
resources must be chosen . In the end these resources will come down to
choices of particular words, idioms, syntactic constructs etc.
​Realization: The selected and organized resources must be realized as an
actual text or voice output.

Application or Speaker :
​This is only for maintaining the model of the situation . Here the
speaker just initiates the process doesn’t take part in the language
generation . It stores the history , structures the content that is potentially
relevant and deploys a representation of what it actually knows. All
these form the situation, while selecting subset of propositions that
speaker has. The only requirement is the speaker has to make sense of
the situation.
Seminar Report 2019-2020 ​12​ Medibot using NLP
4. Tasks in NLP

Syntactic analysis and semantics analysis are the main techniques


used to complete Natural Language Processing tasks.

1. Syntax :
Syntax refers to the arrangement of words in a sentence such that they
make grammatical sense. In NLP, syntactic analysis is used to assess
how the natural language aligns with the grammatical rules.
Computer algorithms are used to apply grammatical rules to a group of
words and derive meaning from them , here are some syntax techniques
that can be used:

● Lemmatization​: It entails reducing the various inflected forms of a


word into a single form for easy analysis.
● Morphological​ ​segmentation​: It involves dividing words into
individual units called morphemes or tokens , segmentation also
termed as Tokenization
● Word segmentation​: It involves dividing a large piece of
continuous text into distinct units.
● Part-of-speech tagging​: It involves identifying the part of speech
for every word.
● Parsing​: It involves undertaking grammatical analysis for the
provided sentence.
● Sentence breaking​: It involves placing sentence boundaries on a
large piece of text.
● Stemming​:​ It involves cutting the inflected words to their root form.

2. Semantics
Semantics refers to the meaning that is conveyed by a text. Semantic
analysis is one of the difficult aspects of Natural Language Processing that
Seminar Report 2019-2020 ​13​ Medibot using NLP
has not been fully resolved yet. It involves applying computer algorithms to
understand the meaning and interpretation of words and how sentences
are structured, here are some techniques in semantic analysis:

● Named entity recognition (NER):​ It involves determining the parts


of a text that can be identified and categorized into preset groups.
Examples of such groups include names of people and names of
places.
● Word sense disambiguation:​ It involves giving meaning to a word
based on the context it is also known as chunking
● Natural language generation​: It involves using databases to derive
semantic intentions and convert them into human language.
Seminar Report 2019-2020 ​14 ​ Medibot using NLP
5. Applications of NLP
​ LP is used to analyze text​, allowing machines to u​ nderstand how
N
human’s speak​. This human-computer interaction enables real-world
applications like ​automatic text summarization​, ​sentiment analysis​, ​topic
extraction​, ​named entity recognition​, ​parts-of-speech tagging​, ​relationship
extraction​, ​stemming ​, and more. NLP is commonly used for ​text mining​,
machine translation​, and ​automated question answering​. Some other
applications are :
1. Sentiment Analysis:
​Sentiment analysis ​is contextual mining of text which identifies and
extracts subjective information in source material , and helping a
business to understand the social sentiment of their brand, product or
service while monitoring online conversations. However, analysis of
social media streams is usually restricted to just basic sentiment analysis
and count based metrics​.

2. chatbot :
A chatbot is a piece of ​software​ that conducts a ​conversation​ via
auditory or textual methods . Such programs are often designed to
convincingly simulate how a human would behave as a conversational
partner . Chatbots are typically used in ​dialog systems​ for various
practical purposes including customer service or information acquisition.
Some chatbots use sophisticated ​natural language processing​ systems,
but many simpler ones scan for keywords within the input, then pull a
reply with the most matching keywords, or the most similar wording
pattern , from a ​database​.
3. Speech Recognition :
Speech recognition is the ability of a machine or ​program​ to identify
words and phrases in spoken language and convert them to a
machine-readable format. Rudimentary speech recognition software has a
limited
Seminar Report 2019-2020 ​15​ Medibot using NLP

vocabulary of words and phrases, and it may only identify these if they are
spoken very clearly. More sophisticated ​software has the ability to
accept natural speech. Speech recognition works using algorithms
through acoustic and language modeling . Acoustic modeling represents
the relationship between linguistic units of speech and audio signals ;
language modeling matches sounds with word sequences to help
distinguish between words that sound similar.
4. Machine Translation :
Machine translation (MT) is automated translation . It is the process by
which computer software is used to translate a text from one natural
language (such as English) to another (such as Spanish) .To process
any translation, human or automated , the meaning of a text in the
original (source) language must be fully restored in the target language,
i.e. the translation. While on the surface this seems straightforward , it is
far more complex. Translation is not a mere word-for-word substitution.
A translator must interpret and analyze all of the elements in the text
and know how each word may influence another. This requires
extensive expertise in grammar, syntax (sentence structure), semantics
(meanings ), etc. , in the source and target languages , as well as
familiarity with each local region. Google translator is an example for
machine translation
5. Advertisement matching :
Targeted advertising is a form of advertising, including ​online​, that is
directed towards audiences with certain traits, based on the product or
person the advertiser is promoting , Targeted matching works by
matching appropriate ads with keywords which basically
recommendation of as based our history and searching habit

Some other applications of NLP are spell checking, keyword searching


and extracting information ,etc.
Seminar Report 2019-2020 ​16 ​ Medibot using NLP
​6. What is chatbot ?
A chatbot is a service , powered by rules and sometime artificial
intelligence , that you interact with via a chat interface , it is a form
human-computer dialog system which operates through natural
language via text or speech. Chatbots are typically used in ​dialog
systems for various practical purposes including customer service or
information acquisition . Some chatbots use sophisticated ​natural
language processing​ systems, but many simpler ones scan for keywords
within the input, then pull a reply with the most matching keywords, or
the most similar wording pattern, from a ​database​.

However , most of the bots today are rule based bots that give
the user a menu and the user navigates through the menu like
telephonic complaint booking systems but in text . Secondly , most
of the bots are closed domain bots meaning they are focused on one
particular task and are trained for that field only . Alexa , Siri are
examples of open domain bots. However, bots for restaurant booking
are closed domain bots . Closed domain bots can be both, powered
by artificial intelligence or be rule based . While the users expect
open domain bots that are intelligent in all aspects .

The goal of a bot system isn't just that . The goal of a bot
system remains to automate a service using a conversational
interface that allows the user to access the service from the
platforms they frequently visit . This goes to say one mustn't be
dissuaded from building a rule based bot that indeed works for the
reason that the bot isn't intelligent like a super human. That being
said, we must pursue building intelligent systems since the more
intelligent they are in terms of understanding the end user , more will
they be useful.

Seminar Report 2019-2020 ​17​ Medibot using NLP


​Chatbot is the new era in mobile technology

● Chatbot technology will reduce the number of calls to the


compliance call center by 50 %
● 48% of brands have implemented automation technologies in sales,
marketing and customer service , with another 40 percent planning
to do so by 2020
● 80% of businesses plan to use chatbots by 2020
● Chatbots will power 85% of customer service interactions by the
year 2020
● The chatbots market is estimated to grow from USD 703.3 Million
in 2016 to USD 3,172.0 Million by 2021

​Familiar chatbots are :-


● SIRI (2010)- Apple
● GOOGLE NOW (2012)- Google
● ALEXA (2015)- Amazon Echo
● CORTANA (2015)- Microsoft
● BOTS FOR MESSENGER (2016)- facebook
● TAY (2016)- Microsoft
Seminar Report 2019-2020 ​18​ Medibot using NLP
7.How chatbots work ?

The main working of chatbot is first it receive message from user


by text/voice through any medium like web , app , etc. Then using AI &
NLP the bot will understand the question through business decisions &
using database the bot decide what to answer . Atlast answer the user
in a personal and cool way .

​ ​Figure 3. Architecture of a chatbot

Chatbot can look like a normal app . There is an application layer , a


database and APIs to call external services. In a case of the chatbot ,
UI is replaced with chat interface . While Chatbots are easy to use for
users, it adds complexity for the app to handle. There is a general
worry that the bot can’t understand the intent of the customer. The bots
are first trained with the actual data . Most companies that already
have a chatbot must be having logs of conversations. Developers use
that logs to analyze what customers are trying to ask and what does
that mean. With a combination of ​Machine Learning models and tools
built, developers match questions that customer asks and answers with
the best suitable answer. . Developers strength is in training the
models so that the chatbot is able to connect both of those questions to
correct intent and as an output produces the correct answer. If there is no
extensive data available, different APIs data can be used to train the
chatbot
Seminar Report 2019-2020 ​19​ Medibot using NLP

The chatbots work by adopting 3 classification methods:


1. Pattern Matchers:
Bots use pattern matching to classify the text and produce a
suitable response for the customers. A standard structure of these
patterns is “Artificial Intelligence Markup Language” (AIML).

A simple pattern matching example:

The machine then gives and output:


Human :​ Do you know who Abraham Lincoln is?
Robot : Abraham Lincoln was the US President during American
civil war.

​ hatbot​ knows the answer only because his or her name is in the
C
associated pattern. Similarly, chatbots respond to anything relating it to
the associated patterns. But it can not go beyond the associated pattern .
To take it to an advanced level algorithms can help.

Seminar Report 2019-2020 ​20​ Medibot using NLP


2. Algorithms :
For each kind of question , a unique pattern must be available in
the database to provide a suitable response . With lots of combination
on patterns , it creates a hierarchical structure . We use algorithms to
reduce the classifiers and generate the more manageable structure .
Multinational Naive Bayes is the classic algorithm for text classification
and NLP. For an instance, let’s assume a set of sentences are given which
are belonging to a particular class. With new input sentence, each word is
counted for its occurrence and is accounted for its commonality and each
class is assigned a score. The highest scored class is the most likely to be
associated with the input sentence.

For example Sample Training set


class: greeting
“How you doing?”
“good morning”
“hi there”

Few sample Input sentence classification:


input: “Hello good morning”
term: “hello” (no matches)
term: “good” (class: greeting)
term: “morning” (class: greeting)
classification: greeting (score=2)

With the help of equation , word matches are found for given some
sample sentences for each class . Classification score identifies the class
with the highest term matches but it also has some limitations . The score
signifies which intent is most likely to the sentence but does not
guarantee it is the perfect match Highest score only provides the relativity
base.
Seminar Report 2019-2020 ​21​ Medibot using NLP

3. Artificial Neural Networks :


Neural Networks are a way of calculating the output from the input
using weighted connections which are calculated from repeated iterations
while training the data. Each step through the training data amends the
weights resulting in the output with accuracy.

As discussed earlier here also, each sentence is broken down into


different words and each word then is used as input for the neural
networks. The weighted connections are then calculated by different
iterations through the training data thousands of times. Each time
improving the weights to making it accurate. The trained data of neural
network is a comparable algorithm more and less code. When there is a
comparably small sample, where the training sentences have 200
different words and 20 classes, then that would be a matrix of 200×20.
But this matrix size increases by n times more gradually and can cause a
huge number of errors. In this kind of situations, processing speed should
be considerably high. There are multiple variations in neural networks,
algorithms as well as patterns matching code. Complexity may also
increase in some of the variations. But the fundamental remains the same,
and the important work is that of classification.

So , NLU is responsible for recognize the words and NLG provides the
appropriate replies with the help of classification methods and database.
Seminar Report 2019-2020 ​22​ Medibot using NLP
​8. Where can we use chatbots ?

Chatbots have become popular in the past few years as businesses


discover innovative ways to put them to use. Having a Chatbot today
has ​numerous benefits for businesses​ , they make life easier for customers,
are available 24/7, save time (no more long waits to talk to a service rep)
and they are easy to use. some applications of chatbots are ,

1. Medical :
​Chatbots have also made their way into health care by easing the burden
on medical professionals by facilitating faster medical diagnosis,
answering health-related questions, booking appointments ,personal
health assistance, age based medical dosage and lots more

2. Marketing :
​Chatbots are monitoring users’ behavior, shopping patterns and habits,
and accordingly sending messages. Imagine that you are a bakery brand
and you have a user who is on a diet. By following the user’s habits and
by answering simple questions, a chatbot can collect data that helps them
to be more personalized and also spread the brands ads

3. Customer support :
​Chatbots can be trained to respond customer service questions and
provide fast solutions, 24/7. For the user, this is an advantage because
they can get instant answers to their questions at any time, without
needing to wait on a human. Businesses can reduce costs by up to 30%
by using chatbots for customer service.

4. Banking :
Chatbots are helping banks enhance customer satisfaction by
answering a host of their queries within seconds. Today, most customers
want prompt replies to their questions and the IVR system often puts their
​Seminar Report 2019-2020 ​23​ Medibot using NLP
calls in queues , user can easily check the statements .chatbot make a vital
role in online transaction

5. personal assistant :
The chatbot will communicate with the user with the help of natural
language processing so Chatbot can use as Personal Assistance . It
will be able to not only control your schedule on Google calendars but
also will be able build an immaculate resume , so it make our daily life
easier

6. social media :
messaging apps have eclipsed social media apps in terms of attracting
new active users, which is hardly surprising . Here, chatbots have a
massive role to play because they enable users to search content via their
preferred messaging apps , also chatbot provide customer support in
social media
Seminar Report 2019-2020 ​24​ Medibot using NLP

9. Importance of medical Chabot

​The usage of chatbot is increasing day by day especially in medical


and health related field , in a research 76% peoples uses medical or
healthy related apps

The main purpose of the scheme is to build the language gap


between the user and health providers by giving immediate replies to
the Questions asked by the user ,Some chatbots are compact medical
reference books which are useful not only for patients, doctors etc. but
also for those who want to learn something about health. The user feels
that they are incorporated in the process of their health . Patients who
feel included , who are interacting through chatbots with the healthcare
system , will stay with the system , and that is important for them and the
healthcare provider.

The old chatbot are client communications systems and their best effort
is a question and answer page on a website. Bot can facilitate to get the
common health related question and prediction of disease without a
human interference.

Seminar Report 2019-2020 ​25 ​ Medibot using NLP


This system helps users to submit their complaints and queries
regarding the health . Customer satisfactions the major concern for
developing this system . The actual welfare of the chatbot is the facilitate
the people by giving proper guidance regarding the good and healthy
living. For the reason that many of the people do not have fundamental
awareness of physical condition. Some people live for years with
debilitating but they do not pay attention to symptoms simply because
they think they don’t require a doctor
Seminar Report 2019-2020 ​26​ Medibot using NLP
10. Medibot technology

Medibot is medical chatbot which is compact medical reference books


which is useful not only for patients, doctors etc. but also for those who
want to learn something about health. The working of the system is as
follows.

10.1. Proposed system

A. User Login to System :


User registers on Chatbot application . Then ask queries regarding to
the health care and medical details.

B. Ask some Questions :


You can ask some questions regarding some healthcare. And its related
to voice- text and text-voice conversation. Using Google API for inter
conversion of text-voice and vice versa.

C. Age based Medicine dosage details :


You can ask medical dosage related queries to this app in voice and
system gets output for medicine API and speak out and display all data.
Get your age from registration data and provide data related to your data
like age, area, gender and so on . Then predict disease using SVM
Algorithm.

D. Get Medicine Details on medicine name :


You can ask about medicine related details on the basis of medicine
names.

E. Disease Prediction :
Depending on the disease symptoms SVM algorithm can predict the
disease.
Seminar Report 2019 -2020 ​ 27 ​ Medibot using NLP
​Figure 4 : System Architecture

F. Online API :
Use Google API for voice-text and text-voice conversion. The
Chatbot API sends query to chatbot and get related answer and refer this
answer analysis on that and display answer on android app. Get medicine
related data like medicine name, medicine expiry details and so on from
medicine API.
When user ask question to the scheme, logic of the complaint is
recognized by applying NLP. Sense of the words is found using part of
speech tagging and Word Net dictionary by using this sentiment analysis.

10.2. Proposed method

​A. Support Vector Machine Algorithm(SVM):


SVM is a powerful classifier that is able to distinguish two classes.
Seminar Report 2019-2020 ​28​ Medibot using NLP
SVM classifies the test image in to the class with highest distance up to the
neighboring point in the training. SVM training algorithm built a model
that predict whether the test image fall into this class or another. SVM
necessitate a vast training data to decide an decision boundary and
computing cost is very high although we are using single pose (frontal)
detection.
The SVM is a learning algorithm for classification which attempt to
discover the finest distinguishing hyper plane which minimize the error
for unseen patterns

​Figure 5: Distinguishing hyper plane to minimize the error

The data which cannot be distinguished the input is mapped to


high-dimensional attribute space where they can be separated by a
hyper plane . This projection is well performed by means of kernels .
If training set of samples and the equivalent resultant values {-1, 1}.
So SVM intend to get the best separating hyper plane specified by the
equation WTx+b that make use of the distance between the two
classes as shown in above figure
Seminar Report 2019-2020 ​29​ Medibot using NLP
Figure 6 : Separating Hyper Plane By Equation

B. NLP (Natural language Processing) :


The enlargement of NLP function is quite tough because
computers usually need humans to "speak" with them in certain
programming language. Human language is not accurate as it include
on a lot of composite variables . NLP permits users to ask a query.
The machine understand the important elements from users speech,
that may relate to particular features in a data set , and gives an answer.
The use of NLP is to recognize the meaning of the text. The stored
information contains the text files , like patients' medical records,
symptom related to particular disease on the basis of which we can
predict the disease also some medicine related information.

Porter stemming algorithm (or 'Porter stemmer') It is a procedure for


discarding the ordinary words which is related to the exact form of
words with also having flexional endings in English . Following are
the steps of this algorithm :-

● Gets rid of plurals and -ed or -ing suffixes


● Turns terminal y to i when there is another vowel in the stem
Seminar Report 2019-2020 ​30​ Medibot using NLP

● Maps double suffixes to single ones: -ization, -ational, etc.


● Deals with suffixes, -full, -ness etc.
● Takes off –ant, -ence ,etc
.

C. Word Order Similarity among Sentences :


The word order similarity of two sentences is important, because
different word order can significantly change the meaning of a
sentence.
For example : Dogs can swim, but chicken cannot . We can change the
word order so the sentence looks like: Chicken can swim, but dogs
cannot. As a result , the meaning of both sentences is completely
different. We must therefore form word order vectors for both sentences,
namely r1 and r2 . For the first sentence, this is achieved by doing the
following for each word w in the joint word set:

1. If the first sentence contains w, we fill the entry in r1 with the


corresponding index of w in the first sentence.

2. If the first sentence does not contain w, we find the word from the
first sentence, which is most similar to w . This word is denoted as
~w. If the similarity is greater than the preset threshold, we fill the
first sentence’s vector entry with the corresponding index of ~w in the
first sentence. If the similarity is not greater than the threshold, we
fill the vector’s entry with 0.

Threshold is important because we are calculating the word


similarity of different words and therefore the similarity measures
could be very low . Since that mean s the words are not similar, we do
not want to introduce such noise into our calculation. If we increase
the threshold , we could potentially introduce more noise to our
calculations, which is not desirable . We repeat the process for both
sentences, so we obtain word order vectors for both sentences. The final
Seminar Report 2019-2020 ​31​ Medibot using NLP
value for the word order similarity measure is evaluated using the following
formula .

Word order similarity measure among two sentences is calculated as a


normalized differentiation of word order. The measure is sensitive to the
distance between two words of the word pair. If the distance increases
, the measure decreases.
Seminar Report 2019-2020 ​ 32​ Medibot using NLP

11. FUTURE SCOPE

​By taking the advantage of the extensibility of the system in


future it will be used as voice and face recognition to mimic a
counselor, also interacting with the patient at deeper levels and
also chatbots will replace all the applications so it make easier
the usage and performance
Seminar Report 2019-2020 ​33​ Medibot using NLP
CONCLUSION

This seminar is about a system which is useful for medical


institute or hospitals to help the users to freely ask medical
dosage related queries by voice. System gets output for
medicine API and speak out and display all medicine names .
We are using NLP because we want to a computer to
communicate with users in their terms. So by using SVM
algorithm and disease symptoms system can predict disease.
User can get related answer displayed on android app , and refer
this answer for analysis.
Seminar Report 2019-2020 ​34 ​ Medibot using NLP
REFERENCE​:

1. http://www.ijcttjournal.org (Volume 60 Issue 1- June 2018)

2. h​ ttps://www.edureka.co/pythonnatural-
language-processing-course

3. http://www.ijecs.in/index.php/ijecs/article/view/720-
"Sanative Chatbot For Health Seekers", JECS Volume 05
Issue 3 March 2016 Page No.16022-16025.

You might also like