Download Knowledge Representation I

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Embodied cognitive science wikipedia , lookup

Resource Description Framework wikipedia , lookup

History of artificial intelligence wikipedia , lookup

Ecological interface design wikipedia , lookup

Personal knowledge base wikipedia , lookup

Semantic Web wikipedia , lookup

Knowledge representation and reasoning wikipedia , lookup

Transcript
Knowledge Representation
Part II
Description Logic
&
Introduction to Protégé
Jan Pettersen Nytun
1
S
P
O
The Semantic Web
"The Semantic Web is not a separate Web but
an extension of the current one, in which
information is given well-defined meaning,
better enabling computers and people to work
in cooperation.“
Ref: "The Semantic Web" by
Tim Berners-Lee, James Hendler, and Ora Lassila,
Scientific American, 2001
Knowledge Representation Part II, JPN, UiA
2
Linked Data/Semantic Web
S
P
O
From Wikipedia
…a method of publishing structured data so that it
can be interlinked...
…builds upon standard Web technologies such as
HTTP, RDF and URIs… it extends them to share
information in a way that can be read automatically
by computers.
This enables data from different sources to be
connected and queried.
Knowledge Representation Part II, JPN, UiA
3
Some Semantic Web Technologies are Based on
S
P
O
Description Logic (DL)
• DL is used in AI - modern ontology languages are
based on description logics, e.g., OWL.
• Provide a logical formalism for ontologies and
the Semantic Web.
• Much used in biomedical informatics codification
of medical knowledge.
Knowledge Representation Part II, JPN, UiA
4
S
P
O
Description Logic (DL) Continues…
• A description logic is used to describe classes,
properties, and individuals.
• The knowledge base contains:
– Tbox (model): A terminological part which should
remain constant as the domain being modelled changes.
– Abox (data): An assertional part describing what is true
in some domain at some point in time.
Knowledge Representation Part II, JPN, UiA
5
S
P
O
Description Logic Continues…
Terminology part (Tbox or Model):
– Defines concepts (also called classes),
e.g., vital sign, blood pressure, patient.
– Defines properties (also called roles or property types),
e.g., hasBloodPressure.
Knowledge Representation Part II, JPN, UiA
6
S
P
O
Description Logic Continues…
Assertion part (ABox or Model Instance):
– Descriptions of individuals (also called objects) with
their properties, e.g., description of a patient and the
patients blood pressure.
– Not all individuals in the assertion part may have
been classified and this differs from ordinary objectoriented program development.
Knowledge Representation Part II, JPN, UiA
7
S
P
O
DL in Short
• T-Box: Definition of Concepts (“Classes”), Roles
(“Properties”) and Constraints.
Subsumption Hierarchy (class-subclass
hierarchies).
• A-Box: Assertions about individuals (instances)
– Unary predicates = concepts (e.g., Person, Boat)
– Binary predicates = roles
• Necessary and Sufficient conditions on classes.
Knowledge Representation Part II, JPN, UiA
8
Knowledge Base
Sensors
Terminology (TBox) - Model
Atomic
Complex
Sensor
Handlers
Classes
(Concepts)
Classes
(Concepts)
Actuator
Handlers
Property
Types
Property
Types
Actuators
Rules
Assertions (ABox) - Model Instance
Asserted
Inferred
Named
Individuals
Named
Individuals
Properties
Properties
User
Interface
Application
Software
Query
Engine
Reasoner
Protégé
A free, open-source OWL ontology editor and
framework for building intelligent systems
10
Protégé
Class hierarchy
(Subsumption hierarchy/taxonomy):
Patient is subclass of Person which
is subclass of Thing.
Property hierarchy:
Properties are modeled separately
from Classes.
hasSSN is sub property of
topDataProperty.
11
Protégé
Property hasSSN has Person as domain.
This means that an individual having
this property must be of type Person,
i.e., it is an axiom stating that given an
individual with this property then it can
be inferred that this individual is of type
Person.
Property hasSSN has string as Range.
I.e., the value of the property must
be a text string, e.g., “17106575561”.
12
S
P
O
Defining an
Individual
Individual has property hasSSN with value “17106575561”.
Id is janPN (complete id:http://www.semanticweb.org/janpn/ontologies/2014/7/untitled-ontology-2#janPN)
which we can assume is a globally unique id).
The type of the individual is “generic” (i.e., type is Thing).
13
Starting
the Reasoner
Since janPN has property hasSSN then
it must be a Person
(i.e., the domain is Person for hasSSN).
inferred
14
S
P
O
Type and Subclass as Properties
• Type of an individual is stated as a property - .
a property predefined in RDF called rdf:type.
E.g.: ( Tom rdf:type Person )
• Subclass is a property between classes.
a property predefined in RDFS called
rdfs:subClassOf.
E.g.: ( Employee rdfs:subClassOf Person )
Knowledge Representation Part II, JPN, UiA
15
Knowledge Base
Terminology (TBox) - Model
Atomic
Complex
Classes
(Concepts)
Classes
(Concepts)
Property
Types
Property
Types
Rules
Assertions (ABox) - Model Instance
Asserted
Inferred
Named
Individuals
Named
Individuals
Properties
Properties
S
P
O
Complex Class
• An atomic class is somewhat like an
“ordinary class”.
• A Complex class is built with the help of
description logic constructors, properties
and other classes (atomic or complex).
17
S
P
O
Complex Class Continues…
Example using intersectionOf:
Informally:
A man is a human that is also a male
Formally:
Class Man is the intersection of class Human and Male
In a more formal syntax:
EquivalentClass(Man intersectionOf(Human Male))
18
Example: Complex Class In Protégé
(Alternatively you may specify that Man is subclass of Human and Man)
Run reasoner
Asserted
Reasoner infer that
Tom is a Man
19
Example: To be a parent you need to be human
and additionally parent to at least one child.
Run reasoner
Reasoner infers that Tom is a HumanParent
20
To be a sick human you need to suffer from at least one sickness
Tom and TomsDiabetes2
are individuals
Run reasoner
Reasoner infers that Tom is a SickHuman
21
Example of rule using The Semantic Web Rule Language (SWRL):
hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒ hasUncle(?x1,?x3)
Also SPARQL can be used
as a rule language.
Knowledge Representation, Part II, JPN, UiA
22
S
P
O
References
[1] Book: David Poole and Alan Mackworth, Artificial Intelligence: Foundations of Computational
Agents, Cambridge University Press, 2010, http://artint.info/
[2] http://dsg.harvard.edu/courses/hst952/lecture12.ppt%E2%80%8E
[3] http://www.jfsowa.com/logic/math.htm#Propositional
[4] http://www.cs.ubc.ca/~kevinlb/teaching/cs322%20-%202009-10/Lectures/Logic2.pdf
[5] http://www.cs.ubc.ca/~kevinlb/teaching/cs322%20-%202009-10/Lectures/Logic1.pdf
[6] http://artint.info/slides/ch05/lect2.pdf
Sowa, John F. (2000) Knowledge Representation: Logical, Philosophical, and Computational Foundations,
Brooks/Cole Publishing Co., Pacific Grove, CA.
Artificial Intelligence: Structures and Strategies for Complex Problem Solving (Addison-Wesley), George F. Luger
Smith Barry. Accessed 24th of March, 2013, Ontology: Philosophical and Computational.
http: //ontology.buffalo.edu/smith/articles/ontologies.htm
Quine WVO. On What There Is. Review of Metaphysics 1948;p. 21–38.
Jan Pettersen Nytun, UiA, page 23