🌍 Machine Learning · flashcards

Machine Learning Natural Language Processing Flashcards

50 question-and-answer cards covering Natural Language Processing as it is examined in Machine Learning. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

50Cards in deck
24Free preview
51Syllabus topics
~187Chars per answer
FreePrice

24 sample cards from the Natural Language Processing deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. What is the Bag of Words (BoW) model?

    BoW represents a document as an unordered multiset of its words, recording word counts (or presence) while discarding grammar and word order. Each document becomes a vector over the vocabulary.

  2. State two key limitations of the Bag of Words model.

    It ignores word order/context (so 'dog bites man' equals 'man bites dog') and produces high-dimensional sparse vectors that capture no semantic similarity between different words.

  3. What does TF-IDF stand for, and what is its purpose?

    Term Frequency–Inverse Document Frequency. It weights terms so that words frequent in a document but rare across the corpus get high scores, highlighting words that are distinctive to a document.

  4. Give the formula for Term Frequency (TF) of term $t$ in document $d$.

    $$\text{TF}(t,d) = \frac{f_{t,d}}{\sum_{t' \in d} f_{t',d}}$$ where $f_{t,d}$ is the raw count of term $t$ in document $d$ (sometimes TF is just the raw count $f_{t,d}$).

  5. Give the standard formula for Inverse Document Frequency (IDF) of term $t$.

    $$\text{IDF}(t) = \log\frac{N}{n_t}$$ where $N$ is the total number of documents and $n_t$ is the number of documents containing term $t$. A smoothed variant is $\log\frac{N}{1+n_t}$.

  6. Write the full TF-IDF weight of term $t$ in document $d$.

    $$\text{TF-IDF}(t,d) = \text{TF}(t,d) \times \text{IDF}(t) = \text{TF}(t,d)\cdot \log\frac{N}{n_t}$$

  7. In TF-IDF, what score does a word that appears in every document receive, and why?

    Its IDF is $\log\frac{N}{N} = \log 1 = 0$, so its TF-IDF weight is $0$ — such ubiquitous words are treated as non-discriminative.

  8. What are word embeddings?

    Word embeddings are dense, low-dimensional real-valued vector representations of words learned so that semantically/syntactically similar words have nearby vectors, capturing meaning from distributional context.

  9. What is the distributional hypothesis that underlies word embeddings?

    'You shall know a word by the company it keeps' — words that occur in similar contexts tend to have similar meanings, so context co-occurrence can encode semantics.

  10. How does the similarity between two word embedding vectors $\vec{a}$ and $\vec{b}$ commonly get measured?

    By cosine similarity: $$\cos(\theta) = \frac{\vec{a}\cdot\vec{b}}{\lVert\vec{a}\rVert\,\lVert\vec{b}\rVert}$$ which ranges from $-1$ to $1$, with values near $1$ meaning highly similar.

  11. What famous analogy result demonstrates the linear structure of word embeddings?

    $\vec{king} - \vec{man} + \vec{woman} \approx \vec{queen}$ — vector arithmetic on embeddings captures relational/semantic analogies.

  12. What is Word2Vec, and who introduced it?

    Word2Vec is a shallow neural network method for learning word embeddings from large corpora, introduced by Tomas Mikolov and colleagues at Google in 2013.

  13. Name and distinguish the two architectures of Word2Vec.

    CBOW (Continuous Bag of Words) predicts the target/center word from its surrounding context words; Skip-gram predicts the surrounding context words given the center word. Skip-gram works better for rare words; CBOW is faster.

  14. What training optimizations make Word2Vec efficient?

    Negative sampling (only updating a small sample of negative words instead of the full softmax) and hierarchical softmax, which avoid computing the expensive full-vocabulary softmax.

  15. What is GloVe, and how does its approach differ from Word2Vec?

    GloVe (Global Vectors), from Stanford (Pennington et al., 2014), learns embeddings by factorizing a global word–word co-occurrence count matrix, using corpus-wide statistics, whereas Word2Vec is a local prediction (window-based) method.

  16. What quantity does GloVe primarily model to learn embeddings?

    Ratios of word–word co-occurrence probabilities; its objective relates the dot product of word vectors to the logarithm of their co-occurrence count, $\vec{w_i}\cdot\vec{w_j} \approx \log(X_{ij})$.

  17. What is FastText, and what is its key innovation over Word2Vec?

    FastText (Facebook AI, 2016) represents each word as a bag of character n-grams and sums their vectors. This lets it build embeddings for out-of-vocabulary words and capture subword/morphological information.

  18. How does FastText handle out-of-vocabulary (OOV) words, unlike Word2Vec and GloVe?

    It composes an OOV word's vector from its character n-gram subword vectors, so even unseen words get meaningful embeddings, whereas Word2Vec/GloVe have no vector for unseen words.

  19. What is an n-gram?

    An n-gram is a contiguous sequence of $n$ items (typically words or characters) from a text. For example, in 'natural language processing': unigrams are single words, bigrams are 'natural language' and 'language processing'.

  20. In an n-gram language model, what does the Markov assumption state?

    The probability of a word depends only on the previous $n-1$ words: $$P(w_i \mid w_1,\dots,w_{i-1}) \approx P(w_i \mid w_{i-n+1},\dots,w_{i-1})$$

  21. Why is smoothing (e.g. Laplace/add-one) needed in n-gram models?

    To assign nonzero probability to n-grams not seen in the training data, avoiding zero probabilities for valid but unobserved word sequences.

  22. What is a Recurrent Neural Network (RNN), and why is it suited to NLP?

    An RNN is a neural network that processes sequences one element at a time while maintaining a hidden state that carries information from previous steps, making it suited to variable-length sequential data like text. Its update is $$h_t = \tanh(W_h h_{t-1} + W_x x_t + b)$$

  23. What is the vanishing/exploding gradient problem in RNNs?

    During backpropagation through time, gradients can shrink toward $0$ (vanishing) or grow without bound (exploding) over many time steps, making it hard for vanilla RNNs to learn long-range dependencies.

  24. What is an LSTM, and how does it address the RNN limitation?

    A Long Short-Term Memory network is a gated RNN variant that uses a cell state plus input, forget, and output gates to regulate information flow, preserving long-range dependencies and mitigating the vanishing gradient problem. The forget gate is $f_t = \sigma(W_f[h_{t-1}, x_t] + b_f)$.

What this deck covers

The Natural Language Processing deck follows the Machine Learning Natural Language Processing syllabus — 10 chapters and 51 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 5.0 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 187 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Natural Language Processing flashcards FAQ

How many Natural Language Processing flashcards are in this Machine Learning deck?

50 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Machine Learning flashcards free?

Yes. The preview here is free to read with no signup, and the full 50-card deck is free inside the Examius app.

What do the Natural Language Processing cards cover?

They follow the Machine Learning Natural Language Processing syllabus — 10 chapters and 51 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.