SQWRL: a Query Language for OWL Martin O’Connor, Amar Das Stanford Center for Biomedical Informatics Research, Stanford University.

Slides:



Advertisements
Similar presentations
May 23, 2004OWL-S straw proposal for SWSL1 OWL-S Straw Proposal Presentation to SWSL Committee May 23, 2004 David Martin Mark Burstein Drew McDermott Deb.
Advertisements

Efficiently Querying Relational Databases using OWL and SWRL Martin OConnor Stanford Medical Informatics, Stanford University.
Knowledge Integration with SWRL Martin OConnor Stanford Center for Biomedical Informatics Research, Stanford University.
Languages on the Semantic Web Frank van Harmelen Vrije Universiteit Amsterdam Ian Horrocks University of Manchester.
SOTIRIS BATSAKIS EURIPIDES G.M. PETRAKIS TECHNICAL UNIVERSITY OF CRETE INTELLIGENT SYSTEMS LABORATORY Imposing Restrictions Over Temporal Properties in.
Ontologies and Databases Ian Horrocks Information Systems Group Oxford University Computing Laboratory.
OWL - DL. DL System A knowledge base (KB) comprises two components, the TBox and the ABox The TBox introduces the terminology, i.e., the vocabulary of.
SWRL – Semantic Web Rule Language University of Belgrade School of Electrical Engineering Department of Computer Engineering and Information Theory Used.
An Introduction to Description Logics
Ontology Editors.
Chronos: A Tool for Handling Temporal Ontologies in Protégé
An Introduction to RDF(S) and a Quick Tour of OWL
A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer Paul R. Smart, Alistair Russell, Dave Braines, Yannis Kalfoglou,,
Of 27 lecture 7: owl - introduction. of 27 ece 627, winter ‘132 OWL a glimpse OWL – Web Ontology Language describes classes, properties and relations.
1 Query-by-Example (QBE). 2 v A “GUI” for expressing queries. –Based on the Domain Relational Calulus (DRC)! –Actually invented before GUIs. –Very convenient.
Database Management Systems 3ed, Online chapter, R. Ramakrishnan and J. Gehrke1 Query-by-Example (QBE) Online Chapter Example is the school of mankind,
5/15/2015Lecture 31 CS 222 Database Management System Spring Lecture 3 Korra Sathya Babu Department of Computer Science NIT Rourkela.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Query-by-Example (QBE) Chapter 6 Example is the school of mankind, and they will learn at no.
From SHIQ and RDF to OWL: The Making of a Web Ontology Language
Editing Description Logic Ontologies with the Protege OWL Plugin.
An OWL based schema for personal data protection policies Giles Hogben Joint Research Centre, European Commission.
Ontologies: Making Computers Smarter to Deal with Data Kei Cheung, PhD Yale Center for Medical Informatics CBB752, February 9, 2015, Yale University.
Reasoning the FMA Ontologies with TrOWL Jeff Z. Pan, Yuan Ren, Nophadol Jekjantuk, and Jhonatan Garcia University of Aberdeen, UK ORE2013.
Ming Fang 6/12/2009. Outlines  Classical logics  Introduction to DL  Syntax of DL  Semantics of DL  KR in DL  Reasoning in DL  Applications.
Building an Ontology of Semantic Web Techniques Utilizing RDF Schema and OWL 2.0 in Protégé 4.0 Presented by: Naveed Javed Nimat Umar Syed.
Ontologies and Lexical Semantic Networks, Their Editing and Browsing Pavel Smrž and Martin Povolný Faculty of Informatics,
OWL 2 Web Ontology Language: New Features and Rationale Feroz Farazi
Ontology-Driven Software Development with Protégé and OWL Holger Knublauch Stanford Medical Informatics Model-Driven Semantic Web.
Coastal Atlas Interoperability - Ontologies (Advanced topics that we did not get to in detail) Luis Bermudez Stephanie Watson Marine Metadata Interoperability.
Advanced topics in software engineering (Semantic web)
Rules, RIF and RuleML.
A Semantic-Web Representation of Clinical Element Models
DAML+OIL: an Ontology Language for the Semantic Web.
1 Comparison and Combination of the Expressive Power of Description Logics and Logic Programs Jidi (Judy) Zhao December 7, 2015.
Of 33 lecture 1: introduction. of 33 the semantic web vision today’s web (1) web content – for human consumption (no structural information) people search.
6 Dec Rev. 14 Dec CmpE 583 Fall 2008OWL Intro 1 OWL Intro Notes off Lacy Ch. 4 Atilla Elçi.
Semantic Web Final Exam Review. Topics for Final Exam First exam material (~30%) Design Patterns and Map/Reduce (~20%) Inference / Restrictions (~10%)
OWL & Protege Introduction Dongfang Xu Ph.D student, School of Information, University of Arizona Sept 10, 2015.
RDFPath: Path Query Processing on Large RDF Graph with MapReduce Martin Przyjaciel-Zablocki et al. University of Freiburg ESWC May 2013 SNU IDB.
Conclusions Presenter: Manolis Koubarakis Extended Semantic Web Conference 2012.
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 8: SPARQL (1.1) Aidan Hogan
ece 627 intelligent web: ontology and beyond
SWRL Semantic Web Rule Language Susana R. Novoa UNIK4710.
Using an Integrated Ontology and Information Model for Querying and Reasoning about Phenotypes The Case of Autism Samson W. Tu, MS, Lakshika Tennakoon,
1 SQL: The Query Language (Part II). 2 Expressions and Strings v Illustrates use of arithmetic expressions and string pattern matching: Find triples (of.
Of 35 lecture 17: semantic web rules. of 35 ece 627, winter ‘132 logic importance - high-level language for expressing knowledge - high expressive power.
Implementation of Ontology Based Context-awareness Framework Ki-Chul Lee, Jung-Hoon Kim International Conference on Multimedia and Ubiquitous Engineering.
Versatile Information Systems, Inc International Semantic Web Conference An Application of Semantic Web Technologies to Situation.
Ontology Technology applied to Catalogues Paul Kopp.
26/02/ WSMO – UDDI Semantics Review Taxonomies and Value Sets Discussion Paper Max Voskob – February 2004 UDDI Spec TC V4 Requirements.
NEDA ALIPANAH, MARIA ADELA GRANDO DBMI 11/19/2012.
OWL (Ontology Web Language and Applications) Maw-Sheng Horng Department of Mathematics and Information Education National Taipei University of Education.
OWL, DL and rules Based on slides from Grigoris Antoniou, Frank van Harmele and Vassilis Papataxiarhis.
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2016
CC La Web de Datos Primavera 2016 Lecture 8: SPARQL (1.1)
CC La Web de Datos Primavera 2017 Lecture 8: SPARQL [ii]
Jim Fawcett CSE681 – Software Modeling and Analysis Fall 2013
Knowledge Representation Part II Description Logic & Introduction to Protégé Jan Pettersen Nytun.
Semantic Web Foundations
Stanford Medical Informatics
ece 720 intelligent web: ontology and beyond
Rules, RIF and RuleML.
Ontology.
ece 720 intelligent web: ontology and beyond
Zachary Cleaver Semantic Web.
Ontology.
Query Functions.
CC La Web de Datos Primavera 2018 Lecture 8: SPARQL [1.1]
A Tutorial Summary of Description Logic and Hybrid Rules
CS4540 Special Topics in Web Development LINQ to Objects
Presentation transcript:

SQWRL: a Query Language for OWL Martin O’Connor, Amar Das Stanford Center for Biomedical Informatics Research, Stanford University

SWRL and Querying SWRL is a rule language, not a query language However, a rule antecedent can be viewed as a pattern matching specification, i.e., a query With built-ins, language compliant query extensions are possible Hence: SQWRL (Semantic Query-Enhanced Web Rule Language; pronounced squirrel)

Example SWRL Rule: is adult? Person(?p) ^ hasAge(?p,?age) ^ swrlb:greaterThan(?age,17) → Adult(?p) Classify all persons in an ontology with an age greater than 17 as adults.

Example SQWRL Query Person(?p) ^ hasAge(?p,?age) ^ swrlb:greaterThan(?age,17) → sqwrl:select(?p, ?age) List all persons in an ontology with an age greater than 17.

Person(?p) ^ hasAge(?p,?age) ^ swrlb:greaterThan(?age,17) → sqwrl:select(?p, ?age) ^ sqwrl:orderBy(?age) List all persons in an ontology with an age greater than 17 and order the result by age in ascending order. Example SQWRL Query: Ordering Results Also: orderByDecending

Important: no way of asserting count in ontology! Example SQWRL Query: Counting Results Car(?c) → sqwrl:count(?c) Count all cars in ontology.

Person(?p) ^ hasAge(?p, ?age) → sqwrl:avg(?age) Also: sqwrl:max, sqwrl:min, sqwrl:sum Example SQWRL Query: Aggregating Results Average age of persons in ontology.

Example SQWRL Query: Arbitrary OWL Class Expressions (hasChild >= 1)(?x) → sqwrl:select(?x) SQWRL can act as a DL query language Individuals with cardinality restrictions.

Semantics (Briefly) Any SWRL body is valid query specification Does not violate OWA Does assume UNA

Useful but Relatively Inexpressive Useful but relatively inexpressive. Needs: –Negation As Failure –Disjunction –Complex Counting –Complex Aggregation We have recently added sets to the language to tackle these problems

SQWRL: Basic Set Operator Person(?p) ° sqwrl:makeSet(?s, ?p) ^ sqwrl:size(?size, ?s) → sqwrl:select(?size) Count all persons in ontology. Ser operators: sqwrl:isEmpty, sqwrl:union, sqwrl:difference

SQWRL: Negation as Failure Drug(?d) ^ BetaBlocker(?b) ° sqwrl:makeSet(?s1, ?d) ^ sqwrl:makeSet(?s2, ?b) ^ sqwrl:difference(?s3, ?s1, ?s2) ^ sqwrl:size(?size, ?s3) → sqwrl:select(?size) List the number of non beta blocker drugs in ontology.

SQWRL: Disjunction AntiHypertensive(?d1) ^ BetaBlocker(?d2) ° sqwrl:makeSet(?s1, ?d1) ^ sqwrl:makeSet(?s2, ?d2) ^ sqwrl:union(?s3, ?s1, ?s2) ^ sqwrl:size(?size, ?s3) → sqwrl:select(?size) List the number of beta blocker or anti-hypertensive drugs in ontology.

SQWRL: Complex Counting Patient(?p) ^ hasDrug(?p,?d) ° sqwrl:makeSet(?s, ?d) ^ sqwrl:groupBy(?s, ?p) ^ sqwrl:size(?n, ?s) ^ swrlb:greaterThan(?n, 2) → sqwrl:select(?p) List all patients on more than two drugs.

SQWRL: Complex Aggregation Patient(?p) ^ hasDrug(?p,?d) ^ hasDose(?d, ?dose) ° sqwrl:makeSet(?s, ?dose) ^ sqwrl:groupBy(?s, ?p, ?d) ^ sqwrl:avg(?avg, ?s) → sqwrl:select(?p, ?d, ?avg) List the average dose of each drug taken by each patient.

SQWRL: NAF, Disjunction, Complex Counting and Aggregation Patient(?p) ^ hasDrug(?p,?d) ^ hasDose(?d, ?dose) ^ BetaBlocker(?d1) ^ AntiHypertensive(?d2) ° sqwrl:makeSet(?s1, ?dose) ^ sqwrl:groupBy(?s1, ?p, ?d) ^ sqwrl:makeSet(?s2, ?drug) ^ sqwrl:groupBy(?s2, ?p) ^ sqwrl:makeSet(?s3, ?d1, ?d2) ^ sqwrl:avg(?avg, ?s1) ^ sqwrl:size(?n, ?s2) ^ swrlb:greaterThan(?n, 2) ^ sqwrl:intersection(?s4, ?s2, ?s3) ^ sqwrl:isEmpty(?s4) → sqwrl:select(?p, ?d, ?avg) List the average dose of patients that are on more than two drugs and where none of those drugs is a beta blocker or anti-hypertensive.

Advantages of SWRL-Based Query Language No need to invent a new semantics Standard(ish) presentation syntax ( ° is syntactic sugar) Standard serialization Can use existing reasoning infrastructure Can use existing editors On-the-fly query checking in editors For SWRL users, easy to learn Extensible with built-ins (TBox, RDF,XML…) Useful for debugging SWRL rules Queries can interoperate with rules Not SPARQL!

Summary Core language features available for 1+ years in Protege-OWL Set operators will be available in month or so Plans for Protege4 port