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 Friday, 26 January 2001 19:50:20 UTC