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

Re: Practical N3/SW Uses

From: <jos.deroo.jd@belgium.agfa.com>
Date: Sun, 28 Jan 2001 19:46:41 +0100
To: " - *sean@mysterylights.com" <sean@mysterylights.com>
Cc: " - *swag-dev@egroups.com" <swag-dev@egroups.com>, " - *www-rdf-interest@w3.org" <www-rdf-interest@w3.org>
Message-Id: <0006800039896161000002L012*@MHS>
Thanks a lot for the "coined" example!
We learned a lot to let our Euler proof engine consume "N3 fuel"!
The most interesting thing was absoluteizing relative URI-references
but also the punctuation ; , . was worth doing.

If we take the axioms in coinedBy.n3 and coinedByf.n3 and try to proof

   @prefix log: <http://www.w3.org/2000/10/swap/log.n3>.
   @prefix rules: <coinedBy.n3>.
   <> log:forAll <#x>,<#y>.
   <#y> rules:coined <#x>.

we get the results found at http://www.agfa.com/w3c/tmp/coinedByp.n3
There are 16 deduced rules:coined statements (I hope this is correct ...)

Some open points:
1. An identifier id without colon is treated as <#id>.
2. @prefix is better and bind is treated as deprecated.
3. Is it <http://www.w3.org/2000/10/swap/log.n3> or
   <http://www.w3.org/2000/10/swap/logic.n3>?
4. Statements with ``a'' predicates are interpreted as
   unary clauses object(subject) to improve matching speed.
5. An implementation of = predicate and [] contents.

--
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/





sean@mysterylights.com@INTERNET@w3.org on 27/01/2001 01:51:18
Sent by: www-rdf-interest-request@w3.org
To: www-rdf-interest@w3.org@INTERNET
cc: swag-dev@egroups.com@INTERNET
Subject: Practical N3/SW Uses
To those who doubt the power of N3, or can't think of any practical SW uses
off the top of their heads...

The SWAG Vocabulary [1] is getting rather large, and I thought it would be
neat to find out which terms both Seth and I had "coined". However, at
first I thought that this task would be a rather tedious job involving
going through the Vocabulary [1] and noting down who did what. Then, I
realised "hey, it's written in N3", so I just wrote a rules file for it,
and processed it on CWM [2].

Basically, I declared in the rules files that :coined is the inverse of
:coinedBy. Then, I made a filter to churn out everything that matches the
inverse of :coinedBy, thus telling us "who coined what" (and only that),
instead of "what was coined by who" with all of the other garbage. Plus the
output is in alphabetical order!

The output as a GIF:-
     http://infomesh.net/swag/n3/hackings/coinedByn3.gif

The input/rules file:-
     http://infomesh.net/swag/n3/hackings/coinedBy.n3
(derived from the SWAG Vocabulary [1]).

The filter:-
     http://infomesh.net/swag/n3/hackings/coinedByf.n3

As you can see, the filter and even the rules file aren't all that
complicated, and it would be easy to modify this useful practical example
of SW use for many other use cases. I hope this gives people some ideas...

[1]
http://purl.org/swag/revision-text?add=termsplayground&format=text/plain
 - SWAG Vocabulary, SWAG (c/o Seth Russell, and Sean B. Palmer).
[2] http://www.w3.org/2000/10/swap/cwm.py
 - Closed World Machine, TimBL.

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://purl.org/swag/termsplayground#> .
[ :name "Sean B. Palmer" ] :hasHomepage <http://infomesh.net/sbp/> .
Received on Sunday, 28 January 2001 13:47:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:47 GMT