1. Home
  2. Explore
  3. Computer Science
  4. Word Embeddings in NLP

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Word Embeddings in NLP

  • 20Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: One-Hot Vector Problems
All pairs of one-hot encoded words have the same Euclidean distance of
.

20 questions

  1. 1
    All pairs of one-hot encoded words have the same Euclidean distance of
    _____
    .
    Hint

    Consider the distance between two vectors that each have a single 1 in different positions.

    Answer

    √2

  2. 2
    One-hot vectors are as long as the
    _____
    size, causing computational inefficiency.
    Hint

    Think about the dimension of the vector in relation to the number of unique words.

    Answer

    vocabulary

  3. 3
    Word embeddings are
    _____
    vectors that capture semantic relationships between words.
    Hint

    In contrast to one-hot vectors which are sparse, these have most entries non-zero.

    Answer

    dense

  4. 4
    The key insight behind word embeddings, attributed to John Firth, is 'You shall know a word by the
    _____
    it keeps.'
    Hint

    Think about what surrounds a word in text.

    Answer

    company

  5. 5
    A
    _____
    matrix counts how often two words appear in the same sentence across a corpus.
    Hint

    It's a word-word matrix where each cell counts joint occurrences.

    Answer

    co-occurrence

  6. 6
    The GloVe model predicts the
    _____
    of the co-occurrence count as the sum of word biases plus the dot product of their embeddings.
    Hint

    This transformation squashes large ranges to make regression more stable.

    Answer

    logarithm

  7. 7
    In GloVe, the bias term for each word captures its inherent
    _____
    .
    Hint

    Some words like 'the' occur very frequently regardless of context.

    Answer

    popularity

  8. 8
    The loss function used to train GloVe embeddings is typically
    _____
    between predicted and actual log co-occurrence.
    Hint

    This is the most common regression loss.

    Answer

    mean squared error

  9. 9
    Stochastic
    _____
    descent can be used to minimize the GloVe loss because the model is differentiable.
    Hint

    This algorithm iteratively updates parameters to reduce the loss.

    Answer

    gradient

  10. 10
    The dimensionality of word embeddings is a
    _____
    that controls model capacity and risk of overfitting.
    Hint

    It must be chosen before training, like the number of hidden units in a neural network.

    Answer

    hyperparameter

  11. 11
    Two words with similar meanings will have similar
    _____
    vectors in the co-occurrence matrix.
    Hint

    Each word corresponds to a row in the matrix; compare rows for similarity.

    Answer

    row

  12. 12
    Standalone word embeddings fail to handle
    _____
    , where a word has multiple meanings.
    Hint

    Words like 'bank' have different senses depending on context.

    Answer

    polysemy

  13. 13
    Pre-trained embeddings are especially useful when you have a
    _____
    amount of task-specific data.
    Hint

    They provide general linguistic knowledge that can be transferred.

    Answer

    small

  14. 14
    In Keras, the embedding layer looks up embedding
    _____
    for each integer token index.
    Hint

    It's essentially a dictionary mapping indices to dense vectors.

    Answer

    vectors

  15. 15
    To make sequences of different lengths uniform, we use
    _____
    and truncation.
    Hint

    We add a special token to shorter sequences to match a fixed length.

    Answer

    padding

  16. 16
    The
    _____
    layer in Keras combines all embedding vectors for a sequence into a single vector by averaging each dimension.
    Hint

    It operates across the sequence dimension, reducing a table to a vector.

    Answer

    GlobalAveragePooling1D

  17. 17
    Setting the embedding layer's trainable attribute to
    _____
    allows backpropagation to update the embeddings during training.
    Hint

    This unleashes gradient descent on the embedding weights.

    Answer

    True

  18. 18
    The relationship 'king - man + woman ≈
    _____
    ' is an example of word vector algebra.
    Hint

    This shows that embeddings capture analogies through vector arithmetic.

    Answer

    queen

  19. 19
    Embeddings learned from biased data will
    _____
    those biases.
    Hint

    The model faithfully reproduces patterns in the training data.

    Answer

    perpetuate

  20. 20
    Word embedding algebra relies on both the
    _____
    and direction between vectors to represent semantic relationships.
    Hint

    It's not just how close they are, but also the orientation matters.

    Answer

    distance

1 of 20
Question 1 of 20

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent