question on restriction

11 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Mar 24, 2020, 3:07:17 PM3/24/20
to topbrai...@googlegroups.com

bs:QuantityValue

  rdf:type owl:Class ;

  rdfs:subClassOf owl:Thing ;

  rdfs:subClassOf [

      rdf:type owl:Restriction ;

      owl:onClass xsd:decimal ;

      owl:onProperty rdf:value ;

      owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;

    ] ;

  skos:prefLabel "kwantiteitwaarde"@nl ;

  skos:prefLabel "quantity value"@en ;

.

 

Someone said: red should be owl:onDatatype but when I do that I get error missing class:

???

 

 

 

 

 

Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

+31888663107
+31630381220
michel...@tno.nl

Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

 

 

 

 

Holger Knublauch

unread,
Mar 24, 2020, 6:08:40 PM3/24/20
to topbrai...@googlegroups.com

This OWL 2 feature is only superficially supported by TopBraid and will not be supported in the future.

Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/f7c585569482452db12ab76a4ed8614d%40tno.nl.

Bohms, H.M. (Michel)

unread,
Mar 25, 2020, 3:25:19 AM3/25/20
to topbrai...@googlegroups.com

Ahhhh, ok!

 

The next question would than be: why is that?

Isnt the example a valid case?

 

In the primer I see only qualifiedCardinality examples with onClass.....maybe this simply should not work for qualified datatype properties?

 

Any other way to say that my class has exactly one attribute with type xsd:decimal?

Like normal cardinality + some or all valuesfrom?

 

Thx a lot,

Michel

Holger Knublauch

unread,
Mar 25, 2020, 3:47:22 AM3/25/20
to topbrai...@googlegroups.com

Hi Michel,

we have (long) moved away from OWL 2 and suggest to use SHACL for these use cases. The example with rdf:value looks like sh:minCount 1; sh:maxCount 1; sh:datatype xsd:decimal.

Holger

Bohms, H.M. (Michel)

unread,
Mar 25, 2020, 4:21:19 AM3/25/20
to topbrai...@googlegroups.com

I know, the question was specifically for OWL.

Some of the involved parties have tools  that do not support SHACL.

 

We cannot force them (now) to SHACL-only mode.

 

Can I do:

bs:QuantityValue

  rdf:type owl:Class ;

  rdfs:subClassOf owl:Thing ;

  rdfs:subClassOf [

      rdf:type owl:Restriction ;

      owl:allValuesFrom xsd:decimal ;

      owl:onProperty rdf:value ;

    ] ;

  rdfs:subClassOf [

      rdf:type owl:Restriction ;

      owl:cardinality "1"^^xsd:nonNegativeInteger ;

      owl:onProperty rdf:value ;

    ] ;

  skos:prefLabel "kwantiteitwaarde"@nl ;

  skos:prefLabel "quantity value"@en ;

.

 

With same effect?

Irene Polikoff

unread,
Mar 25, 2020, 9:41:01 AM3/25/20
to topbrai...@googlegroups.com
Can you use cardinality instead of qualified cardinality? Depends on what you want to say.

Qualified cardinality 1, as you probably know, means that exactly 1 value has to be decimal, other values can be of another data type. While simple cardinality says that the total number of values, irrespective of what kind, has to be 1.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
 
Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Holger Knublauch
Verzonden: Wednesday, March 25, 2020 8:47 AM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] question on restriction
 

Hi Michel,

we have (long) moved away from OWL 2 and suggest to use SHACL for these use cases. The example with rdf:value looks like sh:minCount 1; sh:maxCount 1; sh:datatype xsd:decimal.

Holger

 

On 25/03/2020 17:25, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:
Ahhhh, ok!
 
The next question would than be: why is that?
Isnt the example a valid case?
 
In the primer I see only qualifiedCardinality examples with onClass.....maybe this simply should not work for qualified datatype properties?
 
Any other way to say that my class has exactly one attribute with type xsd:decimal?
Like normal cardinality + some or all valuesfrom?
 
Thx a lot,
Michel
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist


This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
 
Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Holger Knublauch
Verzonden: Tuesday, March 24, 2020 11:09 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] question on restriction
 

This OWL 2 feature is only superficially supported by TopBraid and will not be supported in the future.

Holger

 

On 25/03/2020 05:07, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:
bs:QuantityValue
  rdf:type owl:Class ;
  rdfs:subClassOf owl:Thing ;
  rdfs:subClassOf [
      rdf:type owl:Restriction ;
      owl:onClass xsd:decimal ;
      owl:onProperty rdf:value ;
      owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
    ] ;
  skos:prefLabel "kwantiteitwaarde"@nl ;
  skos:prefLabel "quantity value"@en ;
.
 
Someone said: red should be owl:onDatatype but when I do that I get error missing class:
<image002.png>
???
 
 
 
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist



This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
 
 
-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/f7c585569482452db12ab76a4ed8614d%40tno.nl.
-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/967752e4-a1d4-10b0-cb98-be91a3486c7c%40topquadrant.com.
-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e971ce4c42f84094a0ecda6e9d8338f4%40tno.nl.
-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/4fd71ad0-a41c-2019-4139-d15751837963%40topquadrant.com.

-- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.

Jan Voskuil

unread,
Mar 25, 2020, 10:01:04 AM3/25/20
to topbrai...@googlegroups.com

Also, in OWL, constraints are constraints on classification, not constraints on specifying values of properties. It is often precisely the people who are slow in starting with SHACL that are not fully aware of this.

 

Even with simple cardinality specified to exactly 1, a resource can have none or many values for the property. It just falls outside the definition of the class. Violations are not violations of a constraint, but contradictions between two or more propositions, neither of which is contested. Therefore, in standards that intend to express data constraints, SHACL should be used and not OWL. -j

Bohms, H.M. (Michel)

unread,
Mar 25, 2020, 10:27:14 AM3/25/20
to topbrai...@googlegroups.com
So actually...the approach below, cardinality plus allvaluesfrom seems even better....

Op 25 mrt. 2020 14:41 schreef Irene Polikoff <ir...@topquadrant.com>:

Michael DeBellis

unread,
Mar 25, 2020, 11:03:45 AM3/25/20
to topbrai...@googlegroups.com
"Also, in OWL, constraints are constraints on classification, not constraints on specifying values of properties. It is often precisely the people who are slow in starting with SHACL that are not fully aware of this.  "

I just want to say how strongly I agree with what Jan said. I've used OWL much more than SHACL and until recently I was one of those people who was "slow in starting with SHACL" and didn't really understand why it was so essential to use SHACL rather than OWL to express sata integrity constraints. It was only when I started using knowledge graphs and OWL on a really large scale project that I saw why SHACL makes so much more sense for such constraints. As Jan pointed out for one thing OWL has the Open World Assumption (OWA) so some constraints such as "ssnNumber must have a value" are impossible to even define in OWL. But perhaps even more important is that if an OWL reasoner finds a contradiction (e.g., a data property is typed for xsd:integer and has a literal value) that is a contradiction and the reasoner is useless until that contradiction is resolved. For very large data this is a big problem because it is almost inevitable that some of your data is going to violate some of your constraints and you don't want to have the reasoner be useless until every contradiction is resolved. You need something like SHACL that reports on the violations rather than a reasoner which creates an inconsistent (and hence useless for reasoning) ontology. 

Michael

Irene Polikoff

unread,
Mar 25, 2020, 11:38:23 AM3/25/20
to topbrai...@googlegroups.com
Yes, agree. The actual meaning of OWL cardinality restrictions (given the Open World and Non Unique Name assumptions) and what would happen once you have data is yet another topic.

I intentionally did not say anything about this because I think I already said in the past something like “it does not really mean what you expect it does + you would need a DL reasoner which are not commercially available + you will likely to be surprised by results, anyhow -> use SHACL instead”. I did not want to continue to sound like a broken record :)

Jan Voskuil

unread,
Mar 25, 2020, 2:49:05 PM3/25/20
to topbrai...@googlegroups.com

Thank you Michael for your feedback! I have the same inhibitions as Irene, and yet we need to keep spreading the word. Best, -j

Bohms, H.M. (Michel)

unread,
Mar 25, 2020, 6:35:01 PM3/25/20
to topbrai...@googlegroups.com
Think the benefits of shacl over owl are clear. 
Still there are owl users with owl tools using owl reasoning that are not 100% sure they can do all their owl things in shacl (given their tools have the capability of handling shacl at all).

Eg when they use inference like autoclassification based on necessary&sufficient owl restrictions....can they still do that with shacl? Do they need ..not yet recommendation status...shacl AF for that?

That kind of issues.

Gr michel

Op 25 mrt. 2020 19:49 schreef Jan Voskuil <jan.v...@taxonic.com>:

dprice

unread,
Mar 27, 2020, 7:54:52 AM3/27/20
to topbrai...@googlegroups.com

On 25 Mar 2020, at 22:34, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Think the benefits of shacl over owl are clear. 
Still there are owl users with owl tools using owl reasoning that are not 100% sure they can do all their owl things in shacl (given their tools have the capability of handling shacl at all).

Sure … however, your original question seems to be from a standard for *data exchange* and we know that OWL does not support all your requirements. Reporting a logical inconsistency is not the same thing as reporting a data constraint violation and the OWA and naming assumptions mean there are common cases where OWL can *never* solve the data exchange problem wrt data validation. If I was an RDF-based data exchange standards committee today, I would provide both OWL and SHACL.


Eg when they use inference like autoclassification based on necessary&sufficient owl restrictions....can they still do that with shacl?

We know for certain that the OWL RL profile inferences can be supported, as that’s already implemented using SPIN and we know SPIN to SHACL can be done. I’ve not done an exhaustive check wrt the OWL DL profile but AFAIK “SHACL can be used to infer arbitrary triples” - see pizza calorie example of SHACL that cannot be done in OWL in  https://spinrdf.org/shacl-and-owl.html .

Do they need ..not yet recommendation status...shacl AF for that?

SHACL-AF is indeed where SHACL-based inferencing is specified.

Cheers,
David

Reply all
Reply to author
Forward
0 new messages