0% found this document useful (0 votes)
2 views

AI Unit-3

The document provides an overview of Natural Language Processing (NLP), detailing its components such as Speech Recognition, Natural Language Understanding, and Natural Language Generation. It discusses key concepts, algorithms, applications, and techniques used in NLP, including the role of machine learning and neural networks. Additionally, it highlights the importance of NLP in various fields such as automotive, healthcare, and customer service.

Uploaded by

Soumya Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

AI Unit-3

The document provides an overview of Natural Language Processing (NLP), detailing its components such as Speech Recognition, Natural Language Understanding, and Natural Language Generation. It discusses key concepts, algorithms, applications, and techniques used in NLP, including the role of machine learning and neural networks. Additionally, it highlights the importance of NLP in various fields such as automotive, healthcare, and customer service.

Uploaded by

Soumya Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

3

UNIT
Natural Language
Processing

CONTENTS
Part-1 Speech Recognition ***'****' * * * ' * * ' * * * * ****" ... 3-2M to 3-4M

Part-2 Natural Language..


. ....3-4M to 3-7M
Understanding

Part-3 Natural Language Generation .3-7M to 3-10M

Part-4 Chatbots...
*************** ********** ******* .3-10M to 3-15M

Part-5 Machine Translation.... *****. ... 3-15M to 3-17M


3-2M(Sem-1& 2) Natural Language Processing

PART-1

Speech Recognition.

Questions-Answers
Long Answer Type and Medium Answer Type Questions

Que 3.1. Discuss the term speech recognition.

Answer

1 Speech recognition is the process that enables a computer to recognize


and respond to spoken words and then convert them in a format that
the machine understands. The machine may then convert it into another
form of data depending on theend-goal.

2. Speech recognition is widely used in digital assistants, smart speakers,


smart homes, and automation for a variety of services, products, and
solutions.

Que 3.2. What are the most commonly used algorithms for speech
recognition ?

Answer
1. Natural language processing (NLP):
NLP is not a specific algorithm used in speech recognition; it is the
area of artificial intelligence which focuses on the interaction
between humans and machines through speech and text.
i. Many mobile devices incorporate speech recognition into their
systems to conduct voice search (example : Siri) or provide more
accessibility around texting.
2 Hidden Markov models (HMIM)
i Hidden Markov Models build on the Markov chain model, which
stipulates that the probability of a given state hinges on the current
state, not its prior states.
. While a Markov chain model is useful for observable events, such
as text inputs, hidden Markov models allow us toincorporatehdden
events, such as part-of-speech tags, into a probabilistic model.
3-3 M (Sem-1 &
2
For Engineering
Artificial Intelligence
models
within speech reco
utilized a s sequence

words, syllables,
sentences o
They are

labels to each unit i.e., , in


assigning

the sequence
the provided input, allowin.
ing it
I T h e s e labels
create a mapping with
label s e q u e n c e .
the most appropriate
deternmine
to

Neural networks
neural networks process trainine
algorithms,
For deep learning human brain throuu
interconnectivity ofthe
data bymimicking the
layers of nodes.
of inputs, weights,
a bias (or threshold) and
1. Each node is made up
an output.
exceeds a given threshold,
it "fires" or activates
111. Ifthatoutput value in the network.
data to the next layer
the node, passing

Neural networks learn the


mapping function through supervised
iv. through the process
based on the loss function
learning, adjusting
of gradient descent.
accurate and can accept
V.While
V. neural networks tend to be more
cost as they tend
more data, this comes
at a performance efficiency
to be slower to train compared
to traditional language models.

recognition?
Que 3.3. What are the applications of speech

Answer
1.
. Automotive: Speech recognizer improves driver safety by enabling
voice-activated navigation systems and search capabilities in car radios
2 Technology: Virtual assistants are inereasingly becoming integrated
within our daily lives, particularly on our mobile devices. We use voie
commands to access them through our smartphones, such as through
Google Assistant or Apple's Siri, for tasks, such as voice search, or
through our speakers, via Amazon's Alexa or Microsoft's Cortana, to
play music.
3. Healthcare : Doctors and nurses leverage dictation applications to
capture and log patient diagnoses and treatment notes.
4. Sales: It can call center transcribe thousands of phone calis
help a
between customers and agents to
identify common call patterns an
ISsues. Cognitive bots can also talk to
people via a webpage, answerlns
common queries and solving basic requests without needing to walt
a contact center
agent to be available. In both instances
recognition systems help reduce time to resolution for spee sues.
consumer ls
(Sem-1 & 2) Natural Language ProceAIng
4 M

Security :As technology integrates into our daily ives,security protocoln


are an increasing priority. Voice-based authenticatiorn addn a viable level
ofsecurity.

Que 3.4. What are the Techniques for Speech Recognition ?

Answer

Techniques for Speech Recognition are:

1. Speech Analysis Technique :


different type of information
Speaker identity can be shown by a
that is present in speech data.
information due to the vocal
. This incorporates speaker-specific
tract, excitation source, and behavior feature.
for segmenting speech
This stage deals with a suitable frame size
signals for further analysis and extracting.
2
Feature Extraction Technique:
of placing
The speechfeature extraction technique is the process
the dimensionality of the
words in groups or classes and decreasing
power of the
input vector while maintaining the discriminating
signal.
identification and verification
From the basic formation speaker
of
i we know that the number of training
and test vector needed
system, with the dimension of the given
for the classification problem growsextraction of the speech signal.
feature
input; therefore, we need

3 Modeling:
models using a
technique aims to create speaker
The modeling recognition and
feature vector. Further, Speaker
speaker-specific
Speaker identification
are the parts of Modeling.
who is
identification technique identifies by itself,
. The speaker information integrated into a speech
on individual
speaking based
signal.

PART-2

Natural Language Understanding.

Questions-Answers

Medium Answer Type Questions


Long Answer Type and
Artificial Intelligence For Engineering 3-6M(Sem-1&
2

Que 3.5. What do you mean by natural langunge proc


ocewniny
Why it is needed ?

Answer
Natural Language Processing (NLP) studies the problems inherent.
1
the processing and manipulation of natural language and to k
computer understand statements written in human language.
NLP can be defined as the automatic processing ol human language
2.
Natural language processing is a subfield of Al which deals with the
3
methods of communicating with a computer in one's own natural

language.
It is used for analyzing and representing naturally occurring texts at
4
one or more levels of linguistic analysis for the purpose of achieving
human-like language processing for a range of tasks or applications

It is needed to bridge the gap between human and machine.


5
6. The goal of natural language is to enable people and computers to
communicate in a natural language, such as English.

7. The field of NLP is divided into subfields

a. NLU (Natural Language Understanding): This investigates


methods of allowing the computer to comprehend instructions given
in English.
b. NLG (Natural Language Generation): This strive that computer
produce ordinary English language so that people can understand
computers more easily.
The study of language generation falls into following three areas
a. Determination of content.
b. Formulating and developing a text utterance plan.
C.
C. Achieving a realization of the desired uttera

9. A full NLU system would be able to:


a. Paraphrase an input text.
b. Translate the text into another language.
C. Answer questions about the
contents of the text.
d. Draw inferences from the text.
10. Applications of NIP
a. Natural language interfaces to databases.
b. Machine translation
(Sem-1 & 2) Natural Language Processing
3-6 M

Advanced word-processing tools.


d. Explanation generation for expert systems.

Que 3.6. What do you mean by natural language


understanding ?

Answer

Natural language understanding (NLU) is a branch of natural language


machine-
processing, which involves transforming human language into a
readable format.
of machine
Natural language understanding (NLU) u s e s the power
intent during any
learning to convert speech to text and analyze its
interaction.

by
ii. NLU helps computers understand and interpret human language
breaking down the elemental pieces of speech.
in real-time,
iV. While speech recognition captures spoken language
to
transcribes it, and returns text, NLU goes beyond recognition
determine a user's intent.
time they learn to
. In NLU, machine learning models improve over as

definitions,
recognize syntax, context, language patterns, unique
sentiment, and intent.

Give examples of natural language


Que 3.7.
some

understanding ?

Answer

1. Machine Translation (MT) :

from one language to another


1. Accurately translating text or speech
of natural language processing
is one of the toughest challenges
and natural language understanding.
rules and AI
linguistic
Using complex algorithms that rely
on
i.
Microsoft Translator, and
machine training, Google Translate,
leaders in the tield of "generic"
Facebook Translation have become
language translation.

text or upload whole documents and receive


You can type
machine translation tools.
of languages using
translations in dozens
recognition (OCR)
Google Translate even includes optical character
extract text from images, read
software, which allows machines to
and translate it.
3-7 M
Artificial Intelligonce For Engineering (Sem-1& 2)
Automated Reasoning:
Automated reasoning is a subfield of cognitive science that is usod
to automatically prove mathematical theorems or make lovieal
ical
inferences about a medical diagnosis.
.
It gives machines a form of reasoning or logic, and allows them to
infer new facts by deduction.

Using previously gathered and analyzed information, computer


programs are able to generate conclusions. Por example, in medicine,
machines can infer a diagnosis based on previous diagnoses using
IF-THEN deduction rules.
3. Automatic Ticket Routing:
1. A useful business example of NLU is customer service automation
tech companies receive customer support inquiries per month. Using
NLU technology, we can sort unstructured data (email, social media,
live chat, ete.) by topic, sentiment, and urgency (among others).
. These tickets can then be routed directly to the relevant agent and
prioritized.
4. Question Answering:

i Question answering is a subfield of NLP and speech recognition


that uses NLU to help computers automatically understand natural
language questions.
. For example, here's a common question to Google Assistant: "What's
the weather like tomorrow ?"
NLP tools cansplit this question into topic (weather) and date
(tomorrow), understand it and gather the most appropriate answer
from unstructured collections of
"natural language documents":
online news reports, collected web
pages, reference texts, etc
iv. By default, virtual assistants tell you the weather for your current
location, unless you specify a particular city.
V. The goal of question
answering is to give the user response in their
natural language, rather than a list of text
answers.

|PART-3
Natural Language Generation.

Questions-Answers
Long Answer Type and Medium Answer Type
Questions
MSem-1 & 2)
38 Natural Language Processing

Oue 3.8. Deseribe natural language generation.

Answer

Natural Language Generation (NLG) simply means producing text from


computer data.

It acts as a translator and converts the computerized data into natural


.
language representation.

In this, a conclusion or text is generated on the basis of collected data


i.
and input provided by the user.
It is the natural language processing task of generating natural language
iv.
from a machine representation system.
Natural Language Generation acts contrary to Natural language
.
understanding.
needs to disambiguate
vi. In natural language understanding the system
language,
the input sentence to produce the machine representation
the system needs to make
whereas in Natural Language Generation
concept into words.
decisions about how to put a

What are the typical stages of natural language


Que 3.9.
generation ?

Answer
generation are:
Typical stages of natural language
the main content to be represented
Content determination: Deciding
information to mention in the text.
in a sentence o r the
structure or organization of
ii. Document structuring : Deciding the
the conveyed information.
sentences together to improve
1. Aggregation Putting of similar
:
understanding and readability.
words that convey the meaning
Iv. Lexical choice: Using appropriate
clearly. such referral
V. generation : Creating
tererring expression particular object and region.
expressions that help in
identification of a
be correct a s
the text that should
R e a l i s a t i o n : Creating and optimizing
per the rules of grammar.
Artificial Intelligence For Engineering 3-9 M
(Sem-1& 2
Que 3.10. What are the three basic techniques for evaluating NLG
ystems ?

Answer

Three basic techniques for evaluating NLCG systems are:

1. Task-based evaluation: It includes human-based evaluation, which


assesses how well it helps him perform a task. For example, a
system
which generates summaries of medical data can be evaluated
by giving
these summaries to doctors and
assessing whether summaries heln
the
doctors make better decisions.
2. Human ratings: It assesses the
generated text on the basis of ratings
gIven by a person on the quality and usefulness of the text.
3. Metrics: It compares generated texts to texts written by professionals.
Que 3.11.| What are the applications of natural language
processing?

Answer

Following are the applications of natural language processing:


. Machine Translation:
1 As the amount of information available online is growing, the need
to access it becomes increasingly important.
2 Due to this the value of
nat ural language processing
becomes clear. applications
3. Machine translation helps us
in translating technical
support content or catalogs at a
significantly reduced cost.manuals,
challenge with
4. The machine translation technoloia not in
translating words, but in understandingthe meaning of sentences
to provide a true translation.

ii. Automaticsummarization:
When we access a specifie, important piece of inf
information overl mation from a
huge knowledge base;
1s relevant for summariei
a problem.
2. Automatic summarization
information.
mmarizing the meaning
of documents and
is helpful in understandine.
3 Automatic summarization emotio
collect
meanings inside the
information, such as in
collecting data ional
from
social media
3-10M (Sem-1& 2) Natural Language Processing

A Automatic summarization is especially relevant when used to


provide an overview of a news item or blog posts, while avoiding
redundancy from multiple sources and maximizing the diversity of
content obtained
ii. Sentiment analysis :
1. The goal of sentiment analysis is to identify sentiment among several
posts where emotion is not always explicitly expressed.
2. Companies use sentiment analysis, to identify opinons and
sentiment online to help them understand what customers think
about their products and services.
3. Sentiment analysis understands sentiment in context to help you
better understand what's behind an expressed opinion, which can
be extremely relevant in undersanding and driving purchasing
decisions.

iv. Text classification:


1. Text classification makes it possible to assign predefined categories
o a document and organize it to help you find the information you
need.

For example, an application of text categorization is spam filtering


2
in email

V. Question Answering:
1 Question-Answering GQA) is becoming popular due to applications
virtual assistants.
such as Siri, OK Google, chat boxes and
system capable of coherently answering
a
2 A QA application is a

human request.

It may be used as a text-only interface or as a spoken dialog system


3.
still have a long way to go.
4 While they offer great promise, they
and
for creating a seamless
5. Using natural language processing
machines will continue
between humans with
interactive interface
various cognitive applications.
to be a top priority for

PART-4

Chatbots.

Questions-Answers

Answer Type Questions


Type and M e d i u m
Answer
Long
3-11 M (Sem-1& 2)
Artificial Intelligence For Engineering

chatbots ? What are the models of chatbots ?


Que 3.12. | What are

Answer

Chatbots
agent is a service either
A Chatbot known as a conversational
a
that we interact via a chat
powered by rules or artificial intelligence
interiace.

b. Awell designed &built chatbotwill


Use existing conversation data to understand the type of
questions people ask.
Analyze correct answers to those questions through a 'training'
.

period
Use machine learning and NLP to learn context, and continually
.
in the future.
get better at answering those questions
C. There are two main models for a chatbot

1. Retrieval-based model
This kind of chatbot uses a repository of predefined responses.

11 The programmer chooses an appropriate response based on context


following a given heuristic, which can be either something very
simple or quite complex depending on the situation.
22 Generative model:

i A generative model chatbot does not use any predefined repository


This kind of chatbot is more advanced, because it learns from scratch
using a process called deep learning.

Que 3.13. | What are the types of chatbots?

Answer

There are three


types of chatbots:
A Rules-Based Chatbots :
These chatbots follow pre-designed rules, often built using a
graphical user interface where a bot builder will design paths usus
a decision tree.
2)
3-12M
(Sem-1& Natural Language Processing

Rules-based chatbot software executes pre-determined actions based


on "playbooks" you set up on the back end of the user interface

3.
Rules-based chatbot technology act based on clicks actions, such as
Yes" vs. "No", or by recognizing a particular keyword or group of
keywords.

For example, you could set up a rules-based chatbot to respond if


4
someone selects "Red" or "Green" but also if they respond with "I
want red shoes" and your target keyword is "red shoes"

B. AI Chatbots:

1
AI chatbots will automatically learn after an initial training period
by a bot developer.
A.I. chatbots use artificial intelligence & natural language processing
2
technology to understand sentences structure.

progressively get better at


3. It then process that information &
answering the question at hand.
Instead of relying on a pre-determined
outcome designed by a
4 understand what your question is.
human, AI chatbots first
deliver an a n s w e r
5. Then once they understand your intent, they
a n s w e r based on existing
data.
that they think is the right
the machine
6. Over time byobserving correct & incorrect answers,
better at understanding what the right' answer is.
gets
and effort to get started.
Al chatbots require a training period
more
7.

C. LiveChat:
1.
1 These bots are primarily
used by Sales & Sales Developmentteams
organizations, as live
2. They can also be used by Customer Support in real-
chat option to a n s w e r questions
chat is a m o r e simplistic
time.
acts as a window to
on your website
or product and
3 Live Chat sits
for your customer.
your team
to assigm real-time
Live chat software has s o m e routing capability
4
conversations, but overall it's pretty simple.
team is online, live chat
wants to talk and your
When someone
address that person's
someone from your team to help
connects

ISsue,

ue 3.14.| How a chatbot works ?


Artificial Intelligence For Engineering 3-13 M (Sem-1 &2

Answer

There are two different tasks at the core of a chatbot


A User request analysis:
This is the first task that a chatbot performs.
2. lt analyzes the user's request to identify the user intent and to
extract relevant entities.
If you are not able to correctly understand the user's
request, you
won't be able to provide the correct answer.
B. Returning the response
1 Once the user's intent has been identified, the chatbot must provide
the most appropriate response for the user's request.
2. The answer may be :

A generic and predefined text;

. Atext retrieved from a knowledge base that contains different


answers;

. A contextualized piece of information based on data the user


has provided;
iv. Data stored in enterprise systems;
The result of an action that the chatbot
performed by
interacting with one or more backend application; or,
vi. A disambiguating question that
helps the chatbot to correctly
understand the user's request.

Que 3.15. What are the benefits of


chatbots?
Answer

Following are the benefits of chatbots


1. Increase website conversion rate:
1. Marketers put a lot of work to drive traffic to their website.
The traffic converion rate is anywhere between 0.25% - 1.0%.
i. Chathots can help achieve higher traffic converion rate.
& 2)
3-14M (Sem-1 Natural Language Processing

2 Generate more qualified leads


i It would be nice if we could talk to every lead and ensure they're a
good fit before we schedule a meeting.
In reality, that's impossible for most organizations to do at scale.
ii. Bots canhelp use advanced qualification logic to do lead
and improve sales acceleration. qualification
3 Combat Customer Churn
Bots are a perfect answer to
high-volume
where customers become frustrated withsupport inquiries, especially
standard knowledge bases
that are hard to sift
through.
Que 3.16. Mention the characteristics/features of a chatbot.
Answer

Following are the characteristics/features of a chatbot


1.
Conversational Maturity:
i. Achatbot has specific
natural
to understand the context of language processing (NLP) capabilities
a conversation in
It also
multiple languages
can
identify the intent of a question to
first response, and also provide an accurate
propose options to confirm or
i. The chatbots have advanced clarify intent.
conversational capabilities and can
proactively seek out information, and can also ask
questions, even if the conversation isn't clarifying
2 Omni-capable: linear.

The chatbot converses


and retains data and seamlessly across multiple digital channels
context for a seamless experience.
In some cases, even
needed. passing that information to a live agent if
3.
Integrates with CRM:
The chathot can be
workflows inside andintegrated with critical
outside of the CRM. systems and organize
. It handle real-time action as
can
the way routine as a
through a complex multi-step password change, all
applications. workflow spanning
multiple
3-15 M (Sem-1 & 2

E n g i n e e r i n g

For
Intelligence

Artificial
underot.

m o t i o n a l l y I n t e l l i g e n t :
traits
and
stand
personalized
p e r s o n a l i t y

c u s t o m e r

to delive
infer i n t e r a c t i o n

can necessary.
chatbot an when
The tone
during
and live-agent

s e n t i m e n t

escalate
to a
or

ofdat
e x p e r i e n c e ,

process
vast
amounts
ata
Freet oExplore: and
c o n s u m e ,

issues quickly.
reach, c u s t o m e r

can
chatbot solve
The data to
relevant

to gather
Autonomous Reasoning: without human
an
reasoning

complex
can
perform
chatbot
The
1. infer solutiono
ns
intervention.
should be able to
chatbot
service
a
For example, histories.
case
relevant
based on

7. Pre-Trained:
brand-specific
or industry.
understand
pre-trained to
The chatbot is
knowledge
and terms.
specific customer requests of a
common

to resolve
. It's pre-configured
particular industry.

PART-5
Machine Translation.

Questions-Answers

Long Answer Type and


Medium Answer Type Questions

What
Que 3.17.| What do you understand by machine translation ?
are various types of machine translation systems ?

Answer

Machine translation
Machine translation is the task of automatically converting source text
in one
language to text in another language.
2. In a machine translation
task, the input already consists of a
ofsymbols in some language, and the computer program mustsequence
convet
this into a
sequence of symbols in another
language.
1 6 M (Sem-1 & 2) Natural Language Processing
Types of Machine Translation Systems :
Bilingual MT System: Bilingual MT systems produce translations
between two particular languages.
Multilingual MT System : Multilingual MT systems produce
translations between any pair of languages. They may be either uni-
directional or bi-directional in nature

Que 3.18. What are the three major approaches of machine


translation ?

Answer

Three major approaches are:

Direct MT Approach: It is less popular but the oldest approach of MT.


The systems that use this approach are capable of translating SL (source
language directly to TL (target language). Such systems are bi-lingual
and uni-directional in nature

Interlingua

Analysis Generation

Source Target

Fig. 3.18.1.

approach
The systems that use Interlingua
2 Interlingua Approach : called Interlingua (IL) and
intermediate language
translate SL to a n understood
TL. The Interlingua approach can be
then translate IL to
with the of the following MT pyramid.
help
are involved with this approach:
Transfer Approach :
Three stages
3 converted to
texts are
source language (SL)
a In the first stage,
abstract SL-oriented representations
converted
are
representations
SL-oriented
b. In the second stage, TL-onented
representations

language
into equivalent target
is generated.
the final text
C. In the third stage.
Artificial Inte lligence For Engineering 3-17 M
(Sem-1& 2
Empirical MT Approach: This is an emerging approach for MT
Basically, it uses large amount of raw data in the form of parallel corpora
The raw data consists of the text and their translations. Analogy-based
example-based. memory-based machine translation techniques use
empirical MT approach.

Que 3.19.
Design the process of machine translation with the helo
of flowchart.

Answer
Process of machine translation with the help of the following flowchaart
Source text

De-formatting

Pre-editing

Morphological, syntactic,
semantic and contextual
analysis

Internal representation
of source language

Contextual, semantic
and syntactic generation

Re-formatting
Post editing

Target text

You might also like