Natural Language Processing · TEE · papers
Q1A · Generic NLP pipeline
Solved re-exam · February 2026
Actual re-examination · 9 February 2026 · 100 marks · 3 hours
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
| Block | Task | Example for sentiment analysis |
|---|---|---|
| Data acquisition | Collect representative text and any required labels | Reviews labelled positive or negative |
| Cleaning and preprocessing | Handle noise, tokenize and normalize appropriately | Remove HTML while preserving “not” |
| Text representation | Convert tokens into usable model features | TF–IDF values or contextual embeddings |
| Modeling | Learn patterns from training data and predict new labels | Train a classifier on labelled review features |
| Evaluation | Measure performance on unseen held-out data and inspect errors | Precision, recall, F1 and confusion matrix |
| Deployment and feedback | Deliver predictions and monitor changing data | Show 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.