Data and Knowledge Group

― Knowledge Representation and Reasoning

Hermit OWL Reasoner

The New Kid on the OWL Block

Using HermiT from the command line

You can run HermiT from a shell with

   java -jar HermiT.jar

and access HermiT’s built-in documentation with

   java -jar HermiT.jar --help

When working with very large ontologies, it might be necessary to pass extra arguments to Java requesting more memory (below 1GB=1024MB) for HermiT. E.g.:

   java -Xmx1024M -jar HermiT.jar

Different parameters can be set to perform common reasoning tasks. E.g., HermiT can print direct (d) subclasses (s) of owl:Thing with

   java -jar HermiT.jar -ds owl:Thing oIRI

where oIRI has to be replaced with the IRI of the ontology.

In general, the command line version of HermiT uses UNIX style commands (getopt) and most arguments can be given in long or short form. For the long form, argument options are best given using =, whereas for the short form they directly follow. The two versions below are doing the same thing:

   java -jar HermiT.jar --classify --classifyOPs
          --verbose=2 --output=output.owl oIRI
   java -jar HermiT.jar -cO -v2 -ooutput.owl oIRI

Classes (short: c, long: classify) and object properties (short: O, long: classifyOPs) are classified for the ontology with IRI oIRI, the verbosity level is increased by 2 (short: v, long: verbose) and the results of the classification is saved into output.owl (short: o, long: output).

Writing out the classification results yields by default a file with one subsumption per line of the form SubClassOf(sub sup) and only the transitively reduced hierarchy is printed. If the argument -P (long: --prettyPrint) is added the resulting file will contain a proper ontology including header and declarations and the axioms are indented according to their level in the subsumption hierarchy.

For example, to classify the pizza ontology and output the class hierarchy as an ontology into output.owl within the current directory, use:

   java -jar HermiT.jar -c -ooutput.owl
     http://www.co-ode.org/ontologies/pizza/2005/05/16/pizza.owl

Adding an action such as --classify or -s is required since otherwise HermiT will only load the ontology and not do any reasoning.

HermiT can check entailment (E) between ontologies with

   java -jar HermiT.jar --premise=pIRI --conclusion=cIRI -E

where pIRI and cIRI have to be replaced with the IRIs of the premise and conclusion ontology respectlively.