You are on page 1of 145

Knowledge Representation

Dr. Ranjani Parthasarathi Professor Dept. of Information Science & Technology CEG, Anna University, Chennai
1/25/2012

Knowledge Human characteristic

Cogito Ergo Sum (I Think, Therefore I Am) - Rene Descartes(1637)

1/25/2012

A story
The following scenario illustrates a possible use of an opportunistic network deployed after an earthquake. One of its helpers, a surveillance system, looks at a public area scene with many objects. The image is passed to another helper that analyzes it, and recognizes one of the objects as an overturned car. Another helper decides that the license plate number of the car should be obtained, and (maybe another) image analysis helper provides this information. The plate number is used by another helper to check in a vehicle database whether the car is equipped with the OnStar communication system. If it is, the appropriate OnStar center facility is contacted, becomes a helper, and obtains a connection with the OnStar device in the car. The OnStar device in the car becomes a helper and is asked to contact BANs (body area networks) on and within bodies of car occupants. Each BAN available in the car becomes a helper and reports on the vital signs of its owner. The reports from BANs are analyzed by prioritizing helpers that schedule the responder teams to ensure that people in the most serious condition are rescued sooner than others. With the exception of the BAN link that is just a bit futuristic (its widespread availability could be measured in years not in decades), all other helper capabilities are already quite common.

A simple activity
Identify the knowledge embedded/ implicit for the above scenario to work !

1/25/2012

KR Workshop @ SRM Jan 2012

What is Knowledge
Numerous definitions
Working Knowledge: how organisations manage what they know Harvard Business School Press, 1998, 2000 Knowledge is information combined with experience, context, interpretation, and reflection. It is a high-value form of information that is ready to apply to decisions and actions." T. Davenport et al., 1998 Knowledge is information evaluated and organized by the human mind so that it can be used purposefully, e.g., conclusions or explanations." Rousa, 2002.
1/25/2012

What is Knowledge (2)


Knowledge is a fluid mix of framed experience values, contextual information, and expert insight that provides a framework for evaluating and incorporating new experiences and information. It originates and is applied in the minds of knowers.

In organizations, it often becomes embedded not only in documents or repositories but also in organizational routines, processes, practices and norms. - Thomas H. Davenport, Laurence Prusak (1998) "Knowledge is... a mental grasp of fact(s) of reality, reached either by perceptual observation or by a process of reason based on perceptual observation." Rand, 1967.
1/25/2012

Knowledge representation (KR)


Knowledge is a description of the world
Describes a systems competence by what it knows

Representation is the way it is encoded


Defines a systems performance in doing something

Different types of knowledge may require different types of representation


Logic, Rules, Frames, Semantic Nets
1/25/2012 KR Workshop @ SRM Jan 2012

How KR Works
Intelligence requires knowledge Computational models of intelligence require models of knowledge Use formalisms to write down knowledge
Expressive enough to capture human knowledge Precise enough to be understood by machines

Separate knowledge from computational mechanisms that process it

1/25/2012

KR Workshop @ SRM Jan 2012

What goes into KR ?


How do we decide what we want to represent?
Entities, categories, events, time, aspect Predicates, relationships among entities, arguments (constants, variables) Andquantifiers, operators (e.g. temporal) Concepts, relations, attributes

1/25/2012

KR Workshop @ SRM Jan 2012

Early KR Schemes
Model-based representations reflecting the structure of the domain, and then reason based on the model.
Semantic Nets Frames Scripts

Sometimes called associative networks


CSC 9010: Special Topics, Natural Language Processing. Spring, 2005. Matuszek & Papalaskari
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

10

Basics of Associative Networks


All include
Concepts Various kinds of links between concepts
has-part or aggregation is-a or specialization More specialized depending on domain

Typically also include


Inheritance Some kind of procedural attachment
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

11

Semantic Nets
labeled, directed graph nodes represent objects, concepts, or situations
labels indicate the name nodes can be instances (individual objects) or classes (generic nodes)

links represent relationships


the relationships contain the structural information of the knowledge to be represented the label indicates the type of the relationship
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

12

Semantic Net Examples


HasA Hull Ship HasA Propulsion InstanceOf Instance Steamboat Bob agent give recipient object Candy Mary Person Instance

Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

13

Generic/Individual
Generic describes the idea--the notion
static

Individual or instance describes a real entity


must conform to notion of generic dynamic individuate or instantiate

A lot of NLP using semantic nets involves instantiating generic nets based on a given piece of text.

Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

14

Individuation example
Person agent give recipient Person

object
Thing Process the sentence Bob gave Mary some candy. Generic Representation

Bob agent

give recipient object

Mary

Candy
Instantiation
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

15

Frames
Represent related knowledge about a subject Frame has a title and a set of slots
Title is what the frame is the concept Slots capture relationships of the concept to other things

Typically can be organized hierarchically


Most frame systems have an is-a slot allows the use of inheritance

Slots can contain all kinds of items


Rules, facts, images, video, questions, hypotheses, other frames In NLP, typically capture relationships to other frames or entities

Slots can also have procedural attachments


on creation, modification, removal of the slot value
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

16

Simple Frame Example


Slot Name Restaurant Cuisine Price Service Atmosphere Location Web page Filler Lemon Grass Thai, Vegetarian Expensive Excellent Good KoP Ask Google.

Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

17

Usage of Frames
Most operations with frames do one of two things: Fill slots
Process a piece of text to identify an entity for which we have a frame Fill as many slots as possible

Use contents of slots


Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

Look up answers to questions Generate new text


[Rogers 1999] 18

Scripts
Describe typical events or sequences Components are
script variables (players, props) entry conditions transactions exit conditions

Create instance by filling in variables


Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

19

Restaurant Script Example


Generic template for restaurants
different types default values

Script for a typical sequence of activities at a restaurant Often has a frame behind it; script is essentially instantiating the frame
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

20

EAT-AT-RESTAURANT Script Props: (Restaurant, Money, Food, Menu, Tables, Chairs) Roles: (Hungry-Persons, Wait-Persons, Chef-Persons) Point-of-View: Hungry-Persons Time-of-Occurrence: (Times-of-Operation of Restaurant) Place-of-Occurrence: (Location of Restaurant) Event-Sequence: first: Enter-Restaurant Script then: if (Wait-To-Be-Seated-Sign or Reservations) then Get-Maitre-d's-Attention Script then: Please-Be-Seated Script then: Order-Food-Script then: Eat-Food-Script unless (Long-Wait) when Exit-Restaurant-Angry Script CSC 9010: Special then: if (Food-Quality was better than Palatable) Topics, Natural then Language Processing. Compliments-To-The-Chef Script Spring, then: 2005. Pay-For-It-Script Matuszek & finally: Papalaskari Leave-Restaurant Script

Restaurant Script

21

[Rogers 1999]

Comments on Scripts
Obviously takes a lot of time to develop them initially.
The script itself has much of the knowledge May be serious overkill for most NLP tasks

We need this level of detail if we want to include answers based on reasoning like Most restaurants do serve dinner.
Some slides adapted from Dorr, www.umiacs.umd.edu/~christof/courses/cmsc723-fall04 , Kurfess: www.csc.calpoly.edu/~fkurfess/Courses/CSC481/W03/Slides/3-Knowledge-Representation.ppt and Hirschberg: www1.cs.columbia.edu/~julia/cs4705/syllabus.html

22

First Order Predicate Calculus (FOPC)


Terms
Constants: Lemon Grass Functions: LocationOf(Lemon Grass) Variables: x in LocationOf(x)

Predicates: Relations that hold among objects


Serves(Lemon Grass,VegetarianFood)

Logical Connectives: Permit compositionality of meaning


I only have $5 and I dont have a lot of time Have(I,$5) Have(I,LotofTime)
23

Enter - WWW
Web 1.0
Personal Websites Content Management Systems Altavista, Google CiteSeer, Project Gutenberg Message Boards Buddy Lists, Address Books -

Web 2.0
Blogs Wikis

Semantic Web

Google Personalised, DumbFind Google Scholar, Book Search Community Portals


Online Social Networks -

1/25/2012

KR Workshop @ SRM Jan 2012

Semantic Web / Web 3.0

1/25/2012

KR Workshop @ SRM Jan 2012

Productivity of Search

Beyond the Limits of Keyword Search


The 3.0 Web 2010 - 2020 The Social Semantic Natural language search Web 2.0 Web2000 - 2010 Web Tagging The World Wide Web Web 1.0
1990 - 2000 Keyword search

The 4.0 Web 2020 - 2030 Intelligent Reasoning Web Semantic Search

PC Era
1980 - 1990

Directories The Desktop Files & Folders Databases

Amount of data

Content attributed to Nova Spivack, http://www.mindingtheplanet.net

The Intelligence is in the Connections


Connections between Information
Web OS Semantic Web

Intelligent Web

Web 4.0
2020 - 2030 Intelligent personal agents

The Internet
FTP PCs USENET

Distributed Search SWRL OWL 2010 - 2020 SPARQL Semantic Databases OpenID AJAX Semantic Search ATOM Widgets Social Web RSS Mashups P2P RDF Office 2.0 Javascript Flash SOAP XML Social Media Sharing 2000 - 2010 Weblogs Java The Web HTML SaaS Social Networking HTTP Directory Portals Wikis VR Keyword Search Lightweight Collaboration The PC BBS Websites Gopher 1990 - 2000 MacOS SQL MMOs Groupware Databases SGML Windows File Servers

Web 3.0

Web 2.0

Web 1.0

IRC Email

PC Era
1980 - 1990

File Systems

Connections between people

The Bigsocial graph just connects people Opportunity The


The semantic graph connects everything
People Companies Emails

Better search
Products

Places

More targeted ads Smarter collaboration

Interests

Services

Deeper integration
Activities Web Pages

Richer content
Documents

Projects Events Groups

Better personalization

Multimedia

A Higher Resolution Web


Joe Person Lives in Palo Alto City Fan of IBM Company IBM.com Web Site Publisher of

Subscriber to

Lives in Employee of Sue Person

Dave.com RSS Feed

Fan of Coldplay Band

Jane Person

Friend of

Member of Depiction of Married to

Source of

Design Team Group Dave.com Weblog Member of

Member of Bob Person 123.JPG Photo Depiction of

Member of Author of Dave Person Member of Stanford Alumnae Group

Five Approaches to Semantics


Tagging Statistics Linguistics Semantic Web Artificial Intelligence

The Approaches Compared


Make the Data Smarter
A.I.

Semantic Web Linguistics

Tagging
Statistics

Make the software smarter

Two Paths to Adding Semantics


Bottom-Up (Classic)
Add semantic metadata to pages and databases all over the Web Every Website becomes semantic Everyone has to learn RDF/OWL

Top-Down (Contemporary)
Automatically generate semantic metadata for vertical domains Create services that provide this as an overlay to nonsemantic Web Nobody has to learn RDF/OWL

In Practice: Hybrid Approach Works Best

Tagging
Semantic Web
Top-down
Statistics Linguistics Bottom-up
Artificial intelligence

The Semantic Web is a Key Enabler


Moves the intelligence out of applications, into the data
Data becomes self-describing; Meaning of data becomes part of the data Apps can become smarter with less work, because the data carries knowledge about what it is and how to use it Data can be shared and linked more easily

Semantic Web: which resources to annotate ?


Industrial and business processes
Web resources / services / DBs / etc. External world resources

Web users
(profiles, preferences)

Shared ontology

Multimedia resources

Web access devices

Web agents / applications Smart machines and devices

35

The Semantic Web = Open database layer for the Web


User Profiles Web Content Ads & Listings Data Records Apps & Services

Open Query Interfaces Open Data Mappings

Open Data Records


Open Rules Open Ontologies

Semantic Web Open Standards


RDF (Resource Description Framework) Store data as triples OWL (Web Ontology Language) Define systems of concepts called ontologies Sparql Query data in RDF SWRL Define rules

Ontology
An ontology formally defines a common set of terms that are used to describe and represent a domain (e.g., librarianship, medicine, etc.) Ontologies include computer-usable definitions of basic concepts in the domain and the relationships among them Ontologies are usually expressed in a logicbased language
Dr.T.V.Geetha, Anna University 38

RDF Triples
Subject
Predicate

Object

the subject, which is an RDF URI reference or a blank node the predicate, which is an RDF URI reference the object, which is an RDF URI reference, a literal or a blank node
Source: http://www.w3.org/TR/rdf-concepts/#section-triples

Ontologies

Semantic Web Data is Self-Describing Linked Data


Definition Definition Definition

Definition Data Record Definition


Field 1 Value Field 2 Value

ID

Definition

Field 3 Value Field 4 Value

Definition

More on Ontology

Aristotle - Ontology
Before: study of the nature of being Since Aristotle: study of knowledge representation and reasoning Terminology: Genus: (Classes) Species: (Subclasses) Differentiae: (Characteristics which allow to group or distinguish objects from each other)

Syllogisms (Inference Rules) [Aristotle] Science of Being, Methapysics, IV, 1


42

What is ontology?
Philosophy (400BC):

Systematic explanation of Existence

Neches (91):

Ontology defines basic terms and relations comprising the vocabulary of a topic area as well as the rules for combining terms and relations to define extensions to the vocabulary
Gruber (93): Explicit

specification of a conceptualization

Borst (97):

Formal specification of a shared conceptualization

Dr.T.V.Geetha, Anna University

43

What is ontology (2) ?


Studer(98): Formal, explicit specification of a shared conceptualization

Machine readable

Consensual knowledge

Concepts, properties, functions, axioms are explicitly defined

Abstract model of some phenomena in the world

Dr.T.V.Geetha, Anna University

44

What is Ontology (3) ?


Concepts: Units of thought: Classes and individuals;
Protein, Gene, DNA, Hexokinase, glycolysis,

Terms: Labels for concepts Protein, Gene, Relationships: Semantic links between concepts
Is-a-kind, is-a, part-of, name-of,

Taxonomy backbone of ontology

Dr.T.V.Geetha, Anna University

45

Concept - Instance
Concept / Class / Universal (Metaphysics)
an abstract or general idea inferred or derived from specific instances

Instance / Individual / Particular (Metaphysics)


object in reality, a copy of an abstract concept with actual values for properties
Name: Studied: LivesIn: WorksAt: Thomas Wchter Computer Science Dresden Biotec, TU-Dresden

Dr.T.V.Geetha, Anna University

46

Developing an ontology
Defining classes in the ontology
Concepts in a domain of discourse (classes -sometimes called concepts)

Arranging the classes


in a taxonomic (subclass-superclass) hierarchy

Defining slots and describing allowed values for these slots


Properties of each concept describing various features and attributes of the concept (slots - sometimes called roles or properties)

Restrictions on slots
(facets - sometimes called role restrictions)

Filling in the values for slots for instances


Ontology + set of individual instances of classes => knowledge
Dr.T.V.Geetha, Anna University 47

Ontological Engineering and Related Disciplines


Mathematics Formal Methods Formal Semantics Sociology Ontology Logic Philosophy Enterprise Engineering Industrial Engineering Linguistics Computer Science Business Management Database Theory

Artificial Intelligence Formal Ontology Informal Ontology


Knowledge Representation Conceptual Modeling

Knowledge Management

Ontological Engineering
Knowledge Engineering Software/Data Engineering

Dr.T.V.Geetha, Anna University

Object Modeling
48

Benefits
Communication between people Interoperability between software agents
Reuse of domain knowledge

Make domain knowledge explicit


Analyze domain knowledge
Building an ontology is not a goal in itself.

Dr.T.V.Geetha, Anna University

49

Types of ontologies

[Guarino et al. 1999] - N. Guarino, C. Masolo, G. Vetere. OntoSeek: Content-Based Access to the Web. In: IEEE Intelligent Systems, 14(3), 70--80, 1999.

50

Ontology -Examples

Ontology - Simple examples Taxonomy


fruit fruit apple lemon orange pomme citron orange

fruit
fruit apple citrus pear
tropical temperate

lime

lemon orange

Dr.T.V.Geetha, Anna
52 University

52

Ontology- Example II
subClassOf
domain

Person

subClassOf
range

Student type Frank

hasSuperVisor

Researcher type Jeen

hasSuperVisor

University Related Ontology


Dr.T.V.Geetha, Anna University 53

Ontology Example III


Body Part
has part

Living Thing
eats

Arm Animal Leg Person Carnivore


eats eats

Plant

Grass Herbivore

Tree Cow

Dr.T.V.Geetha, Anna University

54

Ontologies Example IV
Geographical Entity (GE)
is-a flow_through

Natural GE

Inhabited GE
capital_of

mountain
instance_of

river

country
located_in

city

Zugspitze
height (m)

Neckar

F-Logic Ontology capital_of Germany


similar

length (km)

flow_through located_in flow_through

2962

367

Stuttgart

Berlin
Design: Philipp Cimiano

Dr.T.V.Geetha, Anna University

55

Ontology Example V
Object
is_a-1 is_a-1

Person
is_a-1 is_a-1

knows

Topic

described_in related_to

Document
is_a-1 is_a-1

writes

Student
is_a-1

Researcher
is_a-1

Letter

Email

is_similar_to Affiliation instance_of-1

RULES:
T described_in is_about D T T P is_about knows D

Doctoral Student PhD Student

Tel

Affiliation

Ram
+49 721 608 . AIFB

writes

Representation Languages: RDF(S); OWL; Predicate Logic; FDr.T.V.Geetha, Anna Logic University 56

Ontology Example VI
Chemical

Molecule

Compound

Element

Ion

Atom

Molecular Compound

Ionic Compound

Molecular Element

Ionic Molecule

Non-Metal

Metal

Ionic Molecular Compound


Dr.T.V.Geetha, Anna University 57

Metaloid

EcoCyc

Dr.T.V.Geetha, Anna University

58

Dr.T.V.Geetha, Anna University

59

Ontologies and their relatives

Dr.T.V.Geetha, Anna University

60

Structured Ontology Spectrum


The term ontology has been used to describe models with different degrees of structure (Ontology Spectrum) Less structure: Taxonomies (Semio taxonomies, Yahoo hierarchy, biological taxonomy), Database Schemas (many) and metadata schemes (ICML, ebXML, WSDL) More Structure: Thesauri (WordNet, CALL, DTIC), Conceptual Models (OO models, UML) Most Structure: Logical Theories (Ontolingua, TOVE, CYC, Semantic Web) 61

Ontology Spectrum: One View


Modal Logic First Order Logic Logical Theory Is Disjoint Subclass of with transitivity Description Logic DAML+OIL, OWL property UML

strong semantics

Conceptual Model
RDF/S XTM Extended ER

Is Subclass of

Semantic Interoperability

Thesaurus
ER DB Schemas, XML Schema

Has Narrower Meaning Than


Structural Interoperability

Taxonomy
Relational Model, XML

Is Sub-Classification of Syntactic Interoperability


62

weak semantics

Ontology Spectrum: One View


Modal Logic First Order Logic Logical Theory Problem: Disjoint Subclass of Is Very General Semantic Expressivity: Very High with transitivity Description Logic DAML+OIL, OWL property UML

strong semantics

Conceptual Model Local Problem:

Is Subclass of Semantic Interoperability Semantic RDF/S Expressivity: High XTM Extended ER

Thesaurus
DB Schemas, XML Schema

Problem: General ER Semantic Expressivity: Medium

Has Narrower Meaning Than


Structural Interoperability

Taxonomy
Model, XML

Problem: Local Relational Expressivity: Low Semantic

Is Sub-Classification of Syntactic Interoperability


63

weak semantics

Dr.T.V.Geetha, Anna University

Ontology Applications
Information Retrieval
Query Expansion

Information Extraction
Template Definition, Semantic Integration

Question Answering
Question Analysis, Answer Selection

Knowledge Portal Construction


Knowledge Structure

Document Clustering/Classification
Extend Bag-of-words

Knowledge Management
Check Consistency, Infer New Knowledge
64

Big Ontologies
There are several large, general ontologies that are freely available. Some examples are:
Cyc - Original general purpose ontology OntoSem a lexical KR system and ontology WordNet - a large, on-line lexical reference system World Fact Book -- 5Meg of KIF sentences! UMLS - NLMs Unified Medical Language System SUMO Standard Upper Merged Ontology

Dr.T.V.Geetha, Anna University

65

Building an Ontology

Ontology Elements
Concepts(classes) + their hierarchy Concept properties (slots/attributes) Property restrictions (type, cardinality, domain) Relations between concepts (disjoint, equality) Instances

Dr.T.V.Geetha, Anna University

67

How to build an ontology?

Steps: determine domain and scope enumerate important terms

define classes and class hierarchies


define slots define slot restrictions (cardinality, value-type)

Dr.T.V.Geetha, Anna University

68

Consider Reuse
With the spreading deployment of the Semantic Web, ontologies will become more widely available We rarely have to start from scratch when defining an ontology
There is almost always an ontology available from a third party that provides at least a useful starting point for our own ontology
Dr.T.V.Geetha, Anna University 69

Determine Scope (2)


Basic questions to be answered at this stage are: What is the domain that the ontology will cover? For what are we going to use the ontology? For what types of questions should the ontology provide answers ? Who will use and maintain the ontology?
Dr.T.V.Geetha, Anna University 70

Step 1: Determine Domain and Scope Domain: geography


Application: route planning agent

Possible questions: Distance between two cities? What sort of connections exist between two cities? In which country is a city? How many borders are crossed?

Dr.T.V.Geetha, Anna University

71

Enumerate Terms
Write down in an unstructured list all the relevant terms that are expected to appear in the ontology Nouns form the basis for class names Verbs (or verb phrases) form the basis for property names Traditional knowledge engineering tools can be used to obtain the set of terms an initial structure for these terms
72

Dr.T.V.Geetha, Anna University

Step 2: Enumerate Important Terms

city

capital country

Connection_on_land
border

road

Connection_on_water

railway

currency
connection
Dr.T.V.Geetha, Anna University 73

Connection_in_air

Identify properties
What properties do the terms have? What would you like to say about the terms? Initially get comprehensive list of terms do not worry about overlap between concepts they represent Relations among terms Properties concepts have Whether concepts classes or slots Closely integrated steps Developing Class hierarchy Defining properties of concepts (slots)
Dr.T.V.Geetha, Anna University 74

Define Taxonomy
Relevant terms must be organized in a taxonomic hierarchy
Opinions differ on whether it is more efficient/reliable to do this in a top-down or a bottom-up fashion

Ensure that hierarchy is indeed a taxonomy:


If A is a subclass of B, then every instance of A must also be an instance of B (compatible with semantics of rdfs:subClassOf)
Dr.T.V.Geetha, Anna University 75

Step 3: Define Classes and Class Hierarchy

Dr.T.V.Geetha, Anna University

76

Define facets
Define facets of Slots Value type --- string, number, boolean, enumerated, instance type Allowed values Number of values (cardinality) Single and multiple Minimum and maximum cardinality Other features slot can take
Dr.T.V.Geetha, Anna University

77

Define Properties
Often interleaved with the previous step The semantics of subClassOf demands that whenever A is a subclass of B, every property statement that holds for instances of B must also apply to instances of A It makes sense to attach properties to the highest class in the hierarchy to which they apply
Dr.T.V.Geetha, Anna University 78

Define Properties (2)


While attaching properties to classes, it makes sense to immediately provide statements about the domain and range of these properties There is a methodological tension here between generality and specificity:
Flexibility (inheritance to subclasses) Detection of inconsistencies and misconceptions
79

Step 4: Define Slots of Classes


Geographic_entity
End_point

Country

Has_capital

City

Start_point

Connection

Borders_with

Capital_of

Capital_city

Step 5: Define slot constraints


Slot-cardinality

Ex: Borders_with multiple, Start_point single


Slot-value type

Ex: Borders_with- Country


Dr.T.V.Geetha, Anna University 80

Issues on class hierarchy


- all is-a relations hold? Inst(B) Inst(A) - check transitivity C Subclass_of(A) D Subclass_of(C)
A B C D

D Subclass_of(A)

- avoid unexpected cycles B Subclass_of(A) A Subclass_of(B)

A=B

Dr.T.V.Geetha, Anna University

81

Issues on Slots
- inverse slots (redundant, but explicit)
Has_capital

Country
Capital_of

Capital_city

-symmetric slots Ex. A borders_with B -transitive slots A.connection(B) B.connection(C)

B borders_with A

A.connection(C)

Dr.T.V.Geetha, Anna University

82

Define Instances
Filling the ontologies with instances is a separate step Number of instances >> number of classes Thus populating an ontology with instances is not done manually
Retrieved from legacy data sources (DBs) Extracted automatically from a text corpus
Dr.T.V.Geetha, Anna University 83

Languages for Ontology

Languages for Ontology


Wide variety of languages for Explicit Specification Graphical notations Semantic networks Topic Maps (see http://www.topicmaps.org/) UML RDF Logic based Description Logics (e.g., OIL, DAML+OIL, OWL) Rules (e.g., RuleML, LP/Prolog) First Order Logic (e.g., KIF) Conceptual graphs (Syntactically) higher order logics (e.g., LBase) Non-classical logics (e.g., Flogic, Non-Mon, modalities) Probabilistic/fuzzy Degree of formality varies widely Increased formality makes languages more amenable to machine processing (e.g., automated reasoning)
Dr.T.V.Geetha, Anna University 85

Web Schema Languages


Existing Web languages extended to facilitate content description XML XML Schema (XMLS) RDF RDF Schema (RDFS) XMLS not an ontology language Changes format of DTDs (document schemas) to be XML Adds an extensible type hierarchy Integers, Strings, etc. Can define sub-types, e.g., positive integers RDFS is recognisable as an ontology language Classes and properties Sub/super-classes (and properties) Range and domain (of properties) Dr.T.V.Geetha, Anna
University 86

A traditional Indian logic & ontology

1/25/2012

KR Workshop @ SRM Jan 2012

Nyaaya (Tarka)
Ontology
Structure of knowledge A systematic account of Existence Defines the terms used to describe and represent knowledge Allows detailed, accurate, precise, consistent, sound, and meaningful distinctions among the classes, properties, and relations.

Inference
1/25/2012 KM Workshop AU, Dec2007

Nyaaya Ontology - Classification


Seven categories

1/25/2012

Substance (dravya) - 9 Quality (guna) - 24 Action (karma) -5 Universal/Commonality (saamaanya) Particularity (visesha) Inherence (samavaaya) Non-existence (abhaava) - 4
KM Workshop AU, Dec2007

Definitive Qualities of substances


Earth smell as its inherent quality
Also has color, taste, touch, sound etc.

Water cold touch as its inherent quality


Also has color (according to nyaaya white), taste, sound

Fire hot to touch


Also has color, sound

Air colorless but has touch


Necessity to use both terms for the definition

Space (ether) sound as its Dec2007 1/25/2012 KM Workshop AU, inherent quality

Definitive Qualities of substances (2)


Time & direction All pervading, substrate for everything Mind Emotions (pleasure, pain etc)
That which has action, but cannot be touched

Soul Knowledge (gnaanam) is the definitive quality

1/25/2012

KM Workshop AU, Dec2007

Gnaanam cognition/knowledge
The quality which is the cause of all kinds of transactions (communication) Two types
Remembrance (smrti)
Born of mental impressions

Apprehension (anubhava)
True & Untrue ( conforming to the object or not) ( valid / invalid )
1/25/2012 KM Workshop AU, Dec2007

Gnaanam cognition/knowledge(2)
Valid apprehension (4 types)
Perception (pratyaksha) Inference (anumaana) Analogy based (upamaana) Verbal testimony (shabda)

2 more types (in other schools of thought)


Implication (arthaapatti) Non-apprehension (anupalabdhi)
1/25/2012 KM Workshop AU, Dec2007

Perception

Laukika (ordinary) vs Alaukika (extraordinary)


External Visual Tactual Gustatory Olfactory Auditory Internal Mind
Intuitive

1/25/2012

KM Workshop AU, Dec2007

Cause for Perception


Six operative causes
Conjunction in perceiving the jar Inherence with the conjoint in perceiving the color of the jar Inherent union with the inherent which is conjoint in perceiving the genus colorness Inherence in perceiving sound Inherence with the inherently united - in perceiving soundness Relation of attribute with the subject in perceiving absence of jar on the surface
1/25/2012 KM Workshop AU, Dec2007

Inference
Extract the hidden essence from observable facts Identify the implied Cause and effect Deduction and Induction
Universal to Particular Vs Particular to General

1/25/2012

KM Workshop AU, Dec2007

Inference Nyaaya View


There is smoke in the mountain. Smoke is always pervaded by fire. We've seen this in case of hearth, kerosene stove etc. So, if there is smoke somewhere, there should also be fire there. Hence, there is fire in the mountain.
1/25/2012 KM Workshop AU, Dec2007

Inference the parts


Fire" is that which is to be proved. The reason for our conclusion of the presence of fire is "smoke". There is an indisputable association between smoke and fire i.e, wherever there is smoke, there is fire. Mountain is the current place where the above association exists.
1/25/2012 KM Workshop AU, Dec2007

Inference the parts (2)


Paksha - The subject or the receptacle on which we formulate our deductions. Hetu - Reason existing in the paksha Saadhya - The thing we are trying to prove. Vyaapti - Vyaapti is the quality of Saadhya being certainly co-existent with hetu in the same subject. This forms the central part of inference

1/25/2012

KM Workshop AU, Dec2007

Inference - Formalism
Five part syllogism
Prathigna (Statement) the mountain has fire Hetu (reason) - because there is smoke Vyaapti (invariable concomitance)
Smoke is always pervaded by fire

Udaharana (example/illustration)
As in a hearth / kerosene stove

Nigamana

(conclusion)

Hence there is fire in the mountain

1/25/2012

KM Workshop AU, Dec2007

Vyaapti Invariable concomitance


3 types
Anvaya vyaapti
A implies B

Vyatireka vyaapti
Not B implies Not A

Anvaya-vyatireka vyapti
Both

1/25/2012

KM Workshop AU, Dec2007

Verbal Testimony
Shabda (words) Vakya (sentences) Valid sentences
Akaanksha (mutual expectation) Sannidhi (proximity) Yogyata (fitness / aptness/ no-nonsense)

1/25/2012

KM Workshop AU, Dec2007

KRIL
Knowledge representation based on Indian Logic

1/25/2012

KR Workshop @ SRM Jan 2012

Another Conceptual Representation Framework

1/25/2012

KR Workshop @ SRM Jan 2012

Tamil

Dr.T.V.Geetha, Anna University

105

Dr.T.V.Geetha, Anna University

106

Dr.T.V.Geetha, Anna University

107

Dr.T.V.Geetha, Anna University

108

Dr.T.V.Geetha, Anna University

109

Dr.T.V.Geetha, Anna University

110

Tamil examples for UNL graph and expression

Dr.T.V.Geetha, Anna University

111

UNL Expression
[d]

Dr.T.V.Geetha, Anna University

[s] [w] ;tirunelveli;icl>place;1 ;nellaiappar temple;iof>temple;2 ;gandimathi amman temple;iof>temple;3 ;krishnapuram temple;iof>temple;4 ;sree vaikundam temple;iof>temple;5 ;necessity;icl>attribute;6 ;go;icl>do;7 ;pure;aoj>thing;8 ;place;icl>thing;9 [/w] [r] 0 plc 1 c1 0 man 6 c2 0 pur 7 c3 9 mod 8 c4 [/r] [/s]
112

Dr.T.V.Geetha, Anna University

113

Dr.T.V.Geetha, Anna University

114

Dr.T.V.Geetha, Anna University

115

Dr.T.V.Geetha, Anna University

116

Dr.T.V.Geetha, Anna University

117

Dr.T.V.Geetha, Anna University

118

Dr.T.V.Geetha, Anna University

119

agt/obj

Dr.T.V.Geetha, Anna University

frm/tmt/aoj

Dr.T.V.Geetha, Anna University

agt/cag/to

Dr.T.V.Geetha, Anna University

plc

Dr.T.V.Geetha, Anna University

pos

Dr.T.V.Geetha, Anna University

plc/and

Dr.T.V.Geetha, Anna University

int

Dr.T.V.Geetha, Anna University

Dr.T.V.Geetha, Anna University

127

plf/plt/via/agt

Dr.T.V.Geetha, Anna University

nam

Dr.T.V.Geetha, Anna University

iof

Dr.T.V.Geetha, Anna University

Dr.T.V.Geetha, Anna University

131

Dr.T.V.Geetha, Anna University

132

Dr.T.V.Geetha, Anna University

133

Dr.T.V.Geetha, Anna University

134

Dr.T.V.Geetha, Anna University

135

Dr.T.V.Geetha, Anna University

136

Dr.T.V.Geetha, Anna University

137

UNL based apps


Machine translation Conceptual Cross-Lingual IR

1/25/2012

KR Workshop @ SRM Jan 2012

Summary
State of art on KR Details on Ontology Construction Conceptual Inter-lingua framework

1/25/2012

KR Workshop @ SRM Jan 2012

!! Thank you !!

rp@annauniv.edu
1/25/2012 KM Workshop AU, Dec2007

Substance (dravya)
Substratum of qualities Nine substances

Back
1/25/2012 KM Workshop AU, Dec2007

Earth (smell) Water (cold touch) Fire (warm touch) Air (felt but not seen) Ether/Space (sound)

-Time

-Direction
-Soul (Knowledge) -Mind (emotions)

Quality (guna)
rupa (color) rasa (taste) gandha(smell) sparsha (touch) sankhya (no.) parimaNa(magnitude) Prthaktva(separateness) samyoga (conjunction) Vibhaga (disjunction) paratva (remoteness) Aparatva (proximity) gurutva (heaviness) Dravatva (fluidity) sneha (stickiness) shabda (sound) Budhi (cognition) sukha (pleasure) dukha (sorrow) Iccha (desire) dvesa (dislike) praytna (effort) dharma (merit) Adharma (demerit) samskara (tendency)
1/25/2012 KM Workshop AU, Dec2007

Back

Action (karma)
Upward Downward Contraction Expansion Motion (lateral)

Back
1/25/2012 KM Workshop AU, Dec2007

Non-existence / Negation
Pragabhaava (prior / antecedent negation)
Before creation

Pradhvamsaabhaava (post / destructive negation)


After destruction

Anyonyaabhaava (mutual negation) Atyantaabhaava (absolute negation)


Back
1/25/2012 KM Workshop AU, Dec2007

1/25/2012

KM Workshop AU, Dec2007