1 / 32

Use of SWRL for Ontology Translation

Use of SWRL for Ontology Translation. Mike Dean Principal Engineer BBN Technologies mdean@bbn.com. Assumptions. Technology – Intermediate Familiarity with RDF and OWL Desire to integrate multiple independent data sources using Semantic Web technologies. Outline. Background

elita
Download Presentation

Use of SWRL for Ontology Translation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Use of SWRL for Ontology Translation Mike Dean Principal Engineer BBN Technologies mdean@bbn.com

  2. Assumptions • Technology – Intermediate • Familiarity with RDF and OWL • Desire to integrate multiple independent data sources using Semantic Web technologies

  3. Outline • Background • Ontology Translation • SWRL • Demo of open source Snoggle tool • Other Approaches

  4. Presenter Background • Principal Engineer at BBN Technologies (1984-present) • Principal Investigator for DARPA Agent Markup Language (DAML) Integration and Transition (2000-2005) • Chaired the Joint US/EU Committee that developed DAML+OIL and SWRL • Developer and/or Principal Investigator for many Semantic Web tools, datasets, and applications (2000-present) • Member of the W3C RDF Core, Web Ontology, and Rule Interchange Format Working Groups • Co-editor of the W3C OWL Reference • Other SemTech presentations • Semantic Query: Solving the Needs of a Net-Centric Data Sharing Environment (2007, w/ Matt Fisher) • Semantic Queries and Mediation in a RESTful Architecture (2008, w/ John Gilman and Matt Fisher)

  5. Ontology Translation • Data source -> domain ontologies • Data source ontology is an OWL representation of its native data model • Domain ontology is an OWL ontology used by a community of interest • Mappings typically unidirectional and incomplete • Common variations • Use a key data source as the domain ontology • Generalize to n-levels, by employing a domain ontology as someone else’s data source

  6. Types of Ontology Translation • Renaming • (data:Car ?x) => (domain:Vehicle ?x) • Structural • (family:Family ?f)(family:husband ?f ?h)(family:wife ?f ?w)=> (exfoaf:hasHusband ?w ?h)(exfoaf:hasWife ?h ?w) • Value Conversion • (data:length ?feet)(swrlb:multiply ?inches ?feet 12)=> (domain:length ?inches)

  7. SWRL • Semantic Web Rule Language • Combines OWL, RuleML, and builtins • From the developers of OWL and RuleML • W3C Member Submission in 2004 • Input to the W3C standardization process, not an output (Recommendation) • Current de facto standard for Semantic Web Rules • Numerous implementations

  8. SWRL Constructs ClassAtom (?i ?c) DataRangeAtom (?d ?r) IndividualPropertyAtom (?i1 ?p ?i2) DatavaluedPropertyAtom (?i ?p ?d) SameIndividualsAtom (?i1 ?i2) DifferentIndividualsAtom (?i1 ?i2) BuiltinAtom (?op ?arg1 … ?argn)

  9. SWRL Builtins See http://www.w3.org/Submission/SWRL/#8 for details

  10. Snoggle • Open source GUI SWRL editor focused on ontology translation • Can export SWRL/XML or SWRL/RDF • Extensible to other formats such as RIF • Available at http://snoggle.projects.semwebcentral.org

  11. Snoggle Demo

  12. Snoggle-GeneratedRules In Protégé 4

  13. SWRL Implementations • SweetRules • Translates to Jena Rules and implements builtins • Protégé 3 and 4 • TopBraid Composer • Pellet • KAON2 • RacerPro • INRIA Alignment API (export) • RuleVISor and BaseVISor • …

  14. SWRL Notes 1 • Can also generally be used with RDF vocabularies as well as OWL ontologies • Nullable database columns each require their own SWRL translation rule • Most/all implementations support named classes only, referring to externally defined classes and properties rather than internal OWL definitions • Most implementations use SWRL/RDF rather than SWRL/XML – a surprise to the authors • Process and store rules with ontologies • Most implementations assume that only the first argument of a builtin is unbound • SWRL builtins formally represent logical relationships, not function calls • (swrlb:subtract ?a ?b ?c) generally computes ?a = ?b - ?c not all combinations of ?b and ?c that produce ?a

  15. SWRL Notes 2 • Most applications employ some sort of user-defined builtin(s) to generate a URI or bNode • Examples • Generate a new Family instance from information about Individuals • Generate a view (e.g. map point) for instance data • Construct a resolvable URI from database primary or foreign key(s) • Translate a database column spouseName into a foaf:Person with foaf:name and domain:spouse • Jena Rules makeTemp and makeInstance builtins • Logicians worry about “head existential variables” • This should be standardized

  16. SOAP WS RDBMS AsioTM Semantic Web Toolkit 1 Query: SPARQL Snoggle 6 Query Result Set Query Decomposition 2 Semantic Query Decomposition (SQD) Backwards Rule Chaining 5 Generation ofSub Queries 3 Automapper Semantic Bridge Database Semantic Bridge Web Service Semantic Bridge SPARQL Endpoint 4 Data Access KB

  17. Alternative Translation Approaches OWL XSLT SPARQL OWL 2 RIF OWLED DL Safe Rules FOL Custom code

  18. History (My Perspective) • The current W3C separation between ontologies and rules is largely artificial • Precursor representations such as KIF and CycL include both sets of constructs • Adding rules would have significantly delayed OWL • W3C agonized over the relationship between queries and rules before forming the DAWG (SPARQL) and RIF Working Groups • ~50% same/~50% different • W3C made the right decision, but should keep the efforts aligned

  19. OWL • W3C OWL Web Ontology Language • Recommendation since 2004 • + Includes basic mapping constructs • subClassOf, equivalentClass • subPropertyOf, equivalentProperty • sameAs • + Often sufficient for renaming • - Usually insufficient by itself for ontology translation • Many constructs can be expressed using either ontologies or rules • Description Logic Programs (DLP) and subsequent extensions • Users often are more comfortable with one formalism than the other • Probably preferable to use one formalism for translation (rules)

  20. OWL Examples data:Individual owl:equivalentClass domain:Person data:SUV rdfs:subClassOf domain:Vehicle data:lastName owl:eqivalentProperty foaf:surname

  21. XSLT • W3C Recommendation since 1999 • XSLT 2.0 Recommendation since 2007 • Widely used XML tool • + Great for generating RDF from other XML formats • - Generally impractical for reading RDF • No canonical RDF/XML serialization • Too many ways to say the same thing

  22. SPARQL • SPARQL Query Language for RDF • W3C Recommendation since January 2008 • + CONSTRUCT queries can easily map from one ontology to another • ++ Concise representation when dealing with optional values • Supports a range of builtins similar to SWRL • -- Multiple queries can’t naturally be composed (unlike rules) • - No intrinsic support for OWL • SPARQL-DL proposal and Pellet prototype

  23. SPARQL Example PREFIX family: <http://asio.bbn.com/2008/05/semtech/family#> PREFIX exfoaf: http://asio.bbn.com/2008/05/semtech/exfoaf# CONSTRUCT { ?husband exfoaf:hasWife ?wife . ?wife exfoaf:hasHusband ?husband . ?husband exfoaf:hasDaughter ?daughter . ?wife exfoaf:hasDaughter ?daughter . ?husband exfoaf:hasSon ?son . ?wife exfoaf:hasSon ?son . ?son exfoaf:hasFather ?husband . ?son exfoaf:hasMother ?wife . ?daughter exfoaf:hasFather ?husband . ?daughter exfoaf:hasMother ?wife . ?son exfoaf:hasSister ?daughter . ?daughter exfoaf:hasBrother ?son . ?son exfoaf:hasBrother ?son2 . ?daughter exfoaf:hasSister ?daughter2 . } WHERE { ?family a family:Family . OPTIONAL { ?family family:husband ?husband } . OPTIONAL { ?family family:wife ?wife } . OPTIONAL { ?family family:son ?son } . OPTIONAL { ?family family:daughter ?daughter } . OPTIONAL { ?family family:son ?son2 } . OPTIONAL { ?family family:daughter ?daughter2 } . FILTER ( ( ! BOUND(?son) || ! BOUND(?son2) || ( ?son != ?son2 )) && ( ! BOUND(?daughter) || ! BOUND(?daughter2) || ( ?daughter != ?daughter2 ) ) ) . }

  24. OWL 2 • W3C OWL Working Group formed in October 2007 to update OWL based on user feedback • 2 OWL Experiences and Directions Workshops led to W3C OWL 1.1 Member Submission in December 2006 • 6 Working Drafts published in April 2008 • Name changed to OWL 2 • New features particularly relevant to translation • Property chains • Data ranges • OWL-R • N-ary data predicates (may support comparisons and other builtins) • Largely already implemented in Pellet and other reasoners

  25. OWL 2 Examples(Functional-Style Syntax) SubObjectPropertyOf( SubObjectPropertyChain(owns hasPart) owns) SubObjectPropertyOf( SubObjectPropertyChain(parent brother) uncle)

  26. RIF • W3C Rule Interchange Format Working Group formed in December 2005 • Brings together multiple communities: Semantic Web, production rule system vendors (iLog, Fair Isaac, …), OMG, business rules (SBVR, …) • Working Drafts published April 2008 • + Addresses RDF and OWL compatibility • May eventually subsume SWRL • - Very few current implementations

  27. RIF Example(BLD presentation syntax) Forall ?family ?husband ?wife?husband # “foaf:Person^^rif:iri [“exfoaf:wife”^^rif:iri -> ?wife] :- ?family # “family:Family”^^rif:iri [“family:husband”^^rif:iri -> ?husband, “family:wife”^^rif:iri -> ?wife]Forall ?family ?husband ?wife?wife # “foaf:Person^^rif:iri [“exfoaf:husband”^^rif:iri -> ?husband] :- ?family # “family:Family”^^rif:iri [“family:husband”^^rif:iri -> ?husband, “family:wife”^^rif:iri -> ?wife]

  28. OWLED DL Safe (SWRL) Rules • OWLED Task Force • Out of charter for WG OWL WG • DL Safety means only working with named individuals • Incomplete compared to full SWRL • Better computational properties

  29. FOL • First Order Logic • Common Logic (ISO 24707:2007) • CycL • … • + Expressive power • Superset of OWL and SWRL • - Generally not focused on ontology translation • - Builtin support, scalability, and/or portability may be limited

  30. Custom Code • Gold standard • + Total flexibility • - Expensive • - Can’t reason over translation rules • Coverage • Data discovery • Maintenance

  31. Conclusions SWRL is the current de facto standard for Semantic Web rules SWRL works well for ontology translation SWRL rules can easily be translated to other representations when necessary

  32. Additional Pointers • SWRL Member Submission • http://www.w3.org/Submission/SWRL/ • Snoggle • http://snoggle.projects.semwebcentral.org • BBN Asio Toolkit • http://asio.bbn.com

More Related