Pragmatism: An EARL Processing Example (that actually works)

> CR It's fairly complex. A practical example, a program that would
> do something so that people could play with it, would make it
> easier to grasp.

Done. Go to [1] and paste [2] in the first field, and [3] in the second and
press submit.

[1] http://purl.org/swag/cwm
[2] http://infomesh.net/earl/n3/earl1.n3
[3] http://infomesh.net/earl/n3/earl1f.n3

What does this do? It turns a boring annotated list of ":page :person
:rating", into a list of ":page :rating [list of people]". i.e.

This is the input file:-

     <http://testpage.org/>
     :sean [ wcag:rating wcag:A ];
     :len [ wcag:rating wcag:AA ];
    :william [ wcag:rating wcag:A ];
     :charles [ wcag:rating wcag:AAA ];
     :wendy [ wcag:rating wcag:A ];
     :al [ wcag:rating wcag:AA ];
     :daniel [ wcag:rating wcag:A ];
     :danbri [ wcag:rating wcag:AA ] .

Using this filter file:-

     { <#x> :a [ wcag:rating wcag:A ] .
     <#x> :b [ wcag:rating wcag:AA ] .
     <#x> :c [ wcag:rating wcag:AAA ] . }
     log:implies
     { <#x> wcag:AratedBy :a .
     <#x> wcag:AAratedBy :b .
     <#x> wcag:AAAratedBy :c .  }

You get this output:-

     <http://testpage.org/> wcag:AAAratedBy
     :charles .
     <http://testpage.org/> wcag:AAratedBy
     :al, :danbri, :len .
     <http://testpage.org/> wcag:AratedBy
     :daniel, :sean, :wendy, :william .

Is that a good enough example? It is only a five minute hack, but it shows
that: 1)  Constraint = power, 2) the tools already exist.

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
[ :name "Sean B. Palmer" ] :hasHomepage <http://infomesh.net/sbp/> .

Received on Wednesday, 14 February 2001 22:19:42 UTC