On 18/03/13 16:24, Ed Swing wrote:
Thanks Joshua for looking into this. From the results you generated, it looks 
like the Pellet reasoner gets the (more) correct results, while the default 
Jena reasoner has some issues (Unfortunately, I may not be able to use Pellet 
due to licensing issues - checking with legal).

If you want a full DL reasoner on a commercial-friendly license you should probably expect to have to pay for it :)

Anyhow, there are some incorrect results - specifically (A) AircraftHijacking 
does not include TerrorAttack as a parent at all,

Running:

[[[
        String NS = "http://blsdev1.vsticorp.com/terrorism#";;
        Model base = FileManager.get().loadModel("data/terrorism.rdf");
// OntModel omodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, base); OntModel omodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RULE_INF, base); // OntModel omodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF, base); OntClass aircraftHijacking = omodel.getOntClass(NS + "AircraftHijacking"); for (ExtendedIterator<OntClass> supers = aircraftHijacking.listSuperClasses(); supers.hasNext();) {
            System.out.println(" - " + supers.next());
        }
]]]

On your data then I see TerrorAttack listed for all of the reasoner options.

(B) it includes Agent as a parent, which is mutually exclusive with 
AircraftHijacking.

The fact that they are exclusive doesn't stop it being a parent, it just suggests that the ontology isn't consistent.

In your case I seems like the issue is a "syntactic" one. In the definition of Killing you have:

<owl:Class rdf:ID="Killing">
  <rdfs:subClassOf rdf:resource="#Event" />
    <rdfs:subClassOf>
      <owl:equivalentClass>
        <owl:complementOf>
          <owl:Restriction>
            <owl:onProperty rdf:resource="#actor" />
            <owl:hasValue rdf:resource="#NewsOrganization" />
          </owl:Restriction>
        </owl:complementOf>
      </owl:equivalentClass>      
    </rdfs:subClassOf>
</owl:Class>

Note the striping error where you have rdfs:subClassOf (a property) owl:equivalentClass (also a property).

Since the Jena reasoners are OWL/full reasoners they allow you to "mess with the furniture" and that certainly causes a mess.

I guess Pellet attempts to silently fix this up. If I run your example through the online Pellet checker I see the line:

"Untyped Class: Assuming owl:equivalentClass is a class"

An error message like that should ring loud warning bells!

If I comment out that problematic syntax and run the code again for each reasoner option I get:

[[[
Test: no reasoner
 - http://blsdev1.vsticorp.com/terrorism#TerrorAttack

Test: micro
 - http://blsdev1.vsticorp.com/terrorism#TerrorAttack
 - http://www.w3.org/2000/01/rdf-schema#Resource
 - 1829e3a:13d7ef83aca:-7ff2
 - http://blsdev1.vsticorp.com/terrorism#Killing
 - http://www.w3.org/2002/07/owl#Thing

Test: full
 - http://www.w3.org/2000/01/rdf-schema#Resource
 - http://www.w3.org/2002/07/owl#Thing
 - http://blsdev1.vsticorp.com/terrorism#TerrorAttack
 - http://blsdev1.vsticorp.com/terrorism#Killing
 - 1829e3a:13d7ef83aca:-7ff2
]]]

Note that the Jena rule reasoners are OWL/full reasoners (or use the "RDF semantics" if you prefer OWL2 speak). That's why you see the restriction bNodes (in OWL/full each such restriction is itself a class) and why you see every class as being a subclass of rdfs:Resource (which it is in OWL/full).

Note also that your data includes two mentions of rdf:range which generate warnings from the parser. Those are presumably supposed to be rdfs:range.

Dave

Reply via email to