[Pellet-users] Seperating T & A boxes in Pellet (using Jena/ OWL - API)
Evren Sirin
evren at clarkparsia.com
Fri May 25 14:31:01 UTC 2007
On 5/24/07 11:20 AM, Matt Williams wrote:
> Dear Evren,
>
> I was wondering if there is anyway to separate the A & T boxes of an
> ontology in Pellet,
Do you want to separate assertions or inferences related to ABox/TBox?
For example, there is a org.mindswap.pellet.jena.ModelExtractor class
that provides functions to extract the inferences regarding classes,
properties or individuals as a Jena model. you can extract inferences
separately or altogether. There is no such functionality to extract
asserted axioms.
> and then use the results in a Jena/ OWL_API model ?
>
> I can read in an ontology and separate out the ABox & TBox using the
> .getKB().getABox() methods, but these return ATerms.
>
You can use
org.mindswap.pellet.jena.OWLReasoner.toJenaResource(ATermAppl) function
to map ATerms back to Jena resources. There are similar functions for
literals and properties. The ATerm's should be coming from KB associated
with that OWLReasoner.
> Is there any way to turn these back into a jena model ? There seem to be
> various methods in org.mindswap.pellet.jena, but I'm not clear which one
> I would use - and I was wondering if there is a higher level method that
> calls these given an ATerm tree?
>
> Alternatively, can I separate out the A/T boxes in the Jena model?
>
It is a little harder to do it at the triple level. If you are
interested in asserted axioms then this task would be much easier to do
in OWLAPI. You just need to call OWLOntology.getClassAxioms() to get
TBox axioms and OWLOntology.getIndividualAxioms() to get ABox axioms.
Cheers,
Evren
> Thanks a lot,
>
> Matt
>
>
More information about the Pellet-users
mailing list