#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Home / Blog /

Role of NLP in Artificial Intelligence

Illustrate the Various Phases of NLP

Published
4 min read
Scroll Down

What is NLP?

Natural language processing (NLP) is the branch of artificial intelligence that enables computers to understand, interpret and generate human language, in text or speech. It combines linguistics (how language is structured) with computer science and machine learning (how to process it at scale).

NLP has two sides: natural language understanding (NLU), turning language into a representation the machine can reason with, and natural language generation (NLG), producing language from such a representation.

Role of NLP in artificial intelligence

  1. Communication between humans and machines: people can ask questions and give instructions in ordinary language, through chatbots, voice assistants and search boxes, instead of learning a formal command language.
  2. Access to knowledge: most human knowledge is stored as text. NLP lets AI systems read documents, extract facts, and answer questions from them.
  3. Reasoning input: an AI agent that plans or decides needs facts; NLP turns sentences into structured knowledge (entities, relations, events) that other parts of the system can use.
  4. Automation of language tasks: translation, summarisation, classification of emails and tickets, and sentiment analysis of reviews.
  5. Generation: writing replies, reports and explanations, so that AI systems can explain their results in words.

NLP was one of the original goals of AI; the Turing test itself is a conversation in natural language. Today, large language models built for NLP have also become general-purpose tools used across AI.

Phases of NLP

Classical NLP describes understanding as five phases, each working on a larger unit of language and resolving a different kind of ambiguity. We will follow one example through all five:

"The bank rejected Ravi's loan application because it was incomplete. He will apply again next month."

1. Lexical and morphological analysis

The text is split into sentences and words (tokenisation), and each word is analysed into its root and affixes (morphology). Each word gets a part-of-speech tag.

  • Tokens: The / bank / rejected / Ravi / 's / loan / application / because / it / was / incomplete / .
  • Morphology: rejected = reject + -ed (past tense); incomplete = in- + complete; application = apply + -ation.
  • Part of speech: bank = noun, rejected = verb, incomplete = adjective.

2. Syntactic analysis (parsing)

The words are arranged into a grammatical structure according to the rules of the language, and sentences that break those rules are rejected. "Bank the rejected application loan" would fail here.

S
├── NP: The bank
└── VP: rejected
    ├── NP: Ravi's loan application
    └── SBAR (clause): because it was incomplete

Parsing tells us that "the bank" is the subject and "Ravi's loan application" the object of "rejected".

3. Semantic analysis

The meaning of words and the sentence is determined. "Bank" is ambiguous (a river bank or a financial institution); next to "loan application", the financial sense is chosen (word sense disambiguation). The sentence is mapped to a meaning such as reject(agent: bank, object: application, owner: Ravi). A sentence can be grammatical and still meaningless, like "colourless green ideas sleep furiously"; semantic analysis is where that is detected.

4. Discourse integration

The meaning of a sentence depends on the sentences around it. Here, "it" must be resolved: it refers to the application, not the bank (coreference resolution). In the second sentence, "he" refers to Ravi, and "apply again" refers to applying for the same loan.

5. Pragmatic analysis

Finally, the text is interpreted in its real-world context and purpose. The reader infers that Ravi wants the loan, that the rejection was not final, and that completing the missing parts may lead to approval. Pragmatics also covers requests phrased as questions: "Can you check my application status?" is a request to check it, not a question about ability.

Phases at a glance

PhaseUnitMain questionAmbiguity resolved
Lexical / morphologicalWords and their partsWhat are the words and their forms?Word boundaries, word forms
SyntacticSentence structureHow are the words grouped grammatically?Structural ambiguity ("I saw the man with the telescope")
SemanticSentence meaningWhat does the sentence literally mean?Word senses ("bank")
DiscourseSeveral sentencesHow do sentences connect?Pronouns and references ("it", "he")
PragmaticText in contextWhat does the speaker intend?Intent and implied meaning

How modern NLP relates to the phases

Systems built on neural networks, especially transformers, do not run five separate modules. One model learns all these levels together from data, and its internal layers are known to capture syntax and word sense to different degrees. The phases remain the clearest way to understand what any NLP system must handle, and libraries such as spaCy still expose them as separate steps (tokenisation, tagging, parsing, entity recognition). The three broad ways of building these systems are compared in approaches in NLP, and a symbolic meaning representation for the semantic phase is described in conceptual dependency.

To see the phases in code, work through NLP with spaCy or build a chatbot using Python and NLP. NLP is part of Uncodemy's Artificial Intelligence course.