Re: divergence in the definition of sh:minCount

That works for me, but it represents a potential change in the definition of
sh:minCount in a document that may have been approved by the working group.
Does the working group as a whole accept this?

peter


On 09/27/2016 12:14 AM, Dimitris Kontokostas wrote:
> This commit should resolve this issue
> https://github.com/w3c/data-shapes/commit/7ecd90e51373f8934a6160068e1eb37aa8d214bf
> 
> When we introduced property paths we were not sure which is the correct way to
> handle duplicates but after your comments, it makes sense to handle them as sets.
> 
> On Tue, Sep 27, 2016 at 7:19 AM, Irene Polikoff <irene@topquadrant.com
> <mailto:irene@topquadrant.com>> wrote:
> 
>     By the wording issue, I meant that what is being counted here are triples,
>     not łvalue nodes˛ as the description in the spec says.
> 
>     When there is a specific property, number of value nodes equals number of
>     triples since there is always the same subject and predicate. However,
>     with the alternative paths, it is clear that the query is counting triples
>     and that this count can be different from the number of values - as the
>     example shows.
> 
>     I think if the definition as described by the words is to remain the same,
>     then the query would need to change.
> 
>     Irene
> 
> 
> 
> 
>     On 9/26/16, 5:00 PM, "Peter F. Patel-Schneider" <pfpschneider@gmail.com
>     <mailto:pfpschneider@gmail.com>>
>     wrote:
> 
>     >It's not really a language/wording issue, except perhaps if you are Humpty
>     >Dumpty.   There are only two value here, no more.  SHACL has always been
>     >based
>     >on values, not paths.  This is one way in which it differs from shape
>     >expressions.
>     >
>     >peter
>     >
>     >On 09/26/2016 01:48 PM, Irene Polikoff wrote:
>     >> I thought what Peter is saying that even if the count is four, there
>     >>are only
>     >> two nodes in the graph in this example, so this is a language/wording
>     >>issue.
>     >>
>     >> Irene
>     >>
>     >>
>     >> From: Dimitris Kontokostas <kontokostas@informatik.uni-leipzig.de
>     <mailto:kontokostas@informatik.uni-leipzig.de>
>     >> <mailto:kontokostas@informatik.uni-leipzig.de
>     <mailto:kontokostas@informatik.uni-leipzig.de>>>
>     >> Date: Monday, September 26, 2016 at 3:11 PM
>     >> To: "Peter F. Patel-Schneider" <pfpschneider@gmail.com
>     <mailto:pfpschneider@gmail.com>
>     >> <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>>
>     >> Cc: "public-rdf-sha." <public-rdf-shapes@w3.org
>     <mailto:public-rdf-shapes@w3.org>
>     >><mailto:public-rdf-shapes@w3.org <mailto:public-rdf-shapes@w3.org>>>
>     >> Subject: Re: divergence in the definition of sh:minCount
>     >> Resent-From: <public-rdf-shapes@w3.org <mailto:public-rdf-shapes@w3.org>
>     >><mailto:public-rdf-shapes@w3.org <mailto:public-rdf-shapes@w3.org>>>
>     >> Resent-Date: Mon, 26 Sep 2016 19:12:00 +0000
>     >>
>     >> Maybe it is something very obvious but I still cannot see it.
>     >>
>     >> however, I improved the wording for the property path value nodes. It
>     >>was
>     >> using subject and object which was not correct, shapes can use also
>     >>literals
>     >> as focus nodes
>     >>
>     >>https://github.com/w3c/data-shapes/commit/f1d525b82ce8a74092826e768159db6 <https://github.com/w3c/data-shapes/commit/f1d525b82ce8a74092826e768159db6>
>     >>01270033a
>     >>
>     >> On Mon, Sep 26, 2016 at 6:55 PM, Peter F. Patel-Schneider
>     >> <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>> wrote:
>     >>
>     >>     You mean that you got back 4 results when running the SPARQL query.
>     >> That's
>     >>     different from "the number of value nodes", which is my point.
>     >>
>     >>     peter
>     >>
>     >>
>     >>     On 09/26/2016 12:30 AM, Dimitris Kontokostas wrote:
>     >>     > Hi Peter,
>     >>     >
>     >>     > I tried your example and I got 4 "value nodes" back which is in
>     >>line with the
>     >>     > duplicate value node comment above.
>     >>     >
>     >>     > I am trying to see the problem here, is it the following wording
>     >>from section 4?
>     >>     > "For property constraints that have a sh:path the value nodes are
>     >>the objects
>     >>     > in the data graph that can be reached by following the given
>     >>property path
>     >>     > starting with the focus node as subject based on the evaluation
>     >>rules defined
>     >>     > by SPARQL 1.1"
>     >>     >
>     >>     > I think this can be improved but I cannot see if there is a wrong
>     >>definition
>     >>     > there.
>     >>     >
>     >>     > Thanks,
>     >>     > Dimitris
>     >>     >
>     >>     > On Sun, Sep 25, 2016 at 12:43 AM, Peter F. Patel-Schneider
>     >>     > <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>
>     >>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>>>
>     >>wrote:
>     >>     >
>     >>     >     Even if you "count all nodes, even duplicates", there is
>     >>still a violation in
>     >>     >
>     >>     >     Data:
>     >>     >       :john :child :bill .
>     >>     >       :john :son :bill .
>     >>     >       :john :child :mary .
>     >>     >       :john :daughter :mary .
>     >>     >
>     >>     >     Shape
>     >>     >       s:s1 rdf:type sh:Shape ;
>     >>     >         sh:targetNode :john ;
>     >>     >         sh:property [ sh:path [ sh:alternativePath ( :child :son
>     >>:daughter ) ] ;
>     >>     >                       sh:minCount 3 ] .
>     >>     >
>     >>     >     If something other than "A validation result must be produced
>     >>if the number of
>     >>     >     value nodes is less than the value of sh:minCount." is
>     >>desired then this
>     >>     >     wording can no longer be used, particularly given the wording
>     >>about path-based
>     >>     >     property constraints at the beginning of Section 4.
>     >>     >
>     >>     >     peter
>     >>     >
>     >>     >
>     >>     >
>     >>     >     On 09/24/2016 07:12 AM, Dimitris Kontokostas wrote:
>     >>     >     > Hi Peter,
>     >>     >     >
>     >>     >     > is this about the fact that property paths might return
>     >>duplicate value nodes
>     >>     >     > or something else?
>     >>     >     > In this case, we count all nodes, even duplicates for
>     >>cardinality restrictions
>     >>     >     >
>     >>     >     > Thanks,
>     >>     >     > Dimitris
>     >>     >     >
>     >>     >     > On Fri, Sep 23, 2016 at 9:17 PM, Peter F. Patel-Schneider
>     >>     >     > <pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>
>     >>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>>
>     >>     >     <mailto:pfpschneider@gmail.com
>     <mailto:pfpschneider@gmail.com> <mailto:pfpschneider@gmail.com
>     <mailto:pfpschneider@gmail.com>>
>     >>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>
>     <mailto:pfpschneider@gmail.com <mailto:pfpschneider@gmail.com>>>>>
>     >>wrote:
>     >>     >     >
>     >>     >     >     The textual and SPARQL definitions of sh:minCount do
>     >>not align when
>     >>     >     paths
>     >>     >     >     are allowed.
>     >>     >     >
>     >>     >     >
>     >>     >     >     A validation result must be produced if the number of
>     >>value nodes is
>     >>     >     less
>     >>     >     >     than the value of sh:minCount.
>     >>     >     >
>     >>     >     >     SELECT $this
>     >>     >     >     WHERE {OPTIONAL {$this $PATH ?value .}}
>     >>     >     >     GROUP BY $this
>     >>     >     >     HAVING (COUNT(?value) < $minCount)
>     >>     >     >
>     >>     >     >
>     >>     >     >
>     >>     >     >     Peter F. Patel-Schneider
>     >>     >     >     Nuance Communications
>     >>     >     >
>     >>     >     >
>     >>     >     >
>     >>     >     >
>     >>     >     > --
>     >>     >     > Dimitris Kontokostas
>     >>     >     > Department of Computer Science, University of Leipzig &
>     >>DBpedia Association
>     >>     >     > Projects: http://dbpedia.org, http://rdfunit.aksw.org,
>     >>     >     http://aligned-project.eu
>     >>     >     > Homepage: http://aksw.org/DimitrisKontokostas
>     <http://aksw.org/DimitrisKontokostas>
>     >><http://aksw.org/DimitrisKontokostas <http://aksw.org/DimitrisKontokostas>>
>     >>     >     <http://aksw.org/DimitrisKontokostas
>     <http://aksw.org/DimitrisKontokostas>
>     >><http://aksw.org/DimitrisKontokostas <http://aksw.org/DimitrisKontokostas>>>
>     >>     >     > Research Group: AKSW/KILT http://aksw.org/Groups/KILT
>     >>     >     >
>     >>     >
>     >>     >
>     >>     >
>     >>     >
>     >>     > --
>     >>     > Dimitris Kontokostas
>     >>     > Department of Computer Science, University of Leipzig & DBpedia
>     >>Association
>     >>     > Projects: http://dbpedia.org, http://rdfunit.aksw.org,
>     >>http://aligned-project.eu
>     >>     > Homepage: http://aksw.org/DimitrisKontokostas
>     <http://aksw.org/DimitrisKontokostas>
>     >><http://aksw.org/DimitrisKontokostas <http://aksw.org/DimitrisKontokostas>>
>     >>     > Research Group: AKSW/KILT http://aksw.org/Groups/KILT
>     >>     >
>     >>
>     >>
>     >>
>     >>
>     >> --
>     >> Dimitris Kontokostas
>     >> Department of Computer Science, University of Leipzig & DBpedia
>     >>Association
>     >> Projects: http://dbpedia.org, http://rdfunit.aksw.org,
>     >>http://aligned-project.eu
>     >> Homepage: http://aksw.org/DimitrisKontokostas
>     <http://aksw.org/DimitrisKontokostas>
>     >> Research Group: AKSW/KILT http://aksw.org/Groups/KILT
>     >>
> 
> 
> 
> 
> 
> 
> 
> -- 
> Dimitris Kontokostas
> Department of Computer Science, University of Leipzig & DBpedia Association
> Projects: http://dbpedia.org, http://rdfunit.aksw.org, http://aligned-project.eu
> Homepage: http://aksw.org/DimitrisKontokostas
> Research Group: AKSW/KILT http://aksw.org/Groups/KILT
> 

Received on Saturday, 1 October 2016 14:47:14 UTC