terp: an owl-friendly sparql

27
Terp: Syntax for OWL-friendly SPARQL queries Evren Sirin, Blazej Bulka and Michael Smith Clark & Parsia, LLC

Upload: clark-parsia-llc

Post on 18-Dec-2014

3.516 views

Category:

Technology


3 download

DESCRIPTION

Terp is a SPARQL syntax that makes querying OWL ontologies much easier.

TRANSCRIPT

Terp Syntax for OWL-friendly SPARQL queries

Evren Sirin Blazej Bulka and Michael SmithClark amp Parsia LLC

Who are webull Clark amp Parsia is a semantic software startup

o HQ in Washington DC amp office in Bostonbull Provides software development and integration

servicesbull Specializing in Semantic Web web services and

advanced AI technologies for federal and enterprise customers

httpclarkparsiacom Twitter candp

Motivation

bull Make it easy to read and write queries for OWL ontologies

bull Allow both schema and instance queries

bull Without inventing a completely new query language

bull Not hard to learn

Querying OWL

bull The most commonly used Semantic Web query language is SPARQL

bull SPARQL intended for RDF

bull Semantics based on pattern matching over RDF graphs

bull Semantics extensions possible via entailment regimes

bull SPARQL-DL extension [OWLED 2008 paper]

bull SPARQL 11 entailment regime [SPARQL WG]

Simple SPARQL Query

bull Query Find the flavors of red French wines

PREFIX rdf lthttpgtPREFIX wine lthttpgt

SELECT wine flavor wine rdftype wineFrenchWine wine rdftype wineRedWine wine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Who are webull Clark amp Parsia is a semantic software startup

o HQ in Washington DC amp office in Bostonbull Provides software development and integration

servicesbull Specializing in Semantic Web web services and

advanced AI technologies for federal and enterprise customers

httpclarkparsiacom Twitter candp

Motivation

bull Make it easy to read and write queries for OWL ontologies

bull Allow both schema and instance queries

bull Without inventing a completely new query language

bull Not hard to learn

Querying OWL

bull The most commonly used Semantic Web query language is SPARQL

bull SPARQL intended for RDF

bull Semantics based on pattern matching over RDF graphs

bull Semantics extensions possible via entailment regimes

bull SPARQL-DL extension [OWLED 2008 paper]

bull SPARQL 11 entailment regime [SPARQL WG]

Simple SPARQL Query

bull Query Find the flavors of red French wines

PREFIX rdf lthttpgtPREFIX wine lthttpgt

SELECT wine flavor wine rdftype wineFrenchWine wine rdftype wineRedWine wine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Motivation

bull Make it easy to read and write queries for OWL ontologies

bull Allow both schema and instance queries

bull Without inventing a completely new query language

bull Not hard to learn

Querying OWL

bull The most commonly used Semantic Web query language is SPARQL

bull SPARQL intended for RDF

bull Semantics based on pattern matching over RDF graphs

bull Semantics extensions possible via entailment regimes

bull SPARQL-DL extension [OWLED 2008 paper]

bull SPARQL 11 entailment regime [SPARQL WG]

Simple SPARQL Query

bull Query Find the flavors of red French wines

PREFIX rdf lthttpgtPREFIX wine lthttpgt

SELECT wine flavor wine rdftype wineFrenchWine wine rdftype wineRedWine wine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Querying OWL

bull The most commonly used Semantic Web query language is SPARQL

bull SPARQL intended for RDF

bull Semantics based on pattern matching over RDF graphs

bull Semantics extensions possible via entailment regimes

bull SPARQL-DL extension [OWLED 2008 paper]

bull SPARQL 11 entailment regime [SPARQL WG]

Simple SPARQL Query

bull Query Find the flavors of red French wines

PREFIX rdf lthttpgtPREFIX wine lthttpgt

SELECT wine flavor wine rdftype wineFrenchWine wine rdftype wineRedWine wine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Simple SPARQL Query

bull Query Find the flavors of red French wines

PREFIX rdf lthttpgtPREFIX wine lthttpgt

SELECT wine flavor wine rdftype wineFrenchWine wine rdftype wineRedWine wine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colon

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL Abbreviations

bull Query Find the flavors of red French wines

PREFIX wine lthttpgt

SELECT wine flavor wine a wineFrenchWine wineRedWine winehasFlavor flavor Turtle keyword a

instead of rdftype

Object listsseparated by comma

Predicate-object lists separated by

semi-colonbull Result a concise query

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

OWL over RDF

bull RDF knows about triples (and only triples)

bull OWL has many different constructs

bull Classpropertydata expressions axioms etc

bull Triple-based representation of OWL can be

bull verbose

bull unintuitive

bull hard to read or understand

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

SPARQL over OWL

bull Query Find wines that are made of at least two grapesSELECT wine flavor wine a [ owlintersectionOf ( wineWine [ a owlRestriction owlonProperty winemadeFromGrape owlminCardinality 2 ])]

RDF List abbreviation

Bnode abbreviation

bull Result less than ideal (no OWL shortcuts)

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

We have a syntax for that

bull Pick the OWL syntax suitable for you

bull I want a formal syntax Use Functional Syntax

bull I want a syntax that plays nicely with XQuery and XML schema Use OWLXML syntax

bull I want to write OWL expressions easily Use Manchester Syntax

bull I want a triple-friendly syntax Use Turtle syntax

bull I donrsquot need your help Use RDFXML syntax

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Terp Syntax

bull Combine Turtle with Manchester syntax

bull Use Manchester syntax for expressing class property or datatype expressions

bull Manchester syntax expressions can appear in subject or object position of triples

SELECT wine flavor wine a ( wineWine and winemadeFromGrape min 2 )

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Complex Terp Example

bull Query Find meal courses that go with full-bodied wines if exists return the associated label order results by labels but donrsquot include owlNothingSELECT wine flavor mealCourse rdfssubClassOf foodMealCourse foodhasDrink some ( wineWine and winehasBody value wineFull ) OPTIONAL mealCourse rdfslabel label FILTER ( mealCourse = owlNothing )ORDER BY rdfslabel

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Terp Grammar

bull Merge SPARQL grammar with Manchester syntax grammar

bull Keep all the syntax features of SPARQL

bull A few cases where ambiguity arises

bull Ex Parentheses are used for lists in SPARQL and for nesting in Manchester syntax

bull Try to resolve ambiguity by the context

bull Assume SPARQL intent otherwise

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Implementation

bull Terp parser implemented in Pellet and available as of version 21

bull Integrated through Jena ARQ architecture

bull Can translate any Terp query to regular SPARQL syntax

bull Can be used programmatically or through CLI

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Possible Extensions

bull Allow Manchester syntax in predicate position

bull Ex Use equivalentTo instead of owlequivalentClass and owlequivalentProperty

bull Support for additional OWL 2 constructs

bull Ex Negative property assertions axiom annotations

bull More syntactic sugar for frequently used OWL features

Questions

Questions