Natural Language Processing and Computer Vision Applications
Domain 7 - Natural Language Processing and Computer Vision Applications. This domain tests whether you know the standard preprocessing pipeline in each field and can match a stated task to the correct model type.
NLP core concepts
- Pipeline: raw text → tokenisation → normalisation (lowercasing, punctuation removal) → stop-word removal → stemming or lemmatisation → vectorisation (Bag of Words, TF-IDF, embeddings).
- Bag of Words counts term occurrences and ignores word order. TF-IDF down-weights terms that are frequent across all documents. Embeddings give dense vectors where similar meanings sit close together.
- Tasks: sentiment analysis, spam classification, named entity recognition, machine translation, summarisation, chatbots.
Computer vision core concepts
- An image is a numeric array of height × width × channels: grayscale has 1 channel, RGB has 3, with pixel values 0-255.
- Convolution applies learned filters that detect edges, then textures, then shapes; pooling shrinks the feature maps; a classifier head outputs class scores.
- Tasks: image classification (one label per image), object detection (labels plus bounding boxes), segmentation (per-pixel labels), OCR (image to text). Augmentation (flip, rotate, crop, brightness) enlarges the training set.
Worked example
Classify the review The film was not good. Tokenise to [the, film, was, not, good]; after stop-word removal [film, not, good]; a unigram Bag of Words model sees good and predicts positive. Diagnosis: negation has been lost. Fixes: keep negation words, add bigrams so not good becomes one feature, or use contextual embeddings. Evaluate on a labelled review set with a confusion matrix rather than trusting one example.
Traps that cost marks
- Removing not as a stop word and then expecting correct sentiment.
- Applying augmentation to validation or test images, which changes what you are measuring.
- Confusing classification with object detection; detection also returns bounding boxes.
- Stating that a grayscale image has three channels.