Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 1 — Levels of Language Processing: Discourse & Pragmatic

Lesson 5 of 39 in the free Natural Language Processing notes on Siksha Sarovar, written by Rohit Jangra.

Discourse and Pragmatic Analysis

Discourse Analysis

While semantic analysis handles the meaning of a single sentence, discourse analysis studies meaning across multiple connected sentences — a paragraph, a conversation, or a full document.

Key discourse-level problems:

  1. Anaphora resolution (coreference resolution) — determining what a pronoun or noun phrase refers to.
text = "Riya bought a laptop. She said it was expensive."
# "She"  -> refers to "Riya"
# "it"   -> refers to "a laptop"
  1. Discourse structure / coherence — how sentences logically connect (cause-effect, contrast, elaboration).
"The exam was postponed. Students were relieved."
        ^                        ^
      cause                   effect (implicit "because of this")
  1. Topic tracking — identifying what a multi-sentence passage is "about" as it evolves.

Pragmatic Analysis

Pragmatics is the highest level — it studies meaning in context of real-world use: the speaker's intent, the situation, shared knowledge, tone, and social conventions. The same sentence can carry different pragmatic meaning depending on context.

sentence = "Can you pass the salt?"
# Literal (semantic) meaning : a yes/no question about ability
# Pragmatic meaning          : a polite request to pass the salt
PhenomenonExample
Sarcasm/irony"Oh great, another Monday." (positive words, negative intent)
Speech acts"I now pronounce you married" — the utterance performs an action
Implicature"Some students passed" implies (but doesn't state) that not all did
Deixis"I'll meet you here tomorrow" — meaning depends on who/where/when it's said

Summary — All Levels Together

LevelQuestion it answersExample task
MorphologicalWhat are the word's parts?Stemming, lemmatization
LexicalWhat does this word mean, in isolation?POS tagging, lexicon lookup
SyntacticIs this sentence grammatically valid, and how is it structured?Parsing
SemanticWhat does this sentence mean?Semantic role labeling, WSD
DiscourseHow do sentences relate to each other?Coreference resolution
PragmaticWhat is really meant, given context?Sarcasm detection, intent recognition

A production NLP pipeline (e.g. a chatbot) typically touches every one of these levels, from tokenizing input text all the way to inferring user intent.