Upload
albany
View
30
Download
0
Embed Size (px)
DESCRIPTION
Languages for Semantic Web. 葉慶隆 大同大學 資訊工程系所 Email: [email protected] URL: www.cse.ttu.edu.tw/chingyeh. Sources. Knowledge Markup and Resource Semantics, By Harold Boley, Stefan Decker, and Michael Sintek, IJCAI-01 Tutorial, http://www.ijcai-01.org/ - PowerPoint PPT Presentation
Citation preview
Languages for Semantic Languages for Semantic WebWeb葉慶隆葉慶隆
大同大學 資訊工程系所大同大學 資訊工程系所Email: [email protected]
URL: www.cse.ttu.edu.tw/chingyeh
Languages for Semantic Web 2
Sources
• Knowledge Markup and Resource Semantics, By Harold Boley, Stefan Decker, and Michael Sintek, IJCAI-01 Tutorial, http://www.ijcai-01.org/
• XML Fundamentals, http://www.ibiblio.org/xml/slides/sd2001east/fundamentals/XML_Fundamentals.html
• 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.
Languages for Semantic Web 3
Overview• Increasing demand
for formalized knowledge on the Web: AI’s chance!
• XML- & RDF-based markup languages provide a 'universal' storage/interchange format for such Web-distributed knowledge representation
• In this talk, we focus on Semantic Web languages: XML, RDF(S), DAML.
DTDs
XML
RDF[S]
Namespaces
Stylesheets
CSS
XSLT
XQL
Queries
XML-QL
Transformations
Acquisition
Protégé
Agents
Frames
Rules
SHOE
HornML
RuleML
DAML
XQuery
TopicMaps
Ontobroker
Languages for Semantic Web 4
Web Languages forKnowledge Capturing
• Human knowledge is (partially) captured on the Web as informal texts, semiformal documents, and structured metadata
• Each kind of knowledge has its (preferred) markup language
Knowledgeinforma
lSemiform
alMetadat
a
Language HTML XML RDF
Languages for Semantic Web 5
Web Languages forMachine Interpretation
• XML (Extensible Markup Language): Semiformal documents range between non-formatted texts and fully formatted databases
• RDF (Resource Description Framework): Structured metadata describe arbitrary heterogeneous Web pages/objects in a homogeneous manner.
Machines (e.g. search engines) can analyzeXML or RDF markups better than full HTML
Languages for Semantic Web 6
The Semantic Web Activityof the W3C
“The Semantic Web is a vision: the idea of havingdata on the Web defined and linked in a way thatit can be used by machines not just for display purposes,but for
• automation,• integration and• reuse of data across various applications.”
(http://www.w3.org/2001/sw/Activity)
Languages for Semantic Web 7
The Semantic Web Layered Architecture
(http://www.w3.org/2001/Talks/0228-tbl/slide5-0.html)
Tim Berners-Lee:“Axioms, Architecture and Aspirations”W3C all-working group plenary Meeting28 February 2001
XML Fundamentals
Source: http://www.ibiblio.org/xml/slides/sd2001east/fundamentals/XML_Fundamentals.html
Languages for Semantic Web 9
What is XML?
• Extensible Markup Language• A syntax for documents • A Meta-Markup Language• A Structural and Semantic language, not a
formatting language• Not just for Web pages
Languages for Semantic Web 10
Extensible Markup Language
• Language – It has a grammar– It has a vocabulary (sort of)– It can be parsed by machines
• Markup Language– It says what things are; not what they do– It is not a programming language– It is not compiled
• Extensible – You can add words to the language
Languages for Semantic Web 11
XML is a Meta Markup Language
• Not like HTML, troff, LaTeX• Make up the tags you need as you need them• The tags you create can be documented in a Docu
ment Type Definition (DTD)• A meta syntax for domain-specific markup languag
es like MusicML, MathML, and XHTML
Languages for Semantic Web 12
XML Applications
• A specific markup language that uses the XML meta-syntax is called an XML application
• Different XML applications have their own more constricted syntaxes and vocabularies within the broader XML syntax
• Further syntax can be layered on top of this; e.g. data typing through schemas
Languages for Semantic Web 13
XML describes structure and semantics, not formatting
• XML documents form a tree– Document Object Model (DOM)
• Element and attribute names reflect the kind of the element– DTD, Schema
• Formatting can be added with a style sheet– Cascading Style Sheets (CSS)– Extensible Stylesheet language (XSL)
Languages for Semantic Web 14
XML Hypertext
• A Uniform Resource Identifier (URI) names or locates a resource
• An XLink defines connections between two or more documents identified by URIs
• XPath identifies particular nodes within a document
• An XPointer adds an XPath to a URI• XBase defines the URI against which relative URIs a
re resolved • XInclude embeds a document identified by a URI in
side an XML document.
Languages for Semantic Web 15
A Song Description in HTML
<dt>Hot Cop<dd> by Jacques Morali, Henri Belolo, and Victor Willis<ul><li>Producer: Jacques Morali<li>Publisher: PolyGram Records<li>Length: 6:20<li>Written: 1978<li>Artist: Village People</ul>
Languages for Semantic Web 16
A Song Description in XML
<SONG> <TITLE>Hot Cop</TITLE> <COMPOSER>Jacques Morali</COMPOSER> <COMPOSER>Henri Belolo</COMPOSER> <COMPOSER>Victor Willis</COMPOSER> <PRODUCER>Jacques Morali</PRODUCER> <PUBLISHER>PolyGram Records</PUBLISHER> <LENGTH>6:20</LENGTH> <YEAR>1978</YEAR> <ARTIST>Village People</ARTIST></SONG>
Languages for Semantic Web 17
Style Sheets Provide Formatting(CSS)
SONG {display: block; font-family: New York, Times New Roman, serif}TITLE {display: block; font-size: 24pt; font-weight: bold; font-family: Helvetica, sans}COMPOSER {display: block}PRODUCER {display: block}YEAR {display: block}PUBLISHER {display: block}LENGTH {display: block}ARTIST {display: block; font-style: italic}
Languages for Semantic Web 18
Attaching Style Sheets to Documents
<?xml-stylesheet type="text/css" href="song.css"?><SONG> <TITLE>Hot Cop</TITLE> <COMPOSER>Jacques Morali</COMPOSER> <COMPOSER>Henri Belolo</COMPOSER> <COMPOSER>Victor Willis</COMPOSER> <PRODUCER>Jacques Morali</PRODUCER> <PUBLISHER>PolyGram Records</PUBLISHER> <LENGTH>6:20</LENGTH> <YEAR>1978</YEAR> <ARTIST>Village People</ARTIST></SONG>
Languages for Semantic Web 19
An XSLT Stylesheet (Part 1)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <html> <head><title>Song</title></head> <body> <xsl:apply-templates select="SONG"/> </body> </html> </xsl:template>
Languages for Semantic Web 20
An XSLT Stylesheet (Part 2) <xsl:template match="SONG"> <h1> <xsl:value-of select="TITLE"/> by the <xsl:value-of select="ARTIST"/> </h1> <ul> <li>Length: <xsl:value-of select="LENGTH"/></li> <li>Producer: <xsl:value-of select="PRODUCER"/></li> <li>Publisher: <xsl:value-of select="PUBLISHER"/></li> <li>Year: <xsl:value-of select="YEAR"/></li> <xsl:apply-templates select="COMPOSER"/> </ul> </xsl:template>
<xsl:template match="COMPOSER"> <li>Composer: <xsl:value-of select="."/></li> </xsl:template></xsl:stylesheet>
Languages for Semantic Web 21
Transforming the Document<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Song</title> </head> <body> <h1>Hot Cop by the Village People </h1> <ul> <li>Length: 6:20</li> <li>Producer: Jacques Morali</li> <li>Publisher: PolyGram Records</li> <li>Year: 1978</li> <li>Composer: Jacques Morali</li> <li>Composer: Henri Belolo</li> <li>Composer: Victor Willis</li> </ul> </body></html>
XSLT Processor
(IE 5)
XSL document(template rules)
XML document
Output
Languages for Semantic Web 22
A DTD for Songs
<!ELEMENT SONG (TITLE, COMPOSER+, PRODUCER*, PUBLISHER*, LENGTH?, YEAR?, ARTIST+)>
<!ELEMENT TITLE (#PCDATA)>
<!ELEMENT COMPOSER (#PCDATA)><!ELEMENT PRODUCER (#PCDATA)><!ELEMENT PUBLISHER (#PCDATA)><!ELEMENT LENGTH (#PCDATA)><!-- This should be a four digit year like "1999", not a two-digit year like "99" --><!ELEMENT YEAR (#PCDATA)>
<!ELEMENT ARTIST (#PCDATA)>
Languages for Semantic Web 23
Well-formedness
• Rules:– Open and close all tags– Empty tags end with />– There is a unique root element– Elements may not overlap– Attribute values are quoted– < and & are only used to start tags and entities– Only the five predefined entity references are used– Plus more...
Languages for Semantic Web 24
Validity
• To be valid an XML document must be1. Well-formed2. Must have a Document Type Definition
(DTD)3. Must comply with the constraints specified
in the DTD
Languages for Semantic Web 25
What Is XML Used for?
• Domain-Specific Markup Languages– XML in industrial applications: http://www.xml.org/xml/in
dustry_industrysectors.jsp• Self-Describing Data
– Much data is lost due to format problems.• Interchange of Data Among Applications
– Electronic business: RosettaNet, ebXML
Languages for Semantic Web 26
XML Namespaces• XML namespaces are akin to namespaces,
packages, and modules in programming languages
• Disambiguation of tag–and attribute–names from different XML applications (“spaces”) through different prefixes
• A prefix is separated from the local name by a “:”, obtaining prefix:name tags
• Namespaces constitute a layer on top of XML 1.0, since prefix:name is again a valid tag name and namespace bindings are ignored by some tools
Languages for Semantic Web 27
Namespace Bindings
• Prefixes are bound to namespace URIs by attaching an xmlns:prefix attribute to the prefixed
element or one of its ancestors, prefix:name1 ,...,
prefix:namen
• The value of the xmlns:prefix attribute is a URI, which may or (unlike for DTDs!) may not point to a description of the namespace’s syntax
• An element can use bindings for multiple name-
spaces via attributes xmlns:prefix1 ,...,
xmlns:prefixm
Languages for Semantic Web 28
Two-Namespace Example: Snail-Mail and Telecoms Address Parts
<mail:address xmlns:mail="http://www.deutschepost.de/" xmlns:tele="http://www.telekom.de/"> <mail:name>Xaver M. Linde</mail:name> <mail:street>Wikingerufer 7</mail:street> <mail:town>10555 Berlin</mail:town> <mail:bill>12.50</mail:bill> <tele:phone>030/1234567</tele:phone> <tele:phone>030/1234568</tele:phone> <tele:fax>030/1234569</tele:fax> <tele:bill>76.20</tele:bill></ mail:address>
bill disambiguation through mail and tele prefixes
Resource Description Framework
RDFSource: Knowledge Markup and Resource Semantics,By Harold Boley, Stefan Decker, and Michael Sintek,IJCAI-01 Tutorial, http://www.ijcai-01.org/
Languages for Semantic Web 30
Outline
• Motivation: Why XML is not enough
• Introduction to RDF
– Requirements for KR on the Web
– The RDF Data Model
– RDF Schema
• Extensions of RDF(S)
• Tools for RDF and RDF Schema
– Parser, Query, and Inference Engines
Languages for Semantic Web 31
Why The Shift Towards More Semantics?
• Information Overload
– Information on the Web currently aiming at Human
Consumption
– Information Consumption is too time consuming
• Search Engines fail more and more
– combined coverage is less than 42% of the HTML-Web
• Data Interchange growing (e.g. B2B)
– needs a common semantics
Languages for Semantic Web 32
Extensible Markup Language (XML) Revisited
• Key idea: separate structure from presentation
• XML DTDs or Schemas define document structure
• Replace HTML with two things• A domain specific markup language (defined in XML)
• A map from that markup language to HTML (defined using XSLT)
• DTD enables document recipients to tell whether they’ve received a grammar-conforming document– Gives a minimal level of validation
Languages for Semantic Web 33
Why XML is Not Enough
• Main advantage of using XML is reusing the
parser
and document validation
• Many different possibilities to encode a domain
of discourse
• Leads to difficulties when understanding of
foreign documents is required
==> Next step: separate content from structure!
Languages for Semantic Web 34
Encoding of Knowledge: Example
http://www.w3.org/Home/Lassila Creator
Endless encoding possibilities in XML:
“The Creator of the Resource “http://www.w3.org/Home/Lassila” is Ora Lassila
Ora Lassila
<Creator> <uri>http://www.w3.org/Home/Lassila</uri> <name>Ora Lassila</name></Creator><Document uri=“http://www.w3.org/Home/Lassila” <Creator>Ora Lassila</Creator></Document>
<Document uri=“http://www.w3.org/Home/Lassila” Creator=“Ora Lassila”/>
Languages for Semantic Web 35
Point to Point Communicationfor Machine-Understandable
Data
Translation Step
<xsd:schema xmlns:xsd="http://..."> <xsd:annotation> A-Schema
</xsd:...</xsd:schema>
Conceptual Domain Model(Objects and Relations)
DTD or XML Schema
Deployment
Recipient using DTD A
XML-based Communicationusing DTD A
Sender using DTD A
XML-Parser
Parse Tree
Person is_a Mammal Student is_a Person ----
Common Semantics
Languages for Semantic Web 36
Many Previously Unknown Communication Partners
Languages for Semantic Web 37
New Partners Don’t Understand Each Other
XML-based Communicationusing DTD A
Sender using DTD A Recipient using DTD A
XML-Parser
Parse Tree
Communication Partner using DTD B
? ?
Communication Partner using DTD C
?
Languages for Semantic Web 38
Merging Steps Between Models
<xsd:schema xmlns:xsd="http://..."> <xsd:annotation>A-Schema
</xsd:...</xsd:schema>
<xsd:schema xmlns:xsd="http://..."> <xsd:annotation>B-Schema
</xsd:...</xsd:schema>
<xsl:stylesheet version="1.0” xmlns:xsl="http://....Transform" <xsl:template match="/"> .... </xsl:template></xsl:stylesheet>
<xsl:stylesheet version="1.0” xmlns:xsl="http://....Transform" <xsl:template match="/"> .... </xsl:template></xsl:stylesheet>
Matching
Reengineeringof the conceptual model
XML Document Translation Generation(e.g. in XSLT)
DTD A DTD B
XML Document Translation fromDTD A to DTD B(and B to A)
Steps
Matching
Languages for Semantic Web 39
Merging/Aligning Models
• Reengineering step is costly and unnecessary,
when a conceptual language is in use
• Generation document translation procedures is
again complicated and unnecessary
==> use a level on top of XML
• What are requirements for such a level?
Languages for Semantic Web 40
Postulates: Fundamental Requirements for KR on the Web
1. Knowledge on the Web is distributed (link Knowledge on the Web)
2. Knowledge on the Web is biased - there is no universal truth it must be possible to dispute statements
3. Many different user communities: Extensibility and Simplicity
==> Resource Description Framework (RDF)
Languages for Semantic Web 41
Introduction 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)
Languages for Semantic Web 42
RDF Data Model• Resources
– A resource is a thing you talk about (can reference)– Resources have URI’s– 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
Languages for Semantic Web 43
A 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/Lassila– Property (predicate) http://www.schema.org/#Creator– Value (object) "Ora Lassila”
• Directed graph
http://www.w3.org/Home/Lassilas:Creator
Ora Lassila
Languages for Semantic Web 44
Another Example
• To add properties to Creator, point through an intermediate Resource.
http://www.w3.org/Home/Lassila
s:Creator
Person://fi/654645635
Name
Ora Lassila [email protected]
Languages for Semantic Web 45
Collection Containers
• Multiple occurrences of the same PropertyType don’t 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 rdf:Bag
– Sequence ordered values rdf:Seq
– Alternative single value rdf:Alt• Core RDF does not enforce ‘set’ semantics amongst
values
Languages for Semantic Web 46
Example: Bag
• The students incourse 6.001 are Amy, Tim,John, Mary,and Sue
Rdf:Bag
/Students/Amy
/Students/Tim
/Students/John
/Students/Mary
/Students/Sue
bagid1
/courses/6.001
students
rdf:type
rdf:_1
rdf:_2
rdf:_3
rdf:_4
rdf:_5
Languages for Semantic Web 47
Example: 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/X11rdf:Alt
ftp.x.org
ftp.cs.purdue.edu
ftp.eu.net
altid
rdf:type
rdf:_1
rdf:_2
rdf:_3
source
Languages for Semantic Web 48
Statements About Statements (Requirement 2: Dispute
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 rdf:Statement
Languages for Semantic Web 49
A Formal Model of RDF
• RDF itself is mathematically straightforward:
– Basic Definitions• Resources. • Properties Resources • Literals• Statements = Properties Resources {Resources
Literals}
– Typing• rdf:type Properties • {RDF:type, sub, obj} Statements obj Resources
– for triples like {p,r1,r2} the RDF spec should use some different bracketing, like (p,r1,r2)
Languages for Semantic Web 50
Formal Model of RDF II
– Reification• rdf:Statement Resource-Properties• {rdf:predicate, rdf:subject, rdf:object } 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: {RDF:predicate, r, pred}– s2: {RDF:subject, r, sub} – s3: {RDF:object, r, obj} – s4: {RDF:type, r, [RDF:Statement]}
– Collections• { RDF:Seq, RDF:Bag, and RDF:Alt } 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, ...
Languages for Semantic Web 51
RDF Syntax I
• Data model does not enforce particular syntax• Specification suggests many different syntaxes
based on XML• General form:
<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> <s:createdWith rdf:resource=“http://www.w3c.org/amaya”/> </rdf:Description></rdf:RDF>
Starts an RDF-Description
Properties
Subject (OID)
Literal
Resource (possibly another RDF-description)
Languages for Semantic Web 52
Resulting Graph
<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> <s:createdWith rdf:resource=“http://www.w3c.org/amaya”/> </rdf:Description></rdf:RDF>
http://www.w3c.org/amaya
http://www.w3.org/Home/Lassila
Ora Lassila
s:createdWiths:Creator
Languages for Semantic Web 53
RDF Syntax II: Syntactic Varieties
<s:Homepage rdf:about="http://www.w3.org/Home/Lassila” s:Creator=“Ora Lassila”/>
<s:createdWith> <s:HTMLEditor rdf:about=“http://www.w3c.org/amaya”/> </s:createdWith> </s:Homepage>
Typing InformationIn-Element Property
Property
Subject (OID)
http://www.w3c.org/amaya
http://www.w3.org/Home/Lassila
Ora Lassila
s:createdWiths:Creator
HTMLEditor
s:Homepagerdf:type
rdf:type
Languages for Semantic Web 54
RDF Schema (RDFS)
• RDF just defines the data model
• Need for definition of vocabularies for the data
model - an Ontology Language!
• RDF schemas are Web resources (and have
URIs) and can be described using RDF
Languages for Semantic Web 55
Most Important Modeling Primitives
• Core Classes– Root-Class rdfs:Resource
– MetaClass rdfs:Class
– Literals rdfs:Literal
• rdfs:subclassOf-property
• Inherited from RDF: properties (slots)• rdfs:domain & rdfs:range• rdfs:label, rdfs:comment, etc.
• Inherited from RDF: InstanceOf (rdf:type)
Languages for Semantic Web 56
RDF-Schema: Example
rdfs:Resource
xyz:MotorVehicle rdfs:Class
s s t
t
xyz:Truck
s
t
xyz:PassengerVehicle
s = rdfs:subClassOf t = rdf:type
xyz:Van s
s
xyz:MiniVan s
s
t t
t
t
Languages for Semantic Web 57
Extensibility of RDF
• Define an Ontology of your Language with RDF
Schema (like RDF-Schema itself)
• Describe Instance Data using your new
Vocabulary
• Advantage: all Languages use the same Data
Model (simplifies Interoperability)
Languages for Semantic Web 58
Protégé-2000 as RDF[S]-Editor
<rdfs:Class rdf:about="&mv;MotorVehicle"> <rdfs:subClassOf rdf:resource="&rdfs;Resource"/></rdfs:Class>
<rdfs:Class rdf:about="&mv;PassengerVehicle"> <rdfs:subClassOf rdf:resource="&mv;MotorVehicle"/></rdfs:Class>
<rdf:Property rdf:about="&mv;rearSeatLegRoom" a:maxCardinality="1" a:range="integer"> <rdfs:domain rdf:resource="&mv;MotorVehicle"/> <rdfs:range rdf:resource="&rdfs;Literal"/></rdf:Property>
Languages for Semantic Web 59
Ontology Languages on Top of RDF:The Principle
Definition uses the data model of
Defined in terms of
RDF
RDF SchemaOntologyLanguage
Instance Data
Is extension of
Legend:
Languages for Semantic Web 60
The Semantic Web
• A Web of machine understandable Data, based on declarative languages on top of RDF (all use the same data model!)• Intelligent Agent enabling architecture• W3C’s vision for the Semantic Web Architecture:
DARPA Agent Markup DARPA Agent Markup LanguageLanguage
DAMLDAML
Languages for Semantic Web 62
DARPA Agent Markup Language Program
• DARPA funded Research Program (also funded the Development of the ARPANNET -> Internet)
• Focusing on building the foundation for the Semantic Web: http://www.daml.org
• Ontology Language DAML+OIL: Result of a Joint (European + US-American) Committee
• Rule Language in preparation
Languages for Semantic Web 63
DAML+OIL
• Extension of RDF Schema• Ontology Language DAML+OIL: 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
Languages for Semantic Web 64
Example: Intersection & Synonyms
<daml:Class rdf:ID="TallMan"> <daml:intersectionOf rdf:parseType="daml:collection">
<daml:Class rdf:about="#TallThing"/> <daml:Class rdf:about="#Man"/>
</daml:intersectionOf> </daml:Class>
<daml:Class rdf:ID="HumanBeing"><daml:sameClassAs rdf:resource="#Person"/>
</daml:Class>
Languages for Semantic Web 65
Example: Disjoint & Complement<daml:Disjoint rdf:parseType="daml:collection"><daml:Class rdf:about="#Car"/> <daml:Class rdf:about="#Person"/> <daml:Class rdf:about="#Plant"/>
</daml:Disjoint>
<daml:Class rdf:ID="Car"><rdfs:comment>no car is a person</rdfs:comment> <rdfs:subClassOf>
<daml:Class><daml:complementOf rdf:resource="#Person"/>
</daml:Class> </rdfs:subClassOf>
</daml:Class>
Disjoint not strictly necessary, since expressible via pairwise subClassOfof complementOf, as for Car and Person:
Languages for Semantic Web 66
Example: Properties (Transitive, Inverse, subProperty, UniqueProperty, range,
Datatypes)
<daml:TransitiveProperty rdf:ID="hasAncestor"/>
<daml:ObjectProperty rdf:ID="hasChild"><daml:inverseOf rdf:resource="#hasParent"/>
</daml:ObjectProperty>
<daml:UniqueProperty rdf:ID="hasMother"><rdfs:subPropertyOf rdf:resource="#hasParent"/><rdfs:range rdf:resource="#Female"/>
</daml:UniqueProperty>
<daml:DatatypeProperty rdf:ID="age"><rdf:type rdf:resource="http://www.daml.org/2001/03/daml+oil#UniqueProperty"/><rdfs:range rdf:resource="http://www.w3.org/.../XMLSchema#nonNegativeInteger"/>
</daml:DatatypeProperty>
Languages for Semantic Web 67
Using User-defined Datatypes(based on XML Schema)
<xsd:simpleType name="over17"><!--over17 is an XMLS datatype based on decimal--> <!--with the added restriction that values must be >=18--> <xsd:restriction base="xsd:decimal"> <xsd:minInclusive value="18"/> </xsd:restriction>
</xsd:simpleType>
<daml:Class rdf:ID="Adult"><daml:intersectionOf rdf:parseType="daml:collection">
<daml:Class rdf:about="#Person"/> <daml:Restriction><daml:onProperty rdf:resource="#age"/><daml:hasClass rdf:resource="somefile#over17"/>
</daml:Restriction> </daml:intersectionOf> </daml:Class>
Languages for Semantic Web 68
Instances (Individuals)<Person rdf:ID="Adam">
<rdfs:label>Adam</rdfs:label> <rdfs:comment>Adam is a person.</rdfs:comment> <age><xsd:integer rdf:value="13"/></age> <shoesize>
<xsd:decimal rdf:value="9.5"/></shoesize>
</Person>
<daml:Class rdf:ID="Person"> . . .</daml:Class>
Languages for Semantic Web 69
Protégé as OIL-Editor
• supports following subset of OIL:
– class definitions with subclass and slot constraints (property restrictions) with• class expressions: and, or, not, class[names], slot constraints, top, and bottom
• slot constraints: has-value, value-type, max-cardinality, min-cardinality, cardinality
• missing: concrete-type-exp, filler-exp
– slot definitions: • subslot-of, inverse (using Protégé's inverse slot mechanism), domain, range
• properties (transitive, symmetric, functional)
– global axioms (disjoint, covered, disjoint-covered, equivalent)
– missing: instance-of, related
• special widgets for displaying OIL expressions
• connects to FaCT description logic classifier for classification and satisfiability checking
• generates SHIQ LaTeX output
Application:Semantic 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
Languages for Semantic Web 71
Web Services
Serviceregistry
Servicerequester
Serviceprovider
FindWSDL, UDDI
PublishWSDL, UDDI
Bind
Servicedescriptions
Servicedescriptions
Services
Languages for Semantic Web 72
What 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.
Languages for Semantic Web 73
Some Motivating Tasks
• Automatic Web service discovery• Automatic Web service invocation• Automatic Web service composition and
interoperation• Automatic Web service execution
monitoring
Languages for Semantic Web 74
Top Level of the Service Ontology
Service
Resource
ServiceGrounding
ServiceProfile
ServiceModel
provide presents
supports
describedBy
(what it does)
(how it works)
(how to access it)
Languages for Semantic Web 75
Process Modeling Ontology
Languages for Semantic Web 76
Summary