How to reason or make inferences using hermit reasoner in command line

1k views Asked by At

I am totally new to the idea of Semantic web and Reasoner so sorry for being naive.

I downloaded the HermiT.zip package from http://www.hermit-reasoner.com

Then I added a Demo.Java file to the project and ran this in the command prompt using the commands given on the the same website.

The ontology on which I used the reasoner was pizza.owl which i got from this website - http://www.dcs.bbk.ac.uk/~michael/sw/slides/pizza.owl

The only result it shows is "TRUE" but I want to reason things in a ontology. For example :

Transitivity of rdfs:subClassOf and rdfs:subPropertyOf.

(rdfs:subClassOf Dog Mammal)

(rdfs:subClassOf Mammal Animal)

imply the fact

(rdfs:subClassOf Dog Animal)

How can i make these queries ? Do I need to write some java code to do so ?

2

There are 2 answers

5
Ignazio On BEST ANSWER

I don't think HermiT offers a command line interface, but you can try this example from Owl api which allows simple queries on the command line

https://github.com/owlcs/owlapi/wiki/DL-Queries-with-a-real-reasoner

1
D.A. On
java -jar HermiT.jar -c -ooutput.owl pizza.owl

The output.owl file will contain the results. Additional details on the command line interface for HermiT can be found at http://www.hermit-reasoner.com/command.html.