21
What is Ontology & How it enables Semantic Web? What is OWL? Classes & Properties Property Restrictions OWL Reasoning capabilities OWL Species Ontology example - SIOC • SPARQL Ontology API, Tools & Editors • Applications Ontology Agenda... Intro to OWL Agenda...

Intro to OWL & Ontology

Embed Size (px)

DESCRIPTION

Introduction to Ontology, OWL and other semantic technologies.

Citation preview

Page 1: Intro to OWL & Ontology

• What is Ontology & How it enables Semantic Web?• What is OWL?• Classes & Properties• Property Restrictions• OWL Reasoning capabilities• OWL Species• Ontology example - SIOC• SPARQL• Ontology API, Tools & Editors• Applications

OntologyAgenda...

Intro to OWLAgenda...

Page 2: Intro to OWL & Ontology

OWL What is Ontology?

– Ontology– Formal, explicit description of concepts in a domain– Attaches semantics to data.– Specifies the relationships between data/concepts.

Thus ,– Machines can interpret meaning of data, helping to build

semantically-aware Information systems– Data can be Integrated on Web-scale, enabling Semantic Web.– Reasoning of data can be automated and complex inferences

can be made.

Page 3: Intro to OWL & Ontology

OWL Integrating data on Web-scale & enabling Semantic Web

New Data: produce RDF/OWL compliant data

Existing Data: map them to existing/new ontologies.

Page 4: Intro to OWL & Ontology

OWL OWL...

• OWL stands for Web Ontology Language

– Helps to build Ontologies– Its vocabulary is an extension to RDFS vocabulary

• Owl:Class is a subclass of rdfs:Class• Owl:Object/DataProperty are subclasses of rdfs:Property

– Provides a rich set of Inference Capabilities– Supports import of vocabulary from other Owl

documents

Page 5: Intro to OWL & Ontology

OWLOWL Classes...

• In OWL, Classes can be defined in many ways by combining different classes:– Union– Intersection – Enumeration – Restriction

• Eg OWL Class description:

<owl:Class rdf:ID="Movie"><rdfs:subClassOf rdf:resource="#Product"/><rdfs:label>Movie</rdfs:label>

</owl:Class>

Page 6: Intro to OWL & Ontology

OWL OWL Union/Enum...

• Union:<owl:Class rdf:ID="Literature">

<owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Novel"/> <owl:Class rdf:about="#Short_Story"/>

</owl:unionOf></owl:Class>

• Enumeration:<owl:Class rdf:ID="Currency">

<owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:ID="£"/> <owl:Thing rdf:ID="€"/>

</owl:oneOf></owl:Class>

Page 7: Intro to OWL & Ontology

OWL OWL Properties...

• ObjectProperty : Range must be a resource

<owl:ObjectProperty rdf:ID="writtenBy"><rdfs:domain rdf:resource="#Book"/><rdfs:range rdf:resource="#Author"/>

</owl:ObjectProperty>

• DataTypeProperty : Range must be a normal Literal

<owl:DatatypeProperty rdf:ID="endpoint"><rdfs:domain rdf:resource="#Service"/><rdfs:range rdf:resource="&xsd;anyURI"/>

</owl:DatatypeProperty>

Page 8: Intro to OWL & Ontology

OWL OWL Restrictions...

• has value :– The restricted property has exactly the given value.

• all values from:– All values of the restricted property, if it has any, are members

of the given class. • some values from:

– The property has at least one value which is a member of the given class.

• min cardinality :– The property has at least n values, for some positive integer n.

• max cardinality :– The property has at most n values, for some positive integer n.

Page 9: Intro to OWL & Ontology

OWL OWL Restrictions...

• hasValue Restriction example:Every Fiction Book must have its genreOf property value as an object of Ficion only.

<owl:Class rdf:ID="FictionBook"><rdfs:subClassOf><owl:Restriction>

<owl:onProperty rdf:resource="#genreOf" /><owl:hasValue rdf:resource="#Fiction" />

</owl:Restriction></rdfs:subClassOf>

</owl:Class>

Page 10: Intro to OWL & Ontology

OWL OWL Reasoning...

• OWL provides different mathematical set properties which can be used for making inferences. They are:– Transitive – Symmetric– Functional– InverseFunctional– Equilvalence Classes/Properties– Equivalent Resources– Inverse

Page 11: Intro to OWL & Ontology

OWL OWL Transitive...

• Transitive property: <owl:Class rdf:ID="ProductCategory" />

<owl:TransitiveProperty rdf:ID="isSubcategoryOf"><rdfs:domain rdf:resource="#ProductCategory"/><rdfs:range rdf:resource="#ProductCategory"/>

</owl:TransitiveProperty>

<ProductCategory rdf:ID="Books"/><ProductCategory rdf:ID="Arts_and_Entertainment">

<isSubcategoryOf rdf:resource="#Books" /></ProductCategory><ProductCategory rdf:ID="Comics_and_Graphic_Novels">

<isSubcategoryOf rdf:resource="#Arts_and_Entertainment" /></ProductCategory>

Page 12: Intro to OWL & Ontology

OWL OWL Symmetric...

• Symmetric property: <owl:SymmetricProperty rdf:ID=“isFriendOf">

<rdfs:domain rdf:resource="#Person"/><rdfs:range rdf:resource="#Person"/>

</owl:SymmetricProperty><owl:class rdf:ID = “Person“/><Person rdf:ID=“Kiran"><Person rdf:ID=“ramesh">

<isFriendOf rdf:resource=“#Kiran" /></Person>

Inference System can reason out that Kiran is a friend of Ramesh automatically from the above data.

Page 13: Intro to OWL & Ontology

OWL OWL Inverse...

• Inverse property: <owl:ObjectProperty rdf:ID="writtenBy">

<rdfs:domain rdf:resource="#Book"/><rdfs:range rdf:resource="#Author"/>

</owl:ObjectProperty>

<owl:ObjectProperty rdf:ID="writerOf"><owl:inverseOf rdf:resource="#writtenBy"/>

</owl:ObjectProperty>

Given 2 triples: ‘A’ ‘writtenBy’ ‘X’ & ‘writtenBy’ ‘owl:inverse’ ‘writerOf’, it can deduce that ‘X’ ‘writerOf’ ‘A’.

Page 14: Intro to OWL & Ontology

OWL OWL Equivalent...

• Equivalent Classes: <owl:Class rdf:ID="Writer">

<owl:equivalentClass rdf:resource="#Author"/></owl:Class>

• Equivalent Properties: <owl:ObjectProperty rdf:ID="authorOf">

<owl:equivalentProperty rdf:resource="#writerOf"/></owl:ObjectProperty>

• Equivalent Resources:<Author rdf:ID="Joanne_Rowling">

<owl:sameAs rdf:resource="#J_K_Rowling" /></Author>

Page 15: Intro to OWL & Ontology

OWL OWL Species...

OWL has three variations:• OWL Full :

– Most Expressive– No Computational Guarantee– Has all the capabilities of RDFS

• OWL DL( Description Logic)– Moderately Expressive– Mostly Computationally decidable

• OWL Lite– Least Expressive,most Restrictive– Computationally decidable

Page 16: Intro to OWL & Ontology

OWL Query Languages SPARQL...

• SPARQL Protocol and RDF Query Language:– W3C standard language for querying Ontology– SPARQL is to Ontology, what SQL is to RDBMS– Example:

PREFIX dc: <http://purl.org/dc/elements/1.1/>

SELECT ?title

WHERE

{

?book dc:title ?title .

FILTER regex(?title, "^SPARQL")

}

Returns all titles of books that start with ‘SPARQL’

Page 17: Intro to OWL & Ontology

OWL Sample Standard Ontology...

SIOC - Semantically-Interlinked Online Communities.

SIOC Exporters:•WordPress SIOC Exporter•Drupal SIOC Exporter•phpBB SIOC Exporter

Page 18: Intro to OWL & Ontology

• Software that can automate the inference making from a given Ontology

• If Ontology has the following two statements:1. A friendOf B2. ‘friendOf’ is Symmetric

Then, it makes the inference : B firendOf A

• Some Popular Reasoners:– Pellet (OWL DL Reasoner)– Jena Reasoners– FaCT++ …

OWL OWL Reasoners...

Page 19: Intro to OWL & Ontology

OWL Ontology API…

• OWL API• Pellet API• Jena API: is a Semantic Web Frame Work. It provides a rich set

of API to• Create an normal/persistent RDF models• Create an normal/persistent Ontology models• Serialize the RDF/Ontology models in a variety of languages• SPARQL support to query the RDF/Ontology models• Variety of Reasoners to make inferences from the models• Concurrecy and locking mechanisms

Page 20: Intro to OWL & Ontology

OWL Ontology Editors…

• Protégé• TopBraid Composer• Onto Studio• NeOn toolkit

Page 21: Intro to OWL & Ontology

OWL Applications…

• http://www.freebase.com/ : An entity graph of people, places and things, built by a community

• http://dbpedia.org/About : Semantic version of Wikipedia

• http://sig.ma/: Semantic search on RDF data available on web

• http://www.data.gov/semantic/index: US govt initiatives to leavarage semantic technologies for better governance.