Accessing individual axioms in an OWL ontology

3 views
Skip to first unread message

Bill DeSmedt

unread,
Jul 5, 2019, 7:33:58 PM7/5/19
to ErgoAI, Flora-2, and XSB Users Forum

Accessing individual axioms in an OWL ontology

I’ve created some .owl ontologies that I would like to access from ErgoAI, so as to leverage Ergo’s rule engine (as opposed to SWRL). These ontologies are stored on my MacBooK Pro (running MacOSX Sierra 10.14.5), although they sport a related IRI. To date I’ve succeeded in loading one of them into ErgoAI 2.0 via the command:

System[rdf_load('/Users/[my name]/Desktop/[ontology name].owl',[my module name])]@\owl.

The load itself succeeds, and the axioms all make it into ErgoAI, as is shown when I issue the following query —

?S[?P->?O]@[my module name].

— which dumps all of the ontology’s axioms into the Query Window’s Answer pane (albeit displaying the aforementioned IRI).

Unfortunately, that’s as far as I’ve been able to get. Attempts to replace the ?S, ?P, or ?O in the above query with a direct reference to one of the entitiy names from the ontology itself yield either a syntax error or, best case, “No answers found” — this, despite the fact that per the above generic query, the answers are clearly there.

Please let me know what I’m doing wrong, and how to fix.

Thanks,

Bill DeSmedt

Michael Kifer

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

what exactly are you substituting for ?S, ?P,  ?O? And what is it supposed to match in the input?


Please let me know what I’m doing wrong, and how to fix.

Thanks,

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/8896c9cc-ef5c-485d-bd9a-7b17c8c9e3a5%40coherentknowledge.com.

Bill DeSmedt

unread,
Jul 5, 2019, 8:20:37 PM7/5/19
to ErgoAI, Flora-2, and XSB Users Forum
Thank you for the rapid reply, Dr. Kifer --

The ontology in question is just modeling sales regions as they relate to geographic entities. So, for instance, there's an axiom stating that the instance "US_West_Sales_Region" has a relation "hasDirectPart" to the instances for "California," "Oregon," "Washington," etc.

Accordingly, I constructed a query substituting "US_West_Sales_Region" for "?S" and left everything else in place -- i.e.,
  • US_West_Sales_Region[?P->?O]@[my module name].
When that failed, I tried ringing the changes on that theme, finally winding up with:
  • "<IRI>#US_West_Sales_Region"^^\iri[?P->?O]@[my module name].
I could have sworn this one was producing the "No answer" when I tried it a 1 pm PDT today, but -- it's working now. My face is red. I apologize for inconveniencing you.

Bill
Message has been deleted

Michael Kifer

unread,
Jul 5, 2019, 9:22:47 PM7/5/19
to ErgoAI-Flor...@coherentknowledge.com

ok, cool. So, it was just that the constant in the query did not match what was in the OWL file.

--
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.

Bill DeSmedt

unread,
Jul 5, 2019, 10:34:56 PM7/5/19
to ErgoAI, Flora-2, and XSB Users Forum
Yes, exactly.

But while we’re on the subject, there are a few more things I wasn’t quite clear on:

    •    will the imported axioms be queriable, etc., just as if they were natively declared in ErgoAI?
    •    will explanations (Why? Why not?) work for them as well?
    •    How do I specify IRIs so as to avoid their full realization for reference and display purposes? Is this done by specifying them in the third argument (?IriPrefixes) to the rdf_load command?
    •    If so, how are they specified? (The packages manual is a little formulaic on this point, with its “prefix1 = URL”, etc.) What would the actual text for that third arg look like?

In any case, I'm really excited to be exploring ErgoAI's potential. I had thought I was going to be stuck with Horn clauses forever as regards applying rules to our ontologies!

Bill
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB-forum+unsubscribe@coherentknowledge.com.

Paul Fodor

unread,
Jul 6, 2019, 7:40:07 AM7/6/19
to Bill DeSmedt, ErgoAI, Flora-2, and XSB Users Forum
On Fri, Jul 5, 2019 at 10:34 PM Bill DeSmedt <rea...@gmail.com> wrote:
Yes, exactly.

But while we’re on the subject, there are a few more things I wasn’t quite clear on:

    •    will the imported axioms be queriable, etc., just as if they were natively declared in ErgoAI?

Yes, once you load the triple files, the facts are queryable.
 
    •    will explanations (Why? Why not?) work for them as well?

Yes. Regarding OWL axioms see my message below.
 
    •    How do I specify IRIs so as to avoid their full realization for reference and display purposes? Is this done by specifying them in the third argument (?IriPrefixes) to the rdf_load command?

Yes.
 
    •    If so, how are they specified? (The packages manual is a little formulaic on this point, with its “prefix1 = URL”, etc.) What would the actual text for that third arg look like?

It should just work with yourprefixname = 'actual prefix'.
 
In any case, I'm really excited to be exploring ErgoAI's potential. I had thought I was going to be stuck with Horn clauses forever as regards applying rules to our ontologies!

We don't implement the OWL axioms, like subset, equivalent names, etc., but once the imported facts are in ErgoAI, one can transform them into the Ergo frame syntax and use ErgoAI inheritance, etc.

Paul.

To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB...@coherentknowledge.com.

--
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/9cd5509a-85ca-4153-b3f0-8f3cf1025167%40coherentknowledge.com.


--
-------------------------------
Paul Fodor, PhD
E-mail: paul....@coherentknowledge.com
http://www.coherentknowledge.com
-------------------------------
Reply all
Reply to author
Forward
0 new messages