EARL API: Getting There

[[[
EARL Python API - encourage semweb folks to get involved (SBP)
]]] - http://www.w3.org/WAI/ER/2001/10/f2f-notes

I've started on it by modularizing SWIPT (an RDF Python API I wrote), and
then adding a query module to it so that we can scrape results out of some
EARL. The module is at:-

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

the rest of the junk is at:-

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

more instructions at the bottom of this email.

I got the idea from the demonstration that Libby set up during the meeting
and that I was cooing over:-

   http://swordfish.rdfweb.org/discovery/2001/10/earl/

'Cept I implemented it in Python, so mine's better. Honest :-) Libby will
tell you that hers is better because it can do constraints, and has a Web
interface and templatable output: but don't believe a word of it... Ahem.

Anyway, that's just the *start* of an EARL API, because a query engine
isn't specifically an EARL thing. What we need now are built-in queries
that can be performed (Libby's "tell me all tests that my page fails" is a
good one).

So feedback at this point would be good: what kind of stuff would you like
an EARL API to be able to do? The sky's the limit with any Turing Complete
programming language, so suggest anything.

Notes on how to get the query thing running:-

You'll most likely need query.txt, ntriples.txt, swiptql.txt, rdfstore.txt,
and util.txt from the SWIPT directory. Bung them all into a folder, and
rename them so that they have ".py" extensions in place of ".txt". You'll
obviously need to have Python installed:-

   http://www.python.org/

I have version 2.1.1, I think.

To run a query, you can use the following example files:-

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

and then run the following command line:-

   python query.py earl.n3 earlq.n3 > out.n3

The earlq.n3 file is a SWIPTQL file (which is just NTriples with
universally quantified variables in it). You should get some neat SWIPTQL3
output (which is just N3 with universally quantified variables in it).
Easy.

Before William says it, this isn't a great tool for the novice yet, but
it's getting there. It should be possible to run this stuff naturally as a
Python CGI, so there could be a simple Web based interface for it.

Cheers,

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .

Received on Monday, 8 October 2001 19:42:16 UTC