W3C home > Mailing lists > Public > w3c-wai-er-ig@w3.org > October 2001

EARL API: Getting There

From: Sean B. Palmer <sean@mysterylights.com>
Date: Tue, 9 Oct 2001 00:40:09 +0100
Message-ID: <00e901c15052$ca244700$55d993c3@y0r1d9>
To: <w3c-wai-er-ig@w3.org>
Cc: "Libby Miller" <Libby.Miller@bristol.ac.uk>
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:-


the rest of the junk is at:-


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:-


'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:-


I have version 2.1.1, I think.

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


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).

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.


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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:01:33 UTC