shacl rule or metadata+shacl meta-rule?

18 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Jun 9, 2021, 3:02:41 AM6/9/21
to topbrai...@googlegroups.com

In a project we see 2 options of modelling the  rule based knowledge.

 

  1. Using shacl

 

Model the rule in shacl-af (if a and b  then c)

 

  1. Model the rule as metadata as kind of reference data fact (a,b,c) involving a (one, generic) metarule in shacl-af selecting the apporriate fact

(just fyi

adam-shape:TemplateToInferMaatregelComplex a sh:NodeShape ;

                sh:targetClass adam-o:Maatregel ;

                sh:rule [

                               a sh:SPARQLRule ;

                               sh:prefixes adam-p:, adam-ex:, rdf: ;

                               sh:construct """

                                               CONSTRUCT {

                                                               $this ?p ?o .

                                               }

                                               WHERE {

                                                               $this rdf:type ?type .

                                                               FILTER (!STRSTARTS(STR($this),STR(adam-ex:))).

                                                              

                                                               ?bouwdeel_instance adam-p:heeftMaatregel $this .

                                                               ?bouwdeel_instance rdf:type ?bouwdeel_type .

                                                               ?bouwdeel_instance adam-p:heeftMateriaal ?bouwdeel_materiaal .

                                                                                                             

                                                               ?ref_mat rdf:type ?type .

                                                               FILTER (STRSTARTS(STR(?ref_mat),STR(adam-ex:))).

                                                               ?ref_bouwdeel adam-p:heeftMaatregel ?ref_mat .

                                                               FILTER (STRSTARTS(STR(?ref_mat),STR(adam-ex:))).

                                                               ?ref_bouwdeel rdf:type ?bouwdeel_type .

                                                               ?ref_bouwdeel adam-p:heeftMateriaal ?bouwdeel_materiaal .

                                                              

                                                               ?ref_mat ?p ?o .

                                                               }

                                               """

                ] .

 

Working on metadata like:

 

ex:Goed_Reling_2_with_two_Maatregels

  rdf:type adam-o:Reling ;

  adam-p:heeftMaatregel ex:Goed_ConserveringOverlagen_2 ;

  adam-p:heeftMaatregel ex:Goed_GrootOnderhoud_3 ;

  adam-p:heeftMateriaal adam-vwl:Staal ;

  adam-p:oppervlakte "110"^^xsd:decimal ;

.

)

 

Now question is: what is best, futureproof option (well assuming the shacl-af will be a recommendationanyway).

Option 1 seems more standard. Option 2 more particular but involving an an efficient meta-rule as kind of template-rule.

 

Can you think of any pros/cons that can help us decide?

 

Thx a lot, Michel

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
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.

 

David Price

unread,
Jun 9, 2021, 6:08:53 AM6/9/21
to topbrai...@googlegroups.com
Hi Michel,

This looks like a question that I call “Explicit Rules vs Data-Driven Rules”. Both make sense depending on circumstance. I use data-driven when there are going to be hundreds of rules and explicit if there are going to be say 10 rules and it’s likely I can copy and paste and edit when creating new ones. Data-driven is also better if there is staff available to whom you can turn over the the data creation task since it requires no SHACL or rule-writing skills (e.g. often the “data” can be managed as a spreadsheet with a simple spreadsheet importer to turn it into the input triples).

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


Bohms, H.M. (Michel)

unread,
Jun 9, 2021, 6:56:03 AM6/9/21
to topbrai...@googlegroups.com

Thx David for your advice.

 

Many rules indeed so metafacts would be handy, but maybe as frontend to more ‘standard’ rule-based.

 

We’re going to take your input into account, michel

 

 

 

 

Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
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.

Reply all
Reply to author
Forward
0 new messages