Recall & Review
beginner
What is an N-gram in language modeling?
An N-gram is a sequence of N words used together to predict the next word in a sentence. For example, a bigram is two words, a trigram is three words.
Click to reveal answer
beginner
How does an N-gram language model predict the next word?
It looks at the previous N-1 words and calculates the probability of each possible next word based on how often those words appeared together in training data.
Click to reveal answer
beginner
What is the difference between unigram, bigram, and trigram models?
Unigram models consider single words independently. Bigram models consider pairs of words. Trigram models consider triples of words to predict the next word.
Click to reveal answer
intermediate
Why do N-gram models face the problem of data sparsity?
Because many word combinations may not appear in the training data, making it hard to estimate their probabilities accurately.
Click to reveal answer
intermediate
What is smoothing in N-gram language models?
Smoothing is a technique to adjust probabilities so that unseen word sequences get a small, non-zero probability instead of zero, helping the model handle new phrases.
Click to reveal answer
What does a trigram model use to predict the next word?
✗ Incorrect
A trigram model uses the previous two words (N-1) to predict the next word.
Why is smoothing important in N-gram models?
✗ Incorrect
Smoothing assigns small non-zero probabilities to unseen sequences, preventing zero probability issues.
Which problem occurs because many word sequences are rare or missing in training data?
✗ Incorrect
Data sparsity happens when many word combinations are rare or missing, making probability estimation hard.
In a bigram model, what is the probability of a word based on?
✗ Incorrect
A bigram model predicts a word based on the immediately preceding word.
Which of these is NOT a type of N-gram model?
✗ Incorrect
The correct term is 'four-gram' or '4-gram', not 'quadrigram'.
Explain how an N-gram language model predicts the next word in a sentence.
Think about how you guess the next word when typing a message.
You got /3 concepts.
Describe the challenges N-gram models face and how smoothing helps.
Consider what happens when the model sees a new phrase it never learned.
You got /3 concepts.