Bei der Gruppe, für die Sie eine Mitteilung verfassen, handelt es sich um eine Usenet-Gruppe. Wenn Sie in dieser Gruppe Nachrichten posten, ist Ihre E-Mail-Adresse für jeden im Internet sichtbar
I've been experimenting a bit with SWI Prolog, and have made some Python bindings using Cython, mostly to learn a bit about how SWI works.
I arrived at this looking at Notation 3, with quoted graph support and trying to figure out how to bolt inferencing support onto rdflib, a commonly used RDF library for Python.
Notation 3 has constructs that look like,
{ ?X a something:Foo } => { ?X a something:Bar }
which naturally translate to prolog as something like
bar(X) := foo(X)
I would like to be able to read in rules expressed in N3 and then use them when querying the graph, perhaps doing some forward inferencing to pre-populate triples, etc.
I have not been able to find obvious examples of how to create clauses like this from C. One option is to generate a prolog source file and then consult/1 it, but that seems needlessly circuitous.
Is there a recommended way to create "bar(X) := foo(X)" from C?
On Feb 7, 12:11 am, William Waites <wwai...@googlemail.com> wrote:
> I've been experimenting a bit with SWI Prolog, and have made some > Python bindings using Cython, mostly to learn a bit about how SWI > works.
> I arrived at this looking at Notation 3, with quoted graph support and > trying to figure out how to bolt inferencing support onto rdflib, a > commonly > used RDF library for Python.
You may want to take a look at Henry, a N3 parser and reasoner for SWI- Prolog: