我在许多本体上使用了pellet推理器,并在IRI列表上运行了info方法(在本例中为URL).我感兴趣的两个指标是DL Expressivity和OWL Profile.
OWL配置文件我的范围从"OWL 2","OWL 2 DL","OWL 2 EL","OWL 2 QL","OWL 2 RL".什么时候说"OWL 2",这是否意味着本体是OWL 2满的?所有其他变种DL都是吗?我找到了一个描述不同配置文件的规范(特别是表10)[作为新用户我不能发布多个超链接; 以为即将到来的那个更重要的是两个],但到目前为止我还没能为自己回答这个问题.
至于"DL表达性",这个名字暗示所有表达性代码(例如ALCH,ALCH(D))都是DL.我已经找到了这个高度学术性的目录,可以说,代码及其在复杂性方面的技术含义,但我需要知道如何通过查看表达式来说明,至少一般来说,本体是DL还是Full.任何帮助或链接解释这些事情将是非常感谢.
如果它有所帮助,我还应该为我正在尝试用这些东西做些什么.我只是根据"pellet info"数据构建一个表,该数据具有本体ID号(来自url列表),表达性和每个OWL Profile,还说明该本体是完整的,DL还是Lite.
使用以下查询:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX uni: <http://localhost/SemanticSearch/semanticsearch.owl#>
SELECT
DISTINCT *
WHERE {
?uri uni:altLabel "5"^^xsd:integer.
?uri rdf:type ?type
}
Run Code Online (Sandbox Code Playgroud)
也返回其具有的URI altLabel与xsd:decimal5.x的我真的需要它来只返回?uri具有altLabel的xsd:integer.反正有没有实现这个目标?
我试图让 Pellet 将属性从类传播到属于这些类的个人。例如,如果我有一个带有属性 X 的类 A 和带有 rdf:type=Class A 的个人 B,我希望个人 B 在运行推理器后拥有属性 X。我正在使用OWL 2 新功能页面上引用的属性链包含技术。如果我在属性链中使用我自己的自定义属性,则此技术可以完美运行,但如果我尝试使用 rdf:type 本身,则它不起作用。以下是我的 RDF/XML 的一些相关片段。
本体类(由 Jena 生成;注意“传播”属性,因为这是我试图传播给类 Person 的个人的内容):
<rdf:Description rdf:about="http://family/person">
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:sameAs rdf:resource="http://family/person"/>
<rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
<owl:equivalentClass rdf:resource="http://family/person"/>
<owl:disjointWith rdf:resource="http://www.w3.org/2002/07/owl#Nothing"/>
<j.1:spread rdf:resource="http://spread/specificSpread"/>
<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
</rdf:Description>
Run Code Online (Sandbox Code Playgroud)
“Spread”属性本身(由我手动编写,不是用 Jena 生成的,因为 Jena 的 API 不支持对象属性链):
<rdf:Description rdf:about="http://spread/generalSpread">
<owl:propertyChainAxiom rdf:parseType="Collection">
<owl:ObjectProperty rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
<owl:ObjectProperty rdf:about="http://spread/generalSpread"/>
</owl:propertyChainAxiom>
</rdf:Description>
Run Code Online (Sandbox Code Playgroud)
在推理之前,俄狄浦斯人长这样:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
</rdf:Description>
Run Code Online (Sandbox Code Playgroud)
这个想法是,经过推理,它看起来像这样:
<rdf:Description rdf:about="http://family/Oedipus">
<rdf:type rdf:resource="http://family/person"/>
<j.1:spread rdf:resource="http://spread/specificSpread"/>
</rdf:Description>
Run Code Online (Sandbox Code Playgroud)
我有一种感觉,将 rdf:type 称为 rdf:resource 可能是事情变得棘手的地方,因为我很确定它不是资源。但我不确定如何解决它。我也通过 …
我无法找到一些像SWRL和Jena一样使用Pellet,或者至少使用SWRL的简单代码示例?我在Pellet文档中研究过一些例子,但没有关于使用SWRL的例子.网络上的大多数示例都是不完整和令人困惑的.
我找到的唯一解决方案是使用Jess Rule Engine,但它不是免费的,并且是在商业许可下.我发现Pellet支持SWRL规则,但找不到运行示例.
我找到的唯一例子就是这个,但我不明白:
OWLOntologyManager m = create();
OWLOntology o = m.createOntology(example_iri);
// Get hold of references to class A and class B.
OWLClass clsA = df.getOWLClass( IRI.create(example_iri + "#A" ));
OWLClass clsB = df.getOWLClass(IRI.create(example_iri + "#B" ));
SWRLVariable var = df.getSWRLVariable(IRI.create(example_iri + "#x" ));
SWRLClassAtom body = df.getSWRLClassAtom(clsA, var);
SWRLClassAtom head = df.getSWRLClassAtom(clsB, var);
SWRLRule rule = df.getSWRLRule(Collections.singleton(body),
Collections.singleton(head));
m.applyChange(new AddAxiom(o, rule));
Run Code Online (Sandbox Code Playgroud) 自从无法下载 Protege 4.3 的 Pellet 插件表明该版本不可用以来已经快一年了。有什么改变吗?