incremental inferencing questions
696067Nov 13 2009 — edited Nov 18 2009I am very confused about how to make incremental inferencing work. Here is what I tried in java code:
Attachment attachment = Attachment.createInstance(new String[]{}, "OWLPRIME",
InferenceMaintenanceMode.UPDATE_WHEN_COMMIT,
QueryOptions.ALLOW_QUERY_INCOMPLETE);
graph = new GraphOracleSem(oracle, "mc_model", attachment);
graph.setInferenceOption("INC=T");
The trouble is, when I try to do something like this:
ModelOracleSem oracle_sem_model = new ModelOracleSem(graph);
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, oracle_sem_model);
Individual d = model.createInstance(NS+"New_Individual");
parentIndividual.addProperty(transitiveProp, d);
model.commit();
graph.commit();
The command graph.commit() takes around 5 seconds, the same amount of time it if the entailments are created without incremental inferencing. Is there something I am doing wrong? Can I use the OntModel APIs together with Incremental inferencing or do I have to manually add the statements to the model? BTW, I checked the SEM_APIS change tracking property and it seems enabled and has a timestamp
Edited by: alexi on Nov 13, 2009 7:18 AM