In a project we see 2 options of modelling the rule based knowledge.
Model the rule in shacl-af (if a and b then c)
(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
|
||||||||||||||||
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.
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
|
|
|
| ||||||||
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/28126EA5-B03F-44F9-813D-C0E137119203%40topquadrant.com.