constraintAutomaton / shape-index-specification

https://constraintautomaton.github.io/shape-index-specification/
0 stars 0 forks source link

Excluded entries #3

Open pietercolpaert opened 2 weeks ago

pietercolpaert commented 2 weeks ago

Shape languages already support this themself, such as sh:not in SHACL.

I think it’s redundant and confusing to have si:excludes as a concept here

constraintAutomaton commented 2 weeks ago

I think in this "problem," there are two more or less independent worlds. We have the knowledge graph and the network (graph). The knowledge graph is completely independent from its actual materialization in a network (or a single file). The nodes of the network are a subgraph of the knowledge graph, and the edge of this graph is the IRI inside the triple of the network. I think shape deals exclusively in the realm of the knowledge graph; thus, it cannot in any way characterize our network. Thus, I don't think the not operation is able to produce what the si:excludes try to do. We could add an extra rule where if a shape is only negative, then we treat it as the current way with the exclude, but I don't think it is the best way, and it confuses the separation between those two worlds.

constraintAutomaton commented 2 weeks ago

Some questions could be asked about the utility of si:excludes or the negation of information, but I think it is reasonable to use it in the context of the federation of multiple datasets. The data publisher knows that some nodes are specialized in containing information related to him (for instance, forum metadata or organization data ) or in the case where the user wants to help engines by, for example, excluding things that are in a "wiki-like" knowledge graph.

pietercolpaert commented 2 weeks ago

Example: what if you want to indicate that your subweb will not include a person:

Using excludes:

_:b0 a si:Entry ;
   si:excludes true ;
   si:shape [
       a sh:NodeShape ;
      sh:class foaf:Person
] .

Using sh:not:

_:b0 a si:Entry ;
   si:shape [
     sh:not [
         a sh:NodeShape ;
         sh:class foaf:Person 
      ] 
] .

Isn’t this semantically equivalent?

constraintAutomaton commented 2 weeks ago

It would make sense to say that they are the same if the shape is closed (already in the specification) and if it only defines negative things. However, the engine would need to validate this, and I think having a "normal shape" and a flag would be simpler. Because, the entries with close shapes make universal statements (in the context of the subweb of the index), and if we mix positive and negative I am not sure if it would be easier to keep it consistent.

pietercolpaert commented 2 weeks ago

Let’s see what other eyes say about this and leave this open for others to comment?