0% found this document useful (0 votes)
20 views3 pages

Nlpquiz

The document contains a quiz based on Chapters 1 to 9 of a Natural Language Processing (NLP) curriculum, covering topics such as syntactic analysis, language modeling, and neural networks. It includes multiple-choice questions with correct answers provided for each question. The quiz assesses knowledge on various NLP concepts, including n-grams, tokenization, and the Transformer model.

Uploaded by

SimonFn
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)
20 views3 pages

Nlpquiz

The document contains a quiz based on Chapters 1 to 9 of a Natural Language Processing (NLP) curriculum, covering topics such as syntactic analysis, language modeling, and neural networks. It includes multiple-choice questions with correct answers provided for each question. The quiz assesses knowledge on various NLP concepts, including n-grams, tokenization, and the Transformer model.

Uploaded by

SimonFn
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/ 3

NLP Quiz (Chapters 1 to 9)

I NSTRUCTIONS b) The probabilities of each n-gram depend only on the


Answer the following questions based on the material previous word.
covered in Chapters 1 to 9. Choose the correct option for each c) They suffer from the problem of sparsity and require
question. smoothing techniques.
d) They work by learning a global representation of the
C HAPTER 1: I NTRODUCTION TO NLP entire sentence.
Q1. In NLP, which of the following is not considered a core Q6. In an n-gram language model, what does ”smoothing”
problem related to syntactic analysis? refer to?
a) Part-of-speech tagging a) Reducing the number of training examples needed
b) Dependency parsing b) Ensuring that every possible n-gram has a non-zero
c) Named Entity Recognition (NER) probability
d) Constituency parsing c) Mapping unseen words to the most frequent n-grams
Q2. What is the main challenge of word sense disambiguation d) A method to adjust the sentence structure for coherence
(WSD)?
C HAPTER 4: NAIVE BAYES - T EXT C LASSIFICATION AND
a) Determining whether a word is a noun or verb S ENTIMENT A NALYSIS
b) Identifying the correct meaning of a word based on
context Q7. Which of the following is a significant limitation of Naive
c) Removing stop words from text Bayes in text classification tasks?
d) Extracting named entities from a sentence a) It cannot handle large datasets
b) It assumes that all features (words) are independent,
C HAPTER 2: R EGULAR E XPRESSIONS , T OKENIZATION , which is unrealistic for many tasks
AND E DIT D ISTANCE c) It requires extensive training time for high-dimensional
Q3. Which of the following regular expressions cor- datasets
rectly matches an email address in the form ”user- d) It cannot handle continuous feature variables
[email protected]”? Q8. In Naive Bayes classification, the likelihood of each word
a) \w+\@\w+\.\w+ wi in a document D given class C is typically computed
b) [a-zA-Z0-9]+@[a-z]+_ [a-z]2,3 as:
c) \w+.\w+@\.\w+\.\w+ a) P (wi |C) = count(w i ,C)
count(C)
d) [ a − zA − Z0 − 9] + @[a − z] + ˙[a − z]2, 3 count(wi )
b) P (wi |C) = count(C)
Q4. In the context of tokenization, what is the difference count(wi ,C)
c) P (wi |C) = count(wi )
between word-level tokenization and subword-level to- 1
kenization (e.g., Byte Pair Encoding)? d) P (wi |C) = count(C)

a) Word-level tokenization breaks text into sentences, C HAPTER 5: L OGISTIC R EGRESSION


while subword-level tokenization breaks it into words.
Q9. When using Logistic Regression for text classification,
b) Word-level tokenization assigns fixed-length tokens,
what is the purpose of the sigmoid function?
while subword-level tokenization can handle variable-
length tokens. a) It maps the linear decision function to a value between
c) Word-level tokenization assigns integer values to each 0 and 1, representing the probability of class member-
token, while subword-level tokenization represents ship.
words as embeddings. b) It reduces the dimensionality of the feature space.
d) Word-level tokenization splits the text based on whites-c) It normalizes the input features to have mean zero and
pace and punctuation, while subword-level tokeniza- unit variance.
tion splits unknown words into smaller meaningful d) It performs feature selection by removing irrelevant
parts. features.
Q10. What would happen if you used a logistic regression
C HAPTER 3: L ANGUAGE M ODELING model on highly correlated features in text data (e.g.,
Q5. Which of the following is true about n-gram models in word pairs appearing together frequently)?
language modeling? a) It would lead to overfitting, as the model would fail to
a) They capture long-range dependencies in text. generalize to unseen data.
b) It would improve performance by leveraging the cor- a) LSTMs are a type of RNN that overcomes the vanish-
relation to make better predictions. ing gradient problem by using special gating mecha-
c) The coefficients of the correlated features would be- nisms.
come unstable. b) LSTMs process input sequentially, but cannot retain
d) The model would not converge, and the training pro- long-term dependencies.
cess would fail. c) LSTMs only capture short-range dependencies within
a sequence.
C HAPTER 6: V ECTOR S EMANTICS AND E MBEDDINGS d) LSTMs do not use any gates to control the flow of
information.
Q11. Which of the following is true about the GloVe (Global
Q16. In an LSTM, which gate controls the memory of the net-
Vectors for Word Representation) model?
work, determining which information should be retained
a) It is based solely on the context of words in a local or discarded?
window.
a) Forget gate
b) It learns embeddings using a neural network-based
b) Input gate
architecture.
c) Output gate
c) It factors the word co-occurrence matrix to create dense
d) Reset gate
word representations.
d) It generates word embeddings based on syntactic rules C HAPTER 9: T HE T RANSFORMER
alone. Q17. How does the Transformer model differ from traditional
Q12. What is a potential issue with using word embeddings RNN-based models in sequence processing?
learned from large corpora in a specific domain (e.g., a) The Transformer uses convolutional layers for se-
legal or medical text)? quence processing, while RNNs use recurrent connec-
a) The embeddings might not capture enough context for tions.
rare words in the domain. b) The Transformer processes all input tokens simultane-
b) The embeddings may be too dense, losing information ously, whereas RNNs process tokens sequentially.
about individual words. c) The Transformer model is slower to train because it
c) The embeddings are too specific and can no longer needs to process sequences in order.
generalize to other domains. d) The Transformer only works with a fixed-size input
d) The embeddings will always outperform domain- sequence, while RNNs can handle variable-length se-
specific models. quences.
Q18. In the Transformer, what is the function of the ”multi-
C HAPTER 7: N EURAL N ETWORKS head attention” mechanism?
Q13. What is the key difference between a feedforward neural a) It allows the model to focus on different parts of the
network and a recurrent neural network (RNN)? input sequence at the same time, capturing multiple
a) RNNs are designed to handle sequential data, while relationships in parallel.
feedforward networks do not have this capability. b) It combines the outputs of different layers into a single
b) Feedforward networks are more powerful than RNNs representation.
for sequence prediction tasks. c) It processes the sequence using multiple layers of self-
c) RNNs use backpropagation through time (BPTT) for attention for deeper analysis.
learning, while feedforward networks use standard d) It normalizes the attention scores to focus on the most
backpropagation. important parts of the sequence.
d) RNNs are computationally faster than feedforward Q19. What is the primary advantage of position encoding in
networks for NLP tasks. the Transformer model?
Q14. Which activation function is typically used in the hidden a) It reduces the model’s reliance on word embeddings.
layers of a neural network for NLP tasks? b) It allows the model to incorporate word order informa-
a) ReLU (Rectified Linear Unit) tion, which is critical for sequence tasks.
b) Tanh c) It increases the model’s ability to generalize to unseen
c) Sigmoid data.
d) Softmax d) It simplifies the training process by reducing the num-
ber of parameters.
C HAPTER 8: R ECURRENT N EURAL N ETWORKS (RNN S )
AND LSTM S

Q15. Which of the following is true about Long Short-Term


Memory (LSTM) networks?
A NSWER K EY
Q1. c) Named Entity Recognition (NER)
Q2. b) Identifying the correct meaning of a word based
on context
Q3. b) [a-zA-Z0-9]+@[a-z]+_ [a-z]2,3
Q4. d) Word-level tokenization splits the text based on
whitespace and punctuation, while subword-level to-
kenization splits unknown words into smaller mean-
ingful parts
Q5. c) They suffer from the problem of sparsity and
require smoothing techniques
Q6. b) Ensuring that every possible n-gram has a non-zero
probability
Q7. b) It assumes that all features (words) are indepen-
dent, which is unrealistic for many tasks
i ,C)
Q8. a) P (wi |C) = count(w
count(C)
Q9. a) It maps the linear decision function to a value
between 0 and 1, representing the probability of class
membership.
Q10. c) The coefficients of the correlated features would
become unstable.
Q11. c) It factors the word co-occurrence matrix to create
dense word representations.
Q12. a) The embeddings might not capture enough context
for rare words in the domain.
Q13. a) RNNs are designed to handle sequential data, while
feedforward networks do not have this capability.
Q14. a) ReLU (Rectified Linear Unit)
Q15. a) LSTMs are a type of RNN that overcomes the
vanishing gradient problem by using special gating
mechanisms.
Q16. a) Forget gate
Q17. b) The Transformer processes all input tokens simul-
taneously, whereas RNNs process tokens sequentially.
Q18. a) It allows the model to focus on different parts of the
input sequence at the same time, capturing multiple
relationships in parallel.
Q19. b) It allows the model to incorporate word order
information, which is critical for sequence tasks.

You might also like