public class ReduceOperation extends Object
Every axiom A = SubClassOf(C D)
is tested (C or D are permitted to be anonymous,
e.g. SomeValuesFrom)
If there already exists an axiom SubClassOf(C Z)
, where Z is entailed to be a
proper SubClassOf of D (direct or indirect), then A is redundant, and removed.
Because an OWL reasoner will only return named (non-anonymous) superclasses, we add a
pre-processing step, where for each class C appearing in either LHS or RHS of a SubClassOf
expression, if C is anonymous, we create a named class C' and add a temporary axioms
EquivalentClasses(C' C)
, which is later removed as a post-processing step. When performing
reasoner tests, we can then substitute C for C'
We make a special additional case of redunancy, as in the following example:
1. (hand and part-of some human) SubClassOf part-of some forelimb
2. hand SubClassOf part-of some forelimb
Here we treat axiom 1 as redundant, but this is not detected by the algorithm above,
because there is no explicit SubClassOf axiom between the GCI LHS and 'human'. We therefore
extend the test above and first find all superclasses of anonymous LHSs, and then test for these
Constructor and Description |
---|
ReduceOperation() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
getDefaultOptions()
Return a map from option name to default option value, for all the available reasoner options.
|
static void |
reduce(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory)
Remove redundant SubClassOf axioms.
|
static void |
reduce(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory,
Map<String,String> options)
Remove redundant SubClassOf axioms.
|
public static Map<String,String> getDefaultOptions()
public static void reduce(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
ontology
- The ontology to reduce.reasonerFactory
- The reasoner factory to use.org.semanticweb.owlapi.model.OWLOntologyCreationException
- on ontology problempublic static void reduce(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory, Map<String,String> options) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
ontology
- The ontology to reduce.reasonerFactory
- The reasoner factory to use.options
- A map of options for the operation.org.semanticweb.owlapi.model.OWLOntologyCreationException
- on ontology problemCopyright © 2015–2020. All rights reserved.