wissenstechnologie iii 08 09
DESCRIPTION
RDFS, Ontologies and SemanticsTRANSCRIPT
Wissenstechnologie WS 08/09
Michael Granitzer
IWM TU Graz & Know-CenterIWM TU Graz & Know Center
http://kmi tugraz at http://www know center athttp://kmi.tugraz.at http://www.know-center.atThis work is licensed under the Creative Commons Attribution 2.0 Austria License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/at/.
TodayToday
h bThe Semantic Web Stack (rep )Stack (rep.)
Semantics & Semantics & Ontologies
RDF S h (RDFS)2
RDF Schema (RDFS)
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Definition „Semantic Web“The Semantic Web Stack (rep.)
The Semantic Web is an extension of the current Web in The Semantic Web is an extension of the current Web in which information is given well-defined meaning, betterenbaling computers and people to work in cooperations.
[Berners-Lee et al. 2001]
http://www.sciam.com/print_version.cfm?articleID=00048144-10D2-1C70-84A9809EC588EF2110D2 1C70 84A9809EC588EF21
3
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
The Vision as Application ScenarioThe Semantic Web Stack (rep.)
Plan a trip via the internet using your personal agentPlan a trip via the internet using your personal agent
Agent searches automatically for
Suitable flightSuitable flight
Suitable hotels
Alternative routesAlternative routes
Also, the software agent tells you why it made this decision!
4
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
How to Express Semantics The Semantic Web Stack (rep.)
A small example
John Lennon
Th B tlBandIs Member Is A
The Beatles
Is MemberPaul McCartney
Query: all bands from EnglandIs born in
Founded in
Liverpool England
Query: all bands from England
?All bands with English artists?
Is born in
Ist in
5
Liverpool England ?All bands with English artists?
Inferenz & Reasoning: E li h i P h i i d b i E l d
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
English artists := Person who is an artist and born in England
Semantic Web StackThe Semantic Web Stack (rep.)
a.k.a. SW Layer Cakey
a.k.a. SW Tower
6
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantic Web StackThe Semantic Web Stack (rep.)
Unicode
URI
7
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantic Web StackThe Semantic Web Stack (rep.)
XML
XML Schema
Namespaces
8
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Drawbacks of XMLThe Semantic Web Stack (rep.)
9
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Drawbacks of XMLThe Semantic Web Stack (rep.)
No semantic/meaning of tags No semantic/meaning of tags
Tree-like structure makes it hard to combine decentralstored information
<Person>
<name> x</name>
<lecture>
/<name> x</name>
<lecture>
…</lecture>
<name> x</name>
<Person>
…/
10
</lecture>
</Person>
</Person>
</lecture>
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantic Web StackThe Semantic Web Stack (rep.)
RDF
11
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Goal of RDFThe Semantic Web Stack (rep.)
Description of (Web) resource via metadataDescription of (Web) resource via metadata
Historically focused on web sites
E t d d t l“ Extended to „general“ resources
For
Classification of resources
Classification of relationships between resources
Unambigious description
12
Unambigious description
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF Statements (Triples)The Semantic Web Stack (rep.)
A small example
htt // iki di / iki/J h L http://dbpedia org/property/associatedActshttp://en.wikipedia.org/wiki/John_Lennon
http://en.wikipedia.org/wiki/The_Beatles
http://dbpedia.org/property/associatedActs
http://en.wikipedia.org/wiki/Paul_McCartney
rdfs:label
http://dbpedia.org/property/associatedActs
Subject Predicate Object
„Paul McCartney“
j j
http://en.wikipedia.org/wiki/John_Lennon
http://dbpedia.org/property/associatedActs
http://en.wikipedia.org/wiki/The_Beatles
13http://en.wikipedia.org/wiki/Paul_McCartney
http://dbpedia.org/property/associatedActs
http://en.wikipedia.org/wiki/The_Beatles
http://en.wikipedia.org/wiki/P Rdfs:label “Paul McCartney”
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
aul_McCartney
RDF – SerialisationTurtle Example - Extended
The Semantic Web Stack (rep.)
Turtle Example - Extended
# Define some namespaces
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ex: <http://example org/terms/>@prefix ex: <http://example.org/terms/> .
<http://www.example.org/index.html>
dc:creator <http://www.example.org/staffid/85740> .
# write all statements in short form
<http://www.example.org/staffid/85740>
ex:name "John Smith";
ex:age "27" .
14
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF Extended ConceptsThe Semantic Web Stack (rep.)
Blank NodesBlank Nodes
Container & Collections
ReificationReification
Syntactical abbreviations, no extension of expressiveness
But how to define meaning?
15
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologies & SemanticsWhat is an Ontology?
Semantics & Ontologies
What is an Ontology?
Greek: The study of being“Greek: „The study of being
Branch of Philosophy
W it d t th d fi iti f t i We can narrow it down to the definition of concepts in the world and their relationship
16
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
OntologiesWhat are Concepts in our purpose?
Semantics & Ontologies
What are Concepts in our purpose?
Semiotic Triangle [Ogden & Richards 1923]Semiotic Triangle [Ogden & Richards 1923]
Concept
Refers toSymbolizes
Term / Word/URI
St d fThing
17‚Apache‘
Stands for
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologies & SemanticsHow to describe concepts?
Semantics & Ontologies
How to describe concepts?
Intensional Description: Conditions and properties of a Intensional Description: Conditions and properties of a concept
Natural World: textual summaryy
Logics:
N d ffi i di i– Necessary and sufficient conditions– constraints on things
Extensional Description: List of all objects belonging to a p j g gconcept
18
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologies & SemanticsExample: Mammal
Semantics & Ontologies
Example: Mammal
IntensionIntension
•isA(Vertebrate Animal)•has(Sweat glands)
•withFunction(Milk)•withFunction(hair)
•....
Extension
•Elephant•Lion•Monkey
19
Monkey•....
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologie (Gruber)Semantics & Ontologies
Definition in Computer Science
explicit specification of a conceptualization
conceptualization is an abstract, simplified view ofp , pthe world that we wish to represent for some purpose
Definitions associate the names of entities in theuniverse of discourse with human readable textuniverse of discourse with human-readable textdescribing what the names mean, and formal axiomsthat constrain the interpretation and well-formed useof these terms of these terms. Formally, an ontology is the statement of a logicaltheory
20
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologie (Gruber)
Semantics & Ontologies
Ontologie (Gruber)
Ontologies are often equated with taxonomic Ontologies are often equated with taxonomic hierarchies of classes, but class definitions, and the subsumption relation, but ontologies need not be limited to these forms To specify a limited to these forms. … To specify a conceptualization one needs to state axioms that do constrain the possible interpretations for the d fi d tdefined terms.
21
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologie (Guarino)Semantics & Ontologies
Language vs. Conceptualization
An ontology is a logical theory accounting for the gy g y gintended meaning of a formal vocabulary, i.e. its ontological commitment to a particular conceptualization of the world. The intended models of a logical language using such a vocabulary are constrained by its ontological commitment. An ontology indirectly reflects this commitment (and the underlying conceptualization) by
h d d d lapproximating these intended models.
an ontology is language-dependent
22a conceptualization is language-independent
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologie (Sowa)Semantics & Ontologies
Formalization level of Ontologies
An informal ontology may be specified by a catalog of types that are either undefined or d fi d l b t t t i t l l defined only by statements in a natural language.
A formal ontology is specified by a collection of names for concept and relation types organized names for concept and relation types organized in a partial ordering by the type-subtype relation.
23
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontologie (Obrst)
Semantics & Ontologies
Ontologie (Obrst)
With respect to definitions of ontologies, I hope to send a portion of a briefing I made at the Army Knowledge Management Conference in Ft. Lauderdale late Aug/early Sept of 2004, that takes you through the ontology spectrum from taxonomy (weak takes you through the ontology spectrum, from taxonomy (weak and strong) to thesaurus (a strong term taxonomy) to conceptual model (weak ontology) to logical theory (strong ontology).
The first is unstandardized the second and third each has a The first is unstandardized, the second and third each has a set of standards associated with them, the third and fourthhave multiple representation languages supporting them, and the last has some logic behind the representation language, typically ranging from a description logic (OWL) to first-order typically ranging from a description logic (OWL) to first order logic (KIF, Common Logic) to a higher order logic.
A logical theory is a formal ontology. The others range from informal to semi-formal. Other informal ontologies can be natural language sentences in a document The key point
24
natural language sentences in a document. The key point about formal ontologies (logical theories) is that they are machine-interpretable, i.e., semantically interpretable by machine. The others are not, are only interpretable by human beings, though they may be machine-readable and
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
human beings, though they may be machine readable andmachine-processable.
Summary of DefinitionsSemantics & Ontologies
A Ontology is a model (of the world)
A t l d ib ti l (k l d ) d iA ontology describes a particular (knowledge) domain
A ontologie defines words/terms/signs for describingConceptsConcepts
A ontologie puts concepts into relation to each other
A ontologie uses axioms to put constraints on particularconcepts
25
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Components of an Ontology
Semantics & Ontologies
Components of an Ontology
Classes general things of a domainClasses general things of a domain
Instances special things of a domain
R l ti b t thiRelations between things
Properties of things
26
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantics & CommunicationWhy do we need Ontologies in the Web?
Semantics & Ontologies
Java based Intelligent Agent
C# basedIntelligent AgentExchange Semantics
on the basis of an
Q: Is Paul McCartney member of a Rock Band?
agreed Ontology
27
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantics & CommunicationSemantics & Ontologies
Language must allow to express the semantics in an Language must allow to express the semantics in an implementation/algorithmic independent way
Usually done via a Vocabulary
Topic oriented vocabulary (e.g. Friend of a friend)
Schema Knowledge/Terminological Knowledgeg g g
– Special vocabulary to make statements over topic orientedvocabulary (i.e. the termonologie used in a domain)
– A general set of rules independent of the domain– Defines the expressiveness of a language
28
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantics & Communication Example
Semantics & Ontologies
Example
Topic Vocabulary: Elephant, Mammal, AnimalTopic Vocabulary: Elephant, Mammal, Animal
Schema: isSubClassOf defines an transitiv IS-A relationshipisSubClassOf defines an transitiv IS A relationship
Define that: isSubClassOf(Elephant, Mammal)==true
Define that: isSubClassOf(Mammal, Animal)==true
isSubClassOf(Elephant,Animal)==true
Independent of implementation and applyable toabritrary vocabularies:abritrary vocabularies:
isSubClassOf(A, B)
isSubClassOf(B, C)
29
isSubClassOf(B, C)
isSubClassOf(A,C)==true
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Semantics & Communication Example
Semantics & Ontologies
Example
Similar „Rules“ exist in natural languageSimilar „Rules exist in natural language
Fact 1: „An elephant is a mammal“„Mammals like for example elephants“
Fact 2: „A mammal is an animal“
Based on our formal knowledge we conclude that an g„elephant is an animal“.
Note: Exploitable in Ontology Learning from Text
30
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Ontology Spectrum (McGuinness)Semantics & Ontologies
..or how much semantic expresses
SelectedLogical
Thesauri“narrower
t ”Formal
iFrames
(properties)Catalog/ID
LogicalConstraints
(disjointness, inverse, …)
term”relation
is-a (properties)
inverse, …)
Terms/Informal
is-aFormal
instance Value GeneralLogical
glossary Restrs. constraints
31Originally from AAAI 1999- Ontologies Panel by Gruninger, Lehmann, McGuinness, Uschold, Welty;– updated by McGuinness.
http://ontolog.cim3.net/file/work/OntologySummit2007/workshop/McGuinness_NIST-interop-ontology-summit_20070423.ppt
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Description in: www.ksl.stanford.edu/people/dlm/papers/ontologies-come-of-age-abstract.html
Semantic Web StackRDF Schema (RDFS)
RDF Schema
32
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF Schema (RDFS)http://www w3 org/2000/01/rdf-schema#
RDF Schema (RDFS)
http://www.w3.org/2000/01/rdf-schema#
Allows to express terminological knowledge over RDFAllows to express terminological knowledge over RDF
Application of RDFS
Defines a new vocabulary for giving meaningDefines a new vocabulary for giving meaningindependent of program logic
Allows to define „lightweight“ Ontologies and basicg g gReasoning capabilities
http://www.w3.org/TR/rdf-schema/
33
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF Schema & Object-Orientierted
RDF Schema (RDFS)
Languages
RDFS uses object-oriented Concepts:j p
Classes
Properties of the classes
But not classes have properties (e.g. Java)
Properties are assigned to classes:
Easier to extend vocabularyEasier to extend vocabulary
Easier to assign properties to classes
Take care on uniqueness of Propertiesq p
34
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaNotation
RDF Schema (RDFS)
Notation
@prefix rdfs <http://www w3 org/2000/01/rdf-schema#>@prefix rdfs <http://www.w3.org/2000/01/rdf schema#>.
@prefix rdf <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
For the following slides we define this namespaceFor the following slides we define this namespace
35
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaClasses
RDF Schema (RDFS)
Classes
rdfs:Resource Class of all resources
rdfs:Literal Class of literals (Strings)rdfs:Literal Class of literals (Strings)
rdf:XMLLiteral Class of XML Literals
rdfs:Class Class of classesrdfs:Class Class of classes
rdf:Property Class of properties
rdfs:Datatype Class of datatypes (e g integer etc )rdfs:Datatype Class of datatypes (e.g. integer etc.)
rdf:Statement Class of RDF Statements
rdfs:Container Class of containers
36
rdfs:Container Class of containers
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaProperties
RDF Schema (RDFS)
Properties
rdf:type Subject is an instance of a class
rdfs:subClassOf Subject is a subclass of a class
rdfs:subPropertyOf Subject is a sub property of a property
rdfs:domain A possible class for a subject of a property
rdfs:range A possible class for an object of a property
rdfs:label human readable label of an resource
rdfs:comment human readable comment of an resourcerdfs:comment human readable comment of an resource
…
37
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaInstances Classes
RDF Schema (RDFS)
Instances, Classes
Typing: Individuals are assigned to classes (multiple Typing: Individuals are assigned to classes (multiple assignments possible)
rdfs:Class
rdf:type
#Car
#MyBMW
rdfs:subClassOfrdf:type
rdfs:Resource
38Note: Sometimes it is domain dependent what an instance isand what not (modelling aspect)
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaHierarchies
RDF Schema (RDFS)
Hierarchies
rdf:subClassOf allows to define hierarchies amongclasses
#Means of Transportation
#Electric vehicle
#MyBMW
rdfs:subClassOf
39
#Car
rdfs:subClassOf#BMW
rdf:type#Train
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaHierarchies
RDF Schema (RDFS)
Hierarchies
Rdf:subPropertyOf allows to define hierarchies amongproperties
ex:has
– ex: hasFourex: hasFour– ex:hasTwo
<#BMW>ex:hasFour <#Tires> .
<#BMW>ex:has <#Tires> .
40
ex:has <#Tires> .
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaDomain & Range
RDF Schema (RDFS)
Domain & Range
rdf:Domain and rdf:Range allow to specify whichclasses of subjects (==domain) and which classes ofbj t ( ) t tobject (==range) a property can connect
<ex:has> rdf:domain <#Car>
<ex:has>rdf:Range <rdf:Resource>
41
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDF SchemaExampleExample
42
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDFS SemanticsRDFS Semantics
Model-theoretic semantics (subfield of formal semantics)Model theoretic semantics (subfield of formal semantics)
Entailment: Given a graph the graph is transformed accordingto the rules of RDFS
Implicit knowledge (i.e. not explicitly modelled)
#Means of Transportation
rdfs:subClassOf
#Means of Transportation
rdfs:subClassOfrdf:type
#Car
rdfs:subClassOf
#MyBMW
rdf:type#Car
df bCl Of
#MyBMW
df
rdfs:subClassOfyp
43
rdfs:subClassOf
#BMW
rdfs:subClassOf
#BMW
rdf:type
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDFS SemanticsDeductive Rules/Entailment
RDFS Semantics
Deductive Rules/Entailment
The RDF Semantics Document defines a list of 44 Entailment The RDF Semantics Document defines a list of 44 Entailment Rules:
ddlidif1 nss K
“do that recursively until the graph does not change”
sstatement add,statementsvalidare if 11
nn ss
sK
do that recursively until the graph does not change
“this can be done in polynomial time for a specific graph”
We have means for how statements should be interpreted
W “ i ” f URI’ i RDFS
44
We can express “meaning” of URI’s using RDFS
http://www.w3.org/TR/rdf-mt/
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
RDFS SemanticsEntailment Example
RDFS Semantics
Entailment Example
u x v URI‘s or Blank Nodesu, x, v …. URI s or Blank Nodes
.:: Classrdfssubtyperdfsu.Re:: sourcerdfssubClassOfrdfsu
rdfs:subtyperdfs:Class
rdfs:Resource#Car rdfs:subClassOf
.:
.:.:xsubClassOfrdfsu
xsubClassOfrdfsvvsubClassOfrdfsu #Means of Transportation
rdfs:subClassOf
45#Car
rdfs:subClassOf
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
#BMW
RDFS SemanticsDrawback/Restriction of RDF
RDFS Semantics
Drawback/Restriction of RDF
Open world assumption: false statements must be Open world assumption: false statements must be specified
Closed world assumption: if a statement is missing, it is p g,assumed to be false
No negation in RDFS possible
• ex:michael rdf:type ex:nonsmoker
• ex:michael rdf:type ex:smoker• ex:michael rdf:type ex:smoker
Does not lead to a contradiction!
N l i di id l H All
46
No rules over individuals e.g. ex:Humans = All ex:Women and All ex:Men
No Counting: “An Elephant has 4 legs”
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
No Counting: An Elephant has 4 legs
Summary
Ontology = Classes Instances Properties andOntology = Classes, Instances, Properties andRelationships
RDFS as terminological vocabulary over RDFg y
RDF Schema (RDFS):
First step in increasing semanticsFirst step in increasing semantics
No negation and restricted logic capabilities
47
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
Points you should take away from thislecturelecture
• What are Ontologies in Computer Science?• What are Ontologies in Computer Science?
• What adds RDFS to the semantic expressiveness of RDF
Wh i RDFS t h?• Why is RDFS not enough?
48
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
That‘s it for today…
Thanks for your attention
Questions/comments?
49
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at
License
This work is licensed under the Creative Commons This work is licensed under the Creative Commons Attribution 2.0 Austria License. To view a copy of this license, visit http://creativecommons org/licenses/by/2 0/at/http://creativecommons.org/licenses/by/2.0/at/.
Contributors:
Mathias Lux
Peter Scheir
Klaus Tochtermann
50Michael Granitzer
WS 08/09
http://kmi.tugraz.at
Wissenstechnologie @ kmi.tugraz.at