W3C home > Mailing lists > Public > www-rdf-interest@w3.org > January 2001

Reusable N3 Filters: a core SW idea

From: Sean B. Palmer <sean@mysterylights.com>
Date: Tue, 30 Jan 2001 17:45:07 -0000
Message-ID: <014201c08ae4$b12459e0$d6db93c3@z5n9x1>
To: <www-rdf-interest@w3.org>
Cc: <swi-dev@egroups.com>
Intro: It is fully possible to re-use other peoples N3 rule files as long
as you record the equivalences between your terms.

CWM [1] stores RDF triples, and then using a filter matches all x and
outputs y for that x; i.e. only querying, and not inferring. However, this
is still useful is that you can set up rules that can be re-used, i.e.
going beyond one-time querying.

Let's say I had some simple information about people I know:-

     :Sean foaf:knows <mailto:love26@gorge.net> .
     [ foaf:name "William Loughborough" ]
          foaf:mbox <mailto:love26@gorge.net> .

Let's say that foaf:knows means "Knows, or knows the owner of". In that
case you could use the filter:-

     <> log:forAll <#x> , <#y> , <#a> .
     { <#a> foaf:knows <#y> . [ foaf:name <#x> ] foaf:mbox <#y> . }
     { <#a> foaf:knows [ foaf:name <#x> ] . } .

And it would ascertain that:-

    :Sean foaf:knows [ foaf:name "William Loughborough" ] .

Fine. But what if you were using your own term for "foaf:knows" and using
that instead - surely that would make the filter useless? Well, it would do
unless you recorded the equivalence of your new term to the filter term in
your own file. For example:-

     <> log:forAll <#x> , <#y> , <#a> , <#b> .
     { <#x> = <#y> . <#a> <#x> <#b> . }
     { <#a> <#y> <#b> . } .

     sbp:mbox = foaf:mbox .

     :Sean foaf:knows <mailto:love26@gorge.net> .
     [ foaf:name "William Loughborough" ]
          sbp:mbox <mailto:love26@gorge.net> .

This records the equivalence between sbp:mbox and foaf:mbox, and gives a
rule for substituting one for the other. In this case, when I put it
through CWM with the same filter, it gave the same result proving that this
is a correct and useful method. It may also be possible in the future to
have multiple rules files, so that information recording equivalence an be
stored in a third party index, and then used in your SW processing.
Recording equivalence between terms is what will change simple semantics
into a Semantic Web.

Next step: Inference. Machines that can work this stuff out for themselves;
this might require thousands of built in rules.

You could do this now for equivalence in CWM if it had the following filter
built-in to the program:-

     <> log:forAll <#x> , <#y> , <#a> , <#b> .
     { <#x> = <#y> . <#a> <#x> <#b> . }
     { <#a> <#y> <#b> . } .

Then it could then apply to everything that it processes. Actually, this
kind of works now:-

     s:mbox = sp:mbox .
     sp:mbox = sbp:mbox .
     sbp:mbox = foaf:mbox .

     :Sean foaf:knows <mailto:love26@gorge.net> .
     [ foaf:name "William Loughborough" ]
          s:mbox <mailto:love26@gorge.net> .

Does indeed give the correct result when the equivalence filter is built
into the file. That's pretty neat, but I'd still like to see an inference
engine that simply brings in lots of N3 filters (i.e. has a lot built in),
and then correctly deduces which one(s) to use. It could also have a
semBrowserish memory whereby it can remember what is a synonym for what.
The first step is probably transforming CWM so that it can take multiple N3
URIs and filters.

     inference.py anybody?

[1] http://www.w3.org/2000/10/swap/cwm.py

Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
[ :name "Sean B. Palmer" ] :hasHomepage <http://infomesh.net/sbp/> .
Received on Tuesday, 30 January 2001 12:48:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:34 UTC