Lebanese American University
School of Arts & Sciences · Department of Computer Science
A course that traces how a machine learns to read — from words and tokens to transformers. Every deck is linked below, free to use.
The course builds one idea at a time: how text becomes tokens, how early language models predict the next word, how machine learning and neural networks learn from data, and how embeddings and transformers reshaped what's possible. Each lecture assumes the one before it — read them in order, or jump to the topic you need.
Slides build on two textbooks Speech and Language Processing 3rd ed., draft — Jurafsky & Martin Natural Language Processing: Neural Networks and Large Language Models — Xiao & Zhu
The curriculum
what NLP is, and how the field evolved into deep learning
morphemes, Unicode, regular expressions, and subword tokenization
language modeling with n-grams, and how to evaluate them
supervised learning, logistic regression, cross-entropy loss, and gradient descent
multi-layer networks, regularization, optimization, and a PyTorch walkthrough
lexical semantics, count-based vectors, cosine similarity, and Word2Vec
CNNs and RNNs for text — architectures, transfer learning, LSTMs and GRUs
attention, transformer blocks, training LLMs, sampling, and prompting
BERT, text classification, machine translation, and text generation
Found a mistake or a broken link in the slides — or have a question? Email me — corrections and questions are welcome.