Natural
Language
Processing
An Interactive Course Guide
An 8-week, 10-lecture hands-on course spanning the full NLP stack — from statistical language models and word embeddings through CNNs, LSTMs, Transformers, fine-tuning, and RAG. Built around a continuous project with baselines, ablations, and rigorous evaluation at every stage.
Skills &
Prior Knowledge
This course is designed for students with a foundational background in programming and mathematics. The skill bars below indicate the recommended proficiency level entering the course. No prior NLP experience is required — only curiosity and rigour.
Core Learning
Outcomes
8-Week
Course Plan
- NLP task landscape & why language is hard
- Ambiguity, context, and linguistic structure
- The standard NLP pipeline
- Baselines, data splits, metrics, error analysis
- Reproducible experiment setup
- Create project repo:
data/ src/ notebooks/ reports/ - Implement dataset loading + train/dev/test split
- Implement evaluation metrics (accuracy + F1)
- Push code + short README explaining how to run
- N-gram probabilities and perplexity
- Sparsity: why smoothing & backoff are necessary
- Laplace, Kneser-Ney smoothing
- TF-IDF representation for classification
- Logistic regression + F1 + confusion matrix
- Implement trigram LM
- Compute perplexity on dev set
- Train TF-IDF + logistic regression baseline
- Basic error analysis table (≥ 20 mistakes)
Jurafsky & Martin — Ch. 4: Logistic Regression and Text Classification
- Similarity vs. relatedness
- Sparse (TF-IDF) vs. dense (word2vec) representations
- Intrinsic evaluation: nearest neighbours
- Extrinsic evaluation: downstream task performance
- Bias in word embeddings
- Train or load word embeddings
- Inspect nearest neighbours + discuss limitations
- Replace TF-IDF with embeddings in classifier
- Baseline vs. embedding comparison + updated error analysis
Jurafsky & Martin — Ch. 5: Embeddings
- "Encoder → classifier" architecture for neural NLP
- CNNs for sentence/document modelling
- Hyperparameter tuning: kernel size, pooling, dropout
- Fair comparison vs. classical baselines
- Implement CNN-based text classifier
- Add early stopping + dropout regularisation
- Run one ablation: kernel size OR pooling OR dropout
- Error analysis: 5–10 new errors + interpretation
Kim (2014), Convolutional Neural Networks for Sentence Classification
- BPTT and vanishing/exploding gradients
- LSTM gating mechanism — forget, input, output
- GRU: simplified gating
- Bidirectional RNNs for contextual encoding
- CNN vs. LSTM: tradeoffs in runtime & generalisation
- Train LSTM classifier (same task as W04)
- Add gradient clipping
- CNN vs. LSTM comparison (same split, same metrics)
- Model comparison write-up (≤ 1 page): failure modes, generalisation, complexity
Hochreiter & Schmidhuber (1997), Long Short-Term Memory (skim)
Goldberg (2017), RNN/LSTM chapters (recommended)
- Encoder–decoder modelling of P(y|x)
- Bahdanau attention as soft alignment
- Greedy vs. beam search decoding
- BLEU: computation and critical interpretation
- Qualitative analysis: reordering, adequacy, hallucination
- Run greedy vs. beam decoding on MT model (toy or pretrained)
- Compute BLEU scores
- Qualitative analysis table: 10 examples (reordering / adequacy / hallucination)
- Submit: best model so far + results summary
Bahdanau et al. (2015), Neural Machine Translation by Jointly Learning to Align and Translate
Papineni et al. (2002), BLEU (skim)
- Self-attention, masking, and positional encoding
- Encoder-only vs. decoder-only vs. encoder–decoder
- BERT: masked LM pretraining
- GPT: autoregressive pretraining
- Fine-tuning strategy & rigorous evaluation
- Fine-tune a pretrained Transformer on your project task
- Compare to Week 4/5 best model (same split, same metrics)
- Run one robustness/slice test (length, domain slice, negation, etc.)
Vaswani et al. (2017), Attention Is All You Need
Devlin et al. (2019), BERT (recommended)
- Sequence labelling: NER, POS tagging
- Why structured decoding helps (CRF)
- Extractive vs. generative QA
- Closed-book vs. open-book (retrieval-augmented)
- RAG pipeline: retriever + generator + faithfulness
- Implement a simple NER model; evaluate span-F1
- Build a minimal retrieval + generation pipeline
- Evaluate correctness + faithfulness on held-out examples
Lewis et al. (2020), Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (skim)
Real-World
NLP Applications
Responsible NLP &
Societal Impact
As NLP technologies become more powerful and widely deployed, it is essential to engage critically with their societal effects. This course treats ethics not as a peripheral concern but as a core technical and intellectual discipline — woven throughout all eight weeks.