0
我有一個關於Matthew Horridge在GitHub上的owlexplanation項目的問題。如何使用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 ; // Get a reference to the axiom that represents the entailment that we want explanation for
// Get our explanations. Ask for a maximum of 5.
Set<Explanation<OWLAxiom>> expl = gen.getExplanations(entailment, 5);
請能有人解釋究竟是什麼參數entailment
的類型?我不太瞭解我們得到什麼解釋。 我正在尋找當我的本體不一致時給我解釋的代碼。
看來我究竟需要什麼。我下載了OWLExplanation和JFact,並且一切正常,但是我得到一個錯誤「type ExplanationGenerator不接受參數」。你有什麼想法,爲什麼? –
你使用的是哪個版本?確保在類路徑中沒有多個版本 – Ignazio
當您運行上面的示例時,您可以告訴我,您的項目只有OWLExplanation的庫1.1.2和JFact的1.2.1版? –