[Pellet-users] Pellet and SWRL rules: erroneous results
Luigi Iannone
luigi at csc.liv.ac.uk
Fri Jul 27 16:31:14 UTC 2007
Hi all,
I think I already posted on the following problem months ago but still
I cannot see whether I am missing something or there's a bug.
I am using Pellet 1.5.0 now and as I run the following code
/**
*
*/
package uk.ac.liv.csc.semanticweblab.rulestest;
import org.mindswap.pellet.jena.PelletReasonerFactory;
import com.hp.hpl.jena.ontology.OntModel;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.RDFNode;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.StmtIterator;
/**
* @author Luigi Iannone
*
*/
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
OntModel ontModel = ModelFactory.createOntologyModel(
PelletReasonerFactory.THE_SPEC, null);
ontModel.read(args[0]);
ontModel.read(args[1]);
Resource resource = null;
if (args.length > 3) {
resource = ontModel.createResource(args[3]);
}
StmtIterator it = ontModel.listStatements(resource, ontModel
.createProperty(args[2]), (RDFNode) null);
while (it.hasNext()) {
System.out.println("Test.main() " + it.nextStatement());
}
}
}
where the arguments of the main are:
"http://www.csc.liv.ac.uk/~luigi/RULEKIDDING/basicFamilyReference.owl"
"http://www.csc.liv.ac.uk/~luigi/RULEKIDDING/basicFamilyRules.owl"
"http://www.csc.liv.ac.uk/~luigi/ontologies/basicFamily#hasUncle"
"http://www.csc.liv.ac.uk/~luigi/ontologies/basicFamily#Nella"
The output is the following:
Test.main() [http://www.csc.liv.ac.uk/~luigi/ontologies/basicFamily#Nella,
http://www.csc.liv.ac.uk/~luigi/ontologies/basicFamily#hasUncle,
http://www.csc.liv.ac.uk/~luigi/ontologies/basicFamily#Dino]
This output is wrong and I cannot see why Pellet returns such triple.
Thanks for your help,
Luigi
More information about the Pellet-users
mailing list