3

I am using Protege 4.3 (also tried the 5-beta) with the following simple ontology:

Class: Person


Class: Man

    SubClassOf: 
        Person


Individual: John

    Types: 
        Man

Next, I start the Reasoner Hermit 1.3.8, but John is not inferred to be a Person. Also the following SPARQL does not return anything:

PREFIX this: <http://www.semanticweb.org/ontologies/2015/6/untitled-ontology-18#>

SELECT ?subject
    WHERE { ?subject a this:Person }

Do you have any suggestions what I understood wrong?

unor
  • 92,415
  • 26
  • 211
  • 360
user2084865
  • 625
  • 1
  • 7
  • 18
  • 1
    Okay, as for the SPARQL query, it seems like that Protege is not using a SPARQL implementation which makes use of a reasoner ([source](http://stackoverflow.com/questions/12090299/sparql-query-results-in-protege-does-not-recognize-transitive-property) ). Using e.g. Jena should fix that. But first issue is still there. – user2084865 Jul 19 '15 at 22:32
  • 1
    Using Protege 5 with the _Snap SPARQL plugin_ solves the second issue, too. – user2084865 Jul 19 '15 at 22:42

1 Answers1

3

Concerning the "missing" inference of subclass Man to superclass Person:

Protégé doesn't show individuals of a subclass in their superclass, even when the reasoner is active. The inference works, however, as you already saw. The following two examples both return John as an individual of class Person:

SPARQL + Reasoner (Snap SPARQL plugin 4.2.0 + HermiT 1.3.8.413)

PREFIX this: <urn:absolute:test#>

SELECT ?subject
    WHERE { ?subject a this:Person }

DL-Query + Reasoner (DL-Query 4.0.1 + HermiT 1.3.8.413)

Person

Another way to make it obvious is to export the ontology with all inferred axioms ("File" -> "Export inferred axioms as ontology..."). The resulting ontology contains two class assertions for John, one as Man and one as Person.

I assume this behaviour keeps the GUI usable when working with bigger ontologies, which might contain many individuals. As of Protégé 5.1.0, there seems to be no way to change this behaviour.

everdream
  • 100
  • 9