Unit 3 - Practice Quiz

INT344 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 What is the primary goal of calculating Minimum Edit Distance?

A. To calculate the probability of a word appearing in a sentence
B. To generate word embeddings for a neural network
C. To quantify the dissimilarity between two strings by counting operations
D. To find the longest common subsequence between two strings

2 Which of the following operations is NOT typically used in the Levenshtein distance algorithm?

A. Insertion
B. Transposition
C. Substitution
D. Deletion

3 In the context of dynamic programming for edit distance, if source[i] equals target[j], what is the cost of substitution?

A. 0
B. 1
C. 2
D. Infinity

4 What is the Minimum Edit Distance between the strings 'cat' and 'cut'?

A. 0
B. 2
C. 3
D. 1

5 How does an autocorrect system typically identify candidate words for a misspelled word?

A. By using the longest word in the dictionary
B. By finding words within a certain edit distance threshold
C. By choosing words that start with the same letter only
D. By selecting random words from the dictionary

6 Which algorithm is commonly used to efficiently calculate the Minimum Edit Distance?

A. Gradient Descent
B. Dynamic Programming
C. Depth-First Search
D. K-Means Clustering

7 In Part of Speech (POS) tagging, what is the 'Hidden' component in a Hidden Markov Model?

A. The punctuation marks
B. The transition probabilities
C. The Part of Speech tags
D. The words in the sentence

8 What does the Markov Assumption state in the context of Markov Chains?

A. The future state depends only on the current state
B. The future state is independent of the current state
C. The future state depends on all past states
D. The future state depends on the hidden emissions

9 What are 'Transition Probabilities' in an HMM?

A. The probability of moving from one POS tag to another
B. The probability of generating a specific word given a tag
C. The probability of a word being misspelled
D. The probability of a sentence starting with a specific word

10 What are 'Emission Probabilities' in an HMM used for POS tagging?

A. P(tag|word)
B. P(word|previous_word)
C. P(tag|previous_tag)
D. P(word|tag)

11 Which algorithm is used to find the most likely sequence of hidden states (POS tags) given a sequence of observations?

A. The Forward Algorithm
B. The Edit Distance Algorithm
C. The Viterbi Algorithm
D. The Backward Algorithm

12 A text corpus is:

A. A large, structured set of texts used for statistical analysis
B. A set of rules for grammar
C. A dictionary of word definitions
D. A software used for autocorrection

13 In an N-gram language model, what is 'N'?

A. The number of words in the sequence considered for probability
B. The dimension of the word embedding
C. The number of hidden states
D. The number of words in the sentence

14 Which assumption simplifies the calculation of N-gram probabilities?

A. Words are independent of each other
B. The probability of a word depends only on the previous N-1 words
C. All words have equal probability
D. The probability depends on the entire sentence history

15 How is the probability of a bigram P(w2 | w1) calculated from a corpus?

A. Count(w1, w2) / Count(w2)
B. Count(w1) / Count(w2)
C. Count(w1) * Count(w2)
D. Count(w1, w2) / Count(w1)

16 What is the main problem with N-gram models when N is very large?

A. Data sparsity (many sequences have zero counts)
B. The model becomes too simple
C. The context window becomes too small
D. The vocabulary size decreases

17 What technique is used to handle N-grams that have zero probability in the training data?

A. Smoothing (e.g., Laplace Smoothing)
B. Filtering
C. Pruning
D. Tagging

18 In Laplace (Add-1) smoothing, what is added to the denominator?

A. The total word count
B. 1
C. The vocabulary size (V)
D. The number of sentences

19 What does an autocomplete system try to maximize?

A. The length of the sentence
B. P(previous_words | next_word)
C. The edit distance between words
D. P(next_word | previous_words)

20 A Trigram model looks at how many previous words to predict the next word?

A. 2
B. 0
C. 3
D. 1

21 One-hot encoding of words results in vectors that are:

A. Sparse and high-dimensional
B. Dense and high-dimensional
C. Sparse and low-dimensional
D. Dense and low-dimensional

22 What is a major limitation of one-hot encoding for words?

A. It does not capture semantic similarity between words
B. It requires a neural network
C. It cannot represent rare words
D. It is difficult to compute

23 Word embeddings typically represent words as:

A. Integers
B. Dense vectors of real numbers
C. Sparse binary vectors
D. Strings

24 Which metric is commonly used to measure the similarity between two word embedding vectors?

A. Cosine Similarity
B. Edit Distance
C. Jaccard Index
D. Perplexity

25 The Word2Vec model 'Skip-gram' architecture tries to predict:

A. The context words given the target word
B. The next sentence
C. The POS tag of the word
D. The target word given the context words

26 The Word2Vec model 'CBOW' (Continuous Bag of Words) architecture tries to predict:

A. The document topic
B. The part of speech
C. The target word given the context words
D. The context words given the target word

27 What famous algebraic property is often cited to demonstrate the semantic capability of word embeddings?

A. King - Man + Woman = Queen
B. Paris - France = Germany
C. Apple + Orange = Fruit
D. Fast + Slow = Speed

28 In the 'Noisy Channel Model' for spelling correction, P(x|w) represents:

A. The probability of typing x given the intended word w
B. The probability that the user meant w but typed x
C. The probability of x being a valid word
D. The probability of the word w appearing in the corpus

29 When building an HMM for POS tagging, the sum of probabilities of all outgoing transitions from a single state must equal:

A. The number of states
B. The number of observations
C. 0
D. 1

30 What is 'Perplexity' in the context of Language Models?

A. The size of the vocabulary
B. The number of parameters in the model
C. The time taken to train the model
D. A measure of how well a probability model predicts a sample

31 Why do we use Log Probabilities instead of raw probabilities in N-gram calculations?

A. To increase perplexity
B. To avoid arithmetic underflow
C. To handle negative numbers
D. To make numbers larger

32 Which of the following describes the 'Start' token (<s>) in N-gram models?

A. It represents an unknown word
B. It indicates the end of a sentence
C. It is used for punctuation
D. It gives context for the first word in the sentence

33 What represents the 'Observations' in a POS HMM?

A. The transition matrix
B. The sequence of tags
C. The initial state probabilities
D. The sequence of words in the text

34 In Minimum Edit Distance, the 'backtrace' step is used to:

A. Determine the actual sequence of operations (alignment)
B. Initialize the matrix
C. Sum the rows
D. Calculate the cost

35 Which token is typically used to replace words not found in the training vocabulary?

A. <UNK>
B. <NULL>
C. <END>
D. <START>

36 A 'Unigram' model assumes that:

A. Words depend on the previous word
B. Words depend on the previous two words
C. Words depend on the grammar
D. Words are independent of context

37 The dimensionality of a Word2Vec embedding vector is typically chosen by:

A. The size of the vocabulary
B. The system designer (hyperparameter)
C. The number of unique characters
D. The length of the sentence

38 In the equation P(tag|word) ∝ P(word|tag) * P(tag), what is P(tag)?

A. Posterior probability
B. Emission probability
C. Prior probability
D. Likelihood

39 If we want to build a spell checker, which probability do we want to maximize according to Bayes' theorem?

A. P(typo | correction)
B. P(typo)
C. P(correction)
D. P(correction | typo)

40 Which type of language model suffers most from the 'curse of dimensionality'?

A. High-order N-gram model (e.g., 5-gram)
B. Word2Vec
C. Bag of Words
D. Unigram model

41 What is the primary input to a neural network training a Word2Vec model?

A. One-hot encoded vectors of words
B. Image pixels
C. Parse trees
D. Audio signals

42 The term 'corpus' in NLP refers to:

A. A computer algorithm
B. A body of text data
C. A specific neural network layer
D. A type of spelling error

43 In edit distance, if we assign a higher cost to substitution than insertion/deletion, it implies:

A. Typing a wrong letter is considered worse than missing a letter
B. The distance will always be zero
C. The algorithm will fail
D. Insertion is impossible

44 What is the result of using a sliding window in N-gram generation?

A. It creates a sequence of overlapping word chunks
B. It converts text to uppercase
C. It removes stop words
D. It calculates the edit distance

45 Which of these words likely has a vector closest to 'frog' in a well-trained embedding space?

A. Steel
B. Galaxy
C. Toad
D. Philosophy

46 In an HMM, what connects hidden states to each other?

A. Transition probabilities
B. Observation vectors
C. Emission probabilities
D. The Viterbi path

47 What is 'Stupid Backoff' in the context of Language Models?

A. A smoothing method that uses lower-order N-grams if higher-order ones are missing
B. A type of neural network
C. A method to stop the algorithm
D. A way to delete wrong words

48 Which application primarily utilizes Probabilistic Language Models?

A. Speech Recognition
B. Network Routing
C. Image Compression
D. Database Management

49 In the context of Word Embeddings, what does 'Polysemy' refer to?

A. Words that rhyme
B. Words with similar spellings
C. Words with multiple meanings
D. Words in different languages

50 If P(A|B) is the probability of tag A following tag B, this is an example of:

A. Transition probability
B. Emission probability
C. Observation probability
D. Edit probability