โ† All DSE Flashcard Decks

Natural Language Processing Fundamentals Flashcards

7 cards from real DSE practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Natural Language Processing Fundamentals flashcards as text
  1. What is the primary difference between stemming and lemmatization?

    Answer: Stemming applies heuristic rules while lemmatization returns valid base dictionary forms

    Stemming uses rule-based chopping of word endings, while lemmatization uses morphological analysis to return proper base forms.

  2. In sentiment analysis, what is the challenge of handling negation in sentences like 'not good'?

    Answer: Bag-of-words models miss the interaction between 'not' and 'good'

    Simple bag-of-words models treat words independently, so 'not' and 'good' are scored separately rather than as an inverted sentiment unit.

  3. Which technique allows a pre-trained language model to perform a new NLP task with only a few examples provided in the input prompt?

    Answer: Few-shot prompting

    Few-shot prompting provides the model with a small number of input-output examples in the prompt, enabling task performance without gradient updates.

  4. What does TF-IDF measure in document representation?

    Answer: The importance of a term in a document relative to a corpus

    TF-IDF weights terms by how often they appear in a document (TF) discounted by how common they are across all documents (IDF).

  5. In dependency parsing, what does a dependency arc represent?

    Answer: A directed grammatical relationship between a head word and a dependent word

    Dependency arcs connect a head word to its grammatical dependent, labeled with the type of syntactic relation (e.g., subject, object).

  6. Which training objective does BERT use during pre-training?

    Answer: Masked language modeling and next sentence prediction

    BERT is pre-trained using Masked Language Modeling (MLM) and Next Sentence Prediction (NSP) jointly.

  7. What is the role of the key, query, and value matrices in scaled dot-product attention?

    Answer: They project inputs to compute attention scores and weighted value outputs

    Queries and keys are compared via dot product to produce attention weights, which then blend value vectors into the output.