W3C home > Mailing lists > Public > www-rdf-rules@w3.org > October 2001

SWIPT.query: An RDF Query Engine In Python

From: Sean B. Palmer <sean@mysterylights.com>
Date: Tue, 9 Oct 2001 03:06:01 +0100
Message-ID: <01fe01c15066$f788aba0$55d993c3@y0r1d9>
To: <www-rdf-rules@w3.org>
[This is a pre-release, beta version.]

I've broken up my old SWIPT RDF tool into modules, and built a decent query
module for it, available from:-

   http://infomesh.net/2001/10/08/swipt/query.txt

You'll need to have Python [1] installed, and some of the other files from
the (temporary) SWIPT directory:-

   http://infomesh.net/2001/10/08/swipt/

Namely: query.txt, ntriples.txt, swiptql.txt, rdfstore.txt, and util.txt.
Bung them all into a folder, and rename them so that they have ".py"
extensions in place of ".txt".

To run it:-

   python query.py file.n3 query.n3 > out.n3

where file.n3 is the input file (in NTriples only), query.n3 is a superset
of NTriples with universals a la "?x", and out is the output produced by
SWIPT.query.

Example input files:-

   file: http://infomesh.net/2001/10/08/swipt/f.n3
   query: http://infomesh.net/2001/10/08/swipt/q.n3

   file: http://infomesh.net/2001/10/08/swipt/earl.n3
   query: http://infomesh.net/2001/10/08/swipt/earlq.n3

It runs them fairly quickly, and the module itself it pretty concise, which
is nice.

Cheers,

[1] http://www.python.org/

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .
Received on Monday, 8 October 2001 22:06:44 GMT

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