Transcript ontology

Practical aspects of creating
semantic web applications
Peter Fox (RPI)
ESIP Summer Meeting
Knoxville, TN, July 21, 2010, 15:30pm
Slides at:
http://wiki.esipfed.org/index.php/Semantic_Web_Tutorials
1
Semantic Web Methodology and
Technology Development Process
•
•
Establish and improve a well-defined methodology vision for
Semantic Technology based application development
Leverage controlled vocabularies, etc.
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
2
Later, see last year:
• Introductory and intermediate
– http://wiki.esipfed.org/index.php/SWT2009
3
What can ~4 students do in ~3 weeks?
• Hot Vent use case
• http://tw.rpi.edu/wiki/Semantic_eScience_%282009_Fall%29
• http://tw.rpi.edu/portal/SeS_project_team_W
HOI_CSCI-6962-01_2009
4
5
Tetherless World Constellation
6
Tetherless World Constellation
7
Tetherless World Constellation
8
Tetherless World Constellation
9
Tetherless World Constellation
Tools
• Omni Graffle – Creation of Faceted-Browse Mockups
• CmapTools COE – Creation of Ontology Models,
Causality graphs for provenance
• Protégé – Creation of Ongology and Individuals
• Skype (IM and VOIP), Dimdim (Web Conferencing),
MediaWiki – Collaboration tools
• Google Web Toolkit + SmartGWT – Rapid UI
Prototyping
• Jena/TDB and Joseki – triple store and SPARQL
endpoint server – can be extended to perform
reasoning and the execution of semantic rules.
10
Tetherless World Constellation
Use cases
1. Do you have any data online from Hutchins
from award number OCE-0423418?
2. I want to download (temperature, biological, ...)
data in the following areas (N. Atlantic,
bounding box, where JGOFs survey was done,
...)
3. What new data has been added since last year
(and organize it by project)
4. Show me all the places where the surface
temperature in the North Atlantic is 25 degrees
during June.
Tetherless World Constellation
11
Quick prototype of use case 1
12
Tetherless World Constellation
Evolving the ontology model
13
Tetherless World Constellation
To…
• Example where the
iterative process helped to
develop an understanding
by WHOI domain experts
ontologies and translating
their concepts into an
ontology and the ontology
developers to understand
the specific domain
vocabulary.
• Successive iterations
helped to expand and
simplify concepts and
incorporate already
existing ontologies.
• Similar in instrument,
platform, parameter
ontology development.
Includes all of
the foaf
concepts for
name, contact
information,
interests
14
Tetherless World Constellation
Current version
15
Tetherless World Constellation
Current version
• http://escience.rpi.edu/ontology/BCO-DMO/1/0/
16
Tetherless World Constellation
Practical semantics
• Will almost always balance:
– Query
– Reasoning
– Rules
• Choose representations that:
– Balances expressivity, implementability and
maintainability
– Recognizes the way of the world … (ask me)
• Use cases are the key to guide you and
scope each of these balances
17
Semantics
• http://wiki.esipfed.org/index.php/Semantic_W
eb_Tutorials
– See Semantic Query, Rules and Knowledge
Encoding
• Covers a lot on query
• Rules are making a comeback with OWL 2RL and RIF now W3 recommendations so
don’t be afraid of them (or similar, Jena, Jess,
SWRL), e.g.
18
RuleSet Development
[DiffNEQCT:
(?s rdf:type gio:RequestedService),
(?s gio:input ?a),
(?a rdf:type gio:DataSelection),
(?s gio:input ?b),
(?b rdf:type gio:DataSelection),
(?a gio:sourceDataset ?a.ds),
(?b gio:sourceDataset ?b.ds),
(?a.ds gio:fromDeployment ?a.dply),
(?b.ds gio:fromDeployment ?b.dply),
(?a.dply rdf:type gio:SunSynchronousOrbitalDeployment),
(?b.dply rdf:type gio:SunSynchronousOrbitalDeployment),
(?a.dply gio:hasNominalEquatorialCrossingTime ?a.neqct),
(?b.dply gio:hasNominalEquatorialCrossingTime ?b.neqct),
notEqual(?a.neqct, ?b.neqct)
->
(?s gio:issueAdvisory giodata:DifferentNEQCTAdvisory)]
MDSA project: http://tw.rpi.edu/portal/MDSA (with GSFC)
20
And see OWL 2 references from last year
Knowledge modeling and engineering
• Re-use existing ontologies wherever possible
but don’t get too hung up on them to start
• Cmap – classes, properties and instances
• Protégé to clean up, annotate
• Cmap to vet
• Then:
– Classes in one ‘ontology’
– Instances in other ‘files’ (e.g. BCODMO earlier)
• Protégé (http://protégé.stanford.edu)
• CMAP Ontology Editor
(http://cmap.ihmc.us/coe)
21
E.g.
22
Engineering an ontology to the ‘ground’
• But…. don’t over-model
– E.g. sometimes rules are better
– E.g. sometimes call a service and hand off
complex logic, esp. to start
• Often (very) service classes and properties
are needed to really build a useable ontology
23
Engineering software around an ontology
• Query - SPARQL – Joseki
– For minimal expressivity, this is the way to go
– data-gov.tw.rpi.edu (for examples/ tutorial)
• For OWL
– Protégé and plugins
• For managing triples - Jena
(http://jena.sourceforge.net/ )/ TDB
(http://openjena.org/TDB/ )
• For reasoning - Pellet
• Rules – Jena or SWRL, others are not mature
24
enough (e.g. RIF)
Reference material
25
Infrastructure
• Protégé-OWL-API
– http://protege.stanford.edu/plugins/owl/api/in
dex.html
– http://protege.stanford.edu/plugins/owl/api/g
uide.html
• Jena (Java API for RDF and OWL)
– http://protege.stanford.edu/plugins/owl/jenaintegration.html
– http://jena.sourceforge.net/
– Migrate to other triple stores when needed 26
Infrastructure
• Reasoner – DIG/Pellet
– http://protegewiki.stanford.edu/index.php/Protege
ReasonerAPI
• SPARQL
– http://www.w3.org/2001/sw/DataAccess/tests/imp
lementations
• Spring (Application Framework - optional)
– http://www.springframework.org/
• Eclipse (IDE - optional)
– http://www.eclipse.org/
27
Terminology
• Ontology (n.d.). The Free On-line Dictionary of
Computing.
http://dictionary.reference.com/browse/ontology
– An explicit formal specification of how to
represent the objects, concepts and other entities
that are assumed to exist in some area of interest
and the relationships that hold among them.
• Semantic Web
– An extension of the current web in which
information is given well-defined meaning, better
enabling computers and people to work in
cooperation, www.semanticweb.org
– Primer: http://www.ics.forth.gr/isl/swprimer/
28
Ontology Spectrum
Thesauri
“narrower
Catalog/
term”
ID
relation
Terms/
glossary
Informal
is-a
Selected
Formal Frames
Logical
is-a (properties)Constraints
(disjointness,
inverse, …)
Formal
Value
instance
Restrs.
General
Logical
constraints
Originally from AAAI 1999- Ontologies Panel by Gruninger, Lehmann, McGuinness, Uschold, Welty;
– updated by McGuinness.
Description in: www.ksl.stanford.edu/people/dlm/papers/ontologies-come-of-age-abstract.html
29
Ontology - declarative knowledge
• The triple: {subject-object-predicate}
interferometer is-a optical instrument
Fabry-Perot is-a interferometer
Optical instrument has focal length
Optical instrument is-a instrument
Instrument has instrument operating mode
Data archive has measured parameter
SO2 concentration is-a concentration
Concentration is-a parameter
A query: select all optical instruments which have
operating mode vertical
An inference: infer operating modes for a FabryPerot Interferometer which measures neutral
temperature
30
Semantic Web Layers
31
http://www.w3.org/2003/Talks/1023-iswc-tbl/slide26-0.html, http://flickr.com/photos/pshab/291147522/