NLP: final assessment

This covers the whole course. Take it after the last module.

Final quiz

1. Which task gives a whole text a label such as spam or not spam?
2. What is a stopword?
3. What weight does TF-IDF give a word that appears in every document?
4. What is the edit distance between 'cat' and 'cats'?
5. What do one token's attention weights add up to?
6. A bigram never seen in training gets probability 0 under maximum likelihood. What fixes this?
7. Which regular expression finds four-digit years as whole words?
8. In a search engine, what makes looking up the documents for a query word fast?
9. In BIO tagging, what does the tag O mean?
10. Which sentiment rule handles 'very good'?
11. Why do text classifiers add log probabilities instead of multiplying probabilities?
12. Why does Viterbi find the best tag sequence without trying every sequence?
13. Which representation gives 'bank' different vectors in 'river bank' and 'bank account'?
14. Why can an LLM find it hard to count the letters in a word?
15. What does raising the temperature from 1 to 2 do to next-token probabilities?
16. A classifier is 95% accurate on data in which 95% of texts are one class. What should you check?

Practical assessment: Build an NLP pipeline from scratch

Without hints or libraries, write a program that reads labelled short texts, trains a classifier and a search index on them, and handles new inputs end to end.

Final project

A product review analyser: Build a complete text classification pipeline in plain Python that labels product reviews as positive or negative, explains its decisions and measures how well it works.

How it is evaluated

To complete this course