Class ReduceOperation


  • public class ReduceOperation
    extends Object
    Reason over an ontology and remove redundant SubClassOf axioms

    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.

    Implementation

    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'

    GENERAL CLASS INCLUSION AXIOMS

    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

    Author:
    Chris Mungall
    • Constructor Detail

      • ReduceOperation

        public ReduceOperation()
    • Method Detail

      • getDefaultOptions

        public static Map<String,​String> getDefaultOptions()
        Return a map from option name to default option value, for all the available reasoner options.
        Returns:
        a map with default values for all available options
      • reduce

        public static void reduce​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                  org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory)
                           throws org.semanticweb.owlapi.model.OWLOntologyCreationException
        Remove redundant SubClassOf axioms.
        Parameters:
        ontology - The ontology to reduce.
        reasonerFactory - The reasoner factory to use.
        Throws:
        org.semanticweb.owlapi.model.OWLOntologyCreationException - on ontology problem
      • reduce

        public 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
        Remove redundant SubClassOf axioms.
        Parameters:
        ontology - The ontology to reduce.
        reasonerFactory - The reasoner factory to use.
        options - A map of options for the operation.
        Throws:
        org.semanticweb.owlapi.model.OWLOntologyCreationException - on ontology problem