我想用Protege创建一个本体,它包含两个类,Animal和FatherAnimal,以及对象属性hasFather,域名为Animal,范围为FatherAnimal.
另外,我创建了另外两个类:Son和Father,它们与相同的对象属性hasFather链接.这里的问题是我不允许为同一个对象属性创建多个域和范围.我真的想避免创建一个新的对象属性.还有其他解决方案吗?
我对 GitHub 上 Matthew Horridge 的 owlexplanation 项目有疑问。
在README文件中有以下代码:
import org.semanticweb.owl.explanation.api.*;
import org.semanticweb.owlapi.model.*;
import org.semanticweb.owlapi.reasoner.OWLReasonerFactory;
OWLReasonerFactory rf = ; // Get hold of a reasoner factory
OWLOntology ont = ; // Reference to an OWLOntology
// Create the explanation generator factory which uses reasoners provided by the specified
// reasoner factory
ExplanationGeneratorFactory<OWLAxiom> genFac = ExplanationManager.createExplanationGeneratorFactory(rf);
// Now create the actual explanation generator for our ontology
ExplanationGenerator<OWLAxiom> gen = genFac.createExplanationGenerator(ont);
// Ask for explanations for some entailment
OWLAxiom entailment ; // …Run Code Online (Sandbox Code Playgroud)