Inserting a proposition into an RDF module

1 view
Skip to first unread message

Bill DeSmedt

unread,
Jul 14, 2019, 5:16:24 PM7/14/19
to ErgoAI, Flora-2, and XSB Users Forum
I've been trying to follow the instructions on page 48 of the ErgoAI Reasoner manual regarding how to insert a new axiom into a module imported from an RDF/OWL ontology.

Details are shown in the attached file, but for ready reference:
  • I did a System[rdf_load(..., etnmod)]@\owl. on an existing sales order ontology, and set the IRI to etn;
  • I then issued the following command: etnmod[rdf_insert(Invoice_20190705, buyerFieldValue, Microsoft)]@\owl. (Took me a while to arrive at this variant, but it seemed to work, insofar as no syntax errors were reported, and ErgoAI responded with a "Yes";
  • However, when I queried the augmented module for predicates and objects associated with the Invoice_20190705 subject, the newly inserted axiom failed to appear alongside those that had been asserted in the original OWL ontology from which etnmod was drawn,
So, two questions:
  1. (The old familiar one) What am I doing wrong? And --
  2. Assuming I can clear this hurdle, is there any way to save an assertion derived from ErgoAI rules back into the OWL ontology from which the module was originally imported?
Thank you,
Bill DeSmedt
inserting a proposition.png

Michael Kifer

unread,
Jul 14, 2019, 5:42:12 PM7/14/19
to ErgoAI-Flor...@coherentknowledge.com

On 7/14/19 5:16 PM, Bill DeSmedt wrote:
I've been trying to follow the instructions on page 48 of the ErgoAI Reasoner manual regarding how to insert a new axiom into a module imported from an RDF/OWL ontology.

Details are shown in the attached file, but for ready reference:
  • I did a System[rdf_load(..., etnmod)]@\owl. on an existing sales order ontology, and set the IRI to etn;
  • I then issued the following command: etnmod[rdf_insert(Invoice_20190705, buyerFieldValue, Microsoft)]@\owl. (Took me a while to arrive at this variant, but it seemed to work, insofar as no syntax errors were reported, and ErgoAI responded with a "Yes";


This is exactly what the manual says. What was the problem?


  • However, when I queried the augmented module for predicates and objects associated with the Invoice_20190705 subject, the newly inserted axiom failed to appear alongside those that had been asserted in the original OWL ontology from which etnmod was drawn,
So, two questions:
  1. (The old familiar one) What am I doing wrong? And --


It is hard to tell because you give verbal descriptions rather than the exact sequences of commands. Especially, you should have given the query by which you determined that the newly inserted stuff is not there. Verbal descriptions are only half-useful. Why don't you create a small .owl test file and provide the exact sequence of your commands to reproduce?


I strongly suspect that you are not  careful with the iri prefixes so your query does not match the data.

But given that you describe things verbally only, it is hard to give a more useful answer.




  1. Assuming I can clear this hurdle, is there any way to save an assertion derived from ErgoAI rules back into the OWL ontology from which the module was originally imported?


The ontology was imported from an .owl file. What do you mean by saving? Updating the original file in place? That would be highly unusual and dangerous.

You can save your new triples in a separate file in the ergo format or in the fastload format and then load the additional facts from there.

--

       --- michael




Thank you,
Bill DeSmedt
--
You received this message because you are subscribed to the Google Groups "ErgoAI, Flora-2, and XSB Users Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB...@coherentknowledge.com.
To view this discussion on the web visit https://groups.google.com/a/coherentknowledge.com/d/msgid/ErgoAI-Flora2-XSB-forum/5dfe67f8-0068-4dfa-b561-e659df25d6c7%40coherentknowledge.com.

Bill DeSmedt

unread,
Jul 14, 2019, 6:07:03 PM7/14/19
to ErgoAI-Flor...@coherentknowledge.com
The exact sequence of commands is shown in the attached file. (i.e., the file attached to the original post.)
The rdf_load and iriprefix commands were not included for brevity's sake as they were pretty well tested, but they are:
  • System[rdf_load('/Users/bill.desmedt/Desktop/TLCore.owl',etnmod)]@\owl.
  • iriprefix{etn='[actual iri]#'}@etnmod.
Bill
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB-forum+unsubscribe@coherentknowledge.com.
Reply all
Reply to author
Forward
0 new messages