Title: Markup Languages in Semantic Web and Research of Semantic Web at Tatung Univ.
1Markup Languages in Semantic Web andResearch of
Semantic Web at Tatung Univ.
- Ching-Long Yeh ???
- Department of Computer Science and Engineering
- Tatung University
- chingyeh_at_cse.ttu.edu.tw
- httP//www.cse.ttu.edu.tw/chingyeh
2Outline
- Introduction to the Semantic Web
- Some Markup Languages in the Semantic Web
- RDF(S)
- DAML(-S)
- The Big Picture of the Semantic Web
- An Architecture of RDF Triple Data Store
- An RDF Parser in Prolog
- The Repository storage
- APIs and User Interface
- Semantic Community Portal
- Conclusions
3Sources
- Part of the slides are selected from the
following sources - Knowledge Markup and Resource Semantics, By
Harold Boley, Stefan Decker, and Michael Sintek,
IJCAI-01 Tutorial, http//www.ijcai-01.org/ - Anupriya Ankolenkar, et al., DAML-S Semantic
Markup For Web Services,, Proceedings of SWWS
01, the First Semantic Web Working Symposium,
California, USA, July 30 - August 1, 2001.
4Introduction to Semantic Web
- Facilities to put machine-understandable data on
the Web are becoming a high priority for many
communities. - The Web can reach its full potential only if it
becomes a place where data can be shared and
processed by automated tools as well as by
people. - For the Web to scale, tomorrow's programs must be
able to share and process data even when these
programs have been designed totally independently.
5Introduction to Semantic Web
- The Semantic Web is a vision the idea of having
data on the web defined and linked in a way that
it can be used by machines not just for display
purposes, but for automation, integration and
reuse of data across various applications. - See W3C Semantic Web Activity, by Marja-Riitta
Koivunen, for more descriptions.
6The Semantic Web Layered Architecture
Tim Berners-Lee Axioms, Architecture and
Aspirations W3C all-working group plenary
Meeting 28 February 2001
(http//www.w3.org/2001/Talks/0228-tbl/slide5-0.ht
ml)
7AIs Chance
Namespaces
CSS
- Increasing demand for formalized knowledge on
the Web AIs chance! - XML- RDF-based markup languages provide a
'universal' storage/interchange format for such
Web-distributed knowledge representation.
DTDs
XSLT
Stylesheets
DAML
Agents
Transformations
Ontobroker
XQL
XML
HornML
Rules
Queries
RuleML
XQuery
XML-QL
SHOE
RDFS
Frames
Acquisition
TopicMaps
Protégé
8Introduction to RDF
- RDF (Resource Description Framework)
- Beyond Machine readable to Machine understandable
- RDF unites a wide variety of stakeholders
- Digital librarians, content-raters, privacy
advocates, B2B industries, AI... - Significant (but less than XML) industrial
momentum, lead by W3C - RDF consists of two parts
- RDF Model (a set of triples)
- RDF Syntax (different XML serialization syntaxes)
- RDF Schema for definition of Vocabularies (simple
Ontologies) for RDF (and in RDF)
Knowledge Markup and Resource Semantics, By
Harold Boley, Stefan Decker, and Michael Sintek,
IJCAI-01 Tutorial, http//www.ijcai-01.org/
9RDF Data Model
- Resources
- A resource is a thing you talk about (can
reference) - Resources have URIs
- RDF definitions are themselves Resources
(linkage, see requirement 1) - Properties
- slots, define relationships to other resources or
atomic values - Statements
- Resource has Property with Value
- (Values can be resources or atomic XML data)
- Similar to Frame Systems
10A Simple Example
- Statement
- Ora Lassila is the creator of the resource
http//www.w3.org/Home/Lassila - Structure
- Resource (subject) http//www.w3.org/Home/Las
sila - Property (predicate) http//www.schema.org/Cre
ator - Value (object) "Ora Lassila
- Directed graph
sCreator
http//www.w3.org/Home/Lassila
11Another Example
- To add properties to Creator, point through an
intermediate Resource.
http//www.w3.org/Home/Lassila
sCreator
Person//fi/654645635
Email
Name
Ora Lassila
lassila_at_w3.org
12Collection Containers
- Multiple occurrences of the same PropertyType
dont establish a relation between the values - The Millers own a boat, a bike, and a TV set
- The Millers need (a car or a truck)
- (Sarah and Bob) bought a new car
- RDF defines three special Resources
- Bag unordered values rdfBag
- Sequence ordered values rdfSeq
- Alternative single value rdfAlt
- Core RDF does not enforce set semantics amongst
values
13Example Bag
- The students incourse 6.001 are Amy, Tim,John,
Mary,and Sue
RdfBag
rdftype
/Students/Amy
students
rdf_1
rdf_2
/Students/Tim
bagid1
rdf_3
/Students/John
rdf_4
/Students/Mary
rdf_5
/Students/Sue
14Example Alternative
- The source code for X11 may be found at
ftp.x.org, ftp.cs.purdue.edu, or ftp.eu.net
http//x.org/package/X11
rdfAlt
rdftype
source
altid
rdf_1
ftp.x.org
rdf_2
ftp.cs.purdue.edu
rdf_3
ftp.eu.net
15Statements About Statements
- Making statements about statements requires a
process for transforming them into Resources - subject the original resource
- predicate the original property
- object the original value
- type rdfStatement
16Statements About Statements
Ralph Swick says that Ora Lassila is the creator
of the resource http//www.w3.org/Home/Lassila.
ltrdfRDF xmlnsrdf"http//www.w3.org/1999/
02/22-rdf-syntax-ns" xmlnsa"http//descr
iption.org/schema/"gt ltrdfDescriptiongt
ltrdfsubject resource"http//www.w3.org/Home/Lass
ila" /gt ltrdfpredicate resource"http//descr
iption.org/schema/Creator" /gt
ltrdfobjectgtOra Lassilalt/rdfobjectgt
ltrdftype resource"http//www.w3.org/1999/02/22-r
df-syntax-nsStatement" /gt
ltaattributedTogtRalph Swicklt/aattributedTogt
lt/rdfDescriptiongt lt/rdfRDFgt
17Representation of a reified statement
Ora Lasilla
http//www.w3.org/Home/Lassila
rdfobject
rdfsubject
rdfpredicate
rdftype
rdfStatement
sCreator
aattributedTo
Ralph Swick
18Statements About Statements
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila" bagID"D_001"gt
ltsCreatorgtOra Lassilalt/sCreatorgt
ltsTitlegtOra's Home Pagelt/sTitlegt
lt/rdfDescriptiongt ltrdfDescription
aboutEach"D_001"gt ltaattributedTogtRalph
Swicklt/aattributedTogt lt/rdfDescriptiongt lt/rdf
RDFgt
19A Formal Model of RDF
- RDF itself is mathematically straightforward
- Basic Definitions
- Resources.
- Properties ?Resources
- Literals
- Statements Properties ? Resources ? Resources
? Literals - Typing
- rdftype ? Properties
- RDFtype, sub, obj ? Statements ? obj ?
Resources - for triples like p,r1,r2 the RDF spec should
use some different bracketing, like (p,r1,r2)
20Formal Model of RDF II
- Reification
- rdfStatement ? Resource-Properties
- rdfpredicate, rdfsubject, rdfobject ?
Properties - Reification of a triple pred, sub, obj of
Statements is an element r of Resources
representing the reified triple and the elements
s1, s2, s3, and s4 of Statements such that - s1 RDFpredicate, r, pred
- s2 RDFsubject, r, sub
- s3 RDFobject, r, obj
- s4 RDFtype, r, RDFStatement
- Collections
- RDFSeq, RDFBag, and RDFAlt ?
Resources-Properties - There is a subset of Properties corresponding to
the ordinals (1, 2, 3, ...) called Ord. We refer
to - elements of Ord as RDF_1, RDF_2, RDF_3, ...
21RDF Syntax I
- Data model does not enforce particular syntax
- Specification suggests many different syntaxes
based on XML - General form
Subject (OID)
Starts an RDF-Description
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila"gt ltsCreatorgtOra
Lassilalt/sCreatorgt ltscreatedWith
rdfresourcehttp//www.w3c.org/amaya/gt
lt/rdfDescriptiongt lt/rdfRDFgt
Literal
Resource (possibly another RDF-description)
Properties
22Resulting Graph
http//www.w3.org/Home/Lassila
screatedWith
sCreator
http//www.w3c.org/amaya
Ora Lassila
ltrdfRDFgt ltrdfDescription about"http//www.w3.
org/Home/Lassila"gt ltsCreatorgtOra
Lassilalt/sCreatorgt ltscreatedWith
rdfresourcehttp//www.w3c.org/amaya/gt
lt/rdfDescriptiongt lt/rdfRDFgt
23RDF Syntax II Syntactic Varieties
Typing Information
Subject (OID)
In-Element Property
ltsHomepage rdfabout"http//www.w3.org/Home/Lass
ila
sCreatorOra Lassila/gt ltscreatedWithgt
ltsHTMLEditor rdfabouthttp//www.w3c.org/a
maya/gt lt/screatedWithgt lt/sHomepagegt
rdftype
sHomepage
http//www.w3.org/Home/Lassila
Property
screatedWith
sCreator
rdftype
HTMLEditor
http//www.w3c.org/amaya
Ora Lassila
24RDF Schema
25RDF Schema (RDFS)
- RDF just defines the data model
- Need for definition of vocabularies for the data
model - an Ontology Language! - The RDF Schema mechanism provides a basic type
system for use in RDF models. - The RDF schema specification language is less
expressive, but much simpler to implement, than
full predicate calculus languages such as CycL
and KIF.
26Most Important Modeling Primitives
- Core Classes
- Root-Class rdfsResource
- MetaClass rdfsClass
- Literals rdfsLiteral
- rdfssubclassOf-property
- Inherited from RDF properties (slots)
- rdfsdomain rdfsrange
- rdfslabel, rdfscomment, etc.
- Inherited from RDF InstanceOf (rdftype)
27Classes and Properties
Resources
Property
- rdftype
- rdfssubClassOf
- rdfssubPropertyOf
- rdfscomment
- rdfslabel
- rdfsseeAlso
- rdfsisDefinedBy
Classes
- rdfsResource
- rdfsClass
- rdfProperty
- rdfsConstraintProperty
- rdfsLiteral
ConstraintProperty
Classes and Resources as Sets and Elements
28DARPA Agent Markup LanguageDAML
29DARPA Agent Markup Language Program
- DARPA funded Research Program (also funded the
Development of the ARPANNET -gt Internet) - Focusing on building the foundation for the
Semantic Web http//www.daml.org - Ontology Language DAMLOIL Result of a Joint
(European US-American) Committee - Rule Language in preparation
30DAMLOIL
- Extension of RDF Schema
- Ontology Language DAMLOIL Result of a Joint
(European US-American) Committee - Extension of RDF Schema
- Class Expressions (Intersection, Union,
Complement) - XML Schema Datatypes
- Enumerations
- Property Restrictions
- Cardinality Constraints
- Value Restrictions
31Example Intersection Synonyms
ltdamlClass rdfID"TallMan"gt ltdamlintersection
Of rdfparseType"damlcollection"gt
ltdamlClass rdfabout"TallThing"/gt
ltdamlClass rdfabout"Man"/gt
lt/damlintersectionOfgt lt/damlClassgt
ltdamlClass rdfID"HumanBeing"gt ltdamlsameClassA
s rdfresource"Person"/gt lt/damlClassgt
32Example Disjoint Complement
ltdamlDisjoint rdfparseType"damlcollection"gt lt
damlClass rdfabout"Car"/gt ltdamlClass
rdfabout"Person"/gt ltdamlClass
rdfabout"Plant"/gt lt/damlDisjointgt
Disjoint not strictly necessary, since
expressible via pairwise subClassOf of
complementOf, as for Car and Person
ltdamlClass rdfID"Car"gt ltrdfscommentgtno car
is a personlt/rdfscommentgt ltrdfssubClassOfgt lt
damlClassgt ltdamlcomplementOf
rdfresource"Person"/gt lt/damlClassgt
lt/rdfssubClassOfgt lt/damlClassgt
33Example Properties (Transitive, Inverse,
subProperty, UniqueProperty, range, Datatypes)
ltdamlTransitiveProperty rdfID"hasAncestor"/gt
ltdamlObjectProperty rdfID"hasChild"gt ltdamlinv
erseOf rdfresource"hasParent"/gt lt/damlObjectPr
opertygt
ltdamlUniqueProperty rdfID"hasMother"gt ltrdfssu
bPropertyOf rdfresource"hasParent"/gt ltrdfsran
ge rdfresource"Female"/gt lt/damlUniqueProperty
gt
ltdamlDatatypeProperty rdfID"age"gt ltrdftype
rdfresource"http//www.daml.org/2001/03/damloil
UniqueProperty"/gt ltrdfsrange
rdfresource"http//www.w3.org/.../XMLSchemanonN
egativeInteger"/gt lt/damlDatatypePropertygt
34Using User-defined Datatypes(based on XML Schema)
ltxsdsimpleType name"over17"gt lt!--over17 is an
XMLS datatype based on decimal--gt lt!--with the
added restriction that values must be gt18--gt
ltxsdrestriction base"xsddecimal"gt
ltxsdminInclusive value"18"/gt lt/xsdrestriction
gt lt/xsdsimpleTypegt
ltdamlClass rdfID"Adult"gt ltdamlintersectionOf
rdfparseType"damlcollection"gt ltdamlClass
rdfabout"Person"/gt ltdamlRestrictiongt ltda
mlonProperty rdfresource"age"/gt ltdamlhasCl
ass rdfresource"somefileover17"/gt
lt/damlRestrictiongt lt/damlintersectionOfgt
lt/damlClassgt
35Instances (Individuals)
ltdamlClass rdfID"Person"gt . .
. lt/damlClassgt
ltPerson rdfID"Adam"gt ltrdfslabelgtAdamlt/rdfsla
belgt ltrdfscommentgtAdam is a person.lt/rdfscomme
ntgt ltagegtltxsdinteger rdfvalue"13"/gtlt/agegt
ltshoesizegt ltxsddecimal rdfvalue"9.5"/gt lt/s
hoesizegt lt/Persongt
36Semantic Web Services
- Source Anupriya Ankolenkar, et al., DAML-S
Semantic Markup For Web Services,, Proceedings
of SWWS 01, the First Semantic Web Working
Symposium, California, USA, July 30 - August 1,
2001
37Web Services
38What Is DAML-S
- Users and software agents should be able to
discover, invoke, compose, and monitor Web
resources offering particular services and having
particular properties. - As part of the DARPA Agent Markup Language
program, we have begun to develop an ontology of
services, called DAML-S.
39Some Motivating Tasks
- Automatic Web service discovery
- Automatic Web service invocation
- Automatic Web service composition and
interoperation - Automatic Web service execution monitoring
40Top Level of the Service Ontology
Resource
ServiceProfile
provide
presents
(what it does)
Service
(how it works)
(how to access it)
supports
describedBy
ServiceGrounding
ServiceModel
41Process Modeling Ontology
42The Big Picture of SW
43Editing and Annotation Tools
- Protégé-2000
- OntoEdit
- OilED
- Amaya
44An Architecture of RDF Triple Data Store
45RDF Parser and Generator
- Using DCG in Prolog as the development tool
- Formal grammar in RDF MS Spec http//www.w3.org/T
R/1999/REC-rdf-syntax-19990222/grammar
Formal grammar rules in DCG
Prologs working storage
Prologs inference engine
User interface
466.1 RDF 'ltrdfRDFgt' obj
'lt/rdfRDFgt' 6.2 obj
description container 6.3 description
'ltrdfDescription' idAboutAttr? bagIdAttr?
propAttr '/gt'
'ltrdfDescription' idAboutAttr? bagIdAttr?
propAttr 'gt'
propertyElt 'lt/rdfDescriptiongt'
typedNode 6.4 container
sequence bag alternative
rdf(Objs) --gt ('lt?', (nm/'xml'nm/'XML
' nm/'xmls'nm/'XMLS'),
(nm/'version','',qs/_),
(nm/'encoding','',qs/_),
'?gt',wl('XML heading') ),
(fullSTG('RDF',NS) halfSTG('RDF',NS),
'gt' ), objStar(Objs),
(fullETG('RDF',NS) ). objStar(Out) --gt
obj(O), objStar(R),OutOR
,Out.
obj(Obj) --gt container(Obj)
description(_),getAllTriples(Obj). getAllTriples
(Obj)- findall(statement(A,B,C),statement(A,B,C),
Obj). description(_) --gt halfSTG('Descriptio
n',NS), (idAboutAttr(IdAboutAttr)),
(bagIdAttr(BagIdAttr)), propAttrStar(IdAbout
Attr), ('/gt' 'gt', propertyEltS
tar(IdAboutAttr), fullETG('Description',NS)
), reificationOfStatements(IdAboutAttr,BagI
dAttr) typedNode.
47ltrdfRDF xmlnsrdf"http//www.w3.org/1999/02/22
-rdf-syntax-ns" xmlnsdc"http//purl.org/metad
ata/dublin_core"gt ltrdfDescription
about"http//www.foo.com/cool.html"gt
ltdcCreatorgt ltrdfSeq ID"CreatorsAlphabetic
alBySurname"gt ltrdfligtMary Andrewlt/rdfligt ltrdf
ligtJacky Crystallt/rdfligt lt/rdfSeqgt
lt/dcCreatorgt ltdcIdentifiergt ltrdfBag
ID"MirroredSites"gt ltrdfli rdfresource"http/
/www.foo.com.au/cool.html"/gt ltrdfli
rdfresource"http//www.foo.com.it/cool.html"/gt
lt/rdfBaggt lt/dcIdentifiergt
ltdcTitlegt ltrdfAltgt ltrdfli
xmllang"en"gtThe Coolest Web Pagelt/rdfligt ltrdf
li xmllang"it"gtIl Pagio di Web Fubalt/rdfligt
lt/rdfAltgt lt/dcTitlegtlt/rdfDescriptiongtlt/r
dfRDFgt
RDF input
statement(about/http//www.foo.com/cool.html,
Title, alt(_87882,string/The
Coolest Web Page,
string/Il Pagio di Web Fuba)),
statement(about/http//www.foo.com/cool.html,
Identifier, bag(id/MirroredSites
,resource/http//www.foo.com.au/cool.html,
resource/http//www.foo
.com.it/cool.html)), statement(about/http//www.
foo.com/cool.html, Creator,
seq(id/CreatorsAlphabeticalBySurname,string/Mary
Andrew,
string/Jacky Crystal))
Prolog output
48RDF Statements in RDB Tables
RDF_NameSpace
RDF_Resource
RDF_Statement
RDF_Predicate
RDF_Literal
49Application Program Interfaces
- RDF Query language is syntactically verbose.
ltrdfquerygt ltrdfqFromgt ltrdfBaggt ltli
resource"http//www.research.ibm.com/people/ashok
/paper1.html"/gt ltli resource"http//www.re
search.ibm.com/people/ashok/paper3.html"/gt
ltli resource"http//www.research.ibm.com/people/n
eel/paper1.html"/gt ltli resource"http//www
.research.ibm.com/people/neel/paper7.html"/gt
lt/rdfBaggt lt/rdfqFromgt lt/rdfquerygt
Selecting all resources from a collection
50Application Program Interfaces
- We propose a set of frame-based APIs for
programmers to access the RDF repository.
get_frame - retrieves attribute values for a
frame add_frame - adds or updates attribute
values for a frame del_frame - deletes attribute
values from a frame
51User Interface
- Natural language interface is the best choice,
but is very difficult to obtain a good result. - Form-based interface is easy to implement, but is
too restricted. - Hierarchical directory browsing is perhaps a good
idea, if the domain in question is well
organized. - We also propose a frame-based query interface.
target_concept(attribute1value1, )
teacher(office6th_floor)
52Related Work
- Jena
- HP Labs in Bristol, England
- Jena is an API in the Java programming language,
for the creation and manipulation of RDF graphs - RDFSuite
- ICS, Forth, Greece
- The Validating RDF Parser (VRP)
- The RDF Schema Specific DataBase (RSSDB)
- The RDF Query Language (RQL)
53Semantic Community Portal
54Semantic Community Portal
55Semantic Community Portal
56Conceptual Architecture of an NL QA System
http//140.129.20.1138080/daml/
57Recap The Big Picture of SW
58Future Work
- RDF schema-specific validator
- Frame-based RDF schema-specific query language
- User interface
- Automatic generation of community portals
- Application of digital library and archives
- Automatic generation of FAQs
- Trust on the web
59Summary
- RDF repository
- RDF parser and generator using Prolog
- RDF triples storage in Prolog and RDB tables
- Application program interfaces
- User interfaces (inference engine)
- Building community portals
- Agent-based architecture
- Trust on the Web