[Pellet-users] Some Doubts...
Fernando Wagner
fernando.wagner at gmail.com
Tue Mar 18 03:44:06 UTC 2008
Hello again Friends..
I think I found one solution for my problem..
I made a method Using Jena + Pellet API for JAVA that´s receive a OntModel m
and get the reasoner:
String output = "";
OWLReasoner OReasoner = new OWLReasoner();
OReasoner.load(m);
After that, i made an Loop with an iterator of classes, like below:
for(Iterator i=m.listClasses();i.hasNext();)
and inside the loop, i cast the OntClass to Reasource like that:
Resource rc = (Resource)i.next();
And made:
output = output + (rc.getLocalName()) + " " + OReasoner.isSatisfiable(rc)+"
";
where the output is the output String that my method returns...
I made this, and the reasoner has returned the correct answer without need
instances for each class...
For example, part of this output string is describled below:
Pasta true PizzaBase true IceCream false .........
Thanks one more time for the help...
2008/3/14, Fernando Wagner <fernando.wagner at gmail.com>:
>
> Hello Evren
>
> Thanks for the answers... i tried to what you say.. I use the default
> options but the problem persists.. I´m using the PIZZA.OWL ontology came
> in the PROTEGE examples.. ins this ontology, IceCream class and CheeseyVegetableTopping
> class are inconsistent...
>
> Fernando..
>
> 2008/3/13, Evren Sirin <evren at clarkparsia.com>:
> >
> > On 3/13/08 7:57 AM, Fernando Wagner wrote:
> > > Hello again Friends...
> > >
> > > About the doubt below, i did a test: the inconsistent class didn´t has
> > > instances...so, i make an instance for this class and, only after
> > that, the
> > > method kb.insConsistent returned FALSE... Have any way to check only
> > > TBox(concepts) consistency ??
> > >
> >
> >
> > No, what you do below is the way to check for concept satisfiability. It
> > should have found unsatisfiability in the first place. It might have
> > something to do with the configuration options you tweak. Incremental
> > consistency checking in Pellet 1.5.1 is not very robust and would not
> > help you with performance at all in the below example because there are
> > no updates. So first try the same thing with default options. If you
> > share the ontology (or better a minimal subset showing the problem) we
> > can try to reproduce the problem on our side and see what is wrong.
> >
> > Cheers,
> > Evren
> >
> >
> > > And if i have 1000 class in my ontology, I have to make 1000
> > > "test-instances" to check the consistency of these??
> > >
> > > thanks..
> > >
> > > 2008/3/12, Fernando Wagner <fernando.wagner at gmail.com>:
> > >
> > >> Hello friends..
> > >>
> > >> My name is Fernando and i´m a new Pellet´s user... I did a download
> > from
> > >> pellet to include in my JENA project... i put all Pellet´s jar file
> > in the
> > >> classpath of application, and i wanna make a method that checks an
> > ontology
> > >> consistency... for this, my method receive an OntModel "m" in the
> > parameter,
> > >> and inside the method, i use something like have in
> > >> IncrementalConsistencyExample.java
> > >>
> > >> //OntModel m = ModelFactory.createOntologyModel(
> > >> PelletReasonerFactory.THE_SPEC);
> > >> //m.read(new FileInputStream(dirOWL.getText()),"");
> > >> //dirOWL is the directory of ontology
> > >>
> > >> public boolean ChecarConsistenciaPellet(OntModel m)
> > >> {
> > >> PelletOptions.USE_COMPLETION_QUEUE = true;
> > >> PelletOptions.USE_INCREMENTAL_CONSISTENCY = true;
> > >> PelletOptions.USE_SMART_RESTORE = false;
> > >> PelletOptions.USE_TRACING = true;
> > >>
> > >> OWLReasoner OReasoner = new OWLReasoner();
> > >> OReasoner.load(m);
> > >> KnowledgeBase kb = OReasoner.getKB();
> > >> return kb.isConsistent();
> > >> }
> > >>
> > >> I call this method for an inconsistent ontology and this method
> > return
> > >> TRUE(Wrong Answer)... but when i use pellet server(on port 8081) with
> > >> PROTEGE to check the consistency of the same ontology, the result
> > return
> > >> that have an inconsistency(Right Answer).. what did i do wrong???
> > >>
> > >> thanks for the attention....
> > >>
> > >>
> > >
> > >
> >
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > 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/
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.owldl.com/pipermail/pellet-users/attachments/20080318/8fe8a04f/attachment.htm
More information about the Pellet-users
mailing list