1 of 23

Natural Language Processing

By

S.V.V.D.Jagadeesh

Sr. Assistant Professor

Dept of Artificial Intelligence & Data Science

LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING

2 of 23

  • Previously Discussed Topics
  • Session Outcomes
  • Description Logic
  • Components of DL
  • Concepts (Classes)
  • Roles (Relationships)
  • Individuals (Instances)
  • DL Knowledge Base
  • Terminological Box (TBOX)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Previously Discussed Topics

LBRCE

NLP

3 of 23

  • Assertional Knowledge (ABox)
  • Concept Constructors in DL
  • Conjunction (AND)
  • Disjunction (OR)
  • Negation (NOT)
  • Existential Restriction
  • Universal Restriction
  • Exercises
  • Solutions
  • Advantages of DL
  • Disadvantages of DL

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Previously Discussed Topics

LBRCE

NLP

4 of 23

At the end of this session, Student will be able to:

  • Understand Syntax-Driven semantic Analysis and Semantic Attachments(Understand-L2)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Session Outcomes

LBRCE

NLP

5 of 23

  • Syntax-driven semantic analysis is the method of computing the meaning of a sentence based on its syntactic structure.
  • The syntactic parse tree guides the semantic interpretation, and semantic rules are attached to grammar rules.
  • Thus:
  • Meaning of a sentence = Meaning of its parts + Syntactic structure
  • This approach is widely used in semantic parsing and compositional semantics.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Syntax-Driven Semantic Analysis

LBRCE

NLP

6 of 23

  • The Principle of Compositionality states:
  • The meaning of a sentence is determined by the meanings of its individual words and the way they are syntactically combined.
  • This principle is fundamental in syntax-driven semantic analysis.
  • Example
  • Sentence: The dog chased the cat
  • Word meanings: dog cat chase
  • Semantic composition: chase(dog, cat)
  • The meaning is obtained by combining the meanings of the words using syntactic structure.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Principle of Compositionability

LBRCE

NLP

7 of 23

  • Context-Free Grammar (CFG) describes sentence structure.
  • Example rule: VP → V NP
  • To build meaning, CFG rules are augmented with semantic rules.
  • Example
  • Grammar rule: VP → V NP
  • Semantic rule: VP.sem = V.sem(NP.sem)
  • Meaning::The verb meaning is applied to the noun phrase meaning.
  • Example Sentence: Mary likes chocolate
  • Parse: VP → likes chocolate
  • Semantic representation: like(Mary, chocolate)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Semantic Augmentations to CFG Rules

LBRCE

NLP

8 of 23

  • Sentences with quantifiers may have multiple interpretations depending on scope.
  • Example sentence: Every student read a book
  • Two possible meanings:
  • Interpretation 1: Each student read possibly different books.
  • ∀x Student(x) → ∃y Book(y) ∧ Read(x,y)
  • Interpretation 2: There is one book that all students read.
  • ∃y Book(y) ∧ ∀x Student(x) → Read(x,y)
  • Both interpretations are grammatically valid.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Quantifier Scope Ambiguity

LBRCE

NLP

9 of 23

  • A unification-based approach combines syntactic and semantic features using feature structures.
  • These feature structures are unified during parsing.
  • Feature Structure Example
  • [ CAT = NP� SEM = John ]
  • Example Grammar Rule: S → NP VP
  • Semantic unification: S.sem = VP.sem(NP.sem)
  • Example Sentence: John runs
  • Unification result: run(John)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Unification Based Approaches

LBRCE

NLP

10 of 23

  • Semantic attachments associate semantic interpretation rules with grammar rules.
  • These rules allow computing meaning during parsing.
  • We illustrate semantic attachments for common phrase types.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Semantic Attachments

LBRCE

NLP

11 of 23

  • Grammar rule
  • S → NP VP
  • Semantic rule
  • S.sem = VP.sem(NP.sem)
  • Example
  • John sleeps
  • Representation
  • sleep(John)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Sentences

LBRCE

NLP

12 of 23

  • Noun Phrase
  • Example: the dog
  • Semantic representation: dog(x)
  • Genitive Noun Phrase
  • Example: John's book
  • Semantic Representation: book(y) ∧ possess(John,y)
  • Meaning: The book belongs to John.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Noun and Genitive Noun Phrases

LBRCE

NLP

13 of 23

  • Adjectives modify nouns.
  • Example: big dog
  • Semantic representation: dog(x) ∧ big(x)
  • Example
  • red car
  • Representation: car(x) ∧ red(x)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Adjective Phrases

LBRCE

NLP

14 of 23

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Verb Phrases

Entity

Role

Mary

Agent

Chocolate

Theme

  • Verb phrases represent actions or events.
  • Example: Mary likes chocolate
  • Representation: like(Mary, chocolate)
  • Roles:

LBRCE

NLP

15 of 23

  • An infinitive verb phrase contains the word to.
  • Example: John wants to eat pizza
  • Representation: want(John, eat(John,pizza))
  • Meaning: John desires the action of eating pizza.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Infinite Verb Phrases

LBRCE

NLP

16 of 23

  • Prepositional phrases express relationships such as location, instrument, or time.
  • Example: The book is on the table
  • Representation: on(book, table)

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Prepositional Phrases

LBRCE

NLP

17 of 23

  • These modify nouns.
  • Example: the book on the table
  • Meaning: book(x) ∧ on(x, table)
  • The phrase on the table modifies book.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Nominal Modifier Prepositional Phrases

LBRCE

NLP

18 of 23

  • These modify verbs or actions.
  • Example: John ran in the park
  • Representation: run(John) ∧ location(run, park)
  • Meaning: The action occurred in the park.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Verb Phrase Modifier Prepositional Phrases

LBRCE

NLP

19 of 23

  • Some verbs require prepositional phrases as arguments.
  • Example: John put the book on the table
  • Representation: put(John, book, table)
  • Here: on the table is a required argument of the verb put.

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Verb Argument Prepositional Phrases

LBRCE

NLP

20 of 23

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Idioms and Compositionability

  • Idioms are expressions whose meanings cannot be derived from individual word meanings.
  • Example
  • kick the bucket
  • Literal meaning
  • kick(bucket)
  • Actual meaning
  • die

LBRCE

NLP

21 of 23

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Challenges with Idioms

  • They violate the principle of compositionality.
  • Meaning must be stored as a single lexical unit.
  • Example
  • Sentence
  • He kicked the bucket
  • Interpretation
  • die(he)

LBRCE

NLP

22 of 23

  • Previously Discussed Topics
  • Session Outcomes
  • Syntax- Driven Semantic Analyis
  • Principle of Compositionability
  • Semantic Augmentation to CFG Rules
  • Quantifier Scope Ambiguity
  • Unification Based Approaches
  • Semantic Attachments
  • Sentences

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Summary

LBRCE

NLP

23 of 23

  • Noun and Genitive Noun Phrases
  • Adjective Phrases
  • Verb Phrases
  • Infinite Verb Phrases
  • Prepositional Phrases
  • Nominal modifier Prepositional Phrases
  • Verb Phrase Prepositional Phrases
  • Verb Argument Prepositional Phrases
  • Idioms and Compositionability
  • Challenges with Idioms

S.V.V.D.Jagadeesh

Wednesday, March 11, 2026

Summary

LBRCE

NLP