Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 2.31 KB

INFERENCE.md

File metadata and controls

48 lines (30 loc) · 2.31 KB

Inference

Commands for set up basic OWL/RDF inferences in the DOREMUS Virtuoso Triplestore. See also the Virtuoso documentation

Install

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');

Use

Querying the SPARQL endpoint, it is required to add DEFINE input:inference 'mus' on top of the query.

Examples

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