Review: Classic NLP
Lock in the foundations.
Before the capstone, let's make all of this stick. Testing yourself is one of the most effective ways of learning. Pause on every question, and commit to an answer.

- Make it stick
- Test yourself
- Commit to an answer
Recap: classic tools
Regular expressions handle fixed formats. Edit distance measures letters. TF-IDF weights rare words. Naive Bayes multiplies word probabilities. BM25 ranks with rare words and diminishing returns. An inverted index makes search instant. And PMI finds words that belong together.
Question 1
Question 1. Which is best for finding order numbers? A, A large language model. B, A regular expression. C, Topic modelling. D, Sentiment analysis. Pause and choose. The answer is B. Fixed formats need patterns.
Question 2
Question 2. What's the edit distance from kitten to sitting? A, One. B, Two. C, Three. D, Seven. Pause and choose. The answer is C. Two swaps and one addition.
Question 3
Question 3. Why does Naive Bayes add one to its counts? A, For speed. B, So an unseen word doesn't zero everything. C, To be fair. D, For colour. Pause and choose. The answer is B. That's smoothing.
Question 4
Question 4. What does an inverted index map? A, Words to documents. B, Documents to authors. C, Letters to numbers. D, Models to tokens. Pause and choose. The answer is A. Like the index in a book.
Question 5
Question 5. Why does BM25 penalise long documents? A, They are slow. B, They contain more words by chance. C, They are boring. D, They cost more. Pause and choose. The answer is B. Length normalisation is built in.
Question 6
Question 6. High PMI between two words means what? A, They are both common. B, They appear together more than chance. C, They are synonyms. D, They are misspelled. Pause and choose. The answer is B. It corrects for how common each word is.
Summary
Next, the modern tools.
Key takeaways- Patterns for formats
- Smoothing handles unseen words
- PMI beats raw counts