Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can MarkLogic use inference over embedded triples?

Tags:

rdf

marklogic

Will MarkLogic apply reasoning when triples are queried using sem:sparql against a selected set of stores?

like image 498
Alex J. Avatar asked Mar 24 '26 01:03

Alex J.


1 Answers

Alex, take a look at Choosing Rulesets for Queries. You'll see an example there where a SPARQL query is applied to a store of triples resulting from applying two sets of inference rules to a set of triples. If you modify that example slightly, it shows a SPARQL query applied to running inference on all triples in the triples index, which includes embedded triples.

xquery version "1.0-ml";
import module namespace sem = "http://marklogic.com/semantics" 
  at "/MarkLogic/semantics.xqy";

PREFIX skos: <http://www.w3.org/2004/02/skos/core#Concept/>

sem:sparql("select * { ?c a skos:Concept; rdfs:label ?l }",(),(),
  sem:ruleset-store(
    ("subClassOf.rules", "subPropertyOf.rules"),
    sem:store()
  )
)
like image 98
Dave Cassel Avatar answered Mar 26 '26 16:03

Dave Cassel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!