Natural Language Processing · TEE · mocks

Q1A · Generic NLP pipeline

Timed practice · Solved re-exam · February 2026

TEE · actual previous paper · 100 marks · 180 minutes

Question. Draw block diagram of generic NLP pipeline and explain the task associated with each block. [5 marks]

Answer

An NLP pipeline is an ordered workflow that transforms language data into a task-specific result. The exact components depend on the application; a generic supervised pipeline is shown below.

Collect text Clean and preprocess Represent text Train / apply model Evaluate and deliver output
BlockTaskExample for sentiment analysis
Data acquisitionCollect representative text and any required labelsReviews labelled positive or negative
Cleaning and preprocessingHandle noise, tokenize and normalize appropriatelyRemove HTML while preserving “not”
Text representationConvert tokens into usable model featuresTF–IDF values or contextual embeddings
ModelingLearn patterns from training data and predict new labelsTrain a classifier on labelled review features
EvaluationMeasure performance on unseen held-out data and inspect errorsPrecision, recall, F1 and confusion matrix
Deployment and feedbackDeliver predictions and monitor changing dataShow review sentiment and monitor new product vocabulary

Training/validation/test separation must precede fitting the learned preprocessing and feature statistics. New inputs must use the same feature mapping as training. Not every task uses every linguistic level explicitly: a modern end-to-end model may combine several operations internally.

Yaad rakho: Text lo → prepare karo → numbers banao → model lagao → result check aur use karo.