Commands for set up basic OWL/RDF inferences in the DOREMUS Virtuoso Triplestore. See also the Virtuoso documentation
We consider that the 3 ontologies have been loaded in the <http://data.doremus.org/ontology>
graph.
We load in the /data
folder all the ontologies we want to inference (i.e. skos.rdf).
docker exec -it virtuoso_doremus bash
/usr/local/virtuoso-opensource/bin/isql-v
ld_dir ('/data', 'skos.rdf', 'http://data.doremus.org/commons');
# add inference rules
rdfs_rule_set('mus','http://data.doremus.org/ontology');
rdfs_rule_set('mus','http://data.doremus.org/commons');
Querying the SPARQL endpoint, it is required to add DEFINE input:inference 'mus'
on top of the query.
DEFINE input:inference 'mus'
SELECT * WHERE {
?dedication mus:U44i_is_dedication_statement_of ?expression
} LIMIT 100
results with inference - results without inference
DEFINE input:inference 'mus'
SELECT * WHERE {
?a skos:inScheme <http://data.doremus.org/vocabulary/iaml/mop/>
}
results with inference (they include also skos:isTopConceptOf
, subproperty of skos:inScheme
)
results without inference