简体   繁体   English

本体推理

[英]Reasoning on ontology

I have some problem with reasoning: how can I retrieve the instance of a class if I load ONLY the TBox of an ontology? 我在推理方面有一些问题:如果仅加载本体的TBox,如何检索类的实例?

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLDataFactory dataFactory = manager.getOWLDataFactory();
Ontology = manager.createOntology();
Ontology = manager.loadOntologyFromOntologyDocument(IRI.create("http://www.cs.ox.ac.uk/isg/ontologies/lib/RobertsFamily/2009-09-03/00775.owl"));
PelletReasoner reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner(Ontology);
reasoner.getKB().printClassTree();

The execution is BLOCKED to the last Line (I don't have NULL POINTER). 执行被阻塞到最后一行(我没有NULL POINTER)。 It's only blocked :( 它只是被阻止:(

It's just not possible. 只是不可能。 Without ABox, there are no class assertions, thus most individuals are not available for the reasoner to find. 没有ABox,就不会有类断言,因此大多数人都无法找到推理机。

The only individuals which might be found are the ones included in OneOf restrictions; 唯一可以找到的人就是OneOf限制中包含的OneOf however, I've not tried building an ontology that would work with Pellet (or other reasoners) in this way, so I'm not sure it's possible either. 但是,我没有尝试过以这种方式构建可以与Pellet(或其他推理机)一起使用的本体,因此我不确定这是否可行。

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

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