Skip to content

An API and reference implementation for generating justifications for entailments in OWL ontologies

License

Notifications You must be signed in to change notification settings

ignazio1977/owlexplanation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OWL Explanation

An API and reference implementation for generating justifications for entailments in OWL ontologies.

Maven Dependency

<dependency>
    <groupId>net.sourceforge.owlapi</groupId>
    <artifactId>owlexplanation</artifactId>
    <version>5.0.0</version>
</dependency>

Example Usage

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);

Explanations for Inconsistent Ontologies

To obtain explanations for inconsistent ontologies the InconsistentOntologyExplanationGeneratorFactory can be used. Ask for explanations for SubClassOf(owl:Thing owl:Nothing).

About

An API and reference implementation for generating justifications for entailments in OWL ontologies

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%