Inference using skos archetype

I created a database (v5.0-beta) using the skos archetype and the SL reasoning type and added the data below (using the command line because it doesn’t work with the UI for some reason) :

@prefix : <http://www.semanticweb.org/owl/owlapi/turtle#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix ex: <http://example.com#> .
@prefix rule: <tag:stardog:api:rule:> .

ex:ElementScheme a skos:ConceptScheme ;
	skos:prefLabel "Thesaurus of the elements of a building"@en ;
	skos:hasTopConcept ex:element .

ex:Element a skos:Concept ;
	skos:prefLabel "Element"@en ;
	skos:inScheme ex:ElementScheme .

	ex:Building a skos:Concept ;
		skos:prefLabel "Building"@en ;
		skos:broaderTransitive ex:Element ;
		skos:inScheme ex:ElementScheme  .
	
    ex:Room a skos:Concept ;
		skos:prefLabel "Room"@en ;
		skos:broaderTransitive ex:Element ;
		skos:inScheme ex:ElementScheme  .

		ex:Office a skos:Concept ;
			skos:prefLabel "Office"@en ;
			skos:broaderTransitive ex:Room ;
			skos:inScheme ex:ElementScheme  .

When I run the query below, I only have the triples that were explicitly added, even with the reasonner (the transitivity doesn’t work)

select ?o where 
{
	?o skos:broaderTransitive ex:Element
} 

When I run th second query, I don’t have any result, even though skos:narrowerTransitive is the inverse property of skos:broaderTransitive.

select ?o where 
{
	ex:Element skos:narrowerTransitive ?o
} 

Where did I go wrong ?

1 Like

Hi,

Are you running the query via the web console? We have a known issue with the 5.0-RC1 where reasoning cannot be enabled properly on the web console. If you run the command via CLI with stardog query -r myDb do you get the desired results?

1 Like

Yes, it works just fine this way, thanks !

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.