One of the main benefits of working with OWL is the availability of powerful automated reasoners. There are several reasoners available, and each has different capabilities and characteristics. For this example we’ll be using ELK, a very fast reasoner that supports the EL subset of OWL 2.
robot reason --reasoner ELK \ --input ribosome.owl \ --output results/reasoned.owl
It’s also possible to place the new inferences in their own ontology with
robot reason --reasoner ELK \ --create-new-ontology true \ --input ribosome.owl \ --output results/new_axioms.owl
--create-new-ontology-with-annotations true will place the inferences in their own ontology, along with their annotations (e.g. labels, definitions, etc.).
Sometimes it is important to know which axioms were inferred (designated by an axiom annotation “is_inferred true”):
robot reason --reasoner ELK \ --annotate-inferred-axioms true \ --input ribosome.owl \ --output results/reasoned.owl
reason includes two more options to help clean the reasoned output (by default, these are
--exclude-duplicate-axioms: if set to true, the axioms will not be added to the output if they exist in an import.
--remove-redundant-subclass-axioms: if set to true, any redundant axioms (those that have been asserted and were also inferred) will be removed from the output.
--reasoner is provided, ROBOT will default to ELK. The following other reasoner options are supported:
emr- Expression Materializing Reasoner
structural- Structural Reasoner
You must select between
-n). Both cannot be passed in as
true to one reason command, as they have opposite results.