AIML Rounds

QUIZ

NLP basics

12 questions on NLP basics, from 14 lessons. Pick an answer in your head, then open it.

On the roadmap for: AI Engineering, Data Science.

  1. Question 1 of 12

    Why can removing stop words hurt a sentiment model?

    1. A. It doesn't: stop words never affect sentiment
    2. B. Stop words carry most of the sentiment in a review
    3. C. Stop-word lists include 'not', which flips the meaning
    4. D. It makes each review longer and noisier, so it's harder to classify
    View answer

    ✓ C. Stop-word lists include 'not', which flips the meaning

    'Not good' becomes 'good'. Preprocessing choices should be tested against the task.

    Lesson: Text Preprocessing

  2. Question 2 of 12

    What does TF-IDF do that raw word counts don't?

    1. A. It uses the order of words in each document
    2. B. It down-weights words found in many documents
    3. C. It removes all common words from the text
    4. D. It learns a dense embedding for each word in a vocabulary
    View answer

    ✓ B. It down-weights words found in many documents

    A word like 'the' appears everywhere and gets a low IDF; a rare, specific word gets a high one.

    Lesson: Bag-of-Words, N-grams and TF-IDF

  3. Question 3 of 12

    Why does a unigram model misread 'not good', and what fixes it?

    1. A. It can't read short text; use longer reviews
    2. B. It sees 'not' and 'good' apart; bigrams join them
    3. C. It ignores adjectives, so 'good' is always dropped
    4. D. It needs stemming to match 'good' and 'goods'
    View answer

    ✓ B. It sees 'not' and 'good' apart; bigrams join them

    Bigrams keep local word order that changes meaning.

    Lesson: Text Classification: Naive Bayes vs Logistic Regression

  4. Question 4 of 12

    What assumption does Naive Bayes make about words?

    1. A. All words are equally likely to appear in every class
    2. B. Words appear in a fixed order
    3. C. Only nouns carry information about the class
    4. D. Words are independent of each other given the class
    View answer

    ✓ D. Words are independent of each other given the class

    The assumption is wrong for language but makes the model fast and surprisingly strong on small data.

    Lesson: Text Classification: Naive Bayes vs Logistic Regression

  5. Question 5 of 12

    How does LDA describe a collection of documents?

    1. A. Documents form a tree from general to specific topics
    2. B. Documents mix topics; topics are word distributions
    3. C. Each document gets exactly one topic label
    4. D. Each document becomes a short list of keywords
    View answer

    ✓ B. Documents mix topics; topics are word distributions

    It is unsupervised: you choose the number of topics, and it finds the word groups.

    Lesson: Topic Modelling: LDA, NMF and BERTopic

  6. Question 6 of 12

    What does perplexity measure for a language model?

    1. A. The size of its vocabulary
    2. B. How surprised it is by test text, per token
    3. C. How fast it generates tokens on standard hardware
    4. D. The number of parameters in the model
    View answer

    ✓ B. How surprised it is by test text, per token

    Lower is better. Perplexity k is like choosing uniformly among k tokens at each step.

    Lesson: N-gram Language Models and Perplexity

  7. Question 7 of 12

    How is the edit (Levenshtein) distance between two words computed?

    1. A. By comparing only the first and last letters
    2. B. By counting the letters the two words share
    3. C. By the cosine distance between the two words' embedding vectors
    4. D. Fewest inserts, deletes and swaps, via dynamic programming
    View answer

    ✓ D. Fewest inserts, deletes and swaps, via dynamic programming

    A table builds up the distance between every pair of prefixes.

    Lesson: Edit Distance and Spelling Correction

  8. Question 8 of 12

    How does an LLM handle a word it has never seen?

    1. A. It always replaces the word with a single [UNK] token
    2. B. It skips the word and carries on
    3. C. It stops generating with an error
    4. D. Subword tokenisation splits it into known pieces
    View answer

    ✓ D. Subword tokenisation splits it into known pieces

    BPE builds a vocabulary by merging frequent character pairs, so any word can be spelled with subwords.

    Lesson: Subword Tokenisation (BPE, WordPiece, SentencePiece)

  9. Question 9 of 12

    Why is named entity recognition scored with entity-level F1 rather than per-token accuracy?

    1. A. It's faster to compute on large datasets with many sentences
    2. B. Most tokens aren't entities; half-right spans are wrong
    3. C. Accuracy can't be computed for sequences at all
    4. D. Tokens in NER datasets don't have labels
    View answer

    ✓ B. Most tokens aren't entities; half-right spans are wrong

    Token accuracy looks high just by predicting 'O' (outside) everywhere.

    Lesson: Sequence Labelling and NER

  10. Question 10 of 12

    What does the Viterbi algorithm find?

    1. A. The single most likely label sequence for the sentence
    2. B. The edit distance between two misspelt words
    3. C. The most common word in the whole sentence
    4. D. The main topic of the document that the sentence came from
    View answer

    ✓ A. The single most likely label sequence for the sentence

    It's used in HMMs and CRFs to label every word at once rather than one at a time.

    Lesson: HMMs, CRFs and the Viterbi Algorithm

  11. Question 11 of 12

    How is BERT pretrained?

    1. A. By classifying whole documents
    2. B. By translating sentences between languages
    3. C. By predicting masked tokens from both sides
    4. D. By predicting the next word, left to right
    View answer

    ✓ C. By predicting masked tokens from both sides

    Masked language modelling gives bidirectional representations that adapt well to classification and tagging.

    Lesson: BERT and Masked Language Models

  12. Question 12 of 12

    Why can BLEU score a word salad above a correct paraphrase?

    1. A. It can't: BLEU always ranks paraphrases higher
    2. B. BLEU checks meaning, but word salads fool its checks
    3. C. It counts n-gram overlap, so matching words can win
    4. D. BLEU always prefers the shorter of two candidates
    View answer

    ✓ C. It counts n-gram overlap, so matching words can win

    Overlap metrics don't understand meaning; use them with care or alongside human or model-based judgements.

    Lesson: NLP Evaluation: BLEU, ROUGE, EM/F1