Title: RDF and XML tutorial
1RDF and XML tutorial
2Talk Overview
- Semantic Web
- XML
- RDF
- DAML OIL ( Time permitting)
3Problems with current search engines
- Current search engines keywords
- high recall, low precision
- sensitive to vocabulary
- insensitive to implicit content
4Search engines on theSemantic Web
- concept search instead of keyword search
- semantic narrowing/widening of queries
- query-answering over gt1 document
- document transformation operators
5So what is the Semantic Web?
- The Semantic Web Wedding Cake
- Crash course
- XML
- RDF
- RDF Schema
- DAMLOIL (OWL)
6TBL talk at XML 2000
7XML User definable and domain specific markup
HTML
ltH1gtIntroduction to AIlt/H1gt ltULgt ltLIgtTeacher
Frank van Harmelen ltLIgtStudents 1AI,
1I ltLIgtRequirements none lt/ULgt
XML
ltcoursegt lttitlegtIntroduction to
AIlt/titlegt ltteachergtFrank van Harmelenlt/teachergt
ltstudentsgt1AI, 1Ilt/studentsgt ltreqgtnonelt/reqgtlt/c
oursegt
8XML document labelled tree
- node label attr/values contents
ltcourse date...gt lttitlegt...lt/titlegt ltteachergt
...lt/teachergt ltnamegt...lt/namegt lthttpgt...lt/http
gt ltstudentsgt...lt/studentsgtlt/coursegt
- XML Schema grammars for describing legal
trees and datatypes
- So why not use XML to represent semantics?
9Syntax versus Semantics
- Syntax the structure of your data
- Semantics the meaning of your data
- Two conditions necessary for interoperability
- Adopt a common syntax this enables applications
to parse the data. - Adopt a means for understanding the semantics
this enables applications to use the data.
10 XML and Semantics?
- ltPredatorgt
-
- lt/Predatorgt
- Predator a medium-altitude, long-endurance
unmanned aerial vehicle system. - Predator one that victimizes, plunders, or
destroys, especially for one's own gain. - Predator an organism that lives by preying on
other organisms. - Predator a company which specializes in
camouflage attire.
11XML limitations for semantic markup
- XML makes no commitment on
- ? Domain-specific ontological vocabulary
- ? Ontological modeling primitives
- Requires pre-arranged agreement on ? ?
- Only feasible for closed collaboration
- agents in a small stable community
- pages on a small stable intranet
- Not suited for sharing Web-resources
12What is RDF ?
- RDF is a data model
- the model is domain-neutral, application-neutral
and ready for internationalization (i18n) - the model can be viewed as directed, labeled
graphs or as an object-oriented model
(object/attribute/value) - RDF data model is an abstract, conceptual layer
independent of XML - consequently, XML is a transfer syntax for RDF,
not a component of RDF - RDF data might never occur in XML form
13RDF model
- RDF statements consist of
- resources ( nodes)which have propertieswhich
have values ( nodes,strings)
subject predicate object
http//www.w3.org/TR/REC-rdf-syntax/ has the
author Ora Lassila
14RDF Model Example
W3C
dcPublisher
http//www.w3.org/TR/REC-rdf-syntax/
dcCreator
dcDate
Ora Lassila
1999-02-22
15Complex values
- So far, values of properties have been strings
- A graph node (corresponding to a resource) also
can be the value of a property - arbitrarily complex tree and graph structures are
possible - syntactically, values can be embedded (i.e.
lexically in-line) or referenced (linked) - Example
16Complex values (continued)
- Corresponding triples
- http//www.w3.org/TR/PR-rdf-syntax/,
dcCreator, x - x, pName, Ora Lassila
- x, pEMail, ora.lassila_at_nokia.com
17Containers
- Containers are collections
- they allow grouping of resources (or literal
values) - It is possible to make statements about the
container (as a whole) or about its members
individually - Different types of containers exist
- bag - unordered collection
- seq - ordered collection ( sequence)
- alt - represents alternatives
- It is also possible to create collections based
on URI patterns - for example, all files in a particular web site
- Duplicate values are permitted
- there is no mechanism to enforce unique value
constraints
18Containers (continued)
19Higher-order statements
- One can make RDF statements about other RDF
statements - example Ralph believes that the web contains
one billion documents - Higher-order statements
- allow us to express beliefs (and other
modalities) - are important for trust models, digital
signatures,etc. - also metadata about metadata
- are represented by modeling RDF in RDF itself
20Reification
- RDF is not really second-order
- But it does provide a built-in predicate
vocabulary for reification
- The dotted box corresponds to the following
statements - x, rdfpredicate, dccreator
- x, rdfsubject, http//www.w3.org/TR/RED-rdf-sy
ntax - x, rdfobject, Ora Lassila
- x, rdftype, rdfstatement
21Reification
- Any statement can be an object
- graphs can be nested - reification
claims
NYT
22 RDF Schema
- Defines small vocabulary for RDF
- Class, subClassOf, type
- Property, subPropertyOf
- domain, range
- Vocabulary can be used to define other
vocabularies for your application domain
Person
subClassOf
subClassOf
range
domain
Student
Researcher
hasSuperVisor
type
type
Jeen
Frank
hasSuperVisor
23RDF Schema syntax in XML
ltrdfDescription ID"MotorVehicle"gt ltrdftype
resource"http//www.w3.org/...Class"/gt
ltrdfssubClassOf rdfresource"http//www.w3.org/.
..Resource"/gt lt/rdfDescriptiongt ltrdfDescriptio
n ID"Truck"gt ltrdftype resource"http//www.w
3.org/...Class"/gt ltrdfssubClassOf
rdfresource"MotorVehicle"/gt lt/rdfDescriptiongt
ltrdfDescription ID"registeredTo"gt
ltrdftype resource"http//www.w3.org/...Property
"/gt ltrdfsdomain rdfresource"MotorVehicle"/
gt ltrdfsrange rdfresource"Person"/gt lt/rdfD
escriptiongt ltrdfDescription IDownedBy"gt
ltrdftype resource"http//www.w3.org/...Property
"/gt ltrdfssubPropertyOf rdfresource"registe
redTo"/gt lt/rdfDescriptiongt
24Conclusions about RDF(S)
?
- Next step up from plain XML
- (small) ontological commitment to modeling
primitives - possible to define vocabulary
- However
- no precisely described meaning
- no inference model
25Beyond RDF OIL DAML
- OIL extends RDF Schema to a fully-fledged
knowledge representation language. - logical expressions
- data-typing
- cardinality
- quantifiers
- http//www.ontoknowledge.org
- DAML US sister of OIL
- Merged as DAMLOIL in 2001
- Becomes OWL W3C standard in March '03
26DAMLOIL (by example)
class-def animal animals are a
class class-def plant plants are a class
subclass-of NOT animal that is disjoint from
animals class-def tree subclass-of
plant trees are a type of plants class-def
branch slot-constraint is-part-of branches
are parts of some tree has-value tree
max-cardinality 1 class-def defined
carnivore carnivores are animals
subclass-of animal slot-constraint eats
that eat any other animals value-type
animal class-def defined herbivore
herbivores are animals subclass-of animal,
NOT carnivore that are not carnivores, and
slot-constraint eats they eat
plants or parts of plants value-type
plant OR (slot-constraint is-part-of has-value
plant)
27DAMLOIL as RDF(S) extension
ltrdfsClass rdfIDherbivoregt ltrdftype
rdfresourcehttp//www.ontoknowledge.org/
DefinedClass/gt ltrdfssubClassOf
rdfresourceanimal/gt ltrdfssubClassOfgt
ltoilNOTgt ltoilhasOperand
rdfresourcecarnivore/gt lt/oilNOTgt
lt/rdfssubClassOfgt lt/rdfsClassgt
28DAMLOIL as RDFS extension
RDF(S)
DAMLOIL
- class-def
- subclass-of
- slot-def
- subslot-of
- domain
- range
- class-expressions
- AND, OR, NOT
- slot-constraints
- has-value, value-type
- cardinality
- slot-properties
- trans, symm
29DAMLOIL Classes
ltdamlClass rdfID"Male"gt ltrdfssubClassOf
rdfresource"Animal"/gt lt/damlClassgt ltdamlCla
ss rdfID"Female"gt ltrdfssubClassOf
rdfresource"Animal"/gt ltdamldisjointWith
rdfresource"Male"/gt lt/damlClassgt ltdamlClass
rdfID"Man"gt ltrdfssubClassOf
rdfresource"Person"/gt ltrdfssubClassOf
rdfresource"Male"/gt lt/damlClassgt
30Class-Building Operations
- Relation to other Classes
- rdfssubClassOf
- damldisjointWith
- damldisjointUnionOf
- damlsameClassAs
- damlequivalentTo
- Contained Elements
- damloneOf
- Boolean combinations
- damlintersectionOf
- damlunionOf
- damlcomplementOf
31DAMLOIL Properties
ltdamlObjectProperty rdfID"hasParent"gt
ltrdfsdomain rdfresource"Animal"/gt
ltrdfsrange rdfresource"Animal"/gt lt/damlObje
ctPropertygt ltdamlObjectProperty
rdfID"hasChild"gt ltdamlinverseOf
rdfresource"hasParent"/gt lt/damlObjectProperty
gt ltdamlUniqueProperty rdfID"hasMother"gt
ltrdfssubPropertyOf rdfresource"hasP
arent"/gt ltrdfsrange rdfresource"Female"/gt
lt/damlUniquePropertygt
32Property-Building Operations
- Basic Types
- damlObjectProperty
- damlDataTypeProperty
- Special Types
- damlTransitiveProperty
- damlUniqueProperty
- damlUnambigousProperty
- Further Restrictions
- rdfssubPropertyOf
- rdfsdomain
- rdfsrange
- damlsamePropertyAs
- damlinverseOf
33DAMLOILProperty Restrictions
ltdamlClass rdfID"Person"gt ltrdfssubClassOf
rdfresource"Animal"/gt
ltrdfssubClassOfgt ltdamlRestrictiongt
ltdamlonProperty
rdfresource"hasFather"/gt ltdamltoClass
rdfresource"Man"/gt lt/damlRestrictiongt
ltdamlRestriction damlcardinality"1"gt
ltdamlonProperty rdfresource"hasFathe
r"/gt lt/damlRestrictiongt
lt/rdfssubClassOfgt lt/damlClassgt
34DAMLOILProperty Restrictions
ltdamlClass rdfID"Person"gt ltrdfssubClassOf
rdfresource"Animal"/gt
ltrdfssubClassOfgt ltdamlRestriction
damlcardinalityQ"1"gt ltdamlonProperty
rdfresource"hasFather"/gt
ltdamlhasClassQ rdfresource"Man"/gt
lt/damlRestrictiongt lt/rdfssubClassOfgt
lt/damlClassgt
35Restrictions
- General
- damlRestriction
- damlonProperty
- Number Restrictions
- damlcardinality
- damlmaxCardinality
- damlminCardinality
- Value and Type Restrictions
- damltoClass
- damlhasValue
- damlhasClass
- Combinations
- damlcardinalityQ
- damlmaxCardinalityQ
- damlminCardinalityQ
36Resources
- homepages.cwi.nl/lynda/spool/sw-tue-2003.ppt
- www.daml.org/meetings/2003/05/SWMU/briefings/
07_1045_Essential_Building_Blocks.ppt - www.ltg.ed.ac.uk/ht/ora-rdf-dagstuhl.ppt