0% found this document useful (0 votes)
2 views40 pages

AI_UNIT-5

The document discusses machine learning approaches, specifically passive and active learning, highlighting their differences in data acquisition methods. It also covers Natural Language Processing (NLP), detailing its components, challenges, and steps involved in processing natural language. Additionally, the document explains speech recognition, focusing on the roles of acoustic and language models in converting spoken language into text.
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)
2 views40 pages

AI_UNIT-5

The document discusses machine learning approaches, specifically passive and active learning, highlighting their differences in data acquisition methods. It also covers Natural Language Processing (NLP), detailing its components, challenges, and steps involved in processing natural language. Additionally, the document explains speech recognition, focusing on the roles of acoustic and language models in converting spoken language into text.
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/ 40

Machine learning is a subfield of artificial intelligence that deals with the

creation of algorithms that can learn and improve themselves without explicit
programming. One of the most critical factors that contribute to the success
of a machine learning model is the quality and quantity of data used to train
it. Passive learning and active learning are two approaches used in machine
learning to acquire data.
Passive Learning:
Passive learning, also known as batch learning, is a method of acquiring data
by processing a large set of pre-labeled data. In passive learning, the
algorithm uses all the available data to learn and improve its performance.
The algorithm does not interact with the user or request additional data to
improve its accuracy.
Example:- An example of passive learning is training a machine
learning model to classify emails as spam or not spam. The algorithm is fed a
large dataset of labeled emails and uses it to learn how to identify spam
emails. Once the training is complete, the algorithm can accurately classify
new emails without any further input from the user.
Active Learning:
Active learning is a method of acquiring data where the algorithm interacts
with the user to acquire additional data to improve its accuracy. In active
learning, the algorithm starts with a small set of labeled data and requests
the user to label additional data. The algorithm uses the newly labeled data to
improve its performance and may continue to request additional data until a
satisfactory level of accuracy is achieved.
Example:- An example of active learning is training a machine learning model
to recognize handwritten digits. The algorithm may start with a small set of
labeled data and ask the user to label additional data that the algorithm is
uncertain about. The algorithm uses the newly labeled data to improve its
accuracy, and the process repeats until the algorithm can accurately
recognize most handwritten digits.
Difference Between Passive Learning and Active Learning:
The following table summarizes the differences between passive learning and
active learning:

Passive Learning Active Learning

Uses a large set of pre-labeled Starts with a small set of labeled data and
data to train the algorithm requests additional data from the user

The algorithm does not The algorithm interacts with the user to
interact with the user acquire additional data

1
Passive Learning Active Learning

May continue to request additional data


It does not require user input
until a satisfactory level of accuracy is
after training is complete
achieved

Suitable for applications where Suitable for applications where labeled


a large dataset is available data is scarce or expensive to acquire

Conclusion:
In conclusion, passive learning and active learning are two approaches used
in machine learning to acquire data. Passive learning uses a large set of pre-
labeled data to train the algorithm, while active learning starts with a small
set of labeled data and requests additional data from the user to improve
accuracy. The choice between passive learning and active learning depends on
the availability of labeled data and the application’s requirements.

2
AI - NATURAL LANGUAGE PROCESSING

Natural Language Processing (NLP) refers to AI method of communicating with


an intelligent systems using a natural language such as English.

Processing of Natural Language is required when you want an intelligent


system like robot to perform as per your instructions, when you want to hear
decision from a dialogue based clinical expert system, etc.

The field of NLP involves making computers to perform useful tasks with the
natural languages humans use. The input and output of an NLP system can be

•Speech
•Written Text
Components of NLP

There are two components of NLP as given −

Natural Language Understanding (NLU)

Understanding involves the following tasks −

• Mapping the given input in natural language into useful representations.


• Analyzing different aspects of the language.

Natural Language Generation (NLG)

It is the process of producing meaningful phrases and sentences in the form of


natural language from some internal representation.

It involves −

• Text planning − It includes retrieving the relevant content from knowledge


base.
• Sentence planning − It includes choosing required words, forming
meaningful phrases, setting tone of the sentence.
• Text Realization − It is mapping sentence plan into sentence structure.

The NLU is harder than NLG.

1
Difficulties in NLU

NL has an extremely rich form and structure.

It is very ambiguous. There can be different levels of ambiguity −

• Lexical ambiguity − It is at very primitive level such as word-level.


• For example, treating the word “board” as noun or verb?
• Syntax Level ambiguity − A sentence can be parsed in different ways.
• For example, “He lifted the beetle with red cap.” − Did he use cap to lift the
beetle or he lifted a beetle that had red cap?
• Referential ambiguity − Referring to something using pronouns. For
example, Rima went to Gauri. She said, “I am tired.” − Exactly who is tired?
• One input can mean different meanings.
• Many inputs can mean the same thing.
NLP Terminology
• Phonology − It is study of organizing sound systematically.
• Morphology − It is a study of construction of words from primitive
meaningful units.
• Morpheme − It is primitive unit of meaning in a language.
• Syntax − It refers to arranging words to make a sentence. It also involves
determining the structural role of words in the sentence and in phrases.
• Semantics − It is concerned with the meaning of words and how to
combine words into meaningful phrases and sentences.
• Pragmatics − It deals with using and understanding sentences in different
situations and how the interpretation of the sentence is affected.
• Discourse − It deals with how the immediately preceding sentence can
affect the interpretation of the next sentence.
• World Knowledge − It includes the general knowledge about the world.
Steps in NLP

There are general five steps −

• Lexical Analysis − It involves identifying and analyzing the structure of


words. Lexicon of a language means the collection of words and phrases
in a language. Lexical analysis is dividing the whole chunk of txt into
paragraphs, sentences, and words.
• Syntactic Analysis (Parsing) − It involves analysis of words in the
sentence for grammar and arranging words in a manner that shows the
relationship among the words. The sentence such as “The school goes to
boy” is rejected by English syntactic analyzer.

2
• Semantic Analysis − It draws the exact meaning or the dictionary
meaning from the text. The text is checked for meaningfulness. It is done
by mapping syntactic structures and objects in the task domain. The
semantic analyzer disregards sentence such as “hot ice-cream”.
• Discourse Integration − The meaning of any sentence depends upon the
meaning of the sentence just before it. In addition, it also brings about the
meaning of immediately succeeding sentence.
• Pragmatic Analysis − During this, what was said is re-interpreted on
what it actually meant. It involves deriving those aspects of language
which require real world knowledge.

3
Describe Speech Recognition in terms of Language
Model and Acoustic Model.

What is speech recognition?


Speech recognition, or speech-to-text, is the ability of a machine or program to
identify words spoken aloud and convert them into readable text. Rudimentary
speech recognition software has a limited vocabulary and may only identify words
and phrases when spoken clearly. More sophisticated software can handle natural
speech, different accents and various languages.

Speech recognition uses a broad array of research in computer science, linguistics


and computer engineering. Many modern devices and text-focused programs have
speech recognition functions in them to allow for easier or hands-free use of a
device.

Speech recognition and voice recognition are two different technologies


and should not be confused:

• Speech recognition is used to identify words in spoken language.

• Voice recognition is a biometric technology for identifying an individual's


voice.
How does speech recognition work?
Speech recognition systems use computer algorithms to process and interpret
spoken words and convert them into text. A software program turns the sound a
microphone records into written language that computers and humans can
understand, following these four steps:

1. analyze the audio;

2. break it into parts;

3. digitize it into a computer-readable format; and

4. use an algorithm to match it to the most suitable text representation.


Speech recognition software must adapt to the highly variable and context-specific
nature of human speech. The software algorithms that process and organize audio
into text are trained on different speech patterns, speaking styles, languages,
dialects, accents and phrasings. The software also separates spoken audio from
background noise that often accompanies the signal.

To meet these requirements, speech recognition systems use two types of models:

• Acoustic models. These represent the relationship between linguistic units of


speech and audio signals.

• Language models. Here, sounds are matched with word sequences to


distinguish between words that sound similar.

Acoustic Model

The acoustic model is responsible for translating audio signals into phonetic units or
phonemes (the basic sounds of a language).

1. Function: It maps the audio signal, which consists of waveforms or spectral features,
to probabilities of phonetic units.
2. Training: It is trained using a large dataset of audio recordings and their
corresponding transcriptions. Techniques like Hidden Markov Models (HMMs) or
Deep Neural Networks (DNNs) are commonly used.
3. Output: The output of the acoustic model is a sequence of phonemes or probability
distributions over phonemes.

Language Model

The language model is responsible for using linguistic knowledge to construct probable word
sequences from the recognized phonetic units.

1. Function: It predicts the likelihood of a sequence of words. This helps in determining


the most probable word sequences given the phonetic inputs from the acoustic model.
2. Training: It is trained on a large corpus of text data to learn the statistical properties
of the language, including word frequencies and contextual word patterns.
3. Types: Common types of language models include N-gram models, Recurrent Neural
Networks (RNNs), and Transformers.

How They Work Together

1. Feature Extraction: The audio signal is first converted into a set of features that
capture the important characteristics of the speech signal.
2. Phoneme Prediction: The acoustic model processes these features to produce a
sequence of phoneme probabilities.
3. Word Hypothesis: The language model then takes these phoneme sequences and
predicts the most likely sequence of words by evaluating different possible word
sequences and selecting the one with the highest probability.
4. Decoding: A decoder integrates the acoustic and language models to produce the final
transcription. It combines the phoneme probabilities from the acoustic model and the
word probabilities from the language model to find the most likely transcription of the
spoken input.

Example

Suppose someone says, "I need a book."

1. Acoustic Model: Converts the audio features into phoneme probabilities like /ai/ /n/
/iː/ /d/ /ə/ /b/ /ʊk/.
2. Language Model: Evaluates sequences of words that could correspond to these
phonemes, determining that "I need a book" is a more likely sequence than
alternatives like "I knee dab hook."
3. Decoder: Integrates outputs from both models to produce the final recognized text: "I
need a book."

You might also like