A word embedding is a way to turn words into numbers so a computer can understand them. It puts similar words close together in a space, like friends sitting near each other.
Click to reveal answer
beginner
What does Word2Vec do?
Word2Vec learns to represent words as vectors (lists of numbers) by looking at the words around them in sentences. It helps computers understand word meanings based on context.
Click to reveal answer
intermediate
What are the two main models in Word2Vec?
The two main models are CBOW (Continuous Bag of Words) which predicts a word from its neighbors, and Skip-gram which predicts neighbors from a word.
Click to reveal answer
beginner
Why are word embeddings better than one-hot encoding?
Word embeddings capture meaning and similarity between words, while one-hot encoding treats every word as completely different with no relation.
Click to reveal answer
intermediate
How can you tell if two words are similar using Word2Vec embeddings?
You can measure the distance or angle between their vectors. If they are close or point in similar directions, the words have similar meanings.
Click to reveal answer
What does Word2Vec use to learn word meanings?
AThe length of the word
BThe words around a target word
CThe number of vowels in the word
DThe font style of the word
✗ Incorrect
Word2Vec learns word meanings by looking at the context words around a target word.
Which Word2Vec model predicts a word from its neighbors?
ACBOW
BTF-IDF
COne-hot encoding
DSkip-gram
✗ Incorrect
CBOW (Continuous Bag of Words) predicts a word based on its surrounding words.
Why are word embeddings useful compared to one-hot encoding?
AThey show relationships between words
BThey use less memory
CThey are easier to read
DThey count word frequency
✗ Incorrect
Word embeddings capture relationships and similarities between words, unlike one-hot encoding.
What does a vector in Word2Vec represent?
AA word's spelling
BA sentence length
CA word as a list of numbers
DA document's topic
✗ Incorrect
In Word2Vec, each word is represented as a vector, which is a list of numbers capturing its meaning.
If two word vectors are close in space, what does it mean?
AThe words have different meanings
BThe words appear in different languages
CThe words are spelled the same
DThe words have similar meanings
✗ Incorrect
Close vectors mean the words are similar in meaning or used in similar contexts.
Explain how Word2Vec learns to represent words as vectors.
Think about how the words around a word help guess it or its neighbors.
You got /4 concepts.
Describe why word embeddings are important in natural language processing.
Consider how computers need numbers and how embeddings help with meaning.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of Word2Vec in machine learning?
easy
A. To translate text from one language to another
B. To count the number of words in a sentence
C. To convert words into numerical vectors that capture their meanings
D. To generate random words for testing
Solution
Step 1: Understand Word2Vec's role
Word2Vec creates vectors representing words based on their context, capturing meaning.
Step 2: Compare options
Only To convert words into numerical vectors that capture their meanings describes converting words into meaningful numerical vectors.
Final Answer:
To convert words into numerical vectors that capture their meanings -> Option C
Quick Check:
Word2Vec = word vectors [OK]
Hint: Word2Vec turns words into numbers showing meaning [OK]
Common Mistakes:
Thinking Word2Vec translates languages
Confusing Word2Vec with word counting
Assuming Word2Vec generates random words
2. Which of the following is the correct way to import Word2Vec from the gensim library in Python?
easy
A. import gensim.Word2Vec
B. import Word2Vec from gensim.models
C. from gensim import Word2Vec
D. from gensim.models import Word2Vec
Solution
Step 1: Recall correct Python import syntax
Python uses 'from module import class' to import specific classes.
Step 2: Match with gensim syntax
The correct import is 'from gensim.models import Word2Vec'. Other options have wrong syntax.
Final Answer:
from gensim.models import Word2Vec -> Option D
Quick Check:
Correct import syntax = from gensim.models import Word2Vec [OK]
Hint: Use 'from module import class' for specific imports [OK]
Common Mistakes:
Using 'import Word2Vec from ...' which is invalid syntax
Trying to import directly from 'gensim' without 'models'
Using dot notation in import statements incorrectly
3. Given the following code snippet, what will be the output of print(model.wv.most_similar('king', topn=1))?
A. Set min_count=1 to include all words in training
B. Change total_examples to len(sentences) in train()
C. Remove the train() call because Word2Vec trains on initialization
D. Increase vector_size to at least 10
Solution
Step 1: Analyze min_count effect
min_count=2 excludes words appearing less than twice. 'mouse' and 'elephant' appear once, so they are ignored.
Step 2: Fix by lowering min_count
Setting min_count=1 includes all words, fixing vocabulary size and training coverage.
Final Answer:
Set min_count=1 to include all words in training -> Option A
Quick Check:
min_count controls word inclusion [OK]
Hint: min_count filters words; lower it to include rare words [OK]
Common Mistakes:
Ignoring min_count effect on vocabulary
Thinking train() is unnecessary or wrongly used
Changing vector_size without addressing vocabulary issue
5. You want to find the word that best fits the analogy: 'king' is to 'man' as 'queen' is to ____. Using Word2Vec, which operation would you perform to find this word?
hard
A. vector('king') - vector('man') + vector('queen')
B. vector('king') + vector('man') - vector('queen')
C. vector('queen') - vector('king') + vector('man')
D. vector('man') - vector('king') + vector('queen')
Solution
Step 1: Understand analogy vector math
Word2Vec analogies use vector arithmetic: 'king' - 'man' + 'queen' approximates the vector for the missing word.
Step 2: Apply formula to find the answer
Performing vector('king') - vector('man') + vector('queen') finds the word similar to 'queen' but related like 'king' is to 'man'.
Final Answer:
vector('king') - vector('man') + vector('queen') -> Option A
Quick Check:
Analogy = king - man + queen [OK]
Hint: Use king - man + queen to solve analogies [OK]
Common Mistakes:
Mixing up vector addition and subtraction order
Using unrelated vector combinations
Ignoring analogy vector math concept
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.