[Pellet-users] Duplicated results using Pellet with the Jena API

Bruno Antunes bema at student.dei.uc.pt
Mon Oct 29 21:58:31 UTC 2007


Ok. I'll try to explain as far as I can without getting complex... :)

The ontology I'm dealing with stores data similar to WordNet. I have a class
called "Concept" and a property "hyponymOf" between instances of this class.
To find all the instances which are hyponyms of a specific instance I use
something like this:

OntClass jOntClassConcept = jOntModel.getOntClass(DO_CLASS_CONCEPT_URI);
Individual jIndividualConcept = jOntModel.getIndividual(DO_BASE_NAMESPACE +
cptID);
StmtIterator jStmtIterator = jOntModel.listStatements(null,
jOntModel.getProperty(DO_PROPERTY_HYPONYMOF_URI), jIndividualConcept);
while (jStmtIterator.hasNext()) {
	Individual jIndividual =
(Individual)jStmtIterator.nextStatement().getSubject().as(Individual.class);
	hyponymOfList.add(jIndividual);
}

The results I get in the "hyponymOfList" are all duplicated. I've made some
queries in the database storage and found no duplicated statements. This
code worked well with the OWL reasoner of the Jena API. So I suppose it is
something related with the Pellet inference. I hope it became clearer... :)

Thanks,
Bruno

-----Original Message-----
From: Ibach, Brandon L [mailto:brandon.l.ibach at lmco.com] 
Sent: segunda-feira, 29 de Outubro de 2007 21:40
To: Bruno Antunes; pellet-users at lists.owldl.com
Subject: {Spam?} RE: [Pellet-users] Duplicated results using Pellet with the
Jena API

Bruno,
	There is likely a reasonable explanation for why you're getting
these duplicates, but without significantly more detail, I'd guess it
would be impossible for anyone to tell you what the reason is.  Can you
provide a minimal, yet complete, ontology and code sample that
demonstrate the problem?  Sometimes just the process of creating these
can help you to spot the problem.

-Brandon :)
 

> -----Original Message-----
> From: pellet-users-bounces at lists.owldl.com 
> [mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of 
> Bruno Antunes
> Sent: Monday, October 29, 2007 5:30 PM
> To: pellet-users at lists.owldl.com
> Subject: [Pellet-users] Duplicated results using Pellet with 
> the Jena API
> 
> Hi,
> 
> I'm using Pellet with the Jena API and I'm getting a strange, or not,
> behavior when I use the "listStatements(Resource s, Property 
> p, RDFNode o)"
> method of the "Model" interface.
> 
> When I call this method to find the resources to which 
> applies a specific
> property with a specific object, I'm getting duplicated results.
> 
> For instance, if I use something like this:
> 
> myModel.listStatements(null, myProperty, myInstance);
> 
> I get the results just like this:
> 
> Resource1
> Resource1
> Resource2
> Resource2
> ...
> 
> Hope someone could help me with this. I'm using Jena v2.5.2 and Pellet
> v1.5.0 with persistent storage in a MySQL database.
> 
> Thanks in advance, best regards,
> Bruno Antunes
> 
> _______________________________________________
> 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/
> 



More information about the Pellet-users mailing list