1 of 27

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 27

  • Previously Discussed Topics
  • Session Outcomes
  • First Order Logic
  • Components of FOL
  • Constants
  • Variables
  • Predicates
  • Functions
  • Logical Connectives

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Previously Discussed Topics

LBRCE

NLP

3 of 27

  • Examples of Logical connectives
  • Quantifiers
  • Examples of Quantifiers
  • Exercises and Solutions
  • Representing events
  • Inference Using FOL
  • Advantages of FOL
  • Disadvantages of FOL

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Previously Discussed Topics

LBRCE

NLP

4 of 27

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

  • Apply Description logics to derive meaning of the sentences (Apply-L3)

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Session Outcomes

LBRCE

NLP

5 of 27

  • Description Logics (DL) are a family of formal knowledge representation languages used to represent concepts (classes), relationships, and individuals in a domain.
  • DL is mainly used in:
  • Knowledge representation
  • Ontology modeling
  • Semantic Web
  • Natural Language Processing
  • It allows computers to describe structured knowledge and reason about it automatically.

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Description Logic

LBRCE

NLP

6 of 27

  • Concepts
  • Roles
  • Individuals

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Components of DL

LBRCE

NLP

7 of 27

  • A concept represents a set or category of objects in a domain.
  • Concepts are similar to classes in object-oriented programming.
  • Examples: Person, Student, Teacher, Animal, Vehicle
  • Example statement: Student ⊆ Person
  • Meaning: All students are persons.
  • Example Representation
  • Sentence: Ravi is a student.
  • Representation:Student(Ravi)
  • Explanation: Ravi belongs to the concept Student.

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Concepts (Classes)

LBRCE

NLP

8 of 27

  • A role represents a relationship between two concepts or individuals.
  • Roles are similar to relations in databases.
  • Examples: hasChild, teaches, owns, livesIn, drives
  • Example
  • Sentence: John teaches Ravi.
  • Representation: teaches(John, Ravi)

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Roles (Relationships)

LBRCE

NLP

9 of 27

  • Here
  • John → teacher
  • Ravi → student
  • teaches → role
  • Example with Concepts
  • Teacher ⊆ Person�Student ⊆ Person
  • Relationship: teaches(Teacher, Student)
  • Meaning: Teachers teach students.

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Roles (Relationships)

LBRCE

NLP

10 of 27

  • Individuals represent specific objects or entities in the domain.
  • Examples: John, Ravi, Sita, Paris, Car1
  • Example
  • Student(Ravi)�Teacher(John)
  • Meaning
  • Ravi is a student
  • John is a teacher

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Individuals (Instances)

LBRCE

NLP

11 of 27

  • A DL knowledge base consists of two parts:
  • TBox (Terminological Box)
  • ABox (Assertional Box)

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

DL Knowledge Base

LBRCE

NLP

12 of 27

  • TBox contains general knowledge about concepts and relationships.
  • Example
  • Student ⊆ Person�Teacher ⊆ Person�Doctor ⊆ Person
  • Meaning
  • Students are persons
  • Teachers are persons
  • Example: Parent ≡ Person ⊓ ∃hasChild.Person
  • Meaning: A parent is a person who has at least one child.

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Terminological Box (Tbox)

LBRCE

NLP

13 of 27

  • ABox contains specific facts about individuals.
  • Example
  • Student(Ravi)�Teacher(John)�hasChild(John, Ravi)
  • Meaning
  • Ravi is a student
  • John is a teacher
  • John has a child Ravi

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Assertional Knowledge Box (Abox)

LBRCE

NLP

14 of 27

  • DL provides operators to create complex concepts.
  • Conjunction (AND)
  • Disjunction (OR)
  • Negation (NOT)
  • Existential Restriction
  • Universal Restriction

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Concept Constructors in DL

LBRCE

NLP

15 of 27

  • Symbol: ⊓
  • Example: Student ⊓ Athlete
  • Meaning: Students who are athletes.
  • Example sentence
  • Ravi is a student and athlete.
  • Representation
  • (Student ⊓ Athlete)(Ravi)

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Conjunction (AND)

LBRCE

NLP

16 of 27

  • Symbol: ⊔
  • Example: Student ⊔ Teacher
  • Meaning: A person who is either student or teacher.

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Disjunction (OR)

LBRCE

NLP

17 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Negation (NOT)

  • Symbol: ¬
  • Example: ¬Student
  • Meaning: Not a student.
  • Example: ¬Student(John)
  • Meaning: John is not a student.

LBRCE

NLP

18 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Existential Restriction

  • Symbol:∃
  • Example: ∃hasChild.Person
  • Meaning: A person who has at least one child.

LBRCE

NLP

19 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Universal Restriction

  • Symbol: ∀
  • Example: ∀teaches.Student
  • Meaning: A person who teaches only students.

LBRCE

NLP

20 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Exercises

  • Exercise 1
  • Convert the following into description logic representation.
  • Sentence
  • Ravi is a student.
  • Exercise 2
  • Represent the following concept.
  • Sentence
  • A parent is a person who has a child.
  • Exercise 3
  • Given
  • Teacher ⊆ Person�Teacher(John)
  • What can be inferred?�

LBRCE

NLP

21 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Exercises

  • Exercise 4
  • Represent the sentence using DL.
  • Sentence
  • All doctors are persons.
  • Exercise 5
  • Translate the following statement.
  • Sentence
  • Sita teaches Ravi.

LBRCE

NLP

22 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Solutions

  • Exercise 1
  • Sentence:Ravi is a student.
  • Solution: Student(Ravi)
  • Exercise 2
  • Sentence: A parent is a person who has a child.
  • Solution: Parent ≡ Person ⊓ ∃hasChild.Person
  • Exercise 3
  • Given
  • Teacher ⊆ Person�Teacher(John)
  • What can be inferred?
  • Solution: Person(John)
  • Explanation”Since teachers are persons, John must be a person.

LBRCE

NLP

23 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Solutions

  • Exercise 4
  • Sentence: All doctors are persons.
  • Solution: Doctor ⊆ Person
  • Exercise 5
  • Sentence: Sita teaches Ravi.
  • Solution: teaches(Sita, Ravi)

LBRCE

NLP

24 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Advantages of DL

  • Structured knowledge representation
  • Supports reasoning and inference
  • Used in ontologies like OWL
  • Helps build semantic knowledge bases
  • Useful for NLP semantic understanding

LBRCE

NLP

25 of 27

S.V.V.D.Jagadeesh

Saturday, March 7, 2026

Disadvantages of DL

  • Cannot easily represent uncertainty
  • Complex reasoning for large knowledge bases
  • Limited ability for procedural knowledge

LBRCE

NLP

26 of 27

  • 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

Saturday, March 7, 2026

Summary

LBRCE

NLP

27 of 27

  • 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

Saturday, March 7, 2026

Summary

LBRCE

NLP