CHAPTER 5 Flashcards

(34 cards)

1
Q

………………..is the core component of modern
Natural Language Processing (NLP)

A

language model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

T/F Language model , It is a probabilistic statistical model that determines the probability of a given sequence of words occurring in a sentence based on the previous words.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

T/F
It helps to predict which word is more likely to appear next
in the sentence.
⚫ It’s a tool that analyzes the pattern of human language for
the prediction of words.
⚫ Language models analyze bodies of text data to provide a
basis for their word predictions.
⚫ Widely used in NLP applications like chatbots and search
engines.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does Language Model Works?

A

⚫ Language Models determine the probability of the next word by analyzing the text in data.
⚫ These models interpret the data by feeding it through algorithms.
⚫ The algorithms are responsible for creating rules for the context in natural language .

⚫ The models are prepared for the prediction of words by
learning the features and characteristics of a language.
⚫ With this learning, the model prepares itself for
understanding phrases and predicting the next words in
sentences.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Types of Language Models

A
  1. Statistical Language Models
  2. Neural Language Models
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

T/F Statistical models predict the next word based on previous words.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

T/F Statistical language model, Use probabilistic techniques to analyze text patterns.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Popular Statistical Models

A

1- N-Gram Model – Uses a fixed-length sequence of words.
2- Bidirectional Model – Considers both past and future words.
3- Exponential Model – Assigns probabilities based on exponential functions.
4-Continuous Space Model – Represents words in a continuous vector
space.
5- Neural language Model – Uses neural networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

…………creates a probability distribution for a
sequence of ‘n’ tokens (words).

This is one of the simplest approaches to language modelling

A

N-Gram model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

T/F There are different types of N-Gram models such as, bigrams,trigrams

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

N-GRAM EXMAPLES:

A

Example Sentence:
“I like learning and practice NLP in this lecture”
– Unigrams:
“I”, “like”, “learning”, “and”, “practice”, “NLP”, “in”, “this”, “lecture”

– Bigram Example:
(“I”, “like”), (“like”, “learning”), (“learning”, “and”), (“and”, “practice”),
(“practice”, “NLP”), (“NLP”, “in”), (“in”, “this”), (“this”, “lecture”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A

READ IT AGAIN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

…………..is a collection of text data consisting of the proceedings of the European Parliament from 1996 to 2012

A

The Europarl Corpus

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

T/F The Markov assumption simplifies language modeling by stating that only the most recent words in a sentence
matter when predicting the next word.

For a bigram model, The prediction of the next word
depends only on the previous word.

For an n-gram model, only the preceding (n-1) words are considered

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Problem with n-gram

A

⚫ One problem with with N-Gram models is data sparsity.

⚫ This occurs when the model encounters word sequences (N-Grams) that were not seen during training. As a result,
the model assigns them a zero probability.

⚫ Techniques to solve this problem include smoothing, backoff and interpolation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

…………….is a two-word sequence of two words coming together to form a meaning

A

bigram

“I like”, “like learning”, “learning and”, “ and practice”, “practice
NLP”, “ NLP in”, “in this”, “this lecture”.

17
Q

…………is a three-word sequence of three words coming together to form a meaning

“I like learning”, “learning and practicing”, “practicing NLP in “ in this lecture”

18
Q

T/F Bidirectional model, Unlike n-gram models, which analyze text in one direction
(backwards), bidirectional models analyze text in both
directions, (backwards and forwards)

19
Q

T/F Examining text bidirectionally increases result accuracy

This type is often utilized in machine learning and speech
generation applications

Example: Google uses a bidirectional model to process search
queries

20
Q

………..This type of statistical model evaluates text by using an equation which is a combination of n-grams and feature functions

Here the features and parameters of the desired results
are already specified

This model has fewer statistical assumptions which mean
the chances of having accurate results are more.

21
Q

The process of assigning weight to a word is known as
…………………..

A

word embedding

22
Q

……………In this type of statistical model, words are arranged as a
non-linear combination of weights in a neural network

This type of model proves helpful in scenarios where the data set of words continues to become large and include unique words.

A

Continuous Space

23
Q

T/F Neural Language Models

These language models are based on neural networks and are often considered as an advanced approach to execute NLP tasks

Neural language models overcome the shortcomings of classical models such as n-gram and are used for complex tasks such as speech recognition or machine translation

24
Q

…………… is the process of
analyzing the structure of a sentence based on grammatical rules.

25
.................is a formal system that defines how sentences are structured.
Context-Free Grammar (CFG)
26
Why CFG is Important?
Defines sentence structure: Analyzing sentences Sentence generation
27
CFG Key Components
– Non-terminal symbols (N): Represent abstract syntactic categories. – Terminal symbols (Σ): Represent the actual input tokens (e.g., words). – Production rules (R): Define how non-terminals can be expanded into terminals or other non-terminals. – Start symbol (S): A special non-terminal from which the grammar starts.
28
DONE
29
T/F The process of Sentence Generation starts from the start symbol (S) and recursively apply the production rules until only terminal symbols remain
T
30
To determine if a string of terminal symbols can be generated by a given Context-Free Grammar (CFG), and to also return the parse tree(s), we will apply both:
– Top-Down Parsing techniques : Start searching space of derivations for the start symbol. – Bottom-up Parsing techniques : Start search space of reverse derivations from the terminal symbols in the string.
31
T.F Bottom-up parsing starts with the input string and builds the parse tree in a bottom-up manner. * It identifies small portions of the input string and combines them to form larger structures until the entire string is recognized.
T
32
T/F Top down never explores options that will not lead to a full parse, but can explore many options that never connect to the actual sentence
T
33
T/F Bottom up never explores options that do not connect to the actual sentence but can explore options that can never lead to a full parse.
T
34
T/F Relative amounts of wasted search depend on how much the grammar branches in each direction.
T