---
title: "NLU and NLG; NLP steps"
subject: "Artificial Intelligence"
chapter: 7
key: "semester_6/artificial_intelligence:nlu-nlg-nlp-steps"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/nlu-nlg-nlp-steps
site: BCT Engineering
---

# NLU and NLG; NLP steps

Artificial Intelligence · Chapter 7: Application of AI

- Asked in: 2073 Bhadra, 2+7 marks
- Video: [NLP vs NLU vs NLG](https://www.youtube.com/watch?v=1I6bQ12VxV0) — IBM Technology
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/nlu-nlg-nlp-steps
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-7

## Question

Define a NLU and a NLG. List down the different steps involved in natural language processing (NLP) with suitable examples.

## Short answer

NLU converts human language into a structured meaning representation (e.g., extracting intent and entities from “Book a flight to Pokhara tomorrow”). NLG generates natural language from data (e.g., weather data to text). NLP steps: phonetic/phonological, morphological, syntactic, semantic, discourse, and pragmatic analysis.

## Answer

#### NLU (natural language understanding)
**NLU** is the part of NLP that converts human language input (text or speech) into a structured machine-usable meaning representation. It deals with ambiguity, context and intent. Example: from "Book a flight to Pokhara tomorrow" it extracts intent = book_flight, destination = Pokhara, date = tomorrow.

#### NLG (natural language generation)
**NLG** is the part of NLP that produces natural language text or speech from structured data or an internal meaning representation. Steps: content determination, sentence planning and surface realisation. Example: from weather data (temp = 28, rain = 70%) it writes "It will be warm today with a high chance of rain."

#### Steps of natural language processing
```text
 Speech -> Phonetic -> Morphological -> Syntactic
        -> Semantic -> Discourse -> Pragmatic -> Meaning
```
1. **Phonetic / phonological analysis:** converts speech into phonemes and words (for spoken input only).
2. **Morphological (lexical) analysis:** breaks words into roots and affixes. "Walking" = walk + ing; "unhappy" = un + happy.
3. **Syntactic analysis (parsing):** checks grammar and builds a parse tree. "The dog chased the cat": S -> NP(The dog) VP(chased NP(the cat)).
4. **Semantic analysis:** finds the literal meaning: chase(dog, cat). It rejects "The idea chased the cat" as meaningless.
5. **Discourse integration:** links the sentence with the earlier ones. "Ram bought a car. He drove it home." (He = Ram, it = car).
6. **Pragmatic analysis:** gets the intended meaning in context. "Can you close the window?" is a polite request.

NLU covers steps 1-6 for analysing the input, and NLG performs the reverse path (meaning to sentence to text or speech) to produce the output.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. From 'Book a flight to Pokhara tomorrow', NLU extracts
   A. A weather report text
   B. Phonemes only
   C. Intent = book_flight, destination = Pokhara, date = tomorrow
   D. A random sentence
   Answer: C. NLU converts language into a structured, machine-usable representation such as intent and slots. (Key point: NLU example)

2. What are the steps of NLG listed in the answer?
   A. Content determination, sentence planning and surface realisation
   B. Parsing, tagging and chunking
   C. Phonetic, morphological and syntactic analysis
   D. Acquisition, representation and testing
   Answer: A. NLG decides what to say, plans the sentences, then realises the surface text. (Key point: NLG steps)

3. Why does semantic analysis reject 'The idea chased the cat'?
   A. Its word order is ungrammatical
   B. Its words are not in the dictionary
   C. Its pronoun is unresolved
   D. It is meaningless: an idea cannot chase, so no sensible meaning like chase(dog, cat) exists
   Answer: D. Semantic analysis assigns literal meaning and checks that the sentence makes sense. (Key point: Semantic analysis)

4. In 'Ram bought a car. He drove it home.', which step links He = Ram and it = car?
   A. Morphological analysis
   B. Discourse integration
   C. Phonetic analysis
   D. Syntactic analysis
   Answer: B. Discourse integration uses earlier sentences to resolve references in the current one. (Key point: Discourse integration)

## Related in Artificial Intelligence

- [NLP and its steps](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Anlp-steps) — Artificial Intelligence, chapter 7, asked 6×
- [NLP issues with example](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Anlp-issues) — Artificial Intelligence, chapter 7

## Related in other subjects

- [High level languages and natural language](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Ahll-similar-natural-language) — Computer Programming, chapter 1
- [IC manufacturing steps; top-down F = xz + y](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Aic-manufacturing-steps-topdown-xz-y) — Embedded System, chapter 8
- [Interrupt processing steps](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Ainterrupt-processing-steps) — Embedded System, chapter 5
- [RSA steps; encrypt word CAT](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Arsa-steps-encrypt-cat) — Computer Networks and Security, chapter 8
