42
CS3352 Topic Maps and RDF(S) Topic Maps and RDF(S) CS3352

CS3352 Topic Maps and RDF(S) CS3352. Topic Maps From the document mark up community An ISO Standard (ISO13250) describing knowledge structures. Aim: to

Embed Size (px)

Citation preview

CS3352

Topic Maps and RDF(S)Topic Maps and RDF(S)

CS3352

CS3352

Topic MapsTopic Maps From the document mark up community An ISO Standard (ISO13250) describing knowledge

structures. Aim: to enable information resources to be classified

and navigated in a consistent manner by representing knowledge structures for indexes

Extended to other forms of navigation aid: – The electronic equivalent of table of contents, glossaries,

thesauri, cross references The concepts or topics that underlie a set of

information objects exposed to those people or applications processing the information.

Seen by the document community as providing a new organising principle for information.

CS3352

Topic Map basicsTopic Map basics Based on Semantic Nets and Indexes Implemented using XML and XLL (XLink,

XPointer) Topics, Associations and Occurrences

– typed to form groups – – types are defined in the standard as topics– Topic - Tosca is of type opera– Occurrence - Picture X plays role of portrait– Association - Written-by is a type of association

Topics and Occurrences play roles in relationships

CS3352

Topic Maps: TopicsTopic Maps: Topics Topics – a resource

surrogate or proxies for Subjects– Tosca, Madam

Butterfly, Rome, Puccini, Italy

Represent any concept helpful to the meaningful description of information objects.

CS3352

Topic Maps: OccurrencesTopic Maps: OccurrencesProvide a route between a topic

and an information object. Occurrences - addressable

information resources that are linked to the topic – usually electronic– Picture, commentary, article etc

Occurrences are outside the topic map document and are pointed to by the topic (using XLL – XLink and XPointer)

A layer of topics and a layer of occurrences

CS3352

Topic Maps: AssociationsTopic Maps: Associations

Allow more to be said about topics by establishing relationships between topics.

Associations between topics – bi-directional– Tosca was written by Puccini, Rome is in Italy

CS3352

Topic Maps: other conceptsTopic Maps: other concepts Scope and Themes:

– Used to describe the limits of the validity of a topic characteristic assignment. I.e. provides CONTEXT

– Topics can have different names for different scopes Facets:

– Provide a mechanism for assigning properties to groups of information objects. E.g. language, security

Subject descriptors: – Establishing subject identity between topics within

and across topic maps, e.g. when merging them.– Italia and Italy refer to the same subject.– Activity to develop directories of public subjects

CS3352

CS3352

CS3352

Topic Map Topic Map ImplementatioImplementatio

nnXML Topic Maps (XTM) 1.0XML Topic Maps (XTM) 1.0

<topicmap topic="simpletm"> <topic id="defocc" identity="net.ontopia.topicmaps.psd.iso13250.occurrence-

type.default"><topic id="produces"> <topname> <basename>producer of</basename> <sortname>~producer of</sortname> </topname> <topname scope="product"> <basename>product of</basename> <sortname>~product of</sortname> </topname> </topic> <topic id="simpletm"> <topname> <basename>Simple topic map</basename> </topname> <occurs type="website" href="http://www.ontopia.net/topicmaps/examples/ontopia/simple.htm"/> </topic> <assoc type="produces"> <assocrl type="vendor" href="ontopia"/> <assocrl type="product" href="oks"/> </assoc></topicmap>

CS3352

Topic MapsTopic Maps Each map is self-describing, carrying its own ontology

defined as a topic map Topic maps also used for defining control information Work started on

– schema language– TQML – query language– Upper topic model

XML Topic Maps (XTM) 1.0– an abstract model and XML grammar for interchanging Web-

based topic maps, written by the members of the TopicMaps.Org Authoring Group.

Semantic Networks circa 1985? What happened to the last 20 years of knowledge

representation? Scale? Change? Semantics? Rigour? Inference?

CS3352

Topic Map Further ReadingTopic Map Further Reading

http://www.topicmaps.org/ http://www.topicmaps.com/ http://www.ontopia.net/topicmaps/

learn_more.html Commercial examples using topic maps and

XLink: http://www.empolis.co.uk/products/

CS3352

Resource Description Resource Description Framework (RDF)Framework (RDF)

W3C metadata technology A model for metadata for describing resources RDF is a data model

– the model is domain-neutral, application-neutral – the model can be viewed as directed, labeled graphs or as an

object-oriented model (object/attribute/value) Makes no assumptions about a particular application

domain Doesn’t define a priori the semantics of any application

domain The specification provides an encoding (in XML) of the

model The syntactic details are secondary, they are largely

handled by using XML (RDF defines a convention of XML usage)

CS3352

RDF modelRDF model RDF “statements” consist of

resources (= nodes)which have properties which have values (= nodes, strings)

http://www.w3.org/TR/REC-rdf-syntax/

“Ora Lassila”

author

= subject= predicate= object

predicate(subject, object)

“http://www.w3.org/TR/REC-rdf-syntax/ has the author Ora Lassila”

resource

valueproperty

CS3352

Basic Model: ResourceBasic Model: Resource

1. A Resource is anything that can have a URI (and optional anchor ids)

includes all the Web's pages, as well as individual elements of an XML document.– E.g. a document whose URL is

http://www.textuality.com/RDF/Why.html

http://www.w3.org/TR/REC-rdf-syntax/

CS3352

Basic Model: PropertyBasic Model: Property

A Property is a specific aspect, characteristic, attribute or relation to describe a resource.

Can be used as a property – a property needs to be a resource so that it can have its own properties.

http://www.w3.org/TR/REC-rdf-syntax/

author

CS3352

Basic Model: StatementsBasic Model: Statements A Statement consists of the combination of a

Resource, a Property, and a value. These parts are known as the 'subject', 'predicate' and 'object' of a Statement.

An example Statement is "The Author of

http://www.cs.man.ac.uk/cs3362.html is Carole Goble."

The value can just be:– a string, ( “Carole Goble“) or another resource ("The Home-

Page of http://www.textuality.com/RDF/Why.html is http://www.textuality.com.“)http://www.w3.org/TR/REC-rdf-syntax/

“Ora Lassila”

author

CS3352

RDF model (example)RDF model (example)

http://www.w3.org/TR/REC-rdf-syntax/

“Ora Lassila”

dc:Creator

“1999-02-22”

dc:Date

“W3C”

dc:Publisher

CS3352

Complex valuesComplex values 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)

http://www.w3.org/TR/REC-rdf-syntax/

“Ora Lassila”

dc:Creator

[email protected]

p:EMail

p:Name

CS3352

Complex values (continued)Complex values (continued) Corresponding triples

{ “http://www.w3.org/TR/PR-rdf-syntax/”, dc:Creator, x }{ x, p:Name, “Ora Lassila” }{ x, p:EMail, “[email protected]” }

http://www.w3.org/TR/REC-rdf-syntax/

“Ora Lassila”

dc:Creator

[email protected]

p:EMail

p:Name

CS3352

ContainersContainers 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

CS3352

Containers (continued)Containers (continued)

http://www.w3.org/TR/REC-rdf-syntax

“Ora Lassila”

rdf:_1

rdf:Seq

dc:Creator

rdf:Type

“Ralph Swick”

rdf:_2

CS3352

Containers (continued)Containers (continued)

http://www.w3.org/TR/REC-rdf-syntax

“Ora Lassila”

dc:Creator

“Ralph Swick”

dc:Creator

CS3352

Containers (continued)Containers (continued) Triples from the first example:

– { “http://www.w3.org/TR/REC-rdf-syntax”, dc:Creator, x }– { x, rdf:_1, “Ora Lassila” }– { x, rdf:_2, “Ralph Swick” }– { x, rdf:type, rdf:Seq }

Triples from the second example:– { “http://www.w3.org/TR/REC-rdf-syntax”, dc:Creator, “Ora

Lassila” }– { “http://www.w3.org/TR/REC-rdf-syntax”, dc:Creator,

“Ralph Swick” } Syntactic shorthand provided (much like HTML lists)

CS3352

Higher-order statementsHigher-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

CS3352

ReificationReification RDF is not really second-order But it does provide a built-in predicate

vocabulary for reification

http://www.w3.org/TR/REC-rdf-syntax “Ora Lassila”dc:Creator

“Library of Congress”

dc:Creator

• The dotted box corresponds to the following statements

• { x, rdf:predicate, “dc:creator” }• { x, rdf:subject, “http://www.w3.org/TR/RED-rdf-syntax }• { x, rdf:object, “Ora Lassila” }• { x, rdf:type, “rdf:statement” }

CS3352

RDF modelRDF model Graphs can be represented as relational “triples”

– { “http://www.w3.org/TR/REC-rdf-syntax/”, author, “Ora Lassila” }

Any arc in a graph corresponds to one triple, consisting of the arc label itself and the two endpoints

When searching, this is useful only if we know what the meaning of “author” is– e.g., “find all documents where the author is Ora Lassila”– new triple

{ “http://www.w3.org/TR/REC-rdf-syntax/”, dc:Creator, “Ora Lassila” }– “author” replaced by a label which is uniquely qualified (using the

XML namespace mechanism)– Drawn from a consensually pre-established vocabulary

CS3352

RDF SyntaxRDF Syntax

RDF Model and Syntax specification defines a convention of XML usage to “serialize” RDF– Most of the trouble people have had

understanding RDF is probably caused by the syntax

– The syntax was “designed by a committee”)– Lots of attention diverted onto abbreviated

syntax– redesign of the syntax is possible at some point

CS3352

RDF Syntax exampleRDF Syntax example

Ora Lassila is the creator of the resource

http://www.w3.org/Home/Lassila.

<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:s="http://description.org/schema/"> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>

CS3352

Problems with RDFProblems with RDF

Syntax is hard– Fixable but off-putting

Modelling is difficult– Confused simplicity with simple-minded– Confused generality with simplicity– E.g. Quantification?

CS3352

RDF and RDF SchemaRDF and RDF Schema RDF a small set of modelling primitives + syntax RDF does not commit to a domain vocabulary RDF Schema -- RDF(S)

– Extended set of modeling primitives– Define a domain vocabulary for RDF – Organise this vocabulary in a typed hierarchy– BUT expressive inadequacy and poorly defined semantics

RDFS is the framework for a vocabulary– RDF schema provides an extensible, object-oriented type

system Schema definitions are expressed in RDF itself

CS3352

RDF Schema ModelRDF Schema ModelProperty-centric

1. resource, class, subClassOf, type2. property, subPropertyOf3. domain, range, constraintResource, constraintProperty

a new class can be defined by extending an existing class– extension reuses (and thus shares) existing definition(s)– a class can have multiple superclasses

schema definitions can include constraints which express validation conditions

– domain constraints link properties with classes– range constraints limit property values– “hook” for new constraints

CS3352

RDF Schema ModelRDF Schema Model

Class

MotorVehicle

Truck

Person

Property

registeredTo

ownedBy

Domain

Range Resource

type

type

subClassOf

subClassOf

subClassOf

type

type type

CS3352

RDF Data ModelRDF Data Modelrdfs:Resource

rdfs:Class rdf:Property

RD

F/R

DF

S l

ay

er

an

d n

am

es

pa

ce

ap

pli

ca

tio

n s

pe

cif

ics

ch

em

a a

nd

na

me

sp

ac

e

appl:Person

appl:Man appl:Woman

appl:firstNameappl:marriedWith

appl:lastName

appl:Organisation

ap

pli

ca

tio

n s

pe

cif

ica

ctu

al

da

tahttp://www.foo.com/W.Smith

William Smith

appl:lastNameappl:firstName

http://www.foo.com/S.Smith

SmithSusan

appl:firstName appl:lastName

appl:marriedWith

subClassOf

instanceOf

CS3352

Ap

plic

atio

n-

spec

ific

actu

al d

ata

http://www.foo.com/W.Smith

William Smith

appl:lastNameappl:firstName

http://www.foo.com/S.Smith

SmithSusan

appl:firstName appl:lastName

appl:marriedWith

rdfs:Resource

rdfs:Class rdf:Property RD

F/R

DF

Sla

yer

and

n

ames

pac

e

subClassOf

instanceOf

Ap

plic

atio

n-s

pec

ific

sch

ema

and

n

ames

pac

e

appl:Person

appl:Man appl:Woman appl:fatherInLaw appl:marriedWithappl:fatherOf

appl:Organisation o:secondComponento:firstComponent

o:composee

o:Relationo:Partition

o:P

artO

fRel

o:is

Inve

rseR

elat

ionO

f

o:Composition

on

tolo

gy

met

a la

yer

and

nam

esp

ace

o:R

efle

xive

o:Ir

refle

xive

o:A

sym

met

ric

o:T

rans

itive

o:S

ymm

etric

o:Partonomic-RolePropagation

CS3352

RDF and XMLRDF and XML

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

it might reside, for example, in an RDB– XML relieves us of syntactic details when

transporting RDF

CS3352

RDF Schema syntax in XMLRDF Schema syntax in XML<rdf:Description ID="MotorVehicle"> <rdf:type resource="http://www.w3.org/...#Class"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/...#Resource"/> </rdf:Description><rdf:Description ID="Truck"> <rdf:type resource="http://www.w3.org/...#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description><rdf:Description ID="registeredTo"> <rdf:type resource="http://www.w3.org/...#Property"/> <rdfs:domain rdf:resource="#MotorVehicle"/> <rdfs:range rdf:resource="#Person"/></rdf:Description><rdf:Description ID=”ownedBy"> <rdf:type resource="http://www.w3.org/...#Property"/> <rdfs:subPropertyOf rdf:resource="#registeredTo"/></rdf:Description>

CS3352

W3C project for shared web W3C project for shared web annotation using RDFannotation using RDF

Comments, notes, explanations, or other types of external remarks that can be attached to any Web document or a selected part of the document without actually needing to touch the document.

Uses an RDF based annotation schema for describing annotations as metadata and XPointer for locating the annotations in the annotated document.

First client implementation of Annotea is an editor/browser

CS3352

Topic Maps vs RDF(S)Topic Maps vs RDF(S) Both are weak

– Inexpressive– No semantics– Reinventing wheels not terribly effectively

Slightly different perspectives– Topic Maps – topic centric– RDF(S) – property centric

Topic maps have the notion of “aboutness” lacking in RDF, which has the notion of “instance”

Both use XML as a carrier syntax A religious war

CS3352

Layered LanguagesLayered Languages

XMLHTML

XHTML SMIL RDF(S)

PICS

Declarative Languages(OIL, DAML+OIL)

DC

The W3C hierarchy of languages:

CS3352

RDF, RDFS

OILSemantic web

Building on StandardsBuilding on Standards

Html, HttpBrowsers

1990

DHTML, CSS, Javascript, CGISearch engines

XML, DTDs,

XLink

Static web

Dynamic web

Consistent web

1994 1996 1998 20001992

XSLTXML-QL

CS3352

RDF(S) Further ReadingRDF(S) Further Reading

Tutorials– http://www.zvon.org/xxl/RDFTutorial/General/book.html– http://www.xml.com/pub/a/98/06/rdf.html

RDF Resource collection– http://www.ilrt.bristol.ac.uk/discovery/rdf/resources/

Why RDF is different to XML– http://www.w3.org/DesignIssues/RDF-XML.html

W3C– http://www.w3.org/RDF/