[Pellet-users] Duplicated results using Pellet with the Jena API
Bruno Antunes
bema at student.dei.uc.pt
Mon Oct 29 22:41:29 UTC 2007
Ok. Thanks for answering quickly. I'll do some tests according to what
you've pointed out and I'll keep you posted.
Best regards,
Bruno
-----Original Message-----
From: Ibach, Brandon L [mailto:brandon.l.ibach at lmco.com]
Sent: segunda-feira, 29 de Outubro de 2007 22:32
To: Bruno Antunes; pellet-users at lists.owldl.com
Subject: {Spam?} RE: RE: [Pellet-users] Duplicated results using Pellet with
the Jena API
Bruno,
Unfortunately, this doesn't really give me much more to go on.
>From your description and assuming, for the moment, that this is not a
bug in Pellet, I see two possible sources of the problem. The first is
the use of the database for storage. Not that I don't trust the
interface to the database, but if I were running into this problem, I'd
want to see if I could get the same results if the database were not in
the picture.
The second possibility, which I think is more likely, is that
you're getting these duplicates because of some OWL inference that you
did not expect. The fact that you didn't see this with the Jena OWL
reasoner may well be due to the fact that Jena's OWL reasoner is not
complete, while Pellet is, so the inference that is causing the problem
may be one that the Jena reasoner does not fully implement.
For both of these issues, my approach would be to create a
fairly small dataset and a standalone Java class that I can compile and
run against the dataset to demonstrate the problem. As I said, the mere
exercise of producing these two items may very well help you to find the
problem yourself, but if not, providing them to the mailing list will
give myself and/or others everything we would need to observe the
problem and begin to diagnose the cause.
And don't worry about avoiding complexity... if these sort of
problems could be solved without a little complexity, the stuff wouldn't
be nearly as much fun. ;)
-Brandon :)
> -----Original Message-----
> From: Bruno Antunes [mailto:bema at student.dei.uc.pt]
> Sent: Monday, October 29, 2007 5:59 PM
> To: Ibach, Brandon L; pellet-users at lists.owldl.com
> Subject: RE: RE: [Pellet-users] Duplicated results using
> Pellet with the Jena API
>
> 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(Indi
> vidual.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