Re: using Shape Expressions to validate RDF graphs

On 07/11/2014 09:31 AM, Jose Emilio Labra Gayo wrote:
> On Fri, Jul 11, 2014 at 5:35 PM, Peter F. Patel-Schneider
> <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>> wrote:
>
>     I've been looking through the Shape Expressions submission.  I'm having a
>     hard time figuring out how it can be used to validate RDF graphs.
>
>     The kind of validation I'm thinking of is constraining the elements of
>     various RDF types, perhaps requiring something like
>
>
> I will give a first try...
>
>     - the spouse of every person is a person
>
>
> This could be declared as:
>
> <Person> {  a (:Person) , :spouse @<Person>? }
>
> meaning that the shape Person has type :Person and can have an optional triple
> :spouse of shape <Person>
 >
 > You can play with the example here: http://goo.gl/pcL0ix

Yes, but how does that determine whether the spouse of every person is a 
person?  All that it is doing is determining which nodes match the shape <Person>.


>     - the university of every graduate student is a research university
>
>
> I declared it as:
>
> <GradStudent> { :university @<ResearchUniversity> }
>
> <ResearchUniversity> { a (:ResearchUniversity) }
>
> You can also play with the example here: http://goo.gl/fkx71w

Same comment.

> Taking a look at your examples, I would like to comment that there is a
> difference between the domain of discourse of RDF Data Shapes and OWL.

I don't see where OWL has come into the discussion so far.  Everything above 
was stock RDF.

> OWL is very well suited to describe concepts like Person, Graduate Student,
> University, etc. while RDF Data Shapes are more oriented towards RDF data
> representations, although they can be related, it is not always the case.
>
> For example, the constraints that I would express in RDF Data Shapes would be
> something like:
>
> "In this RDF graph, the representation of a Person (or the shape of the
> resource Person) has a property rdf:type with value :Person and can have a
> property spouse which must have the shape of a Person"

That seems to be what I want to say.  Let me reiterate:

I want to be able to determine whether, in a particular RDF graph (including 
RDFS inferences, by the way) all the elements of the class Person have each of 
their spouses (if any) also belonging to Person.

> I mean, OWL and Shape Expressions have different goals...with OWL you model an
> ontology of concepts, while with Shape Expressions you just describe the
> shapes of RDF graphs.

Agreed, but the very first thing that I want to do along these lines is to 
determine whether the elements of a particular class have a particular shape. 
  I think that this is one of the most essential tasks that need to be done 
along these lines - think of it as type checking of the information in the RDF 
graph.

> Best regards, Jose Labra

peter

Received on Friday, 11 July 2014 16:55:58 UTC