Recall & Review
beginner
What is an N-gram in natural language processing?
An N-gram is a sequence of N words or tokens that appear together in text. For example, a 2-gram (bigram) is two words in a row, like "good morning."
Click to reveal answer
beginner
What is the difference between a unigram, bigram, and trigram?
A unigram is a single word, a bigram is a pair of two consecutive words, and a trigram is a group of three consecutive words.
Click to reveal answer
intermediate
Why are N-grams useful in language models?
N-grams help predict the next word by looking at the previous N-1 words. This helps computers understand context and improve tasks like text prediction or spelling correction.
Click to reveal answer
intermediate
What is a limitation of using large N in N-grams?
Using large N (like 5-grams or more) can cause data sparsity, meaning many sequences appear rarely or never, making it hard for the model to learn well.
Click to reveal answer
beginner
How can N-grams be used to detect common phrases?
By counting how often N-grams appear in text, we can find common phrases or word combinations that occur frequently, like "New York City" or "machine learning."
Click to reveal answer
What does a bigram represent?
✗ Incorrect
A bigram is a sequence of two consecutive words in text.
Which N-gram size is called a trigram?
✗ Incorrect
A trigram consists of three consecutive words.
What problem can happen if N is too large in N-grams?
✗ Incorrect
Large N causes data sparsity because many sequences appear rarely, making learning difficult.
How do N-grams help in text prediction?
✗ Incorrect
N-grams use the previous N-1 words to predict the next word, helping with text prediction.
Which of these is an example of a unigram?
✗ Incorrect
A unigram is a single word, like "machine."
Explain what N-grams are and how they are used in language processing.
Think about sequences of words and how they help computers understand text.
You got /3 concepts.
Describe one advantage and one limitation of using N-grams in text analysis.
Consider what N-grams help with and what problems happen when N grows.
You got /2 concepts.