Foundations: Semantic Modeling Languages and Provenance Deborah McGuinness Semantic eScience Fall 2012 Week 9, Oct.

Download Report

Transcript Foundations: Semantic Modeling Languages and Provenance Deborah McGuinness Semantic eScience Fall 2012 Week 9, Oct.

Foundations: Semantic
Modeling Languages and
Provenance
Deborah McGuinness
Semantic eScience Fall 2012
Week 9, Oct. 29, 2012
1
Review of reading Assignment
• Any comments, questions?
2
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.
Rapid
Open World:
Evolve, Iterate, Prototype
Redesign,
Redeploy
Leverage
Technology
Infrastructure
Adopt
Science/Expert
Technology
Approach Review & Iteration
Use Tools
Analysis
Use Case
Small Team,
mixed skills
Develop
model/
ontology
3
Semantic Web Layers
4
http://www.w3.org/2003/Talks/1023-iswc-tbl/slide26-0.html, http://flickr.com/photos/pshab/291147522/
Languages
• RDFS – Resource Description Framework
Schema
• OWL – Web Ontology Language OWL
• SKOS – Simple Knowledge Organization
System
• RIF – Rule Interchange Framework
• SPARQL- SPARQL Protocol and RDF Query
Language
• OWL-S – OWL for Services
5
RDFS
• Note: While XMLS was aimed at schemas, it
has little expressive power if it is to be 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 recognizable as an ontology language
– Classes and properties
– Sub/super-classes (and properties)
– Range and domain (of properties)
6
However
• RDFS too weak to describe resources in sufficient
detail for many applications
– 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 axiomatisation
7
OWL requirements
Desirable 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 support
8
The Original OWL language:
• Original 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
• OWL DL based on SHIQ Description Logic
– In fact it is equivalent to SHOIN(Dn) DL
• OWL DL Benefits from many years of Description Logic
research
–
–
–
–
Well defined semantics
Formal properties well understood (complexity, decidability)
Known reasoning algorithms
Implemented systems (highly optimized)
9
OWL Class Constructors
10
OWL axioms
11
OWL Layering
See http://www.w3.org/TR/owl-features/ section 2 for features
and relation to RDF or OWL species
12
OWL 2
• http://www.w3.org/2007/OWL/wiki/OWL_Working_G
roup
• Recommendation as of Oct. 27, 2009
W3C OWL 2 User Documents
• Document Overview - The place to start – light introduction to OWL
2 and its relationship to OWL
http://www.w3.org/TR/owl2-overview/
• New Features and Rationale - More details of the new features in
OWL 2 along with their motivations
http://www.w3.org/TR/owl2-new-features/
• Primer - An introduction to OWL using a running example
http://www.w3.org/TR/owl2-primer/
• Quick Reference A brief synopsis of the features of OWL along with
links into relevant documents (both to user and specification documents)
http://www.w3.org/TR/owl2-quick-reference/
•
Next generation of the OWL 1 Guide - Next generation of a portion of the
OWL 1 Overview combined with UMBC’s quick reference card
– Meetings: ISWC, OWLED, ESWC, Web Science, DL, Protégé, …
14
Why Some Users May Care
about OWL 2
• Datatype support: Many applications need more
datatype support including things such as numerical
comparisons (e.g., VSTO, SWEET, etc.)
• Selected additional expressive power: Different
applications may need or benefit from features such
as qualified cardinality.
• More support for annotations (e.g., for more support
for knowledge provenance )
• Definition and support for profiles
15
OWL 2
• Extends OWL with a small set of features
– That are motivated from application usage
– For which semantics and reasoning techniques are well
understood
– That tool builders are willing and able to support
• Is fully backwards compatible with OWL:
– Every OWL ontology is a valid OWL 2 ontology
– Every OWL 2 ontology not using new features is a valid
OWL ontology
– OWL Lite & OWL DL are both sublanguages of
OWL 2, along with the new profiles (EL, QL, RL)
• Already supported by popular OWL tools &
infrastructure:
– Protégé, Pellet, FaCT++, OWL API
New OWL 2 Features : Expressiveness
– qualified cardinality restrictions, e.g.:
ObjectMinCardinality(2 friendOf hacker)
– property chains, e.g.:
SubObjectPropertyOf(SubObjectPropertyChain(parent
brother) uncle)
– local reflexivity restrictions, e.g.:
ObjectExistsSelf(likes)
[for narcissists]
– reflexive, irreflexive, symmetric, and antisymmetric
properties, e.g.:
ReflexiveObjectProperty(knows);
IrreflexiveObjectProperty(husbandOf)
flowsInto rdf:type owl:IrreflexiveProperty.
Nothing can flow into itself.
– disjoint properties, e.g.:
DisjointObjectProperties(childOf spouseOf)
– keys, e.g.:
HasKey( US-Citizen () ( a:hasSSN ) )
New OWL2 features: MetaModelling
– Restricted form of metamodelling via “punning”, e.g.
subClassOf(SnowLeopard BigCat)
ClassAssertion(SnowLeopard EndangeredSpecies)
http://www.w3.org/TR/owl2-new-features/#F12:_Punning
– Annotations of axioms as well as entities, e.g.:
ClassAssertion(Comment(“source: WWF”)
SnowLeopard EndangeredSpecies)
– Including annotations of annotations
• Punning allowed in OWL 2 but OWL 2 DL still
imposes:
– Name cannot be used for both class and datatype
– Name can only be used for one type of property
Annotations
•Annotation Assertion
– Construct for annotation of ontology entities and anonymous
individuals
• Annotation
– Construct for annotation of axioms and ontologies(even annotations
themselves)
• Annotations about annotation properties
– SubAnnotationPropertyOf
• Syntax example: :narrow_synonymrdfs:subPropertyOf:synonym.
(UC#5)
– The annotation property :narrow synonym is a subproperty of
:synonym.
– AnnotationPropertyDomain
• Syntax example: FMA:UWDAIDrdfs:domainFMA:AnatomicalEntity. (UC#2)
– Only FMA: AnatomicalEntitycan have an FMA:UWDAID (that is, an
FMA ID)
– AnnotationPropertyRange
Syntax example: FMA:UWDAIDrdfs:rangexsd:positiveInteger.
New Features: Syntactic Sugar
– Disjoint unions
• Shorthand for combination of disjointWith and unionOf
statements
• BrainHemisphereowl:disjointUnionOf(
:LeftHemisphere:RightHemisphere) .
• BrainHemisphereis exclusively either a :LeftHemisphere or
:RightHemisphere and cannot be both of them.
• DisjointUnion(Element Earth Wind Fire Water)
– Negative assertions
• States that a property does not hold for a particular
individual
• NegativeObjectPropertyAssertion(Deborah hasChild Mary)
• NegativeDataPropertyAssertion (Peter hasAge 21)
Profiles
• OWL defines only one fragment (OWL Lite)
• OWL 2 defines three different fragments with
useful computational properties
– EL: polynomial time reasoning for schema and
data
• Useful for ontologies with large conceptual part
– QL: fast (logspace) query answering using
RDBMs via SQL
• Useful for large datasets already stored in RDBs
– RL: fast (polynomial) query answering using ruleextended DBs
• Useful for large datasets stored as RDF triples
EL (Profiles Document Source)
•
•
Supported class restrictions
–existential quantification to a class expression (ObjectSomeValuesFrom) or a data range
(DataSomeValuesFrom)
–existential quantification to an individual (ObjectHasValue) or a literal (DataHasValue)
–self-restriction (ObjectHasSelf)
–enumerations involving a singleindividual (ObjectOneOf) or a singleliteral (DataOneOf)
–intersection of classes (ObjectIntersectionOf) and data ranges (DataIntersectionOf)
Supported axioms, restricted to class restrictions
–class inclusion (SubClassOf)
–class equivalence (EquivalentClasses)
–class disjointness(DisjointClasses)
–object property inclusion (SubObjectPropertyOf) with or without property chains, and data
property inclusion (SubDataPropertyOf)
–property equivalence (EquivalentObjectPropertiesand EquivalentDataProperties),
–transitive object properties (TransitiveObjectProperty)
–reflexive object properties (ReflexiveObjectProperty)
–domain restrictions (ObjectPropertyDomainand DataPropertyDomain)
–range restrictions (ObjectPropertyRangeand DataPropertyRange)
–assertions (SameIndividual, DifferentIndividuals, ClassAssertion, ObjectPropertyAssertion,
DataPropertyAssertion, NegativeObjectPropertyAssertion, and
NegativeDataPropertyAssertion)
–functional data properties (FunctionalDataProperty)
–keys (HasKey)
EL does NOT support
• universal quantification to a class expression (ObjectAllValuesFrom) or a
data range (DataAllValuesFrom)
• –cardinality restrictions (ObjectMaxCardinality, ObjectMinCardinality,
ObjectExactCardinality, DataMaxCardinality, DataMinCardinality, and
DataExactCardinality)
• –disjunction (ObjectUnionOf, DisjointUnion, and DataUnionOf)
• –class negation (ObjectComplementOf)
• –enumerations involving more than one individual (ObjectOneOfand
DataOneOf)
• –disjoint properties (DisjointObjectPropertiesand DisjointDataProperties)
• –irreflexiveobject properties (IrreflexiveObjectProperty)
• –inverse object properties (InverseObjectProperties)
• –functional and inverse-functional object properties
(FunctionalObjectPropertyand InverseFunctionalObjectProperty)
• –symmetric object properties (SymmetricObjectProperty)
• –asymmetric object properties (AsymmetricObjectProperty)
QL
•
•
Supported class restrictions
–Subclass Expressions
a class
existential quantification (ObjectSomeValuesFrom) where the class is limited to owl:Thing
existential quantification to a data range (DataSomeValuesFrom)
–SuperclassExpressions
a class
intersection (ObjectIntersectionOf)
negation (ObjectComplementOf)
existential quantification to a class (ObjectSomeValuesFrom)
existential quantification to a data range (DataSomeValuesFrom)
Supported axioms, compliant with class restriction expressions
–subclass axioms (SubClassOf)
–class expression equivalence (EquivalentClasses)
–class expression disjointness(DisjointClasses)
–inverse object properties (InverseObjectProperties)
–property inclusion (SubObjectPropertyOfnot involving property chains and SubDataPropertyOf)
–property equivalence (EquivalentObjectPropertiesand EquivalentDataProperties)
–property domain (ObjectPropertyDomainand DataPropertyDomain)
–property range (ObjectPropertyRangeand DataPropertyRange)
–disjoint properties (DisjointObjectPropertiesand DisjointDataProperties)
–symmetric properties (SymmetricObjectProperty)
–reflexive properties (ReflexiveObjectProperty)
–irreflexiveproperties (IrreflexiveObjectProperty)
–asymmetric properties (AsymmetricObjectProperty)
–assertions other than individual equality assertions and negative
QL does not support
–existential quantification to a class expression or a data range
(ObjectSomeValuesFromand DataSomeValuesFrom) in the subclass
position
–self-restriction (ObjectHasSelf)
–existential quantification to an individual or a literal (ObjectHasValue,
DataHasValue)
–enumeration of individuals and literals (ObjectOneOf, DataOneOf)
–universal quantification to a class expression or a data range
(ObjectAllValuesFrom, DataAllValuesFrom)
–cardinality restrictions (ObjectMaxCardinality, ObjectMinCardinality,
ObjectExactCardinality, DataMaxCardinality, DataMinCardinality,
DataExactCardinality)
–disjunction (ObjectUnionOf, DisjointUnion, and DataUnionOf)
–property inclusions (SubObjectPropertyOf) involving property chains
–functional and inverse-functional properties (FunctionalObjectProperty,
InverseFunctionalObjectProperty, and FunctionalDataProperty)
–transitive properties (TransitiveObjectProperty)
–keys (HasKey)
–individual equality assertions and negative property assertions
RL
–Subclass expressions
•a class other than owl:Thing
•an enumeration of individuals (ObjectOneOf)
•intersection of class expressions (ObjectIntersectionOf)
•union of class expressions (ObjectUnionOf)
•existential quantification to a class expression (ObjectSomeValuesFrom)
•existential quantification to a data range (DataSomeValuesFrom)
•existential quantification to an individual (ObjectHasValue)
•existential quantification to a literal (DataHasValue)
–Superclassexpressions
•a class other than owl:Thing
•intersection of classes (ObjectIntersectionOf)
•negation (ObjectComplementOf)
•universal quantification to a class expression (ObjectAllValuesFrom)
•existential quantification to an individual (ObjectHasValue)
•at-most 0/1 cardinality restriction to a class expression
(ObjectMaxCardinality0/1)
•universal quantification to a data range (DataAllValuesFrom)
•existential quantification to a literal (DataHasValue)
•at-most 0/1 cardinality restriction to a data range (DataMaxCardinality0/1)
RL does not support
OWL 2 RL supports all axioms of OWL 2 apart
from disjoint unions of classes (DisjointUnion)
and reflexive object property axioms
(ReflexiveObjectProperty)
OWL 2 Documentation
Roadmap
Editors
• Protégé (http://protege.stanford.edu)
• SWOOP (http://mindswap.org/2004/SWOOP; see
also http://www.mindswap.org/downloads/)
• Altova SemanticWorks
(http://www.altova.com/download/semanticworks/se
mantic_web_rdf_owl_editor.html)
• SWeDE (http://owleclipse.projects.semwebcentral.org/InstallSwede.ht
ml), goes with Eclipse
• NeON toolkit http://neon-toolkit.org/
• ThManager http://thmanager.sourceforge.net/
• TopBraid Composer and other commercial tools
29
CMAP
• CMAP Ontology Editor (COE)
– http://cmap.ihmc.us/
Protégé
•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)
Next: Provenance
32
Ingest/pipelines: problem definition
•
Data is coming in faster, in greater volumes and outstripping our ability to perform
adequate quality control
•
Data is being used in new ways and we frequently do not have sufficient
information on what happened to the data along the processing stages to
determine if it is suitable for a use we did not envision
•
We often fail to capture, represent and propagate manually generated
information that need to go with the data flows
•
Each time we develop a new instrument, we develop a new data ingest
procedure and collect different metadata and organize it differently. It is then hard
to use with previous projects
•
The task of event determination and feature classification is onerous and we
don't do it until after we get the data
33
34
20080602 Fox VSTO et al.
Use cases
• Who (person or program) added the comments
to the science data file for the best vignetted,
rectangular polarization brightness image from
January, 26, 2005 1849:09UT taken by the
ACOS Mark IV polarimeter?
• What was the cloud cover and atmospheric
seeing conditions during the local morning of
January 26, 2005 at MLSO?
• Find all good images on March 21, 2008.
• Why are the quick look images from March 21,
2008, 1900UT missing?
• Why does this image look bad?
35
36
20080602 Fox VSTO et al.
37
20080602 Fox VSTO et al.
Provenance
• Origin or source from which something
comes, intention for use, who/what generated
for, manner of manufacture, history of
subsequent owners, sense of place and time
of manufacture, production or discovery,
documented in detail sufficient to allow
reproducibility
• Knowledge provenance; enrich with
ontologies and ontology-aware tools
38
Semantic Technology Foundations
• PML – Proof Markup Language – used for
knowledge provenance interlingua
• Inference Web Toolkit – used to manipulate and
access knowledge provenance
• OWL-DL ontologies (including SWEET and VSTO
ontologies)
•
•
PML -McGuinness, Ding, Pinheiro da Silva, Chang. PML 2: A Modular Explanation Interlingua. AAAI 2007 Workshop on
Explanation-aware Computing, Vancouver, Can., 7/07. Stanford Tech report KSL-07-07.
Inference Web - McGuinness and Pinheiro da Silva. Explaining Answers from the Semantic Web: The Inference Web
Approach. Web Semantics: Science, Services and Agents on the World Wide Web Special issue: International Semantic
Web Conference 2003 - Edited by K.Sycara and J.Mylopoulis. Volume 1, Issue 4. Journal published Fall, 2004
Inference Web Explanation Architecture
WWW
SDS
OWL-S/BPEL
Trace of web service discovery
Learners
*
Proof Markup
Language (PML)
Toolkit
IWTrust
Trust computation
IW Explainer/
Abstractor
End-user friendly
visualization
Learning Conclusions
JTP/CWM
KIF/N3
Trust
Theorem prover/Rules
SPARK
SPARK-L
Trace of task execution
UIMA
Justification
Provenance
Text Analytics
IWBrowser
Expert friendly
Visualization
IWSearch
search engine
based publishing
IWBase
provenance
registration
Trace of information extraction
• Semantic Web based infrastructure
• PML is an explanation interlingua
– Represent knowledge provenance (who, where, when…)
– Represent justifications and workflow traces across system boundaries
• Inference Web provides a toolkit for data management and
visualization
Global View and More
Views of Explanation
filtered
focused
global
Explanation
(in PML)
discourse
trust
•
•
provenance
Explanation as a graph
Customizable browser
options
–
–
–
–
•
abstraction
Proof style
Sentence format
Lens magnitude
Lens width
More information
–
–
–
–
Provenance metadata
Source PML
Proof statistics
Variable bindings
Provenance View
• Source metadata: name, description, …
• Source-Usage metadata: which fragment of
a source has been used when
Views of Explanation
filtered
focused
Explanation
(in PML)
trust
global
abstraction
discourse
provenance
Trust View
Views of Explanation
filtered
Detailed trust
explanation
Trust Tab
Explanation
(in PML)
trust
•
•
•
Fragment
colored by
trust value
focused
global
abstraction
discourse
provenance
(preliminary) simple
trust representation
Provides colored
(mouseable) view
based on trust values
Enables sharing and
collaborative
computation and
propagation of trust
values
Discourse View
•
•
•
•
(Limited) natural language interface
Mixed initiative dialogue
Exemplified in CALO domain
Explains task execution component
powered by learned and human
generated procedures
Views of Explanation
filtered
focused
Explanation
(in PML)
trust
global
abstraction
discourse
provenance
Selected IW and PML Applications
• Portable proofs across reasoners: JTP (with temporal and
context reasoners (Stanford); CWM (W3C), SNARK(SRI),
…
• Explaining web service composition and discovery (SNRC)
• Explaining information extraction (more emphasis on
provenance – KANI, UIMA)
• Explaining intelligence analysts’ tools (NIMD/KANI)
• Explaining tasks processing (SPARK / CALO)
• Explaining learned procedures (TAILOR, LAPDOG, /
CALO)
• Explaining privacy policy law validation (TAMI)
• Explaining decision making and machine learning (GILA)
• Explaining trust in social collaborative networks (TrustTab)
• Registered knowledge provenance: IW Registrar
(Explainable Knowledge Aggregation)
• Explaining natural science provenance – VSTO, SPCDIS,
…
PML1 vs. PML2
• PML1 was introduced in 2002
– It has been used in multiple contexts ranging from
explaining theorem provers to text analytics to machine
learning.
– It was specified as a single ontology
• PML2 improves PML1 by
– Adopting a modular design: splitting the original ontology
into three pieces: provenance, justification, and trust
• This improves reusability, particularly for applications
that only need certain explanation aspects, such as
provenance or trust.
– Enhancing explanation vocabulary and structure
• Adding new concepts, e.g. information
• Refining explanation structure
PML Provenance Ontology
• Scope: annotating
provenance metadata
• Highlights
– Information
– Source Hierarchy
– Source Usage
Referencing, Encoding and
Annotating a Piece of Information
• Referencing a piece of information
– using URI
• Encoding the content of information
– Complete Quote:
<hasRawString>(type TonysSpecialty SHELLFISH) </hasRawString>
– Obtained from URL:
<hasURL>http://inferenceweb.org/ksl/registry/storage/documents/tonys_fact.kif</hasURL>
• Annotations
– For human consumption:
<hasPrettyString>Tonys’ Specialty is ShellFish</hasPrettyString>
– For machine consumption
• Language:
<hasLanguage rdf:resource="http://inference-web.org/registry/LG/KIF.owl#KIF" />
• Format:
<hasFormat "http://inference-web.org//registry/FM/PDF.owl#PDF" />
Source Hierarchy
• Source is the container of information
• Our source hierarchy offers
– Many well-known sources such as
• Sensor (e.g. geo-science)
• InferenceEngine (e.g. reasoner)
• WebService (e.g. workflow)
– Finer granularity of source than just document
• DocumentFragment (for text analytics)
Source Usage
• Source Usage
– logs the action that accesses a source at a
certain dateTime to retrieve information
– is part of PML1
• Example: Source #ST was accessed on
certain date
<pmlp:SourceUsage rdf:about="#usage1">
<pmlp:hasUsageDateTime>2005-10-17T10:30:00Z</pmlp:hasUsageDateTime>
<pmlp:hasSource rdf:resource="#ST"/>
</pmlp:SourceUsage>
PML Justification Ontology
• Scope: annotating
justification process
• Highlights
– Template for questionanswer/justification
– Four types of justification
Four Types of Justification
Goal
conclusion without justification
Assumption
conclusion assumed (using
Assumption Rule) asserted by an
InferenceEngine, no antecedent
Direct Assertion
conclusion directly asserted (using
DirectAssertion rule) by an
InferenceEngine, no antecedent
Regular
conclusion derived from antecedent
conclusions
PML Trust Ontology
• Scope: annotate trust and
belief assertions
• Highlights
– Extensible trust representation
(user may plug in their
quantitative metrics using OWL
class inheritance feature)
– Has been used to provide a
trust tab filter for wikipedia –
see McGuinness, Zeng, Pinheiro da
Silva, Ding, Narayanan, and Bhaowal.
Investigations into Trust for Collaborative
Information Repositories: A Wikipedia
Case Study. WWW2006 Workshop on the
Models of Trust for the Web (MTW'06),
Edinburgh, Scotland, May 22, 2006.
54
55
20080602 Fox VSTO et al.
Quick look browse
56
20080602 Fox VSTO et al.
57
Visual browse
58
59
60
Search and structured query
Search
Structured
Query
61
Search
62
20080602 Fox VSTO et al.
Provenance within
SemantAqua
63
SemantAqua System
Architecture
Virtuoso
access
64
Provenance
• Preserves provenance in the Proof Markup
Language (PML).
• Data Source Level Provenance:
– The captured provenance data are used to support
provenance-based queries.
• Reasoning level provenance:
– When water source been marked as polluted, user can
access supporting provenance data for the
explanations including the URLs of the source data,
intermediate data, the converted data, and regulatory
data.
65
Visualization
66
http://tinyurl.com/iswc-swqp
Visualization
67
http://tinyurl.com/iswc-swqp
Visualization
68
http://tinyurl.com/iswc-swqp
Visualization
69
http://tinyurl.com/iswc-swqp
Visualization
70
http://tinyurl.com/iswc-swqp
Visualization
• Time series Visualization:
– Presents data in time series visualization
for user to explore and analyze the data
Violation, measured value: 2032.8
Violation, measured value: 971
Limit value: 400
71
http://was.tw.rpi.edu/swqp/trend/epaTrend.html?state=RI&county=1&site=http%3A%2F%2Ftw2.tw.rpi.edu%2
Fzhengj3%2Fowl%2Fepa.owl%23facility-110009444869
Selected Results
• Provenance information encoded using semantic
web technology supports transparency and trust.
• SemantAqua provides detailed provenance information:
– Original data, intermediate data, data source
• “What if” Scenario:
– User can apply a stricter regulation from another state to a local
water source.
• User may be interested only in certain sources and can
use the interface to control queries
72
Aim at providing at least as
much provenance as
SemantAqua
• Questions?
• Homework assignment – next generation of course
project
73
Assignments
• Reading:
• Reminder – look for reference list on
class page: then look for
• Class 5: Reading Assignment
• Also, meet with your groups and update
your project web pages. While you can
drop any next steps section in your final
submission, it is wise to include that now
74
Next: Query
75
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/
– W3C Recommendation as of January 15, 2008
•
•
•
•
XQUERY (for XML)
SeRQL (for SeSAME)
RDFQuery (RDF)
Few as yet for natural language representations
(ROO – Dolbear, et al., …)
76
What is Query?
• http://esw.w3.org/SPARQL
• Languages
– SPARQL for RDF (http://www.sparql.org/ and
http://www.w3.org/TR/rdf-sparql-query/ )
– RDFQuery for RDF
– SeRQL for RDF (SeSAME)
– OWL-QL for OWL
(http://projects.semwebcentral.org/projects/owl-ql/ )
– XQUERY for XML
• Few as yet for natural language
representations (ROO – Dolbear, et al., …)
77
SPARQL
• W3 Recommendation, Jan 2008
• SPARQL has 4 result forms:
– SELECT – Return a table of results.
– CONSTRUCT – Return an RDF graph, based on
a template in the query.
– DESCRIBE – Return an RDF graph, based on
what the query processor is configured to return.
– ASK – Ask a Boolean query.
• The SELECT form directly returns a table
• DESCRIBE and CONSTRUCT use the
outcome of matching to build RDF graphs.
78
SPARQL Solution Modifiers
• Pattern matching produces a set of solutions.
This set can be modified in various ways:
– Projection - keep only selected variables
– OFFSET/LIMIT - chop the number solutions (best
used with ORDER BY)
– ORDER BY - sorted results
– DISTINCT - yield only one row for one
combination of variables and values.
• The solution modifiers OFFSET/LIMIT and
ORDER BY always apply to all result forms.
79
Query examples
PREFIX foaf: <http://xmlns.com/foaf/spec/>
namespace
SELECT ?url
Returns a table in ‘url’ (can use $)
FROM <bloggers.rdf>
WHERE {
?contributor foaf:name "Jon Foobar" . Triple patterns using
Turtle syntax
80
?contributor foaf:weblog ?url .
}
What happens
• These triples together comprise a graph pattern.
• The query attempts to match the triples of the graph pattern
to the model.
• Each matching binding of the graph pattern's variables to the
model's nodes becomes a query solution, and the values of
the variables named in the SELECT clause become part of
the query results.
• In this example, the first triple in the WHERE clause's graph
pattern matches a node with a foaf:name property of "Jon
Foobar," and binds it to the variable named contributor.
• In the bloggers.rdf model, contributor will match the
foaf:Agent blank-node at the top of the figure.
• The graph pattern's second triple matches the object of the
contributor's foaf:weblog property.
81
• This is bound to the url variable, forming a query solution.
Using SPARQL with Jena
• Jena calls RDF graphs "models" and triples
"statements" because that is what they were called
at the time the Jena API was first designed
• ARQ's query engine can also parse queries
expressed in RDQL or its own internal query
language. ARQ is under active development, and is
not yet part of the standard Jena distribution.
• http://jena.sourceforge.net/ARQ/Tutorial/data.html
• Can also use SPARQL from the command line
82
com.hp.hpl.jena.query package
// Open the bloggers RDF graph from the filesystem
InputStream in = new FileInputStream(new File("bloggers.rdf"));
// Create an empty in-memory model and populate it from the graph
Model model = ModelFactory.createMemModelMaker().createModel();
model.read(in,null); // null base URI, since model URIs are absolute
in.close();
// Create a new query
String queryString =
"PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
"SELECT ?url " +
"WHERE {" +
"
?contributor foaf:name \"Jon Foobar\" . " +
"
?contributor foaf:weblog ?url . " +
"
}”;
Query query = QueryFactory.create(queryString);
// Execute the query and obtain results
QueryExecution qe = QueryExecutionFactory.create(query, model);
ResultSet results = qe.execSelect();
// Output query results
ResultSetFormatter.out(System.out, results, query);
// Important - free up resources used running the query
qe.close();
83
More complex queries
@prefix foaf: <http://xmlns.com/foaf/spec/> .
_:a foaf:name
"Jon Foobar" ;
foaf:mbox
<mailto:[email protected]> ;
foaf:depiction <http://foobar.xx/2005/04/jon.jpg> .
_:b foaf:name
"A. N. O'Ther" ;
foaf:mbox
<mailto:[email protected]> ;
foaf:depiction <http://example.net/photos/an-2005.jpg> .
_:c foaf:name
"Liz Somebody" ;
foaf:mbox_sha1sum "3f01fa9929df769aff173f57dec2fe0c2290aeea"
_:d foaf:name
foaf:depiction
"M Benn" ;
<http://mbe.nn/pics/me.jpeg> .
84
Querying FOAF data with an optional block
PREFIX foaf: <http://xmlns.com/foaf/spec>
SELECT ?name ?depiction
WHERE {
?person foaf:name ?name .
OPTIONAL {
?person foaf:depiction ?depiction .
}.
}
| name
| depiction
|
| "A. N. O'Ther" | <http://example.net/photos/an-2005.jpg> |
| "Jon Foobar" | <http://foobar.xx/2005/04/jon.jpg>
|
| "Liz Somebody" |
|
| "M Benn"
| <http://mbe.nn/pics/me.jpeg>
85
Query with alternative matches, and its results
PREFIX foaf: <http://xmlns.com/foaf/spec/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?name ?mbox
WHERE {
?person foaf:name ?name .
{
{ ?person foaf:mbox ?mbox } UNION { ?person foaf:mbox_sha1sum
?mbox }
}
}
| name
| mbox
|
| "Jon Foobar"
| <mailto:[email protected]>
|
| "A. N. O'Ther"
| <mailto:[email protected]>
|
| "Liz Somebody" | "3f01fa9929df769aff173f57dec2fe0c2290aeea" |
86
Filter to retrieve RSS feed items published in April
2005
PREFIX rss: <http://purl.org/rss/1.0/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?item_title ?pub_date
WHERE {
?item rss:title ?item_title .
?item dc:date ?pub_date .
FILTER xsd:dateTime(?pub_date) >= "2005-0401T00:00:00Z"^^xsd:dateTime &&
xsd:dateTime(?pub_date) < "2005-0501T00:00:00Z"^^xsd:dateTime
}
87
Find people described in two named FOAF graphs
PREFIX foaf: <http://xmlns.com/foaf/spec/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?name
FROM NAMED <jon-foaf.rdf>
FROM NAMED <liz-foaf.rdf>
WHERE {
GRAPH <jon-foaf.rdf> {
?x rdf:type foaf:Person .
?x foaf:name ?name .
}.
GRAPH <liz-foaf.rdf> {
?y rdf:type foaf:Person .
?y foaf:name ?name .
}.
}
88
Which graph describes different people
PREFIX foaf: <http://xmlns.com/foaf/spec/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?name ?graph_uri
FROM NAMED <jon-foaf.rdf>
FROM NAMED <liz-foaf.rdf>
WHERE {
GRAPH ?graph_uri {
?x rdf:type foaf:Person .
?x foaf:name ?name .
}
}
| name
| graph_uri
|
| "Liz Somebody" | <file://.../jon-foaf.rdf> |
| "A. N. O'Ther"
| <file://.../jon-foaf.rdf> |
| "Jon Foobar"
| <file://.../liz-foaf.rdf> |
| "A. N. O'Ther"
| <file://.../liz-foaf.rdf> |
89
Personalized feed by query filter
PREFIX foaf: <http://xmlns.com/foaf/spec/>
PREFIX rss: <http://purl.org/rss/1.0/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?title ?known_name ?link
FROM <http://planetrdf.com/index.rdf>
FROM NAMED <phil-foaf.rdf>
WHERE {
GRAPH <phil-foaf.rdf> {
?me foaf:name "Phil McCarthy" .
?me foaf:knows ?known_person .
?known_person foaf:name ?known_name .
}.
?item dc:creator ?known_name .
?item rss:title ?title .
?item rss:link ?link .
?item dc:date ?date.
}
ORDER BY DESC[?date] LIMIT 10
90
Returning as XML
• SPARQL allows query results to be returned as
XML, in a simple format known as the SPARQL
Variable Binding Results XML Format.
• This schema-defined format acts as a bridge
between RDF queries and XML tools and libraries.
• There are a number of potential uses for this
capability. You could transform the results of a
SPARQL query into a Web page or RSS feed via
XSLT, access the results via XPath, or return the
result document to a SOAP or AJAX client.
• To output query results as XML, use the
ResultSetFormatter.outputAsXML() method, or
specify --results rs/xml on the command line.
91
Final example
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rss: <http://purl.org/rss/1.0/>
SELECT ?link ?title
FROM <http://rss.slashdot.org/Slashdot/slashdotScience>
FROM
<http://www.nature.com/nprot/current_issue/rss/index.html>
WHERE {
?i rss:link?link .
?i dc:date?date . FILTER (?date > "2008-08-31")
?i rss:description?desc. FILTER regex(?desc,"biolog|
mathematic","i")
?i rss:title?title
}
92
SPARQL 2-page reference
guide
• http://www.dajobe.org/2005/04sparql/SPARQLreference-1.8-us.pdf
93
Using Protégé
• SPARQL plug-in to run queries on your
ontology
94
Semantic Web with Rules
•
•
•
•
•
•
Metalog
RuleML
SWRL
WRL
Cwm
N3 - http://hydrogen.informatik.tucottbus.de/wiki/index.php/N3_Notation
• Jess
• Jena
• RIF
95
Rules - expressing logic
• Notation - e.g. Horn rules
– (P1 ∧ P2 ∧ ...) → C
– parent(?x,?y) ∧ brother(?y,?z) ⇒
uncle(?x,?z)
– for any X, Y and Z: if Y is a parent of X, and Z is
a brother of Y then Z is the uncle of X
96
Examples from
http://www.w3.org/Submission/SWRL/
• A simple use of these rules would be to assert that
the combination of the hasParent and
hasBrother properties implies the hasUncle
property. Informally, this rule could be written as:
– hasParent(?x1,?x2) ∧ hasBrother(?x2,?x3) ⇒
hasUncle(?x1,?x3)
• In the abstract syntax the rule would be written like:
– Implies(Antecedent(hasParent(Ivariable(x1) I-variable(x2))
hasBrother(I-variable(x2) Ivariable(x3)))Consequent(hasUncle(Ivariable(x1) I-variable(x3))))
• From this rule, if John has Mary as a parent and
Mary has Bill as a brother then John has Bill as an
uncle.
97
Examples
• An even simpler rule would be to assert that
Students are Persons, as in
– Student(?x1) ⇒
Person(?x1).Implies(Antecedent(Student(Ivariable(x1)))Consequent(Person(Ivariable(x1))))
– However, this kind of use for rules in OWL just duplicates
the OWL subclass facility. It is logically equivalent to write
instead
• Class(Student partial Person) or
• SubClassOf(Student Person)
– which would make the information directly available to an
OWL reasoner.
98
Rule Interchange Format (RIF)
• W3 Recommendation (June 2010)
• Interlingua (similar to KIF)
• http://www.w3.org/2005/rules/wiki/RIF_Worki
ng_Group
• Tools starting to emerge
• http://www.w3.org/2005/rules/wiki/RIF_FAQ
• http://www.w3.org/TR/rif-overview/
99
Test an interchanged RIF rule set
• testQuery(Literal)
test the literal (= rule head or fact)
• testNotQuery(Literal)
negatively test the literal with
default negation
• testNegQuery(Literal)
negatively test the literal with
explicit negation
• testNumberOfResults(Literal, Number)
test number of results
derived for the literal = stated value
• testNumberOfResults(Literal, Var, Number) test number of results for
the variable in the literal
• testNumberOfResultsMore(Literal,Number) test number of results for
the literal > given value
• testNumberOfResultsLess(Literal,Number) test number of results for
the literal < given value
• testNumberOfResultsMore(Literal,Var,Number) test number of results for
the variable in the literal > given value
• testNumberOfResultsLess(Literal,Var,Number) test number of results for
100
the variable in the literal < given value
More RIF testing
• testResult(QueryLiteral,ResultLiteral)
test if the second literal is
an answer of the query literal
• testResults(Literal,Var,[<BindingList>])
test if the list of binding
results for the variable in the literal can be derived
• testResultsOrder(Literal,Var,[<BindingList>]) test if the list of ordered
binding results for the variable in the literal can be derived
• testQueryTime(Literal, MaxTime)
test if the literal can be
derived in less than the stated time in milliseconds
• testNotQueryTime(Literal, MaxTime)
test if the literal can be
derived negatively by default in less than the stated time in milliseconds
• testNegQueryTime(Literal, MaxTime)
test if the literal can be
derived strongly negative in less than the stated time in milliseconds
• getQueryTime(Literal, Time)
get the query time for the literal
• getNotQueryTime(Literal,Time)
get the default negated
query time for the literal
• getNegQueryTime(Literal,Time)
get the explicitly negated 101
query time for the literal
Testing class membership
Document(
Prefix(fam http://example.org/family#)
Group (
Forall ?X ?Y (
fam:isFatherOf(?Y ?X) :- And (fam:isSonOf(?X ?Y) fam:isMale(?Y)
?X#fam:Child ?Y#fam:Parent )
)
fam:isSonOf(fam:Adrian fam:Uwe)
fam:isMale(fam:Adrian)
fam:isMale(fam:Uwe)
fam:Adrian#fam:Child
fam:Uwe#fam:Parent
)
)
Conclusion: fam:isFather(fam:Uwe fam:Adrian)
102
XML for conclusion
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Document [
<!ENTITY rif "http://www.w3.org/2007/rif#">
<!ENTITY xs "http://www.w3.org/2001/XMLSchema#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
]>
<Atom xmlns="&rif;">
<op>
<Const type="&rif;iri">http://example.org/family#isFather</Const>
</op>
<args>
<Const type="&rif;iri">http://example.org/family#Uwe</Const>
<Const type="&rif;iri">http://example.org/family#Adrian</Const>
</args>
</Atom>
<!--XML document generated on Tue Dec 30 12:08:16 EST 2008-->
103
Language options that you can implement
• JenaRules is based on RDF(S) and uses the
triple representation of RDF descriptions (see
also N3 Notation and Turtle Syntax).
104
Examples
<ex:Driver rdf:about="http://example.com/John">
<ex:state>New York</ex:state>
<ex:hasTrainingCertificate
rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</ex:h
asTrainingCertificate>
</ex:Driver>
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
@prefix ex: http://example.com/
@prefix xs: http://www.w3.org/2001/XMLSchema#
[eligibleDriver: (?d rdf:type ex:EligibleDriver)
<(?d rdf:type ex:Driver)
(?d ex:state "New York")
(?d ex:hasTrainingCertificate "true"^^xs:boolean)]
Any driver living in New York and having training driver certificate is eligible
105
A driver is young if has between 18 and 25
years old.
<ex:age
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
>21</ex:age><br>
</ex:Driver>
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
@prefix ex: http://example.com/
@prefix xs: http://www.w3.org/2001/XMLSchema#
[youngDriver: (?d rdf:type ex:YoungDriver)
<(?d rdf:type ex:Driver)
(?d ex:age ?a)
greaterThan(?a,18)
lessThan(?a,25)]
106
Negation
<ex:Driver rdf:about="http://example.com/John">
<ex:name>Jojn Smith</ex:name>
</ex:Driver>
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
@prefix ex: http://example.com/
[eligibleDriver: (?d rdf:type ex:TypicalDriver)
<(?d rdf:type ex:Driver)
noValue(?d rdf:type ex:YoungDriver)
noValue(?d rdf:type ex:SeniorDriver)]
107
Multiple rules, split disjunction
<ex:Driver rdf:about="http://example.com/John">
<ex:state>Vancouver</ex:state>
<ex:accidentsNumber
rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</ex:accidentsNumber>
</ex:Driver>
@prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
@prefix ex: http://example.com/
[eligibleDriver_1: (?d rdf:type ex:EligibleDriver)
<(?d rdf:type ex:Driver)
(?d ex:state "New York")
(?d ex:accidentsNumber ?an)
lessThan(?an,2)]
[eligibleDriver_2: (?d rdf:type ex:EligibleDriver)
<(?d rdf:type ex:Driver)
(?d ex:state "Vancouver")
(?d ex:accidentsNumber ?an)
lessThan(?an,2)]
108
Using Protégé
• SWRL plugin for editing rules
• Jena (instructions for running the rule engine
and using inference:
http://hydrogen.informatik.tucottbus.de/wiki/index.php/JenaRules)
109
Inference structure
110
Lastly and briefly
• Jess rules (LISP-like)
– Jess rules engine http://herzberg.ca.sandia.gov/jess/
– http://www.jessrules.com/jess/docs/Jess71p2.pdf
111
Summaries
• Michael Denny’s Table: (a bit out of date)
• http://www.xml.com/2004/07/14/examples/On
tology_Editor_Survey_2004_Table__Michael_Denny.pdf
• ESW Wiki:
ttp://esw.w3.org/SemanticWebTools
Triple Stores
• W3C’s list – worth looking at the text around
the listing as well
• http://www.w3.org/wiki/LargeTripleStores
•
•
•
•
•
•
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)
Many others (relational, object-relational)
113
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://eclipse.org/)
• Top Quadrant suite
• Sandsoft (Sandpiper Software)
• … see Semantic Technologies
114
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)
• …
115
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 116
ServiceGrounding.
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)
117
Explanation, Proof (path to Trust)
• Proof markup language (PML)
– an interlingua representation for justifications of results
produced by Semantic Web services
• Implemented in InferenceWeb (http://inferenceweb.org)
• CWM and N3 and theorem provers - not yet
adapted to OWL-based languages
• Recent incubator
group http://www.w3.org/2005/Incubator/prov/cha
rter
• Current working group:
118
http://www.w3.org/2011/prov/wiki/Main_Page
SKOS properties
Simple Knowledge Organization System - W3C Recommendation Status on
August 18, 2009 http://www.w3.org/2004/02/skos/
• skos:note
e.g. ‘Anything goes.’
• skos:definition
e.g. ‘A long curved fruit with a yellow skin and soft, sweet white flesh inside.’
• skos:example
e.g. ‘A bunch of bananas.’
• skos:scopeNote
e.g. ‘Historically members of a sheriff's retinue armed with pikes who escorted judges at assizes.’
• skos:historyNote
e.g. ‘Deleted 1986. See now Detention, Institutionalization (Persons), or
Hospitalization.’
• skos:editorialNote
e.g. ‘Confer with Mr. X. re deletion.’
• skos:changeNote
119
e.g. ‘Promoted “love” to preferred label, demoted “affection” to alternative label, Joe
Bloggs, 2005-08-09.’
SKOS Vocabulary Elements
•
•
•
•
•
•
skos:mappingRelation
skos:closeMatch
skos:exactMatch
skos:broadMatch
skos:narrowMatch
skos:relatedMatch
120
SKOS Class and Property relations
• S38 skos:mappingRelation, skos:closeMatch, skos:exactMatch,
skos:broadMatch, skos:narrowMatch and skos:relatedMatch are each
instances of owl:ObjectProperty.
• S39 skos:mappingRelation is a sub-property of skos:semanticRelation.
• S40 skos:closeMatch, skos:broadMatch, skos:narrowMatch and
skos:relatedMatch are each sub-properties of skos:mappingRelation.
• S41 skos:broadMatch is a sub-property of skos:broader,
skos:narrowMatch is a sub-property of skos:narrower, and
skos:relatedMatch is a sub-property of skos:related.
• S42 skos:exactMatch is a sub-property of skos:closeMatch.
• S43 skos:narrowMatch is owl:inverseOf the property skos:broadMatch.
• S44 skos:relatedMatch, skos:closeMatch and skos:exactMatch are each
instances of owl:SymmetricProperty.
• S45 skos:exactMatch is an instance of owl:TransitiveProperty.
121
• http://www.w3.org/2006/07/SWD/SKOS/reference/20081001/skos.txt
Integrity constraints
• skos:exactMatch is disjoint with each
of the properties skos:broadMatch
and skos:relatedMatch.
122
SKOS example
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#">
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#">
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#ConceptScheme"/>
<dc:title>SKOS-based service taxonomy for DevX Article</dc:title>
<skos:hasTopConcept rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
</rdf:Description>
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#Service">
<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
<rdfs:comment>An rdfs:Class of services.</rdfs:comment>
</rdf:Description>
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#PrintingService">
<rdf:type rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
<skos:narrower rdf:resource="http://zepheira.com/examples/soa-skos#LaserPrintingService"/>
<skos:narrower rdf:resource="http://zepheira.com/examples/soa-skos#PlotterPrintingService"/>
<skos:prefLabel>Printing Service</skos:prefLabel>
</rdf:Description>
123
SKOS example
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#LaserPrintingService">
<rdf:type rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
<skos:narrower rdf:resource="http://zepheira.com/examples/soa-skos#ColorLaserPrintingService"/>
<skos:narrower rdf:resource="http://zepheira.com/examples/soa-skos#BWLaserPrintingService"/>
<skos:prefLabel>Laser Printing Service</skos:prefLabel>
</rdf:Description>
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#PlotterPrintingService">
<rdf:type rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
<skos:prefLabel>Plotter Printing Service</skos:prefLabel>
</rdf:Description>
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#ColorLaserPrintingService">
<rdf:type rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
<skos:prefLabel>Color Laser Printing Service</skos:prefLabel>
</rdf:Description>
<rdf:Description rdf:about="http://zepheira.com/examples/soa-skos#BWLaserPrintingService">
<rdf:type rdf:resource="http://zepheira.com/examples/soa-skos#Service"/>
<skos:prefLabel>Black and White Laser Printing Service</skos:prefLabel>
</rdf:Description>
</rdf:RDF>
124
SKOS core and RDFS/OWL
• Disjoint?
– Should skos:Concept be disjoint with …
• rdf:Property ?
• rdfs:Class ?
• owl:Class ?
• http://www.w3.org/TR/2009/REC-skos-reference20090818/#L1045
• http://skosapi.sourceforge.net/
• Editors
– ThManager http://thmanager.sourceforge.net/
– SKOS API and Editor http://ftp.informatik.rwthaachen.de/Publications/CEUR-WS/Vol401/iswc2008pd_submission_88.pdf
125