(a) Preprocessing + Bigram LM Lowercase, remove URLs, expand contractions, map :)/:( to /, regex tokenise Porter stemming vs WordNet lemmatisation Bigram with Add-one smoothing: (C+1)/(C(prev)+V), sentence probability, perplexity, sampling with seed. (b) POS + Parsing nltk.pos_tag, open-class (NN, VB, JJ, RB) vs closed-class (DT, IN, PRP, CC) words CFG + ChartParser for "…with the Z" sentences, which give 2 trees (PP-attachment ambiguity) spaCy dependencies, aspect–opinion pairs (nsubj + acomp, amod) (c) Semantics WordNet synsets, Wu–Palmer similarity, Lesk WSD TF-IDF + cosine similarity, top-k retrieval PPMI with window ±2, Word2Vec skip-gram (sg, seed, workers) (d) Coreference Find mentions with spaCy: names, noun chunks, pronouns Mention-pair scoring: gender/number agreement, sentence distance, head-word match Build chains; hard-code a gender list for names and Mr./Mrs. (e) BERT Fill-mask and sentiment pipelines Fine-tune bert-base-uncased on 9 samples, then accuracy, F1 and prediction on new text