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

# NLP and its steps

Artificial Intelligence · Chapter 7: Application of AI

- Asked in: 2069 Bhadra, 6 marks; 2069 Poush, 8 marks; 2072 Asoj, 2+6 marks; 2072 Magh, 8 marks; 2073 Magh, 2+4 marks; 2075 Baisakh, 8 marks (asked 6 times)
- Video: [Lec-36: Natural Language Processing in Artificial Intelligence in Hindi | NLP with Demo and Examples](https://www.youtube.com/watch?v=bPpwZxasJo0) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/nlp-steps
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-7

## Question

What is natural language processing (NLP)? Explain the different steps of NLP (with block diagram, examples and applications). Justify that NLP is an important part of AI.

## Short answer

NLP is AI that enables computers to understand and generate human language. Its steps are phonological, morphological, syntactic, semantic, discourse, and pragmatic analysis, progressing from speech/text to intended meaning.

## Answer

**Natural language processing (NLP)** is the area of AI concerned with enabling computers to understand, interpret and generate human (natural) languages such as English or Nepali. It has two parts: **natural language understanding (NLU)**, which maps text/speech to meaning, and **natural language generation (NLG)**, which produces text from meaning.

#### Steps (levels) of NLP
```text
 Input text/speech
       |
 [1 Phonetic/Phonological]  (speech only)
       v
 [2 Morphological analysis] words -> stems, affixes
       v
 [3 Syntactic analysis]     parse tree (grammar)
       v
 [4 Semantic analysis]      literal meaning
       v
 [5 Discourse integration]  link sentences
       v
 [6 Pragmatic analysis]     intended meaning in context
       v
   Meaning / action / response
```
1. **Phonetic / phonological analysis:** converts the speech signal into sounds (phonemes). Used only for spoken input.
2. **Morphological (lexical) analysis:** splits words into root and affixes and identifies word class. "Unhappiness" = un + happy + ness.
3. **Syntactic analysis (parsing):** checks that the word order follows grammar and builds a parse tree. "The cat sat on the mat" is accepted; "Mat the on sat cat" is rejected.
4. **Semantic analysis:** assigns a literal meaning to the structure and checks it makes sense. "Colourless green ideas sleep furiously" is syntactically fine but semantically odd.
5. **Discourse integration:** the meaning of a sentence depends on earlier ones. "Ram took the book. He read it." (he = Ram, it = book).
6. **Pragmatic analysis:** interprets meaning using context and intention. "Can you pass the salt?" is a request, not a question about ability.

Example: for "Ram eats an apple", morphology finds eat + s; syntax gives S → NP(Ram) VP(V(eats) NP(an apple)); semantics gives eat(Ram, apple).

#### Applications
Machine translation, speech recognition, question answering, chatbots and virtual assistants, information retrieval and extraction, text summarisation, spelling and grammar checking, sentiment analysis.

#### Why NLP is important for AI
- Language is the main medium of human intelligence; an AI must understand it to communicate naturally.
- It lets people use computers without programming, through speech or text.
- Much of the world's knowledge is stored as text, so NLP lets machines acquire and use it.
- It is needed for the Turing test, intelligent assistants, and knowledge-based systems.

## Check yourself

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

1. In NLP, what is the difference between NLU and NLG?
   A. NLU maps text/speech to meaning; NLG produces text from meaning
   B. NLU produces text from meaning; NLG maps text to meaning
   C. NLU handles only speech; NLG handles only text
   D. NLU is syntax checking; NLG is spelling checking
   Answer: A. Natural language understanding converts input into meaning, while natural language generation does the reverse, producing language from meaning. (Key point: NLU vs NLG)

2. Which is the correct order of the analysis levels in NLP?
   A. Morphological, semantic, syntactic, pragmatic, discourse
   B. Morphological, syntactic, semantic, discourse, pragmatic
   C. Syntactic, morphological, semantic, pragmatic, discourse
   D. Semantic, syntactic, morphological, discourse, pragmatic
   Answer: B. The steps go words (morphology), grammar (syntax), literal meaning (semantics), linking sentences (discourse), then intended meaning (pragmatics). (Key point: Order of NLP steps)

3. Why is 'Mat the on sat cat' rejected in NLP, and at which step?
   A. Semantic analysis, because the meaning is odd
   B. Morphological analysis, because the words are unknown
   C. Pragmatic analysis, because the intent is unclear
   D. Syntactic analysis, because the word order breaks grammar and no parse tree can be built
   Answer: D. Syntactic analysis checks word order against grammar and builds a parse tree; this sentence violates the grammar. (Key point: Syntactic analysis)

4. 'Can you pass the salt?' is understood as a request rather than a question about ability. Which step does this?
   A. Pragmatic analysis
   B. Semantic analysis
   C. Morphological analysis
   D. Phonetic analysis
   Answer: A. Pragmatic analysis uses context and intention to get the intended meaning, beyond the literal meaning. (Key point: Pragmatic analysis)

## Related in Artificial Intelligence

- [NLU and NLG; NLP steps](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Anlu-nlg-nlp-steps) — Artificial Intelligence, chapter 7
- [Define AI, importance and applications](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aai-importance-applications) — Artificial Intelligence, chapter 1, asked 2×
- [NLP issues with example](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Anlp-issues) — Artificial Intelligence, chapter 7
- [AI, Turing test importance, applications](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aai-turing-test-importance-applications) — Artificial Intelligence, chapter 1
- [Applications of AI in daily life](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aai-application-fields) — Artificial Intelligence, chapter 1

## 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
- [Interrupt processing steps](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Ainterrupt-processing-steps) — Embedded System, chapter 5
- [OFC block diagram vs microwave link](https://www.bctengineer.com/question.md?key=semester_6%2Fpropagation_and_antenna%3Aofc-block-diagram-vs-microwave) — Propagation and Antenna, chapter 6
- [Frequency counter operation with block diagram](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Afrequency-counter) — Digital Logic, chapter 11, asked 14×
