OWL & SPARQL - 웹정보시스템

Similar documents
Semantic Web Technologies: Web Ontology Language

Main topics: Presenter: Introduction to OWL Protégé, an ontology editor OWL 2 Semantic reasoner Summary TDT OWL

KDI OWL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

SPAR-QL. Mario Arrigoni Neri

BASI DI DATI II 2 modulo Parte VIII: SPARQL

XML and Semantic Web Technologies. III. Semantic Web / 2. Web Ontology Language (OWL)

Querying RDF & RDFS. Several query languages exist to retrieve

SPARQL. Dr Nicholas Gibbins

Web Ontology Language: OWL

Open Geospatial Consortium Inc.

Semantic Technologies

OWL Web Ontology Language

Short notes about OWL 1

OWL an Ontology Language for the Semantic Web

Jans Aasman, Ph.D. CEO Franz Inc Optimizing Sparql and Prolog for reasoning on large scale diverse ontologies

OWL and tractability. Based on slides from Ian Horrocks and Franz Baader. Combining the strengths of UMIST and The Victoria University of Manchester

FOUNDATIONS OF SEMANTIC WEB TECHNOLOGIES

Description Logic. Eva Mráková,

Web Ontology Language: OWL

OWL a glimpse. OWL a glimpse (2) requirements for ontology languages. requirements for ontology languages

Logical Foundations for the Semantic Web

Web Ontology Language: OWL by Grigoris Antoniou Frank van Harmelen

OWL Tutorial. LD4P RareMat / ARTFrame Meeting Columbia University January 11-12, 2018

Web Ontology Language: OWL

Chapter 4 Web Ontology Language: OWL

An Introduction to the Semantic Web. Jeff Heflin Lehigh University

Semantic Web Test

INF3580/4580 Semantic Technologies Spring 2017

l A family of logic based KR formalisms l Distinguished by: l Decidable fragments of FOL l Closely related to Propositional Modal & Dynamic Logics

INF3580 Semantic Technologies Spring 2012

SPARQL. Fausto Giunchiglia and Mattia Fumagallli. University of Trento

Semantic Web Ontologies

Aperçu de SPARQL. Exemples tirés

Making BioPAX SPARQL

Simplified Approach for Representing Part-Whole Relations in OWL-DL Ontologies

Querying Data through Ontologies

The Semantic Web. Craig Knoblock. (based on slides by Yolanda Gil, Ian Horrocks, Jose Luis Ambite, and Tom Russ)

Modeling LMF compliant lexica in OWL-DL

Chapter 4 OWL. Outline. A Brief History of OWL: SHOE. The OWL Family Tree

JOURNAL OF OBJECT TECHNOLOGY

Knowledge management. OWL Web Ontology Language

Intelligent Agents. Pınar Yolum Utrecht University. Spring 2018 Pınar Yolum

Semantic Web. Ontology and OWL. Morteza Amini. Sharif University of Technology Fall 95-96

Building Blocks of Linked Data

Ontology-Based Data Access

Contents. G52IWS: The Semantic Web. The Semantic Web. Semantic web elements. Semantic Web technologies. Semantic Web Services

Web Data and Declarative Programming

OWL Full and UML 2.0 Compared

Jans Aasman, Ph.D. CEO Franz Inc GeoSpatial with AllegroGraph

Evaluating DBOWL: A Non-materializing OWL Reasoner based on Relational Database Technology

Deep integration of Python with Semantic Web technologies

Bryan Smith May 2010

Knowledge Representation for the Semantic Web

Semantic Web KM: A Knowledge Machine for Semantic Webs

Chapter 2 AN INTRODUCTION TO THE OWL WEB ONTOLOGY LANGUAGE 1. INTRODUCTION. Jeff Heflin Lehigh University

Formalising the Semantic Web. (These slides have been written by Axel Polleres, WU Vienna)

FHIR RDF Sample side by side comparisons

Description Logics and OWL

Reasoning with the Web Ontology Language (OWL)

Extracting Ontologies from Standards: Experiences and Issues

Description Logics. F. Description Logics. This section is based on material from Ian Horrocks:

For return on 19 January 2018 (late submission: 2 February 2018)

The Semantic Web. What is the Semantic Web?

Knowledge management. OWL Web Ontology Language

Table of Contents. iii

Unit 2 RDF Formal Semantics in Detail

Goals. Introduction to Ontologybased. Service Semantics. Functional Semantics. Need more than XML Schema. Non-functional Semantics

Today: RDF syntax. + conjunctive queries for OWL. KR4SW Winter 2010 Pascal Hitzler 3

Semantic Web and Python Concepts to Application development

AI Fundamentals: Knowledge Representation and Reasoning. Maria Simi

SEMANTIC WEB AND COMPARATIVE ANALYSIS OF INFERENCE ENGINES

Semantic Web. MPRI : Web Data Management. Antoine Amarilli Friday, January 11th 1/29

OWL 2 Update. Christine Golbreich

Lecture 8 OWL: Web Ontology Language

Ontologies and OWL. Riccardo Rosati. Knowledge Representation and Semantic Technologies

Knowledge Engineering with Semantic Web Technologies

Reasoning with DAML+OIL:

Logic and Reasoning in the Semantic Web (part I RDF/RDFS)

Reminder: RDF triples

Presented By Aditya R Joshi Neha Purohit

Ontology-based Metadata for MidArch-Styles

LECTURE 09 RDF: SCHEMA - AN INTRODUCTION

Helmi Ben Hmida Hannover University, Germany

OntoViBe: An Ontology Visualization Benchmark

Genea: Schema-Aware Mapping of Ontologies into Relational Databases

12th ICCRTS. On the Automated Generation of an OWL Ontology based on the Joint C3 Information Exchange Data Model (JC3IEDM)

RDF AND SPARQL. Part IV: Syntax of SPARQL. Dresden, August Sebastian Rudolph ICCL Summer School

Linked data and its role in the semantic web. Dave Reynolds, Epimorphics

08 OWL SEMANTIC WEB ONTOLOGY WEB LANGUAGE IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD

Outline RDF. RDF Schema (RDFS) RDF Storing. Semantic Web and Metadata What is RDF and what is not? Why use RDF? RDF Elements

What is the Semantic Web?

Chapter 3. RDF Schema

SEMANTIC WEB 05 RDF SCHEMA MODELLING SEMANTICS IMRAN IHSAN ASSISTANT PROFESSOR, AIR UNIVERSITY, ISLAMABAD

Standardization of Ontologies

Racer - An Inference Engine for the Semantic Web

OWL 2 Syntax and Semantics Sebastian Rudolph

Flexible Tools for the Semantic Web

Converting a thesaurus into an ontology: the use case of URBISOC

Ontologies and The Earth System Grid

nrql Tutorial Systems & Co. KG Blumenau Hamburg Germany nrql Tutorial p.1/55

Transcription:

- 웹정보시스템 - OWL & SPARQL 2009. 12 Sang-goo Lee School of Computer Science & Engineering Seoul National University, Seoul, Korea Seoul National University Seoul, Korea Copyright 2008~2009 SNU. All rights reserved.

OWL & Description Logics

OWL Web Ontology Language (WOL? -> OWL) is built on top of RDF was designed to be interpreted by computers (not people) is a W3C Recommendation (standard) A richer ontology language relations between classes: e.g., disjointness cardinality: e.g., exactly one richer typing of properties characteristics of properties (e.g., symmetry) Three sublanguages OWL Lite - simplest OWL DL (includes OWL Lite) - constructs with restriction OWL Full (includes OWL DL) - full expressive power OWL & SPARQL - 3

OWL Basic Structure (OWL Lite) (In)Equality: equivalentclass, equivalentproperty, sameas, differentfrom, AllDifferent, distinctmembers, Property Characteristics: ObjectProperty, DatatypeProperty, inverseof, TransitiveProperty, SymmetricProperty, FunctionalProperty, InverseFunctionalProperty Property Restrictions: Restriction, onproperty, allvaluesfrom, somevaluesfrom, Restricted Cardinality: mincardinality (only 0 or 1), maxcardinality (only 0 or 1), cardinality (only 0 or 1) Header Information: Ontology, imports Class Intersection: intersectionof Versioning: versioninfo, priorversion, backwardcompatiblewith, incompatiblewith, DeprecatedClass, DeprecatedProperty Annotation Properties: rdfs:label, rdfs:comment, rdfs:seealso, rdfs:isdefinedby, AnnotationProperty, OntologyProperty Extended Structure (OWL DL & Full) Class Axioms: oneof, datarange, disjointwith, equivalentclass, rdfs:subclassof Boolean Combinations of Class Expressions: unionof, complementof, intersectionof Arbitrary Cardinality: mincardinality, maxcardinality, cardinality Filler Information: hasvalue OWL & SPARQL - 4

OWL Examples <owl:class rdf:about="#associateprofessor"> <owl:disjointwith rdf:resource="#professor"/> <owl:disjointwith rdf:resource="#assistantprofessor"/> </owl:class> <owl:class rdf:id="faculty"> <owl:equivalentclass rdf:resource="#academicstaffmember"/> </owl:class> <owl:objectproperty rdf:id="istaughtby"> <owl:domain rdf:resource="#course"/> <owl:range rdf:resource= "#academicstaffmember"/> <rdfs:subpropertyof rdf:resource="#involves"/> </owl:objectproperty> OWL & SPARQL - 5

OWL Examples (cont.) <owl:objectproperty rdf:id="teaches"> <rdfs:range rdf:resource="#course"/> <rdfs:domain rdf:resource= "#academicstaffmember"/> <owl:inverseof rdf:resource="#istaughtby"/> </owl:objectproperty> <owl:class rdf:about="#firstyearcourse"> <rdfs:subclassof> <owl:restriction> <owl:onproperty <owl:allvaluesfrom </owl:restriction> </rdfs:subclassof> </owl:class> rdf:resource="#istaughtby"/> rdf:resource="#professor"/> OWL & SPARQL - 6

Description Logics? A family of logic based Knowledge Representation formalisms Descendants of semantic networks and KL-ONE Describe domain in terms of concepts (classes), roles (relationships) and individuals Distinguished by: Formal semantics (typically model theoretic) Decidable fragments of FOL Provision of inference services Sound and complete decision procedures for key problems OWL & SPARQL - 7

DL Basics Concepts (unary predicates/formulae with one free variable) E.g., Person, Father, Mother Roles (binary predicates/formulae with two free variables) E.g., haschild, hashudband Individual names (constants) E.g., Alice, Bob, Cindy Subsumption (relations between concepts) E.g. Female Person Operators (for forming concepts and roles) And(Π), Or(U), Not ( ) Universal qualifier ( ), Existent qualifier( ) Number restriction :,, = Inverse role ( - ), transitive role ( + ), Role hierarchy OWL & SPARQL - 8

Example OWL & SPARQL - 9

Role example (Inverse Role) hasparent = haschild - hasparent(bob,alice) -> haschild(alice, Bob) (Transitive Role) ancestor + ancestor(bob,david), ancestor(david, Mack) -> ancestor(bob,mack) (Role Hierarchy) hasmother hasparent hasmother(bob,alice) -> hasparent(bob, Alice) HappyFather Father Π 1 haschild.woman Π 1 haschild.man OWL & SPARQL - 10

OWL as DL: Axioms [Ian Horrocks] OWL & SPARQL - 11

OWL as DL: Class Constructors [Ian Horrocks] OWL & SPARQL - 12

DL Knowledge Base Knowledge Base [Ian Horrocks] Tbox (schema) HappyFather Person Π 1 haschild.woman Π 1 haschild.man Abox (data) Happy-Father(Bob) Inference System Interface Tbox (terminology, taxonomy): a set of axioms describing structure of domain (i.e., a conceptual schema) ABox (membership assertions): a set of axioms describing a concrete situation (data), e.g.: John:HappyFather; <John,Mary>:hasChild Separation has no logical significance But may be conceptually and implementationally convenient OWL & SPARQL - 13

DL Knowledge Base Example Tbox (terminology, taxonomy) Abox (membership assertions) OWL & SPARQL - 14

Description Logic Family DLs are a family of logic based KR formalisms Particular languages mainly characterised by: Set of constructors for building complex concepts and roles from simpler ones Set of axioms for asserting facts about concepts, roles and individuals ALC (Attributive Language with Complements) is the smallest DL ALC ::= A C C D C D R.C R.C Constructors include booleans (and, or, not), and Restrictions on role successors OWL & SPARQL - 15

OWL Full, DL, Lite SHOIQ = OWL DL S =ALCR + : ALC with transitive role H = role hierarchy O = nominal, e.g, WeekEnd = {Saturday, Sunday} I = Inverse role Q = qualified number restriction e.g. 1 haschild.man N = number restriction e.g. 1 haschild OWL Lite = SHIF(D n ) F = functionality: ( 1 R) Complexity SHOIQ: NExpTime (adding transitive roles => undecidable: OWL full) SHIF: ExpTime OWL & SPARQL - 16

Triple store & SPARQL

Triples as Graph createtriplestore( seminar.db" ) addtriple (Person1 first-name Steve) addtriple (Person1 isa Organizer) addtriple (Person1 age 52) addtriple (Person2 first-name Jans) addtriple (Person2 isa Psychologist) addtriple (Person2 age 50) addtriple (Person3 first-name Craig) addtriple (Person3 isa SalesPerson) addtriple (Person3 age 32) addtriple (Person1 colleague-of Person2) addtriple (Person1 colleague-of Person3) addtriple (Person1 likes Pizza) addtriple ( Person3 neighbour-of Person1) addtriple ( Person3 neighbour-of Person2) [Franz, Inc., 2008] OWL & SPARQL - 18

Query the Graph (select (?xname?yname) (?x colleague-of?y) (?y neighbour-of?x) (?x first-name?xname) (?y first-name?yname)) [Franz, Inc., 2008] OWL & SPARQL - 19

Triple Store A system to provide a mechanism for persistent storage and access of RDF graphs. Persistent RDF storage Why? Relational model vs OO model vs RDF model Everything is modeled as triples => very flexible cf. relational model Simple cf. relational model, OO model Standards based cf. OO model OWL & SPARQL - 20

Triple Store Architectures In memory Internal data representation of graph Will not scale RDB based Built on top of a relational DB - easy implementation Not optimized for RDF graph RDF specific Specially designed storage system for RDF graphs Optimized but New (not mature) AllegroGraph, Sesame, Oracle 11g (?) Issues Scalability Language support: SPARQL Level of inference: RDFS, OWL (levels), Interoperability: APIs Relational-to-RDF mapping OWL & SPARQL - 21

Triple Store Benchmarks Lehigh University Benchmark (LUBM) Ontology: The benchmark ontology (named Univ-Bench) Data Generator(UBA): Tool to generate synthetic OWL data over the Univ-Bench ontology in the unit of a university Test Queries: 14 test queries Tester (UBT) : The test module Ontology Benchmark (UOBM) extends the LUBM benchmark in terms of inference and scalability testing UOBM ontology and data set Berlin SPARQL Benchmark (BSBM) designed along an e-commerce use case SPARQL and SQL version available SP 2 Bench a scalable RDF data generator a set of benchmark queries OWL & SPARQL - 22

SPARQL SPARQL is a query language and a protocol for accessing RDF designed by the W3C RDF Data Access Working Group. a W3C Recommendation: SPARQL Query Language for RDF, http://www.w3.org/tr/rdf-sparql-query/ SPARQL Query language can be used to get information from RDF graphs. It provides facilities to: extract information in the form of URIs, blank nodes, plain and typed literals. extract RDF subgraphs. construct new RDF graphs based on information in the queried graphs. OWL & SPARQL - 23

The Semantic Web Layer Tower OWL & SPARQL - 24

Basic Graph Pattern Triple Patterns Matching a triple pattern to a graph: bindings between variables and RDF Terms?book dc:title?title Data rdf:type rdf:type rdf:property Query SELECT?x?v WHERE {?x?x?v } Query Result x rdf:type v rdf:property OWL & SPARQL - 25

Basic Graph Pattern - Multiple Matches Data @prefix foaf: <http://xmlns.com/foaf/0.1/>. _:a foaf:name "Johnny Lee". _:a foaf:mbox <mailto:jlow@example.com>. _:b foaf:name "Peter Guy". _:b foaf:mbox <mailto:peter@example.org>. [ Written in Turtle format: Terse RDF Triple Language ] Query PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT?name?mbox WHERE {?x foaf:name?name.?x foaf:mbox?mbox } Query Result name "Johnny Lee " "Peter Guy" mbox <mailto:jlow@example.com> <mailto:peter@example.org> OWL & SPARQL - 26

Value Constraints @prefix dc: <http://purl.org/dc/elements/1.1/>. @prefix : <http://example.org/book/>. @prefix ns: <http://example.org/ns#>. :book1 dc:title "SPARQL Tutorial". :book1 ns:price 42. :book2 dc:title "The Semantic Web". :book2 ns:price 23. Query Data PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX ns: <http://example.org/ns#> SELECT?title?price WHERE {?x ns:price?price. FILTER?price < 30.?x dc:title?title. } title "The Semantic Web" 23 price Query Result OWL & SPARQL - 27

Optional graph patterns @prefix dc: <http://purl.org/dc/elements/1.1/>. Data @prefix : <http://example.org/book/>. @prefix ns: <http://example.org/ns#>. :book1 dc:title "SPARQL Tutorial". :book1 ns:price 42. :book2 dc:title "The Semantic Web". :book2 ns:price 23. PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX ns: <http://example.org/ns#> Query SELECT?title?price WHERE {?x dc:title?title. OPTIONAL {?x ns:price?price. title price FILTER?price < 30 }} SPARQL Tutorial "The Semantic Web" 23 Query Result OWL & SPARQL - 28

Order By PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT?name WHERE {?x foaf:name?name } ORDER BY?name PREFIX : http://example.org/ns# PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/xmlschema#> SELECT?name WHERE {?x foaf:name?name ; :empid?emp } ORDER BY DESC(?emp) OWL & SPARQL - 29

In XML Form [SPARQL Variable Binding Results XML Format] namex namey nicky "Alice" "Bob" "Alice" "Clare" "CT" <?xml version="1.0"?> <sparql xmlns="http://www.w3.org/2005/sparqlresults#"> <head> <variable name="namex"/> <variable name="namey"/> <variable name="nicky"/> </head> <results> <result> <binding name="namex"> <literal>alice</literal> </binding> <binding name="namey"> <literal>bob</literal> </binding> </result> <result> <binding name="namex"> <literal>alice</literal> </binding> <binding name="namey"> <literal>clare</literal> </binding> <binding name="nicky"> <literal>ct</literal> </binding> </result> </results> </sparql> OWL & SPARQL - 30

Query forms and Extensions Query forms SELECT: returns all, or a subset of the variables bound in a query pattern match CONSTRUCT: returns an RDF graph constructed by substituting variables in a set of triple templates DESCRIBE: returns an RDF graph that describes the resources found. ASK: returns whether a query pattern matches or not. Related specifications SPARQL Query Language for RDF http://www.w3.org/tr/rdf-sparql-query/ defines the syntax and semantics of the SPARQL query language for RDF SPARQL Protocol for RDF http://www.w3.org/tr/rdf-sparql-protocol/ defines the remote protocol for issuing SPARQL queries and receiving the results SPARQL Query Results XML Format http://www.w3.org/tr/rdf-sparql-xmlres/ defines an XML document format for representing the results of SPARQL queries OWL & SPARQL - 31

OWL & SPARQL Seoul National University Seoul, Korea Copyright 2008~2009 SNU. All rights reserved.