SlideShare a Scribd company logo
1 of 30
Shape Expressions: An RDF validation 
and transformation language 
Eric Prud'hommeaux 
World Wide Web 
Consortium 
MIT, Cambridge, MA, USA 
eric@w3.org 
Harold Solbrig 
Mayo Clinic 
USA 
College of Medicine, Rochester, 
MN, USA 
Jose Emilio Labra Gayo 
WESO Research group 
University of Oviedo 
Spain 
labra@uniovi.es
This talk in 1 slide 
Motivating example: 
Represent issues and users in RDF 
...and validate that data 
Shape Expressions = simple language to: 
Describe the topology of RDF data 
Validate if an RDF graph matches a given shape 
Shape expressions can be extended with actions 
Possible application: transform RDF into XML
Motivating example 
Represent in RDF a issue tracking system 
Issues are reported by users on some date 
Issues have some status (assigned/unassigned) 
Issues can also be reproduced on some date by users 
User Issue
User__ 
foaf:name: xsd:string 
foaf:givenName: xsd:string* 
foaf:familyName: xsd:string 
foaf:mbox: IRI 
Issue__ 
:status: (:Assigned :Unassigned) 
:reportedOn: xsd:date 
:reproducedOn: xsd:date 
1 :reportedBy 0..* 
0..* :reproducedBy 0..1 
0..* 
0..1 
:related 
E-R Diagram 
...and several constraints 
A user: 
- has full name or 
several given names and one 
family name 
- can have one mbox 
A Issue 
- has status Assigned/Unassigned 
- is reported by a user 
- is reported on a date 
- can be reproduced by a user on a 
date 
- is related to other issues
Example data in RDF 
:Issue1 
:status :Unassigned ; 
:reportedBy :Bob ; 
:reportedOn "2013-01-23"^^xsd:date ; 
:reproducedBy :Thompson.J ; 
:reproducedOn "2013-01-23"^^xsd:date . 
:Bob 
foaf:name "Bob Smith" ; 
foaf:mbox <mail:bob@example.org> . 
:Thompson.J 
foaf:givenName "Joe", "Joseph" ; 
foaf:familyName "Thompson" ; 
foaf:mbox <mail:joe@example.org> . 
:Issue2 
:status :Checked ; 
:reportedBy :Issue1 ; 
:reportedOn 2014 ; 
:reproducedBy :Tom . 
๏Š 
:Tom 
foaf:name "Tom Smith", "Tam" . 
:Anna 
foaf:givenName "Anna" ; 
foaf:mbox 23. 
๏Œ
Problem statement 
We want to detect possible errors in RDF like: 
Issues without status 
Issues with status different of Assigned/Unassigned 
Issues reported by something different to a user 
Issues reported on a date with a non-date type 
Issues reproduced on a date before the reported date 
Users without mbox 
Users with 2 names 
Users with with a name of type integer 
...lots of other errors... 
Q: How can we describe RDF data to be able to detect those errors? 
A: Our proposal = Shape Expressions
Shape Expressions - Users 
A user can have either: 
one foaf:name 
or one or more foaf:givenName and one foaf:familyName 
all of them must be of type xsd:string 
A user can have one foaf:mbox with value any IRI 
<UserShape> { 
( foaf:name xsd:string 
| foaf:givenName xsd:string+ 
, foaf:familyName xsd:string 
) 
, foaf:mbox IRI ? 
} 
The example uses compact syntax 
Shape Expressions can also be represented in RDF
Shape Expressions - Issues 
Issues :status must be either :Assigned or :Unassigned 
Issues are :reportedBy a user 
Issues are :reportedOn a xsd:date 
A issue may be :reproducedBy a user and :reproduceOn an xsd:date 
A issue can be :related to several issues 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
, ( :reproducedBy @<UserShape> 
, :reproducedOn xsd:date 
)? 
, :related @<IssueShape>* 
}
Full example 
prefix : <http://example.org/> 
prefix xsd: <http://www.w3.org/2001/XMLSchema#> 
prefix foaf: <http://xmlns.com/foaf/0.1/> 
<UserShape> { 
( foaf:name xsd:string 
| foaf:givenName xsd:string+ 
, foaf:familyName xsd:string 
) 
, foaf:mbox IRI ? 
} 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
, ( :reproducedBy @<UserShape> 
, :reproducedOn xsd:date 
)? 
, :related @<IssueShape>* 
} 
Online Shape Expressions validators: 
http://www.w3.org/2013/ShEx 
http://rdfshape.weso.es
FAQ: Why not use SPARQL? 
<UserShape> { 
( foaf:name xsd:string 
| foaf:givenName xsd:string+ 
, foaf:familyName xsd:string 
) 
, foaf:mbox IRI ? 
} 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
, ( :reproducedBy @<UserShape> 
, :reproducedOn xsd:date 
)? 
, :related @<IssueShape>* 
} 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
CONSTRUCT { 
?IssueShape :hasShape <IssueShape> . 
?UserShape :hasShape <UserShape> . 
} { { SELECT ?IssueShape { 
?IssueShape :status ?o } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} 
{ SELECT ?IssueShape { 
?IssueShape :status ?o . 
FILTER ((?o = :Assigned || ?o = :Unassigned)) 
} GROUP BY ?IssueShape HAVING (COUNT(*)=1)} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c0) { 
?IssueShape :reportedBy ?o . 
} GROUP BY ?IssueShape HAVING (COUNT(*)=1)} 
{ SELECT ?IssueShape { 
?IssueShape :reportedBy ?o . 
FILTER ((isIRI(?o) || isBlank(?o))) 
} GROUP BY ?IssueShape HAVING (COUNT(*)=1)} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c1) { 
{ SELECT ?IssueShape ?UserShape { 
?IssueShape :reportedBy ?UserShape . 
FILTER (isIRI(?UserShape) || isBlank(?UserShape)) 
} } 
{ SELECT ?UserShape WHERE { 
{ { SELECT ?UserShape { 
?UserShape foaf:name ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
{ SELECT ?UserShape { 
?UserShape foaf:name ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape HAVING (COUNT(*)=1) 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
} UNION { 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c0) { 
?UserShape foaf:givenName ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)>=1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c1) 
{ ?UserShape foaf:givenName ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape 
HAVING (COUNT(*)>=1)} 
FILTER (?UserShape_c0 = ?UserShape_c1) 
{ SELECT ?UserShape { 
?UserShape foaf:familyName ?o . 
} GROUP BY ?UserShape 
HAVING (COUNT(*)=1)} 
{ SELECT ?UserShape { 
?UserShape foaf:familyName ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
} 
} GROUP BY ?UserShape HAVING (COUNT(*) = 1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c2) 
{ 
?UserShape foaf:mbox ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)<=1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c3) 
{ 
?UserShape foaf:mbox ?o . 
FILTER (isIRI(?o)) 
} GROUP BY ?HAVING (COUNT(*)<=1)} 
FILTER (?UserShape_c2 = ?UserShape_c3) 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
UserShape_c2 = ?UserShape_c3) 
} GROUP BY ?IssueShape } 
FILTER (?IssueShape_c0 = ?IssueShape_c1) 
OPTIONAL { 
?IssueShape :reportedBy ?IssueShape_UserShape_ref0 . 
FILTER (isIRI(?IssueShape_UserShape_ref0) 
|| isBlank(?IssueShape_UserShape_ref0)) } 
{ SELECT ?IssueShape { 
?IssueShape :reportedOn } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} 
{ SELECT ?IssueShape { 
?IssueShape :reportedOn ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:date)) 
} GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c2) { 
?IssueShape :reproducedBy ?o . 
} GROUP BY IssueShape} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c3) { 
?IssueShape :reproducedBy ?o . 
FILTER ((isIRI(?o) || isBlank(?o))) 
} GROUP BY ?IssueShape} 
FILTER (?IssueShape_c2 = ?IssueShape_c3) 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c5) { 
?IssueShape :reproducedOn ?o . 
} GROUP BY ?IssueShape} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c6) { 
?IssueShape :reproducedOn ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:date)) 
} GROUP BY IssueShape} 
FILTER (?IssueShape_c5 = ?IssueShape_c6) 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
FILTER (?IssueShape_c2=0 && ?IssueShape_c5=0 || 
?IssueShape_c2>=1&&?IssueShape_c2<=1 && 
?IssueShape_c5>=1&&?IssueShape_c5<=1) 
} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c7) { 
?IssueShape :related ?o . 
} GROUP BY ?IssueShape} 
{ SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c8) { 
?IssueShape :related ?o . 
} GROUP BY ?IssueShape} 
FILTER (?IssueShape_c7 = ?IssueShape_c8) 
{ SELECT ?UserShape WHERE { 
{ { SELECT ?UserShape { 
?UserShape foaf:name ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
{ SELECT ?UserShape { 
?UserShape foaf:name ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
} UNION { 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c0) { 
?UserShape foaf:givenName ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)>=1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c1) { 
?UserShape foaf:givenName ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape HAVING (COUNT(*)>=1)} 
FILTER (?UserShape_c0 = ?UserShape_c1) 
{ SELECT ?UserShape { 
?UserShape foaf:familyName ?o . 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
{ SELECT ?UserShape { 
?UserShape foaf:familyName ?o . 
FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) 
} GROUP BY ?UserShape HAVING (COUNT(*)=1)} 
} 
} GROUP BY ?UserShape HAVING (COUNT(*) = 1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c2) { 
?UserShape foaf:mbox ?o . 
} GROUP BY ?UserShape HAVING (COUNT(*)<=1)} 
{ SELECT ?UserShape (COUNT(*) AS ?UserShape_c3) { 
?UserShape foaf:mbox ?o . FILTER (isIRI(?o)) 
} GROUP BY ?UserShape HAVING (COUNT(*)<=1)} 
FILTER (?UserShape_c2 = ?UserShape_c3) 
} 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
135 
136 
. 
. 
. 
. 
Shape Expression 
Shape Expressions can be converted to SPARQL 
But Shape Expressions are simpler and more readable to solve this problem
Shape Expressions Language 
Schema = set of Shape Expressions 
Shape Expression = labeled pattern 
Typical pattern = conjunction of several expressions 
Conjunction represented by , 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
... 
} 
<label> { 
...pattern... 
} 
Label 
Conjunction
Arcs 
Basic expression: an Arc 
Arc = name definition followed by value definition 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
... 
} 
Name defn Value defn 
:status :Unassigned 
:isue1 :reportedBy :bob 
:reportedOn 23-01-2013
Value definition 
Value definitions can be 
Value type xsd:date Matches a value of type xsd:date 
Value set ( :Assigned 
:Unassigned ) 
The object is an element of the given set 
Reference @<UserShape> The object has shape <UserShape> 
Stem foaf:~ Starts with the IRI associated with foaf 
Any - :Checked Any value except :Checked 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
... 
} 
Value set 
Value reference 
Value type
Name definition 
Name definitions can be 
Name term foaf:name Matches given IRI 
Name stem foaf:~ Any predicate that starts by foaf 
Name any - foaf:name Any predicate except foaf:name 
<IssueShape> { 
:status (:Assigned :Unassigned) 
, :reportedBy @<UserShape> 
, :reportedOn xsd:date 
... 
} 
Name terms
Alternatives 
Alternatives (disjunctions) are marked by | 
Example 1: An agent has either foaf:name or rdfs:label 
<Agent> { 
( foaf:name xsd:string | rdfs:label xsd:string ) 
... 
} 
Example 2: A list of integers 
<listOfInt> { 
rdf:first xsd:integer 
, ( rdf:rest ( rdf:nil ) 
| rdf:rest @<listOfInt> 
) 
}
Cardinalities 
The same as in common regular expressions 
* 0 or more 
+ 1 or more 
? 0 or 1 
{m} m repetitions 
{m,n} Between m and n repetitions 
<IssueShape> { 
... 
( :reproducedBy @<UserShape>, :reproducedOn xsd:date)? 
, :related @<IssueShape>* 
}
Semantic actions 
Define actions to be executed during validation 
<Issue> { 
... 
:reportedOn xsd:date %js{ report = _.o; return true; %} 
, ( :reproducedBy @<UserShape> 
, :reproducedOn xsd:date %js{ return _.o.lex > report.lex; %} 
) ? 
} 
%lang{ ...actions... %} 
Calls lang processor passing it the given actions 
Example: 
Check that :reportedOn must be before :reproducedOn
Semantics of Shape Expressions 
Operational semantics using inference rules 
Inspired by the semantics of RelaxNG 
Formalism used to define type inference systems 
Matching ๏‚ป infer shape typings 
Axioms and rules of the form:
Example: matching rules ( ) 
Graph can be decomposed 
in g1 and g2 
Combine typings 
t1 and t2 
Context Graph Type Assignment
Transforming RDF using ShEx 
Semantic actions can be combined with 
specialized languages 
Possible languages: sparql, js 
Other examples: 
GenX = very simple language to generate XML 
Goal: Semantic lowering 
Map RDF clinical records to XML 
GenJ generates JSON
Example 
:Issue1 
:status :Unassigned ; 
:reportedBy :Bob ; 
:reportedOn "2013-01-23"^^xsd:date ; 
:reproducedBy :Thompson.J ; 
:reproducedOn "2013-01-23"^^xsd:date . 
:Bob 
foaf:name "Bob Smith" ; 
foaf:mbox <mail:bob@example.org> . 
:Thompson.J 
foaf:givenName "Joe", "Joseph" ; 
foaf:familyName "Thompson" ; 
foaf:mbox <mail:joe@example.org> . 
RDF (Turtle) 
Shape Expressions 
XML 
+ 
GenX 
<issue xmlns="http://ex.example/xml" 
id="Issue1" status="Unassigned"> 
<reported date="2013-01-23"> 
<given-name>Bob</given-name> 
<family-name>Smith</family-name> 
<email>mail:bob@example.org</email> 
</reported> 
<reproduced date="2013-01-23"> 
<given-name>Joe</given-name> 
<given-name>Joseph</given-name> 
<family-name>Thompson</family-name> 
<email>mail:joe@example.org</email> 
</reproduced> 
</issue>
GenX 
GenX syntax 
$IRI Generates elements in that namespace 
<name> Add element <name> 
@<name> Add attribute <name> 
=<expr> XPath function applied to the value 
= Don't emit the value 
[-n] Place the value up n values in the hierarchy
Example transforming RDF to XML 
%GenX{ issue $http://ex.example/xml %} 
<IssueShape> { 
ex:status (ex:unassigned ex:assigned) %GenX{@status =substr(19)%} 
, ex:reportedBy @<UserShape> %GenX{ reported = %} 
, ex:reportedOn xsd:date %GenX{ [-1]@date %} 
, (ex:reproducedBy @<UserShape>, 
ex:reproducedOn xsd:date %GenX{ @date %} 
)? %GenX{ reproduced = %} 
, ex:related @<IssueShape>* 
} %GenX{ @id %} 
<UserShape> { 
(foaf:name xsd:string %GenX{ full-name %} 
| foaf:givenName xsd:string+ %GenX{ given-name %} 
, foaf:familyName xsd:string %GenX{ family-name %} 
) 
, foaf:mbox shex:IRI ? %GenX{ email %} 
}
Example 
:Issue1 
:status :Unassigned ; 
:reportedBy :Bob ; 
:reportedOn "2013-01-23"^^xsd:date ; 
:reproducedBy :Thompson.J ; 
:reproducedOn "2013-01-23"^^xsd:date . 
:Bob 
foaf:name "Bob Smith" ; 
foaf:mbox <mail:bob@example.org> . 
:Thompson.J 
foaf:givenName "Joe", "Joseph" ; 
foaf:familyName "Thompson" ; 
foaf:mbox <mail:joe@example.org> . 
<issue xmlns="http://ex.example/xml" 
id="Issue1" status="Unassigned"> 
<reported date="2013-01-23"> 
<given-name>Bob</given-name> 
<family-name>Smith</family-name> 
<email>mail:bob@example.org</email> 
</reported> 
<reproduced date="2013-01-23"> 
<given-name>Joe</given-name> 
<given-name>Joseph</given-name> 
<family-name>Thompson</family-name> 
<email>mail:joe@example.org</email> 
</reproduced> 
</issue> 
RDF (Turtle) 
XML 
Shape Expressions 
+ 
GenX 
%GenX{ issue $http://ex.example/xml %} 
<IssueShape> { 
ex:status (ex:unassigned ex:assigned) %GenX{@status =substr(19)%} 
, ex:reportedBy @<UserShape> %GenX{ reported = %} 
, ex:reportedOn xsd:date %GenX{ [-1]@date %} 
, (ex:reproducedBy @<UserShape>, 
ex:reproducedOn xsd:date %GenX{ @date %} 
)? %GenX{ reproduced = %} 
, ex:related @<IssueShape>* 
} %GenX{ @id %} 
<UserShape> { 
(foaf:name xsd:string %GenX{ full-name %} 
| foaf:givenName xsd:string+ %GenX{ given-name %} 
, foaf:familyName xsd:string %GenX{ family-name %} 
) 
, foaf:mbox shex:IRI ? %GenX{ email %} 
} 
Shape Expressions + 
GenX
Current Implementations 
Name Main 
Developer 
Language Features 
FancyDemo Eric 
Prud'hommeaux 
Javascript First implementation 
Semantic Actions 
- GenX, GenJ 
Conversion to SPARQL 
http://www.w3.org/2013/ShEx/ 
JsShExTest Jesse van Dam Javascript Supports RDF and Compact syntax 
https://github.com/jessevdam/shextest 
ShExcala Jose E. Labra Scala Several extensions: 
negations, reverse arcs, relations,... 
Efficient implementation using Derivatives 
http://labra.github.io/ShExcala/ 
Haws Jose E. Labra Haskell Prototype to check inference semantics 
http://labra.github.io/haws/
Applications to linked data portals 
2 data portals: WebIndex and LandPortal 
Data portal documentation 
http://weso.github.io/wiDoc/ http://weso.github.io/landportalDoc/data 
<Observation> { 
cex:md5-checksum xsd:string 
, cex:computation @<Computation> 
, dcterms:issued xsd:integer 
, dcterms:publisher ( wi-org:WebFoundation ) 
, qb:dataSet @<Dataset> 
, rdfs:label (@en) 
, sdmx-concept:obsStatus @<ObsStatus> 
, wi-onto:ref-area @<Area> 
, wi-onto:ref-indicator @<Indicator> 
, wi-onto:ref-year xsd:int 
, cex:value xsd:double 
, a ( qb:Observation ) 
} 
<Observation> { 
cex:ref-area @<Area> 
, cex:ref-indicator @<Indicator> 
, cex:ref-time @<Time> 
, cex:value xsd:double? 
, cex:computation @<Computation> 
, dcterms:issued xsd:dateTime 
, qb:dataSet @<DataSet> 
, qb:slice @<Slice> 
, rdfs:label xsd:string 
, lb:source @<Upload> 
, a ( qb:Observation ) 
} 
Same type: qb:Observation 
...but different shapes More info: 
Paper on Linked Data Quality Workshop
Conclusions 
Shape Expressions = simple language 
One goal: Describe and validate RDF graphs 
Semantics of Shape Expressions 
Described using inference rules 
...but Shape Expressions can be converted to SPARQL 
Compatible with other Semantic technologies 
Semantic actions = Extensibility mechanism 
Can be applied to transform RDF
Future Work 
Improve implementations and language 
Debugging and error messages 
Expressiveness and usability of language 
Performance evaluation 
Shape Expressions = role similar to Schema for XML 
Future applications: 
Online validators 
Interface generators 
Binding: generate parsers/tools from shapes 
Performance of RDF triplestores?
Future work at w3c 
RDF Data shapes WG chartered 
Mailing list: public-rdf-shapes@mail.org 
"The discussion on public-rdf-shapes@w3.org is the best entertainment since years; 
Game of Thrones colors pale." Paul Hermans (@PaulZH)
End of presentation 
Slides available at: 
http://www.slideshare.net/jelabra/semantics-2014

More Related Content

What's hot

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapesJose Emilio Labra Gayo
ย 
RDF data validation 2017 SHACL
RDF data validation 2017 SHACLRDF data validation 2017 SHACL
RDF data validation 2017 SHACLJean-Paul Calbimonte
ย 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five SlidesHolger Knublauch
ย 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphsandyseaborne
ย 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingMariano Rodriguez-Muro
ย 
SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1Mariano Rodriguez-Muro
ย 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic webJose Emilio Labra Gayo
ย 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphsandyseaborne
ย 
SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020andyseaborne
ย 
Another RDF Encoding Form
Another RDF Encoding FormAnother RDF Encoding Form
Another RDF Encoding FormJakob .
ย 
Ch08 - Manipulating Data in Strings and Arrays
Ch08 - Manipulating Data in Strings and ArraysCh08 - Manipulating Data in Strings and Arrays
Ch08 - Manipulating Data in Strings and Arraysdcomfort6819
ย 
Structure&amp;union
Structure&amp;unionStructure&amp;union
Structure&amp;unionPralhadKhanal1
ย 
Semantic web meetup โ€“ sparql tutorial
Semantic web meetup โ€“ sparql tutorialSemantic web meetup โ€“ sparql tutorial
Semantic web meetup โ€“ sparql tutorialAdonisDamian
ย 
Xml Overview
Xml OverviewXml Overview
Xml Overviewkevinreiss
ย 
Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsPawanMM
ย 

What's hot (20)

Challenges and applications of RDF shapes
Challenges and applications of RDF shapesChallenges and applications of RDF shapes
Challenges and applications of RDF shapes
ย 
SHACL by example
SHACL by exampleSHACL by example
SHACL by example
ย 
ShEx vs SHACL
ShEx vs SHACLShEx vs SHACL
ShEx vs SHACL
ย 
RDF Data Model
RDF Data ModelRDF Data Model
RDF Data Model
ย 
RDF data validation 2017 SHACL
RDF data validation 2017 SHACLRDF data validation 2017 SHACL
RDF data validation 2017 SHACL
ย 
SPIN in Five Slides
SPIN in Five SlidesSPIN in Five Slides
SPIN in Five Slides
ย 
Two graph data models : RDF and Property Graphs
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
ย 
SWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mappingSWT Lecture Session 9 - RDB2RDF direct mapping
SWT Lecture Session 9 - RDB2RDF direct mapping
ย 
SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1SWT Lecture Session 10 R2RML Part 1
SWT Lecture Session 10 R2RML Part 1
ย 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
ย 
Graph Data -- RDF and Property Graphs
Graph Data -- RDF and Property GraphsGraph Data -- RDF and Property Graphs
Graph Data -- RDF and Property Graphs
ย 
RDF briefing
RDF briefingRDF briefing
RDF briefing
ย 
SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020SHACL in Apache jena - ApacheCon2020
SHACL in Apache jena - ApacheCon2020
ย 
Another RDF Encoding Form
Another RDF Encoding FormAnother RDF Encoding Form
Another RDF Encoding Form
ย 
5 rdfs
5 rdfs5 rdfs
5 rdfs
ย 
Ch08 - Manipulating Data in Strings and Arrays
Ch08 - Manipulating Data in Strings and ArraysCh08 - Manipulating Data in Strings and Arrays
Ch08 - Manipulating Data in Strings and Arrays
ย 
Structure&amp;union
Structure&amp;unionStructure&amp;union
Structure&amp;union
ย 
Semantic web meetup โ€“ sparql tutorial
Semantic web meetup โ€“ sparql tutorialSemantic web meetup โ€“ sparql tutorial
Semantic web meetup โ€“ sparql tutorial
ย 
Xml Overview
Xml OverviewXml Overview
Xml Overview
ย 
Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing Basics
ย 

Similar to Shape Expressions: An RDF validation and transformation language

Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wranglingjakehofman
ย 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)Thomas Francart
ย 
Practical cats
Practical catsPractical cats
Practical catsRaymond Tay
ย 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfaromanets
ย 
Writing DSL with Applicative Functors
Writing DSL with Applicative FunctorsWriting DSL with Applicative Functors
Writing DSL with Applicative FunctorsDavid Galichet
ย 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against YouC4Media
ย 
Golang slidesaudrey
Golang slidesaudreyGolang slidesaudrey
Golang slidesaudreyAudrey Lim
ย 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Trisha Gee
ย 
New C# features
New C# featuresNew C# features
New C# featuresAlexej Sommer
ย 
A Model of the Scholarly Community
A Model of the Scholarly CommunityA Model of the Scholarly Community
A Model of the Scholarly CommunityMarko Rodriguez
ย 
Why functional programming and category theory strongly matters - Piotr Parad...
Why functional programming and category theory strongly matters - Piotr Parad...Why functional programming and category theory strongly matters - Piotr Parad...
Why functional programming and category theory strongly matters - Piotr Parad...Scalac
ย 
Why functional programming and category theory strongly matters
Why functional programming and category theory strongly mattersWhy functional programming and category theory strongly matters
Why functional programming and category theory strongly mattersPiotr Paradziล„ski
ย 
Lab_910.pdf
Lab_910.pdfLab_910.pdf
Lab_910.pdflinaalama
ย 
An introduction to functional programming with Swift
An introduction to functional programming with SwiftAn introduction to functional programming with Swift
An introduction to functional programming with SwiftFatih Nayebi, Ph.D.
ย 
A Presentation About Array Manipulation(Insertion & Deletion in an array)
A Presentation About Array Manipulation(Insertion & Deletion in an array)A Presentation About Array Manipulation(Insertion & Deletion in an array)
A Presentation About Array Manipulation(Insertion & Deletion in an array)Imdadul Himu
ย 
Big Data Analytics Part2
Big Data Analytics Part2Big Data Analytics Part2
Big Data Analytics Part2Sreedhar Chowdam
ย 
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTechNETFest
ย 
Extracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code ChangesExtracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code Changesstevensreinout
ย 
Xm lparsers
Xm lparsersXm lparsers
Xm lparsersSuman Lata
ย 

Similar to Shape Expressions: An RDF validation and transformation language (20)

Computational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data WranglingComputational Social Science, Lecture 09: Data Wrangling
Computational Social Science, Lecture 09: Data Wrangling
ย 
SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)SPARQL introduction and training (130+ slides with exercices)
SPARQL introduction and training (130+ slides with exercices)
ย 
Practical cats
Practical catsPractical cats
Practical cats
ย 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
ย 
Writing DSL with Applicative Functors
Writing DSL with Applicative FunctorsWriting DSL with Applicative Functors
Writing DSL with Applicative Functors
ย 
Types Working for You, Not Against You
Types Working for You, Not Against YouTypes Working for You, Not Against You
Types Working for You, Not Against You
ย 
Golang slidesaudrey
Golang slidesaudreyGolang slidesaudrey
Golang slidesaudrey
ย 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)
ย 
New C# features
New C# featuresNew C# features
New C# features
ย 
A Model of the Scholarly Community
A Model of the Scholarly CommunityA Model of the Scholarly Community
A Model of the Scholarly Community
ย 
Why functional programming and category theory strongly matters - Piotr Parad...
Why functional programming and category theory strongly matters - Piotr Parad...Why functional programming and category theory strongly matters - Piotr Parad...
Why functional programming and category theory strongly matters - Piotr Parad...
ย 
Why functional programming and category theory strongly matters
Why functional programming and category theory strongly mattersWhy functional programming and category theory strongly matters
Why functional programming and category theory strongly matters
ย 
Sparql
SparqlSparql
Sparql
ย 
Lab_910.pdf
Lab_910.pdfLab_910.pdf
Lab_910.pdf
ย 
An introduction to functional programming with Swift
An introduction to functional programming with SwiftAn introduction to functional programming with Swift
An introduction to functional programming with Swift
ย 
A Presentation About Array Manipulation(Insertion & Deletion in an array)
A Presentation About Array Manipulation(Insertion & Deletion in an array)A Presentation About Array Manipulation(Insertion & Deletion in an array)
A Presentation About Array Manipulation(Insertion & Deletion in an array)
ย 
Big Data Analytics Part2
Big Data Analytics Part2Big Data Analytics Part2
Big Data Analytics Part2
ย 
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech
.NET Fest 2018. ะะฝั‚ะพะฝ ะœะพะปะดะพะฒะฐะฝ. One year of using F# in production at SBTech
ย 
Extracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code ChangesExtracting Executable Transformations from Distilled Code Changes
Extracting Executable Transformations from Distilled Code Changes
ย 
Xm lparsers
Xm lparsersXm lparsers
Xm lparsers
ย 

More from Jose Emilio Labra Gayo

Publicaciones de investigaciรณn
Publicaciones de investigaciรณnPublicaciones de investigaciรณn
Publicaciones de investigaciรณnJose Emilio Labra Gayo
ย 
Introducciรณn a la investigaciรณn/doctorado
Introducciรณn a la investigaciรณn/doctoradoIntroducciรณn a la investigaciรณn/doctorado
Introducciรณn a la investigaciรณn/doctoradoJose Emilio Labra Gayo
ย 
Legislative data portals and linked data quality
Legislative data portals and linked data qualityLegislative data portals and linked data quality
Legislative data portals and linked data qualityJose Emilio Labra Gayo
ย 
Legislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesLegislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesJose Emilio Labra Gayo
ย 
Introducciรณn a la Web Semรกntica
Introducciรณn a la Web SemรกnticaIntroducciรณn a la Web Semรกntica
Introducciรณn a la Web SemรกnticaJose Emilio Labra Gayo
ย 
2017 Tendencias en informรกtica
2017 Tendencias en informรกtica2017 Tendencias en informรกtica
2017 Tendencias en informรกticaJose Emilio Labra Gayo
ย 
Como publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosComo publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosJose Emilio Labra Gayo
ย 
Arquitectura de la Web y Computaciรณn en el Servidor
Arquitectura de la Web y Computaciรณn en el ServidorArquitectura de la Web y Computaciรณn en el Servidor
Arquitectura de la Web y Computaciรณn en el ServidorJose Emilio Labra Gayo
ย 
Mรกster en Ingenierรญa Web
Mรกster en Ingenierรญa WebMรกster en Ingenierรญa Web
Mรกster en Ingenierรญa WebJose Emilio Labra Gayo
ย 
2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemanticaJose Emilio Labra Gayo
ย 

More from Jose Emilio Labra Gayo (20)

Publicaciones de investigaciรณn
Publicaciones de investigaciรณnPublicaciones de investigaciรณn
Publicaciones de investigaciรณn
ย 
Introducciรณn a la investigaciรณn/doctorado
Introducciรณn a la investigaciรณn/doctoradoIntroducciรณn a la investigaciรณn/doctorado
Introducciรณn a la investigaciรณn/doctorado
ย 
Legislative data portals and linked data quality
Legislative data portals and linked data qualityLegislative data portals and linked data quality
Legislative data portals and linked data quality
ย 
Wikidata
WikidataWikidata
Wikidata
ย 
Legislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologiesLegislative document content extraction based on Semantic Web technologies
Legislative document content extraction based on Semantic Web technologies
ย 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
ย 
Introducciรณn a la Web Semรกntica
Introducciรณn a la Web SemรกnticaIntroducciรณn a la Web Semรกntica
Introducciรณn a la Web Semรกntica
ย 
2017 Tendencias en informรกtica
2017 Tendencias en informรกtica2017 Tendencias en informรกtica
2017 Tendencias en informรกtica
ย 
19 javascript servidor
19 javascript servidor19 javascript servidor
19 javascript servidor
ย 
Como publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazadosComo publicar datos: hacia los datos abiertos enlazados
Como publicar datos: hacia los datos abiertos enlazados
ย 
16 Alternativas XML
16 Alternativas XML16 Alternativas XML
16 Alternativas XML
ย 
XSLT
XSLTXSLT
XSLT
ย 
XPath
XPathXPath
XPath
ย 
Arquitectura de la Web y Computaciรณn en el Servidor
Arquitectura de la Web y Computaciรณn en el ServidorArquitectura de la Web y Computaciรณn en el Servidor
Arquitectura de la Web y Computaciรณn en el Servidor
ย 
RDF data model
RDF data modelRDF data model
RDF data model
ย 
Mรกster en Ingenierรญa Web
Mรกster en Ingenierรญa WebMรกster en Ingenierรญa Web
Mรกster en Ingenierรญa Web
ย 
2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica2016 temuco tecnologias_websemantica
2016 temuco tecnologias_websemantica
ย 
2015 bogota datos_enlazados
2015 bogota datos_enlazados2015 bogota datos_enlazados
2015 bogota datos_enlazados
ย 
17 computacion servidor
17 computacion servidor17 computacion servidor
17 computacion servidor
ย 
Tecnologias Web Semantica
Tecnologias Web SemanticaTecnologias Web Semantica
Tecnologias Web Semantica
ย 

Recently uploaded

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
ย 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
ย 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธanilsa9823
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
ย 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
ย 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto Gonzรกlez Trastoy
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Steffen Staab
ย 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
ย 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
ย 

Recently uploaded (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ย 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
ย 
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
ย 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
ย 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
ย 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
ย 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
ย 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
ย 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
ย 

Shape Expressions: An RDF validation and transformation language

  • 1. Shape Expressions: An RDF validation and transformation language Eric Prud'hommeaux World Wide Web Consortium MIT, Cambridge, MA, USA eric@w3.org Harold Solbrig Mayo Clinic USA College of Medicine, Rochester, MN, USA Jose Emilio Labra Gayo WESO Research group University of Oviedo Spain labra@uniovi.es
  • 2. This talk in 1 slide Motivating example: Represent issues and users in RDF ...and validate that data Shape Expressions = simple language to: Describe the topology of RDF data Validate if an RDF graph matches a given shape Shape expressions can be extended with actions Possible application: transform RDF into XML
  • 3. Motivating example Represent in RDF a issue tracking system Issues are reported by users on some date Issues have some status (assigned/unassigned) Issues can also be reproduced on some date by users User Issue
  • 4. User__ foaf:name: xsd:string foaf:givenName: xsd:string* foaf:familyName: xsd:string foaf:mbox: IRI Issue__ :status: (:Assigned :Unassigned) :reportedOn: xsd:date :reproducedOn: xsd:date 1 :reportedBy 0..* 0..* :reproducedBy 0..1 0..* 0..1 :related E-R Diagram ...and several constraints A user: - has full name or several given names and one family name - can have one mbox A Issue - has status Assigned/Unassigned - is reported by a user - is reported on a date - can be reproduced by a user on a date - is related to other issues
  • 5. Example data in RDF :Issue1 :status :Unassigned ; :reportedBy :Bob ; :reportedOn "2013-01-23"^^xsd:date ; :reproducedBy :Thompson.J ; :reproducedOn "2013-01-23"^^xsd:date . :Bob foaf:name "Bob Smith" ; foaf:mbox <mail:bob@example.org> . :Thompson.J foaf:givenName "Joe", "Joseph" ; foaf:familyName "Thompson" ; foaf:mbox <mail:joe@example.org> . :Issue2 :status :Checked ; :reportedBy :Issue1 ; :reportedOn 2014 ; :reproducedBy :Tom . ๏Š :Tom foaf:name "Tom Smith", "Tam" . :Anna foaf:givenName "Anna" ; foaf:mbox 23. ๏Œ
  • 6. Problem statement We want to detect possible errors in RDF like: Issues without status Issues with status different of Assigned/Unassigned Issues reported by something different to a user Issues reported on a date with a non-date type Issues reproduced on a date before the reported date Users without mbox Users with 2 names Users with with a name of type integer ...lots of other errors... Q: How can we describe RDF data to be able to detect those errors? A: Our proposal = Shape Expressions
  • 7. Shape Expressions - Users A user can have either: one foaf:name or one or more foaf:givenName and one foaf:familyName all of them must be of type xsd:string A user can have one foaf:mbox with value any IRI <UserShape> { ( foaf:name xsd:string | foaf:givenName xsd:string+ , foaf:familyName xsd:string ) , foaf:mbox IRI ? } The example uses compact syntax Shape Expressions can also be represented in RDF
  • 8. Shape Expressions - Issues Issues :status must be either :Assigned or :Unassigned Issues are :reportedBy a user Issues are :reportedOn a xsd:date A issue may be :reproducedBy a user and :reproduceOn an xsd:date A issue can be :related to several issues <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date , ( :reproducedBy @<UserShape> , :reproducedOn xsd:date )? , :related @<IssueShape>* }
  • 9. Full example prefix : <http://example.org/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix foaf: <http://xmlns.com/foaf/0.1/> <UserShape> { ( foaf:name xsd:string | foaf:givenName xsd:string+ , foaf:familyName xsd:string ) , foaf:mbox IRI ? } <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date , ( :reproducedBy @<UserShape> , :reproducedOn xsd:date )? , :related @<IssueShape>* } Online Shape Expressions validators: http://www.w3.org/2013/ShEx http://rdfshape.weso.es
  • 10. FAQ: Why not use SPARQL? <UserShape> { ( foaf:name xsd:string | foaf:givenName xsd:string+ , foaf:familyName xsd:string ) , foaf:mbox IRI ? } <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date , ( :reproducedBy @<UserShape> , :reproducedOn xsd:date )? , :related @<IssueShape>* } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 CONSTRUCT { ?IssueShape :hasShape <IssueShape> . ?UserShape :hasShape <UserShape> . } { { SELECT ?IssueShape { ?IssueShape :status ?o } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { SELECT ?IssueShape { ?IssueShape :status ?o . FILTER ((?o = :Assigned || ?o = :Unassigned)) } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c0) { ?IssueShape :reportedBy ?o . } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { SELECT ?IssueShape { ?IssueShape :reportedBy ?o . FILTER ((isIRI(?o) || isBlank(?o))) } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c1) { { SELECT ?IssueShape ?UserShape { ?IssueShape :reportedBy ?UserShape . FILTER (isIRI(?UserShape) || isBlank(?UserShape)) } } { SELECT ?UserShape WHERE { { { SELECT ?UserShape { ?UserShape foaf:name ?o . } GROUP BY ?UserShape HAVING (COUNT(*)=1)} { SELECT ?UserShape { ?UserShape foaf:name ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)=1) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 } UNION { { SELECT ?UserShape (COUNT(*) AS ?UserShape_c0) { ?UserShape foaf:givenName ?o . } GROUP BY ?UserShape HAVING (COUNT(*)>=1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c1) { ?UserShape foaf:givenName ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)>=1)} FILTER (?UserShape_c0 = ?UserShape_c1) { SELECT ?UserShape { ?UserShape foaf:familyName ?o . } GROUP BY ?UserShape HAVING (COUNT(*)=1)} { SELECT ?UserShape { ?UserShape foaf:familyName ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)=1)} } } GROUP BY ?UserShape HAVING (COUNT(*) = 1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c2) { ?UserShape foaf:mbox ?o . } GROUP BY ?UserShape HAVING (COUNT(*)<=1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c3) { ?UserShape foaf:mbox ?o . FILTER (isIRI(?o)) } GROUP BY ?HAVING (COUNT(*)<=1)} FILTER (?UserShape_c2 = ?UserShape_c3) 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 UserShape_c2 = ?UserShape_c3) } GROUP BY ?IssueShape } FILTER (?IssueShape_c0 = ?IssueShape_c1) OPTIONAL { ?IssueShape :reportedBy ?IssueShape_UserShape_ref0 . FILTER (isIRI(?IssueShape_UserShape_ref0) || isBlank(?IssueShape_UserShape_ref0)) } { SELECT ?IssueShape { ?IssueShape :reportedOn } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { SELECT ?IssueShape { ?IssueShape :reportedOn ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:date)) } GROUP BY ?IssueShape HAVING (COUNT(*)=1)} { { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c2) { ?IssueShape :reproducedBy ?o . } GROUP BY IssueShape} { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c3) { ?IssueShape :reproducedBy ?o . FILTER ((isIRI(?o) || isBlank(?o))) } GROUP BY ?IssueShape} FILTER (?IssueShape_c2 = ?IssueShape_c3) { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c5) { ?IssueShape :reproducedOn ?o . } GROUP BY ?IssueShape} { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c6) { ?IssueShape :reproducedOn ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:date)) } GROUP BY IssueShape} FILTER (?IssueShape_c5 = ?IssueShape_c6) 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 FILTER (?IssueShape_c2=0 && ?IssueShape_c5=0 || ?IssueShape_c2>=1&&?IssueShape_c2<=1 && ?IssueShape_c5>=1&&?IssueShape_c5<=1) } { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c7) { ?IssueShape :related ?o . } GROUP BY ?IssueShape} { SELECT ?IssueShape (COUNT(*) AS ?IssueShape_c8) { ?IssueShape :related ?o . } GROUP BY ?IssueShape} FILTER (?IssueShape_c7 = ?IssueShape_c8) { SELECT ?UserShape WHERE { { { SELECT ?UserShape { ?UserShape foaf:name ?o . } GROUP BY ?UserShape HAVING (COUNT(*)=1)} { SELECT ?UserShape { ?UserShape foaf:name ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)=1)} } UNION { { SELECT ?UserShape (COUNT(*) AS ?UserShape_c0) { ?UserShape foaf:givenName ?o . } GROUP BY ?UserShape HAVING (COUNT(*)>=1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c1) { ?UserShape foaf:givenName ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)>=1)} FILTER (?UserShape_c0 = ?UserShape_c1) { SELECT ?UserShape { ?UserShape foaf:familyName ?o . 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 } GROUP BY ?UserShape HAVING (COUNT(*)=1)} { SELECT ?UserShape { ?UserShape foaf:familyName ?o . FILTER ((isLiteral(?o) && datatype(?o) = xsd:string)) } GROUP BY ?UserShape HAVING (COUNT(*)=1)} } } GROUP BY ?UserShape HAVING (COUNT(*) = 1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c2) { ?UserShape foaf:mbox ?o . } GROUP BY ?UserShape HAVING (COUNT(*)<=1)} { SELECT ?UserShape (COUNT(*) AS ?UserShape_c3) { ?UserShape foaf:mbox ?o . FILTER (isIRI(?o)) } GROUP BY ?UserShape HAVING (COUNT(*)<=1)} FILTER (?UserShape_c2 = ?UserShape_c3) } 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 . . . . Shape Expression Shape Expressions can be converted to SPARQL But Shape Expressions are simpler and more readable to solve this problem
  • 11. Shape Expressions Language Schema = set of Shape Expressions Shape Expression = labeled pattern Typical pattern = conjunction of several expressions Conjunction represented by , <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date ... } <label> { ...pattern... } Label Conjunction
  • 12. Arcs Basic expression: an Arc Arc = name definition followed by value definition <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date ... } Name defn Value defn :status :Unassigned :isue1 :reportedBy :bob :reportedOn 23-01-2013
  • 13. Value definition Value definitions can be Value type xsd:date Matches a value of type xsd:date Value set ( :Assigned :Unassigned ) The object is an element of the given set Reference @<UserShape> The object has shape <UserShape> Stem foaf:~ Starts with the IRI associated with foaf Any - :Checked Any value except :Checked <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date ... } Value set Value reference Value type
  • 14. Name definition Name definitions can be Name term foaf:name Matches given IRI Name stem foaf:~ Any predicate that starts by foaf Name any - foaf:name Any predicate except foaf:name <IssueShape> { :status (:Assigned :Unassigned) , :reportedBy @<UserShape> , :reportedOn xsd:date ... } Name terms
  • 15. Alternatives Alternatives (disjunctions) are marked by | Example 1: An agent has either foaf:name or rdfs:label <Agent> { ( foaf:name xsd:string | rdfs:label xsd:string ) ... } Example 2: A list of integers <listOfInt> { rdf:first xsd:integer , ( rdf:rest ( rdf:nil ) | rdf:rest @<listOfInt> ) }
  • 16. Cardinalities The same as in common regular expressions * 0 or more + 1 or more ? 0 or 1 {m} m repetitions {m,n} Between m and n repetitions <IssueShape> { ... ( :reproducedBy @<UserShape>, :reproducedOn xsd:date)? , :related @<IssueShape>* }
  • 17. Semantic actions Define actions to be executed during validation <Issue> { ... :reportedOn xsd:date %js{ report = _.o; return true; %} , ( :reproducedBy @<UserShape> , :reproducedOn xsd:date %js{ return _.o.lex > report.lex; %} ) ? } %lang{ ...actions... %} Calls lang processor passing it the given actions Example: Check that :reportedOn must be before :reproducedOn
  • 18. Semantics of Shape Expressions Operational semantics using inference rules Inspired by the semantics of RelaxNG Formalism used to define type inference systems Matching ๏‚ป infer shape typings Axioms and rules of the form:
  • 19. Example: matching rules ( ) Graph can be decomposed in g1 and g2 Combine typings t1 and t2 Context Graph Type Assignment
  • 20. Transforming RDF using ShEx Semantic actions can be combined with specialized languages Possible languages: sparql, js Other examples: GenX = very simple language to generate XML Goal: Semantic lowering Map RDF clinical records to XML GenJ generates JSON
  • 21. Example :Issue1 :status :Unassigned ; :reportedBy :Bob ; :reportedOn "2013-01-23"^^xsd:date ; :reproducedBy :Thompson.J ; :reproducedOn "2013-01-23"^^xsd:date . :Bob foaf:name "Bob Smith" ; foaf:mbox <mail:bob@example.org> . :Thompson.J foaf:givenName "Joe", "Joseph" ; foaf:familyName "Thompson" ; foaf:mbox <mail:joe@example.org> . RDF (Turtle) Shape Expressions XML + GenX <issue xmlns="http://ex.example/xml" id="Issue1" status="Unassigned"> <reported date="2013-01-23"> <given-name>Bob</given-name> <family-name>Smith</family-name> <email>mail:bob@example.org</email> </reported> <reproduced date="2013-01-23"> <given-name>Joe</given-name> <given-name>Joseph</given-name> <family-name>Thompson</family-name> <email>mail:joe@example.org</email> </reproduced> </issue>
  • 22. GenX GenX syntax $IRI Generates elements in that namespace <name> Add element <name> @<name> Add attribute <name> =<expr> XPath function applied to the value = Don't emit the value [-n] Place the value up n values in the hierarchy
  • 23. Example transforming RDF to XML %GenX{ issue $http://ex.example/xml %} <IssueShape> { ex:status (ex:unassigned ex:assigned) %GenX{@status =substr(19)%} , ex:reportedBy @<UserShape> %GenX{ reported = %} , ex:reportedOn xsd:date %GenX{ [-1]@date %} , (ex:reproducedBy @<UserShape>, ex:reproducedOn xsd:date %GenX{ @date %} )? %GenX{ reproduced = %} , ex:related @<IssueShape>* } %GenX{ @id %} <UserShape> { (foaf:name xsd:string %GenX{ full-name %} | foaf:givenName xsd:string+ %GenX{ given-name %} , foaf:familyName xsd:string %GenX{ family-name %} ) , foaf:mbox shex:IRI ? %GenX{ email %} }
  • 24. Example :Issue1 :status :Unassigned ; :reportedBy :Bob ; :reportedOn "2013-01-23"^^xsd:date ; :reproducedBy :Thompson.J ; :reproducedOn "2013-01-23"^^xsd:date . :Bob foaf:name "Bob Smith" ; foaf:mbox <mail:bob@example.org> . :Thompson.J foaf:givenName "Joe", "Joseph" ; foaf:familyName "Thompson" ; foaf:mbox <mail:joe@example.org> . <issue xmlns="http://ex.example/xml" id="Issue1" status="Unassigned"> <reported date="2013-01-23"> <given-name>Bob</given-name> <family-name>Smith</family-name> <email>mail:bob@example.org</email> </reported> <reproduced date="2013-01-23"> <given-name>Joe</given-name> <given-name>Joseph</given-name> <family-name>Thompson</family-name> <email>mail:joe@example.org</email> </reproduced> </issue> RDF (Turtle) XML Shape Expressions + GenX %GenX{ issue $http://ex.example/xml %} <IssueShape> { ex:status (ex:unassigned ex:assigned) %GenX{@status =substr(19)%} , ex:reportedBy @<UserShape> %GenX{ reported = %} , ex:reportedOn xsd:date %GenX{ [-1]@date %} , (ex:reproducedBy @<UserShape>, ex:reproducedOn xsd:date %GenX{ @date %} )? %GenX{ reproduced = %} , ex:related @<IssueShape>* } %GenX{ @id %} <UserShape> { (foaf:name xsd:string %GenX{ full-name %} | foaf:givenName xsd:string+ %GenX{ given-name %} , foaf:familyName xsd:string %GenX{ family-name %} ) , foaf:mbox shex:IRI ? %GenX{ email %} } Shape Expressions + GenX
  • 25. Current Implementations Name Main Developer Language Features FancyDemo Eric Prud'hommeaux Javascript First implementation Semantic Actions - GenX, GenJ Conversion to SPARQL http://www.w3.org/2013/ShEx/ JsShExTest Jesse van Dam Javascript Supports RDF and Compact syntax https://github.com/jessevdam/shextest ShExcala Jose E. Labra Scala Several extensions: negations, reverse arcs, relations,... Efficient implementation using Derivatives http://labra.github.io/ShExcala/ Haws Jose E. Labra Haskell Prototype to check inference semantics http://labra.github.io/haws/
  • 26. Applications to linked data portals 2 data portals: WebIndex and LandPortal Data portal documentation http://weso.github.io/wiDoc/ http://weso.github.io/landportalDoc/data <Observation> { cex:md5-checksum xsd:string , cex:computation @<Computation> , dcterms:issued xsd:integer , dcterms:publisher ( wi-org:WebFoundation ) , qb:dataSet @<Dataset> , rdfs:label (@en) , sdmx-concept:obsStatus @<ObsStatus> , wi-onto:ref-area @<Area> , wi-onto:ref-indicator @<Indicator> , wi-onto:ref-year xsd:int , cex:value xsd:double , a ( qb:Observation ) } <Observation> { cex:ref-area @<Area> , cex:ref-indicator @<Indicator> , cex:ref-time @<Time> , cex:value xsd:double? , cex:computation @<Computation> , dcterms:issued xsd:dateTime , qb:dataSet @<DataSet> , qb:slice @<Slice> , rdfs:label xsd:string , lb:source @<Upload> , a ( qb:Observation ) } Same type: qb:Observation ...but different shapes More info: Paper on Linked Data Quality Workshop
  • 27. Conclusions Shape Expressions = simple language One goal: Describe and validate RDF graphs Semantics of Shape Expressions Described using inference rules ...but Shape Expressions can be converted to SPARQL Compatible with other Semantic technologies Semantic actions = Extensibility mechanism Can be applied to transform RDF
  • 28. Future Work Improve implementations and language Debugging and error messages Expressiveness and usability of language Performance evaluation Shape Expressions = role similar to Schema for XML Future applications: Online validators Interface generators Binding: generate parsers/tools from shapes Performance of RDF triplestores?
  • 29. Future work at w3c RDF Data shapes WG chartered Mailing list: public-rdf-shapes@mail.org "The discussion on public-rdf-shapes@w3.org is the best entertainment since years; Game of Thrones colors pale." Paul Hermans (@PaulZH)
  • 30. End of presentation Slides available at: http://www.slideshare.net/jelabra/semantics-2014