Ontology Query - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Ontology Query

Description:

Because ontologies do more than just control a vocabulary, they ... OWL-QL, Jena. SRWL. Semantic Web Rule Language. OWL. Web Ontology Language. RDQL Tutorial ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 22
Provided by: vpcl
Category:
Tags: jena | of | ontology | query | types | white | wine | wines

less

Transcript and Presenter's Notes

Title: Ontology Query


1
Ontology Query
2
What Is Ontology
  • Ontologies resemble faceted taxonomies but use
    richer semantic relationships among terms and
    attributes, as well as strict rules about how to
    specify terms and relationships. Because
    ontologies do more than just control a
    vocabulary, they are thought of as knowledge
    representation. The oft-quoted definition of
    ontology is "the specification of one's
    conceptualization of a knowledge domain."
  • iawiki.net/IAGlossary

3
Some Related Languages For Web Ontology
  • XML provides a surface syntax for structured
    documents, but imposes no semantic constraints on
    the meaning of these documents.
  • XML Schema is a language for restricting the
    structure of XML documents and also extends XML
    with data types.
  • RDF is a data model for objects ("resources") and
    relations between them, provides a simple
    semantics for this data model, and these data
    models can be represented in an XML syntax.
  • RDF Schema is a vocabulary for describing
    properties and classes of RDF resources, with a
    semantics for generalization-hierarchies of such
    properties and classes.
  • OWL adds more vocabulary for describing
    properties and classes among others, relations
    between classes (e.g. disjointness), cardinality
    (e.g. "exactly one"), equality, richer typing of
    properties, characteristics of properties (e.g.
    symmetry), and enumerated classes.

4
Ontology Related Language
5
RDQL Tutorial
http//phpxmlclasses.sourceforge.net/rdql.html
SELECT vars FROM documents WHERE Expressions AND
Filters USING Namespace declarations
6
Syntax Where, And
  • Where indicate constraints that RDF triples
    (subject, predicate, object)
  • And indicates constraints that RDQL variables
    must follow

7
Examples
  • Example If A is friend of B and B is friend of A
    report them
  • Query
  • SELECT ?x,?y
  • FROM ltpeople.rdfgt
  • WHERE (?x,ltdtfriendgt,?y), (?y,ltdtfriendgt,?x)
  • AND ?xltgt?y
  • USING dt for lthttp//foo.orggt, rdf for
    lthttp//www.w3.org/1999/02/22-rdf-syntax-nsgt
  • Result
  • Array (
  • 0 gt Array ( ?x gt http//foo.org/persons/Car
    l ?y gt http//foo.org/persons/Peter )
  • 1 gt Array ( ?x gt http//foo.org/persons/Pet
    er ?y gt http//foo.org/persons/Carl )
  • )

8
http//phpxmlclasses.sourceforge.net/rdql.html
  • Indicate name and age of all the individuals
    older than 20
  • SELECT ?y
  • FROM ltpeople.rdfgt
  • WHERE (?x,ltdtagegt,?z),(?x,ltdtnamegt,?y)
  • AND ?zgt20
  • USING dt for lthttp//foo.orggt, rdf for
    lthttp//www.w3.org/1999/02/22-rdf-syntax-nsgt

9
Online Example RQL
  • Basic Schema Navigation Queries
  • subClassOf(Artist)
  • subPropertyOf(creates)
  • leafclass(Artist)
  • leafproperty(creates)
  • topclassleafclasstoppropertyleafproperty
  • domain(creates)range(creates)
  • Namespace(Artist)

10
RQL - cont
  • Class Property Querying
  • Which classes can appear as domain and range of
    the property creates?
  • SELECT C1, C2
  • FROM C1createsC2
  • SELECT X, Y
  • FROM ClassX, ClassY, XcreatesY
  • What if?
  • SELECT X, Y
  • FROM XcreatesY

11
RQL - cont
  • Querying Resource Descriptions
  • SELECT X
  • FROM ArtistX
  • SELECT X, Y
  • FROM XcreatesY

12
RQL - cont
  • SELECT Y
  • FROM XtitleY
  • WHERE X like "www.artchive.com

13
OWL-QL Overview
  • The model
  • OWL-QL follows a simple request-response model.
    The querying agent, or client, issues a query to
    the answering agent, or server. As with P2P
    networks, the notions of client and server become
    blurry, because agent 1 may ask agent 2 for an
    answer, who may then turn around and ask agent 3
    for an answer to relay to agent 1.

14
OWL-QL Example Query
  • If C1 is a Seafood Course and W1 is a drink of
    C1, what color is W1?
  • P (type C1 Seafood-Course) (drink C1 W1)
  • Q (has-color W1 ?x) must-bind ?x
  • A White

15
1. Soap Tags
  • ltSOAP-ENVEnvelope xmlnsSOAP-ENV"http//schemas.
    xmlsoap.org/soap/envelope/" SOAP-ENVencodingStyle
    "http//schemas.xmlsoap.org/soap/encoding/"gt
  • ltSOAP-ENVBodygt

16
2. Query Tag
  • ltowl-qlquery xmlnsowl-ql"http//www.w3.org/2003
    /10/owl-ql-syntax" xmlnsvar"http//www.w3.org/2
    003/10/owl-ql-variables" xmlnsrdf"http//www.w3
    .org/1999/02/22-rdf-syntax-ns"
    xmlnsrdfs"http//www.w3.org/2000/01/rdf-schema"
    xmlnsowl"http//www.w3.org/2002/07/owl"gt

17
3. Premise
  • ltowl-qlpremisegt
  • ltrdfRDFgt
  • ltrdfDescription rdfabout"C1"gt
  • ltrdftype rdfresource"Seafood-Course"/gt
  • ltdrink rdfresource"W1"/gt
  • lt/rdfDescriptiongt
  • lt/rdfRDFgt
  • lt/owl-qlpremisegt

18
4. Query
  • ltowl-qlqueryPatterngt
  • ltrdfRDFgt
  • ltrdfDescription rdfabout"W1"gt
  • lthas-color rdfresource"http//www.w3.org/2003/10
    /owl-ql-variablesx"/gt
  • lt/rdfDescriptiongt
  • lt/rdfRDFgt
  • lt/owl-qlqueryPatterngt
  • ltowl-qlmustBindVarsgt ltvarx/gt
  • lt/owl-qlmustBindVarsgt

19
KB Pattern
  • ltowl-qlanswerKBPatterngt
  • ltowl-qlkbRef rdfresource"http//ontolingua.stan
    ford.edu/wines.owl"/gt
  • lt/owl-qlanswerKBPatterngt
  • ltowl-qlanswerSizeBoundgt5lt/owl-qlanswerSizeBoundgt
  • lt/owl-qlquerygt

20
OWL Layering
  • OWL has a layered architecture with successive
    layers providing more expressivity.
  • OWL Full corresponds to RDF.
  • OWL DL is OWL restricted to a DL/FOL fragment,
    allowing the use of DL reasoning techniques.
  • OWL Lite has further restrictions intended to
    ease implementation and provide easy entry for
    those familiar with frame-like languages.
  • Layered syntax and semantics
  • DL semantics are normative

21
OWL Layering
  • OWL Lite
  • Quantification Simple number restrictions (0/1)
  • Subclass and Equivalence axioms relating class
    names
  • OWL DL
  • Boolean expressions Arbitrary number
    restrictions
  • Axioms relating arbitrary descriptions
  • Disjointness
  • OWL Full
  • No restrictions on separation of interpretations
    (class-as-instance, class-as-property etc.)
  • Redefinition of built-in vocabulary allowed
Write a Comment
User Comments (0)
About PowerShow.com