4

I am using Ontology for recognition of user activities....I have an ontology(OWL) consisting of the various classes i will be using along with the object properties.....

i am new to ontology and am confused even after readin a lot about it....
What i understand is that a class is defined in relation to another class using various propeties...so is there anyway i can check whether the objects of a particular class are anyway related to another class..What i wanna ask is how do I check whether an ABox is consistent with the terminological part of the ontology(the TBox as i understand).....

i have used protege for making my ontology and also tried using jena and pellet reasoner along with its GUI version SWOOP to check the consistency.....

I am completely confused and have no clue what to use...

Bohemian
  • 412,405
  • 93
  • 575
  • 722
Kai
  • 953
  • 6
  • 16
  • 37

3 Answers3

2

SWOOP is pretty outdated, if you're going to use a GUI, I recommend you stick with Protoge 4. For information on using Pellet, there's a pretty good tutorial online.

I recommend using OWLAPI over Jena if you're going to work with OWL programmatically. Jena is a more RDF-centric API while OWLAPI is designed for OWL, so you'll find it easier to work with when you're doing OWL related stuff. That said, Jena is vastly more featureful.

Michael
  • 4,858
  • 19
  • 32
0

This is how you can perform consistency checking with the Java OWL API:

/*Load your ontology from a local file and do the initialisations*/
File inputfile = new File("ontologyPath");
OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); ;
OWLDataFactory dataFactory = manager.getOWLDataFactory();
OWLOntology yourOntology = manager.loadOntologyFromOntologyDocument(inputfile);
IRI ontologyIRI = yourOntology.getOntologyID().getOntologyIRI();  

/* Load a reasoner, the default one that comes with the OWL API is HermiT.
   However, You can use other reasoners, such as Fact++ or Pellet, by 
   downloading their libraries and adding them to your project build path */ 
OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();
OWLReasonerreasoner = reasonerFactory.createReasoner(yourOntology);

/* Perform consistency check */ 
boolean consistency = reasoner.isConsistent();

Also check out the examples on the OWL API website.

Berkan

Zhubarb
  • 11,432
  • 18
  • 75
  • 114
0

I have used the Jena API to deal with Ontologies created by Protege before. Jena is, admittedly confusing. However, these are resources that I used to help figure it out:

In order to figure out how it worked, we did some spikes where we created a very simple OWL file and wrote some Java using Jena to see how we would be able to get what we needed. The code was throw-away, but it allowed us to learn a bit about OWL files and the Jena API in an idealized context.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Becky reamy
  • 96
  • 2
  • 11