Fixig SMOB

Here are the scripts to fix the recent SMOB bug:

I remember a quote from Benjamin on #semsol (but I can’t find it in the logs - is there a related SPARQL endpoint ?) where he hoped that one day, people would consider RDF programming as ‘normal programming’. I think that SPARUL (especially at the triples level) is really helpful for that, since adding / deleting statements is more than easy. Combined with SPARQL capabilities and used, for instance, with ARC2 and its 3-lines-of-code endpoint, everyone should be able to go into SemWeb programming without aditional skills than the one required by usual PHP/MySQL applications.

FOAF hacks of the day

A bit of hacking tonight, after a lot of interesting talks this afternoon about FOAF, OpenID and online identity (and certainly more to come tomorrow):

accounts.png

foafgear2.png

Time to sleep now …

 

SparlPress and foaf:openid

This website now uses SparqlPress.

Morten did a lot of work to include a scutter with ARC2-integration into the plugin, and so this blog now features a RDF backend, that stores some data from my website and related documents (FOAF profile, related seeAlso’s) and also from people who commented there. After 3 great weeks in DERI, I finally took time to dig in the source code of the plugin and start hacking.

A cool thing with this plugin is that the openid patch I wrote some times ago, which implied to hack the original plug-in, is now powered by SparqlPress itself. Each time someone registers to the website, its openid URL is parsed by ARC’s SemHTMLParser which retrieves the FOAF profile, that then goes in the scutter’s queue. There maybe some delay before the files is fetched, but this issue should be covered soon.

Yet, you may notice that some FOAF links disappeared from the comments. While the first version only retrieved the profile using auto-discovery links, I can now SPARQL the file to check if there’s a foaf:openid link to the URL, which lets identify that’s the foaf profile belongs to (or mentions) the related user. So, if your foaf link disappeared, that’s certainly because you don’t have this property in your profile, of it’s not the same than the URL you used to register here (be careful with trailing /). On the other hand, thanks to SPARQL capabilities, comments now also feature links to homepage and blog, picture and others things may come soon.

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?graph ?uri ?home ?blog
WHERE {
  GRAPH ?graph {
    ?uri rdf:type foaf:Person ;
      foaf:openid <$openid> .
    OPTIONAL { ?uri foaf:homepage ?home } .
    OPTIONAL { ?uri foaf:weblog ?blog } .
  }
} LIMIT 1

There should also be some privacy settings in the future (in case you do not want your information to be used), as well as SIOC / FOAF / SKOS exports and some other widgets / social network stuff. If you’re interested, check this page (repositories are not merged yet).

Browsing your FOAF social graph

As a way to demo some thoughts from one of my previous posts, I wrote a small python script that query my main FOAF URI to retrieve my other URIs (flickr, twitter …) and related RDF files, then SPARQL each of them to retrieve relationships and creates an XML file according the needs of Graph Gear.

foafgear.png

Live demo here. If you want to run in on your own data, just grab it there. The way is defines color mappings is a bit ugly, so if anyone wants to hack a better regexp for it, I’d be glad to have feedback.

SIOC reader (universal) widget

On yesterday’s SIOC brainstorming, Knud Möller mentioned the use of widgets to browse SIOC data.

I take a look today at the Universal Widget API from Netvibes and wrote a simple widget, that will query any SPARQL endpoint of your choice (need to support JSON output for SELECT queries) for fresh SIOC data. There’s certainly a lof of funniest things we can do with SIOC and widgets (eg: find similar posts in all the sioc-o-sphere when browsing a blog, related pictures, people …), but that’s a starting point. Here’s what it looks like in iGoogle

siocwidget.png

You can setup the number of items you want to retrieve, as well as the type (default sioc:Post) and the property used to match the date (since I noticed that some SIOC data use dct:modified while others juste use dct:created - it’s time for a SIOC-best practices guide !). Just go to the widget editing interface to change the values. By default, the widget uses one of the Talis platform endpoint URL, thanks a lot to Keith Alexander for quickly setting a JSON-enabled endpoint so that I debugged the widget !

The widget constructs the following query according your parameters:

SELECT ?post ?title
WHERE {
  ?post rdf:type $type ;
    ?post dc:title ?title ;
    ?post $date ?date .
}
ORDER BY DESC (?date) LIMIT $limit

This is the kind of widget that would be cool to plug to a SPARQLPress endpoint to get a quick overview of the activity of your social network, i.e. what are the last thing your friends twit, post, or listened to.

To use it, just go there and you’ll be able to add it to iGoogle or netvibes. If you want to use a standalone version or put it on your blog, you may need additonal resources. I can’t make it work on Dashboard yet, but I hope it will be ok soon.

AllegroGraph v2.2

While answering a comment on my latest post about some SW tools I’m - almost daily - using, I saw that a new release of AllegroGraph has just been set.

Actually, I tried it last week while looking for triple stores that support the following requirements:

Even if it was relatively fast, I had to remove it from my shortlist as the needed inference capabilities were supported only with its own query language.

But … according to its changelog regarding this new release:

Get-triples and SPARQL now both work with AllegroGraph’s RDFS++ reasoner

Wow ! Plus other cool features as freetext indexing and SPARQL over HTTP support… let’s try it again !

DOAP Dataset

For those who want to play with DOAP files, doap:store now provides a dump of its content, containing all DOAP files fetched from PTSW.

The dump is available in both RDF/XML and N3, and is run daily[1]. It also contains information about RDF files since I made a complete export of the RDF store, including informations added by 3store when dealing with contexts.

Also remember that there’s a SPARQL endpoint for doap:store, that accepts CONSTRUCT queries.

Notes

[1] It seems there’s broken use of rdf:resource in the XML version, the N3 is a cleaned version, thanks to rapper.

SPARQL endpoint for doap:store

doap:store now provides a SPARQL endpoint for its data. The RDF store used is threestore, so it supports GRAPH queries, but you may have to use the http://triplestore.aktors.org/direct/# namespace for some properties (as direct:type instead of rdf:type in GRAPH queries). In order to write queries, the endpoint uses Danny Ayers’ sparql-editor.

I also updated / fixed the service regarding various points:

Thanks to those who sent feedback !

doap:store, a collaborative DOAP projects directory

I’ve just completed a first release of doap:store, a user-driven directory of DOAP projects.

The goal is to build a database of computing projects that have a DOAP description - as does the Semantic Web Apps and Demo service, but not only SW related here - , thanks to Ping The Semantic Web service. Thus, there is no need to register, projects will be fetched from PTSW, that will get them eitheir by pings, or even better, thanks to Semantic Radar plugin for Firefox when people browse the Web.

Then, doap:store provides a common search engine and browsing interface for these decentralized project description, while authors keep control over their data. Data is updated each time PTSW has a new ping for it (in the future, PTSW should store new pings only if the document has changed, so updated will be made only for real document updates).

From the technical side, it’s using 3store for the storage and of course SPARQL for the queries.

I hope this kind of tool can help to outreach DOAP for developers, and SW in general, as thanks to Semantic Radar, anyone can contribute to build this directory.

SPARQL in command line

Just discovered roquet while talking on #sioc about SPARQL in command line.

Available on Debian within rasqal-utils packages, and really simple to use, eg:

 roqet -r json -e "SELECT ?s ?p ?o WHERE { ?s ?p ?o }" -s http://apassant.net/blog/feed/rdf

Next Page →