infer question

32 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Apr 9, 2020, 6:48:49 AM4/9/20
to topbrai...@googlegroups.com

No way/trick to topspin-infer ex:Bridge_1 rdf:type ex:ShortBridge ?

 

(I know shacl is better here but still got this question for owl)

 

 

 

From

 

<https://w3id.org/def/example>

  a owl:Ontology ;

  owl:imports <https://w3id.org/def/basicsemantics-owl> ;

.

ex:Bridge

  a owl:Class ;

.

ex:Bridge_1

  a ex:Bridge ;

  ex:length [

      rdf:value 50.0 ;

    ] ;

.

ex:ShortBridge

  a owl:Class ;

  rdfs:subClassOf ex:Bridge ;

  rdfs:subClassOf [

      a owl:Restriction ;

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

      owl:onProperty ex:length ;

    ] ;

  owl:equivalentClass [

      a owl:Restriction ;

      owl:allValuesFrom ex:ShortBridgeLengthValue ;

      owl:onProperty ex:length ;

    ] ;

.

ex:ShortBridgeLengthValue

  a owl:Class ;

  rdfs:subClassOf bs:QuantityValue ;

  rdfs:subClassOf [

      a owl:Restriction ;

      owl:allValuesFrom [

          a rdfs:Datatype ;

          owl:onDatatype xsd:decimal ;

          owl:withRestrictions (

              [

                xsd:maxInclusive 100 ;

              ]

            ) ;

        ] ;

      owl:onProperty rdf:value ;

    ] ;

.

ex:length

  a owl:ObjectProperty ;

  rdfs:range bs:QuantityValue ;

.

 

 

 

 

 

 

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.

 

 

 

 

dprice

unread,
Apr 9, 2020, 7:38:29 AM4/9/20
to topbrai...@googlegroups.com
I did not look into the details, but TopBraid has support for the OWL RL profile wrt inference. Anything beyond that is not supported out-of-the-box.

If you find a few patterns like that you need to support in TopBraid, then layer SHACL rules over the OWL or extend the OWL RL SPIN rules to make these inferences . You could even have a small library of SPARQL CONSTRUCTs that do the trick.

As you know from the V-Con project Michel, it is also possible to do a customer extension and integrate a DL reasoner into EDG if that requirement becomes operational in an organisation.

Cheers,
David

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/5a44c93542e34368a7ef2630e8de1147%40tno.nl.


Bohms, H.M. (Michel)

unread,
Apr 9, 2020, 9:15:02 AM4/9/20
to topbrai...@googlegroups.com

 

 

Thx david

 

I see all the shacl pros etc.

 

It just that we have owl-oriented partners that wondered how they could autoclassify like in the example.

 

I know the limitations...was just thinking...maybe we can remodel in such a way the same sothat it would come into RL-territory.....

Well,guess that’s difficult ....

 

Gr michel

 

 

 

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

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

Location

 

Irene Polikoff

unread,
Apr 9, 2020, 9:47:40 AM4/9/20
to topbrai...@googlegroups.com
No, this type of inference is outside of RL profile. However, as David said, if you want to support a specific pattern that is outside of OWL RL, you can still add a rule targeted for it. RL profile is implemented as a set of SPIN rules - you can see it in TBC in owlrl-all.ttl and you can extend it.

Further, I don’t think this example would produce the inference you are looking for irrespective of the reasoner. You would need to change the below restriction to the equivalentClass:

ex:ShortBridgeLengthValue
  a owl:Class ;
  rdfs:subClassOf bs:QuantityValue ;
  rdfs:subClassOf [
      a owl:Restriction ;
      owl:allValuesFrom [
          a rdfs:Datatype ;
          owl:onDatatype xsd:decimal ;
          owl:withRestrictions (
              [
                xsd:maxInclusive 100 ;
              ]
            ) ;
        ] ;
      owl:onProperty rdf:value ;
    ] ;

On Apr 9, 2020, at 9:14 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Thx david
 
I see all the shacl pros etc.
 
It just that we have owl-oriented partners that wondered how they could autoclassify like in the example.
 
I know the limitations...was just thinking...maybe we can remodel in such a way the same sothat it would come into RL-territory.....
Well,guess that’s difficult ....
 
Gr michel
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

Bohms, H.M. (Michel)

unread,
Apr 9, 2020, 10:08:33 AM4/9/20
to topbrai...@googlegroups.com

Yes , of course: 2 times equivalent in the chain! (otherwise you wont travel back...)

Thx!

 

 

 

 

 

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

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

Location

 

Bohms, H.M. (Michel)

unread,
Apr 10, 2020, 8:00:41 AM4/10/20
to topbrai...@googlegroups.com

Ok, so better shacl

 

Somehow I do not get a shacl warning on. This used to work as I remember well...tips welcome

 

 

# baseURI: https://w3id.org/def/example

# imports: http://datashapes.org/dash

# imports: https://w3id.org/def/basicsemantics-owl

# prefix: ex

 

@prefix bs: <https://w3id.org/def/basicsemantics-owl#> .

@prefix dash: <http://datashapes.org/dash#> .

@prefix ex: <https://w3id.org/def/example#> .

@prefix owl: <http://www.w3.org/2002/07/owl#> .

@prefix quantitykind: <http://qudt.org/vocab/quantitykind/> .

@prefix qudt: <http://qudt.org/schema/qudt/> .

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

@prefix sh: <http://www.w3.org/ns/shacl#> .

@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

@prefix unit: <http://qudt.org/vocab/unit/> .

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

 

<https://w3id.org/def/example>

  a owl:Ontology ;

  owl:imports <http://datashapes.org/dash> ;

  owl:imports <https://w3id.org/def/basicsemantics-owl> ;

.

ex:Bridge

  a owl:Class ;

.

ex:Bridge_1

  a ex:ShortBridge ;

  ex:length [

      rdf:value 120.0 ;

    ] ;

.

ex:ShortBridge

  a owl:Class ;

  rdfs:subClassOf ex:Bridge ;

  sh:property [

      a sh:PropertyShape ;

      sh:path (

          ex:length

          rdf:value

        ) ;

      sh:maxCount 1 ;

      sh:maxInclusive 100.0 ;

      sh:minCount 1 ;

    ] ;

.

ex:length

  a owl:ObjectProperty ;

  rdfs:range bs:QuantityValue ;

.

 

 

 

 

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

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

Location

 

dprice

unread,
Apr 10, 2020, 10:11:19 AM4/10/20
to topbrai...@googlegroups.com
You have no NodeShapes defined.

Cheers,
David

dprice

unread,
Apr 10, 2020, 10:37:27 AM4/10/20
to topbrai...@googlegroups.com

On 9 Apr 2020, at 14:14, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

 
 
Thx david
 
I see all the shacl pros etc.
 
It just that we have owl-oriented partners that wondered how they could autoclassify like in the example.

1) TopBraid is not a DL reasoner. If you want the full and arbitrary inferences available with one then you will need to augment/integrate TopBraid and such an engine.

If you need OWL inference and SHACL validation then you need to layer SHACL over the OWL and use the appropriate engine to process each specification.

If you have just a few patterns in specific ontologies, then I already explained approaches for that.

2) As an aside …. I understand these examples are from an in-work data exchange standard. Assuming that’s correct, then it is unclear to me why anyone would think it desirable to depend on the kind of inferences being discussed in such a standard. IMO providing a ex:ShortBridgeLengthValue that is outside its allowed value set OR providing a an instance of Bridge that should be a ShortBridge is an error in the data in an exchange scenario. Using a reasoner to “fix up” the data after the exchange can be risky. For example, it may be that the value was an error and it should have been 250.0 instead of 25.0 and using a reasoner could hide that possible error.

Note that in EDG now we have a “Problems and Suggestions” approach to this kind of situation. You can write the SHACL to validate and DASH suggestions to propose a solution (e.g. add rdf:type or change the value) and the user can execute the suggestions if/when they agree. See http://datashapes.org/suggestions.html which is part of “DASH is a carefully curated and platform-independent extension of the Shapes Constraint Language (SHACL) for common tasks"

Cheers,
David


 
I know the limitations...was just thinking...maybe we can remodel in such a way the same sothat it would come into RL-territory…..
Well,guess that’s difficult ….
 
Gr michel
 
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

Bohms, H.M. (Michel)

unread,
Apr 10, 2020, 10:49:24 AM4/10/20
to topbrai...@googlegroups.com
Ahhh how stupid!
Sometimes you can keep looking without seeing...
Thx david

Op 10 apr. 2020 16:11 schreef dprice <dpr...@topquadrant.com>:
Reply all
Reply to author
Forward
0 new messages