[foaf-dev] FOAF pathfinder code: anyone care to update it? (Ruby, Java)

Dan Brickley danbri at danbri.org
Thu Apr 3 14:41:51 BST 2008


Morten Høybye Frederiksen wrote:
> Hey,
>
> On Thu, Apr 3, 2008 at 12:53 AM, Dan Brickley <danbri at danbri.org> wrote:
>   
>>  Here's the core Squish query I used:
>>  SELECT ?mbox1, ?mbox2, ?uri,
>>  WHERE
>>  (foaf::depiction ?x ?img)
>>  (foaf::depiction ?z ?img)
>>  (foaf::thumbnail ?img ?uri)
>>  (foaf::mbox ?x ?mbox1)
>>  (foaf::mbox ?z ?mbox2)
>>  USING foaf for http://xmlns.com/foaf/0.1/
>>     
> I have run a similar query against my depiction store, replacing
> foaf:mbox with foaf:mbox_sha1sum (and weeding out duplicates by
> requiring ?x > ?z), resulting in 1542 image URIs depicting 335
> distinct persons (28650 codepictions). From my reading of the code, it
> shouldn't matter that the nodes are literals instead of URIs.
>
> You can find the output at the following one-op (!) SPARQL end point:
> http://www.wasab.dk/morten/2008/04/codep.srx (9M)
>   
Ah that's great, thanks!!!
> Finding out who is represented by each of the sha1sums is left as en
> exercise for the linked data enthusiast... :)
>
>   


I was just trying to use the Google Social Graph API here,

perl sgapi_test_parse.pl http://danbri.org/foaf.rdf gives:

  [
   "http://danbri.org/foaf.rdf",
   "me",
   "sgn://mboxsha1/?pk\u003d6e80d02de4cb3376605a34976e31188bb16180d0"
  ],

This corresponds to     
<mbox_sha1sum>6e80d02de4cb3376605a34976e31188bb16180d0</mbox_sha1sum>
 in my FOAF. Actually you can google on that value and find FOAF files, 
using google.com but it should be possible to plug 
sgn://mboxsha1/?pk\u003d6e80d02de4cb3376605a34976e31188bb16180d0 into 
the forms at http://code.google.com/apis/socialgraph/docs/ to do 
lookups. It wasn't working just now , ... but  ah ok, if I write it this 
way, all is good:

sgn://mboxsha1/?pk=6e80d02de4cb3376605a34976e31188bb16180d0

(somehow = is getting turned into its unicode escape character, \u003d, 
http://www.fileformat.info/info/unicode/char/003d/index.htm but the 
service doesn't like to receive that)

http://socialgraph.apis.google.com/lookup?q=sgn%3A%2F%2Fmboxsha1%2F%3Fpk%3D6e80d02de4cb3376605a34976e31188bb16180d0&fme=1&pretty=1&callback=

(I won't past the json here, but it returns a pile of data mentioning me 
from around the Web)

So I tried taking (by hand) the first few result from your SPARQL file, 
and plugging it in. Haven't managed to find one that 'hits' yet, but 
searching the main Google site for one of the mbox hashes returned only 
http://www.wasab.dk/morten/photos/all.rdf ...

I'd be v interested to know how many of these hashes get data back from 
the SGAPI... (hmm should we be throttling calls to it if used in bulk 
scripts?)

cheers,

Dan



--
http://danbri.org/


More information about the foaf-dev mailing list