1 Foundations III: Languages, Tools and Services Deborah McGuinness and Peter Fox (NCAR)...

Post on 25-Dec-2015

220 views 2 download

Transcript of 1 Foundations III: Languages, Tools and Services Deborah McGuinness and Peter Fox (NCAR)...

1

Foundations III: Languages, Tools and Services

Deborah McGuinness and Peter Fox (NCAR)

CSCI-6962-01

Week 5, 2008

Review of reading Assignment• Ontology Tool Summary, Pellet, OWL-S,

Wine Agent

• Assignment

• Any comments, questions?

2

Contents• Review of reading, comments, questions?

• Languages (including SPARQL – Greg)

• Tools (including Triple Stores – Jesse)

• Services (including demos – Wine Agent – James)

• Summary and assignments

3

4

Semantic Web Methodology and Technology Development Process

• Establish and improve a well-defined methodology vision for Semantic Technology based application development

• Leverage controlled vocabularies, et c.

Use Case

Small Team, mixed skills

Analysis

Adopt Technology Approach

Leverage Technology

Infrastructure

Rapid Prototype

Open World: Evolve, Iterate,

Redesign, Redeploy

Use Tools

Science/Expert Review & Iteration

Develop model/

ontology

5

Semantic Web Layers

http://www.w3.org/2003/Talks/1023-iswc-tbl/slide26-0.html, http://flickr.com/photos/pshab/291147522/

Languages• OWL

• RDFS

• SKOS

• RIF

• SPARQL

• OWL-S

6

RDFS• Note: XMLS not an ontology language

– Changes format of DTDs (document schemas) to be XML

– Adds an extensible type hierarchy• Integers, Strings, etc.• Can define sub-types, e.g., positive integers

• RDFS is recognisable as an ontology language– Classes and properties– Sub/super-classes (and properties)– Range and domain (of properties) 7

However• RDFS too weak to describe resources in sufficient

detail– No localized range and domain constraints

• Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants

– No existence/cardinality constraints• Can’t say that all instances of person have a mother that is also a

person, or that persons have exactly 2 parents

– No transitive, inverse or symmetrical properties• Can’t say that isPartOf is a transitive property, that hasPart is the

inverse of isPartOf or that touches is symmetrical

– …

• Difficult to provide reasoning support– No “native” reasoners for non-standard semantics

– May be possible to reason via First Order axiomatisation8

OWL requirementsDesirable features identified for Web Ontology

Language:

• Extends existing Web standards – Such as XML, RDF, RDFS

• Easy to understand and use– Should be based on familiar KR idioms

• Formally specified

• Of “adequate” expressive power

• Possible to provide automated reasoning support9

The OWL language:• Three species of OWL

– OWL full is union of OWL syntax and RDF– OWL DL restricted to FOL fragment (¼ DAML+OIL)– OWL Lite is “easier to implement” subset of OWL DL

• Semantic layering– OWL DL ¼ OWL full within DL fragment– DL semantics officially definitive

• OWL DL based on SHIQ Description Logic– In fact it is equivalent to SHOIN(Dn) DL

• OWL DL Benefits from many years of DL research– Well defined semantics– Formal properties well understood (complexity, decidability)– Known reasoning algorithms– Implemented systems (highly optimized)

10

OWL Class Constructors

11

OWL axioms

12

SKOS properties• skos:note

e.g. ‘Anything goes.’

• skos:definitione.g. ‘A long curved fruit with a yellow skin and soft, sweet white flesh inside.’

• skos:examplee.g. ‘A bunch of bananas.’

• skos:scopeNotee.g. ‘Historically members of a sheriff's retinue armed with pikes who escorted judges

at assizes.’

• skos:historyNotee.g. ‘Deleted 1986. See now Detention, Institutionalization (Persons), or

Hospitalization.’

• skos:editorialNotee.g. ‘Confer with Mr. X. re deletion.’

• skos:changeNotee.g. ‘Promoted “love” to preferred label, demoted “affection” to alternative label, Joe

Bloggs, 2005-08-09.’

13

SKOS core and RDFS/OWL• Disjoint?

– Should skos:Concept be disjoint with …• rdf:Property ?• rdfs:Class ?• owl:Class ?

• DL?– Should SKOS Core be an OWL DL ontology?

• Means not allowing flexibility in range of documentation props

– It is now (2008)!

14

16

Query• Querying knowledge representations in OWL and/or

RDF• OWL-QL (for OWL)

http://projects.semwebcentral.org/projects/owl-ql/ • SPARQL for RDF http://www.sparql.org/ and

http://www.w3.org/TR/rdf-sparql-query/ – Now a W3C Candidate Recommendation 14 June 2007!

• XQUERY (for XML)• SeRQL (for SeSAME)• RDFQuery (RDF)• Few as yet for natural language representations

(ROO – Dolbear, et al., …)

SPARQL (Greg)•

Summaries

• Michael Denny’s Table: (a bit out of date)

• http://www.xml.com/2004/07/14/examples/Ontology_Editor_Survey_2004_Table_-_Michael_Denny.pdf

• ESW Wiki: http://esw.w3.org/topic/SemanticWebTools

19

Editors• Protégé (http://protégé.stanford.edu)• SWOOP (http://mindswap.org/2004/SWOOP; see

also http://www.mindswap.org/downloads/)• Altova SemanticWorks (

http://www.altova.com/download/semanticworks/semantic_web_rdf_owl_editor.html)

• SWeDE (http://owl-eclipse.projects.semwebcentral.org/InstallSwede.html), goes with Eclipse

• Medius• TopBraid Composer and other commercial tools• CMAP Ontology Editor (COE) (http://

cmap.ihmc.us/coe)

CMAP Demo•

Protégé Demo

•http://protege.stanford.edu/•http://protegewiki.stanford.edu/index.php/Protege-OWL•Please check version compatibility when choosing.

•Do you have plugins you like?

•(Prompt not compatible with version 4.0)

22

Triple Stores• Jena (http://jena.sourceforge.net/)

• SeSAME/SAIL (http://www.openrdf.org/)

• KOWARI (http://www.kowari.org/) ->

• Mulgara (http://www.mulgara.org/)

• Redland (http://librdf.org/index.html)

• Oracle (!)

• Many others (relational, object-relational)

Triple Stores (Jesse)

24

Software development tools• Protégé, w/ plug-ins - some better than

others• SWOOP (OWL analyzer – species validator,

partitioner)• Jena (http://jena.sourceforge.net/)• Eclipse (full integrated development

environment for Java; http://www.eclipse.org/)• Top Quadrant suite• Sandsoft (Sandpiper Software)• … see Semantic Technologies 2007

25

Reasoners (aka Inference engines)

• Pellet **• Racer (and Racer Pro) **• SHER (IBM)

http://www.alphaworks.ibm.com/tech/sher • Medius KBS• FACT++• fuzzyDL• KAON2• MSPASS• QuOnto• Jess (for Rules)• …

26

Services• Ontologies of services, provides:

– What does the service provide for prospective clients? The answer to this question is given in the "profile," which is used to advertise the service. To capture this perspective, each instance of the class Service presents a ServiceProfile.

– How is it used? The answer to this question is given in the "process model." This perspective is captured by the ServiceModel class. Instances of the class Service use the property describedBy to refer to the service's ServiceModel.

– How does one interact with it? The answer to this question is given in the "grounding." A grounding provides the needed details about transport protocols. Instances of the class Service have a supports property referring to a ServiceGrounding.

27

Services, not standard…• Now 4 submissions to W3C

– OWL-S - http://www.w3.org/Submission/OWL-S (updated journal publication - http://springerlink.com/content/wp8q2133g5725340/ )

– SWSO/F/L - Semantic Web Services Ontology/Framework/Language - http://www.w3.org/Submission/SWSF/

– WSMO/X/L - Web Services Modeling Ontology/Exection/Language - http://www.w3.org/Submission/WSMX/ www.wsmo.org, www.wsmx.org

– SAWSDL - (WSDL-S)

28

Explanation, Proof (path to Trust)

• Proof markup language (PML)– an interlingua representation for justifications of

results produced by Semantic Web services

• Not W3C, but no competition

• Implemented in InferenceWeb (http://iw.stanford.edu)

• CWM and N3 and theorem provers - not yet adapted to OWL-based languages

Integrated Semantically-Enabled Agents

Wine Agent receives a meal description and retrieves a selection of matching wines available on the Web, using an ensemble of standards and tools

OWL for representing a domain ontology of foods, wines, their properties, and relationships between them

JTP theorem prover for deriving appropriate pairings

OWL-QL for querying a knowledge base

Inference Web for explaining and validating the response

Web Services for interfacing with vendors

Utilities for conducting and caching the above transactions

KSL Wine Agent – Semantic Interoperability

Wine Agent ProcessingGiven a description of a meal• Use OWL-QL/DQL to state a

premise (the meal) and query the knowledge base for a suggestion for a wine description or set of instances

• Use JTP to deduce answers (and proofs)

• Use Inference Web to explain results (descriptions, instances, provenance, reasoning engines, etc.)

• Access relevant web sites (wine.com, …) to access current information

• Use OWL-S for markup and protocol*

Results<rdfs:Class rdf:ID="BLAND-FISH-COURSE"> <daml:intersectionOf rdf:parseType="daml:collection"> <rdfs:Class rdf:about="#MEAL-COURSE"/> <daml:Restriction> <daml:onProperty rdf:resource="#FOOD"/> <daml:toClass rdf:resource="#BLAND-FISH"/> </daml:Restriction> </daml:intersectionOf> <rdfs:subClassOf rdf:resource="#DRINK-HAS-DELICATE-FLAVOR-

RESTRICTION"/></rdfs:Class><rdfs:Class rdf:ID="BLAND-FISH"> <rdfs:subClassOf rdf:resource="#FISH"/> <daml:disjointWith rdf:resource="#NON-BLAND-FISH"/></rdfs:Class><rdf:Description rdf:ID="FLOUNDER"> <rdf:type rdf:resource="#BLAND-FISH"/></rdf:Description><rdfs:Class rdf:ID="CHARDONNAY"> <rdfs:subClassOf rdf:resource="#WHITE-COLOR-RESTRICTION"/> <rdfs:subClassOf rdf:resource="#MEDIUM-OR-FULL-BODY-RESTRICTION"/> <rdfs:subClassOf rdf:resource="#MODERATE-OR-STRONG-FLAVOR-

RESTRICTION"/> […]</rdfs:Class><rdf:Description rdf:ID="BANCROFT-CHARDONNAY"> <rdf:type rdf:resource="#CHARDONNAY"/> <REGION rdf:resource="#NAPA"/> <MAKER rdf:resource="#BANCROFT"/> <SUGAR rdf:resource="#DRY"/> […]</rdf:Description>

Querying Multiple Online Sources

TW Wine Agent – Semantic Interoperability

• RDF and OWL used for encoding wine/food listings and pairing recommendations

• Semantic MediaWiki for publishing user-contributed recommendations

• Pellet used for deriving knowledge using wine ontology and recommendations

• SPARQL used for querying wine/food listings with recommendations

• Inference Web for explaining TW Wine Agent’s intelligent behavior

Wine Agent receives a meal description and retrieves a selection of matching wines available on the Web, using an ensemble of standards and tools

Social Semantic Web Data Publishing

Collaborative wine recommendations• Using Semantic MediaWiki to

manage users and user-contributed food/wine pairings recommendations

• Using semantic form to add OWL instance data

Semantic Query:Food Hierarchy and Recommendation

Wine Agent ProcessingGiven a description of a meal

• Combine wine ontology and the OWL data published at Wiki

• Use Pellet and SPARQL to state a premise (the meal) and query the knowledge base for a suggestion for a wine description or a set of wine instances

• Use Inference Web to explain results (descriptions, instances, provenance, reasoning engines, etc.)

Observations from the Wine Agent• Background knowledge is reasonably simple and built in OWL (includes

food, wine and pairing information similar to the OWL Guide, Ontology Engineering 101, CLASSIC Tutorial, …)

• Background knowledge can be used for simple query expansion over wine sources to retrieve for example documents about red wines (including zinfandel, syrah, …)

• Background knowledge used to interact with structured queries such as those possible on wine.com

• Constraints allows a reasoner like Pellet to infer consequences of the premises and query.

• Explanation system (Inference Web) can provide provenance information such as information on the knowledge source (McGuinness’ wine ontology) and data sources (such as wine.com)

• Services work could allow automatic “matchmaking” instead of hand coded linkages with web resources

TW Wine Agent (James)

40

Assignments for Week 5

• Reading: Ontology Evolution