简体   繁体   English

skos 更宽和更窄的逆不工作

[英]skos broader and narrow inverse not working

I have setup GraphDB SE trial version and trying out inference functionality with OWL2-RL ruleset.我已经设置了 GraphDB SE 试用版并尝试使用 OWL2-RL 规则集进行推理功能。 I have built a simple SKOS knowledge with a single broader relationship.我已经建立了一个简单的 SKOS 知识和一个更广泛的关系。 Some how, when I try to query for narrower relationship am not getting any results.某种方式,当我尝试查询更窄的关系时没有得到任何结果。 Am I going wrong in the usage ?我在使用上会出错吗?

Insertion:插入:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

INSERT DATA {  
        ex:mammals rdf:type skos:Concept;
                   skos:prefLabel "mammals"@en;

        ex:animals rdf:type skos:Concept;
                   skos:prefLabel "animals"@en;
                   skos:broader ex:mammals .
}

Query:询问:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

select * where {
    ?s skos:narrower ?o .
}

In the query result I don't see any response.在查询结果中,我没有看到任何响应。 Shouldn't it return below result - ex:mammals skos:narrower ex:animals它不应该返回以下结果吗 - ex:mammals skos:narrower ex:animals

I just came across this question and the OP is correct: Although the official SKOS reference explicitly states that skos:broader and skos:narrower are inverse, the actual RDF implementation does not include this statement.我刚刚遇到了这个问题,并且 OP 是正确的:虽然官方 SKOS 参考明确指出skos:broaderskos:narrower是相反的,但实际的 RDF 实现不包括这个语句。 However, properties skos:broaderTransitive and skos:narrowerTransitive are declared as inverse.但是,属性skos:broaderTransitiveskos:narrowerTransitive被声明为逆属性。

And, although not relevant to the original question, the implementation does not state properties skos:topConceptOf and skos:hasTopConcept as inverse either.而且,虽然与原始问题无关,但实现也没有将属性skos:topConceptOfskos:hasTopConcept为相反的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM