[Pellet-users] Problems with the Interface Pellet-Jena (performances and not only)

Andrea Splendiani andrea.splendiani at univ-rennes1.fr
Mon Feb 4 15:03:05 UTC 2008


Hi, thank a lot for your answer.

I have to put the results from Pellet into a Model with another Jena  
rule-customized reasoner... so I opted for this solution, let me know  
what you think:

I have a JenaModel,
I pass it to Pellet, classify it, then extract from it Properties and  
Classes (here subsumption should be performed by pellet).

I then add to a new model properties, classes and the original model  
(so I also have individuals and some assertion).

Then I add everything to a transitive reasoners so classes can be  
resolved.

What I aspect is a subset of entailments in my new models, with  
classes in order from Pellet.

ciao,
Andrea

Il giorno 31/gen/08, alle ore 18:59, Evren Sirin ha scritto:

> On 1/25/08 5:06 AM, Andrea Splendiani wrote:
>> Hi,
>>
>> I have a problem with the interface between Pellet and Jena.
>>
>> That is:
>>
>> OntModel myBasicKnowledge
>> myOntoKnowledge 
>> = 
>> ModelFactory 
>> .createOntologyModel 
>> (PelletReasonerFactory.THE_SPEC,myBasicKnowledge);
>> myOntoKnowledge.prepare();
>> ...
>> OntModel newModel.add(myOntoKnowledge)
>> ^^^
>> At this point, it starts a huge computation (For small ontologies,  
>> it is still reasonable, but it's undoable for bigger ones) (Note:  
>> small=~10^2 classes+instances bigger=10^4).
>>
>> Now, pellet command line and programmatic classification and  
>> realization tasks are fast.
>>
>> When I add the model to an ontology, I guess it issues a  
>> listStatements(), I think that at its time prompts the expansion of  
>> all possible relations and classes in the ontology, and here lie my  
>> problem. Or at least that's my guess.
>
> Yes, this is true.
>
>>
>> Can this be avoided ?
>
> Yes, there are couple of options depending on what you are trying to  
> accomplish. My first suggestion would be to have a single model that  
> you will query, e.g. just create myOntoKnowledge and put everything  
> in it (rather that creating an  extra newModel). And if you don't  
> call listStatements on this model you should be fine (all  
> computations will be done on-demand as you want). If you really want  
> to put myOntKnowledge into newModel then add it through  
> OntModel.addSubModel. Whenever you query newModel it will pass the  
> query myOntoKnowledge and any other sub model it might have. But  
> make sure that newModel is a plain model with no reasoners attached.
>
>>
>> classification would be enough of a computation for me (ideally, I  
>> would like to have computations on demand driven by the Jena model).
>>
>> Digging on the wen, I've come to the following code:
>>
>>
>> Model tempModel=myOntoKnowledge.getBaseModel();
>> OntModel  
>> tempModel2 
>> = 
>> ModelFactory 
>> .createOntologyModel(PelletReasonerFactory.THE_SPEC,tempModel);
>> tempModel2.prepare();
>> OWLReasoner reasoner =  
>> ((PelletInfGraph)tempModel2.getGraph()).getOWLReasoner();
>> reasoner.classify();
>> reasoner.realize();
>> myOntoKnowledge 
>> =ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>> Model m=reasoner.extractModel(false);
>> ^^^^^^
>> Here still huge computation.
>>               Any hint/help ?
>
> If classification and realization is completed fast and you got  
> stuck at extractModel then this is probably related to the  
> inefficiency of extractIndividualModel [1]. One workaround is just  
> to extract only inferences regarding class and property models using  
> extractClassModel and extractPropertyModel functions. That should be  
> really fast after classification is completed.
>
> Cheers,
> Evren
>
> [1] http://cvsdude.com/trac/clark-parsia/pellet-devel/ticket/97
>
>>
>> Andrea Splendiani
>>
>>
>>
>> -----------
>> Andrea Splendiani
>> post-doc, bootstrep project (www.bootstrep.eu)
>>
>> UPRES-EA 3888 - Laboratoire d'Informatique Médicale
>> CHU de Pontchaillou
>> 2, rue Henri Le Guilloux
>> 35033 Rennes - France
>> Tel : +33 2 99 28 92 45 / +33 2 99 28 42 15 (secr.)
>> Fax : +33 2 99 28 41 60
>>
>> 48° 07.275N
>> 1° 41.643W
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Pellet-users mailing list
>> Pellet-users at lists.owldl.com
>> http://lists.owldl.com/mailman/listinfo/pellet-users
>> _______________________________________________
>>
>> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
>

-----------
Andrea Splendiani
post-doc, bootstrep project (www.bootstrep.eu)

UPRES-EA 3888 - Laboratoire d'Informatique Médicale
CHU de Pontchaillou
2, rue Henri Le Guilloux
35033 Rennes - France
Tel : +33 2 99 28 92 45 / +33 2 99 28 42 15 (secr.)
Fax : +33 2 99 28 41 60

48° 07.275N
1° 41.643W








More information about the Pellet-users mailing list