This content has been marked as final.
Show 5 replies
-
1. Re: how exactly does graph.performInference() work?
alwu-Oracle Sep 4, 2009 1:47 PM (in response to 696067)Hi,1 person found this helpful
A call to performInference() invokes create_entailment behind the scene. If the entailment status is COMPLETE, then nothing will happen. If the entailment status is INCOMPLETE, then create_entailment will finish building an inference closure. If the entailment status is INVALID, then create_entailment will start from scratch building a closure.
So the action of performInference depends on the entailment status. From what you've described, (assume you haven't inserted new triples after the SEM_APIS.CREATE_ENTAILMENT in SQL*PLUS), then nothing will happen.
Hope it helps,
Zhe Wu -
2. Re: how exactly does graph.performInference() work?
696067 Sep 8, 2009 8:18 PM (in response to alwu-Oracle)Ok, got it. Thanks.
-Alexi -
3. Re: how exactly does graph.performInference() work?
696067 Sep 9, 2009 3:50 AM (in response to alwu-Oracle)Two followup questions then.
1) If you make a change to OracleSemModel that causes the Model's status to become Incomplete (i.e. add or remove a statement and then call model.commit()), do the commands graph.performInference() and graph.commitTransaction() do the same thing?
2) Is there a way to do something like graph.performInference() via the SEM_APIS? Or do I have to call SEM_APIS.CREATE_ENTILMENT every time I add/delete a triple from the model?
Edited by: alexi on Sep 8, 2009 8:46 PM - Added second question -
4. Re: how exactly does graph.performInference() work?
696067 Sep 9, 2009 9:27 AM (in response to 696067)Two followup questions then.
1) If you make a change to OracleSemModel that causes the Model's status to become Incomplete (i.e. add or remove a statement and then call model.commit()), do the commands graph.performInference() and graph.commitTransaction() do the same thing (given that you specify InferenceMaintenanceMode.UPDATE_WHEN_COMMIT in the Attachment creation)?
2) Is there a way to do something like graph.performInference() via the SEM_APIS? Or do I have to call SEM_APIS.CREATE_ENTILMENT every time I add/delete a triple from the model? -
5. Re: how exactly does graph.performInference() work?
alwu-Oracle Sep 9, 2009 1:47 PM (in response to 696067)Hi,
Answer to 1) is yes.
For your second question, "Is there a way to do something like graph.performInference() via the SEM_APIS? Or do I have to call SEM_APIS.CREATE_ENTILMENT every time I add/delete a triple from the model?"
SEM_APIS.create_entailment is the API you want to call from SQL to run inference. Whether you need to call that API every time you add/delete a triple
is application dependent. You may want to run create_entailment periodically. Note that, Oracle Database release 11.2 has a cool feature called incremental inference maintenance. It can efficiently update the inference closure after a few triples are added. Please see the user manual for details.
Hope it helps,
Zhe Wu