John mentionned 2 weeks ago the latest developments of the SIOC-osphere, but things are still hot !

  • A first version of the API documentation is online. It explains the different classes and methods of the API, which are designed to create SIOC data without any knowledge of SIOC nor RDF.
  • Drupal exporter has been updated. It now exports data according the latest version of the specs (1.08), and is ready for FOAF mappings. There are still adjustements to be done about the FOAF module, but you can apply a patch that can be found and explained here to make it work – you need to install FOAF module for Drupal first of course;
  • Some bugs have also been fixed in b2evo exporter (see SVN) and DotClear one (release 1.4.2 (src | pkg)). As things seems now quite stable in PHP, is there any volunteer for coding Perl or RoR exporters for SIOC ?
  • SIOC export in ODS is now compliant with SIOC crawler, so it can be crawled and put in any triple-store, as Kingley’s one which is now here among other blogs from various engines;
  • John wrote 3 different SIOC pdf guides, and also designed a shema about FOAF / SIOC / SKOS, to help people to get rid of ambiguity between foaf:User and sioc:User;
  • Wikier mentionned on #sioc that SWAML, a project he’s involved in to translate mailing lists in RDF, will use SIOC;
  • Finally, SIOC will be exposed at BlogTalk, with a SIOCYourBlog experiment.

Wow !

About these ads

BlogTalk Reloaded

I’ll flight to Vienna tomorrow morning to attend BlogTalk Reloaded.

My talk about “Folksonomies, Ontologies and Corporate Blogging” is planned to be monday at noon, while Uldis should present the one dedicated to SIOC (co-writen with John[1] and myself) on thurdsay morning.

There should be a lot of interesting talks during these two days, I’m especially waiting for the ones about social software in companies, presentation of the Google-Data API, but also about social aspects of blogging. Well, I also hope to meet new people, so if you’re frequently reading this blog, just come to say hello.


[1] Who recently made different SIOC Guides

Quelques nouveautés SPARQL

2 news intéressantes pour ceux qui s’interessent à SPARQL:

  • Une FAQ par Lee Feigenbaum, qui couvre différents aspects à la fois sur le language et le protocole;
  • Un éditeur de requêtes en JavaScript par Danny Ayers. De quoi éviter un paquet de copier / coller et des erreurs dans les prefixes. Mis en place ici, pour ceux qui veulent tester (je ne garantis rien quand à la rapidité des requêtes sur ce serveur).

Révision du validateur RDF du W3C

Reçu hier dans la journée

 Regular users of the RDF validator may have noticed that, over the past few months, the service sometimes had some trouble processing and displaying graphs of validated RDF documents. This was due to a protection mechanism preventing the already overloaded server to spin entirely out of control. The RDF validator now happily sits on a newer, puchier and less loaded machine. As a result, the issue of graphs now showing should become extremely rare.

Vous pouvez donc à nouveau utiliser le validateur RDF du W3C sans souci pour valider vos documents RDF, mais aussi pour afficher les graphes correspondant, grâce à GraphViz, comme par exemple pour les données SIOC de ce billet.

New query interfaces for browsing SIOC data

I’ve recently added new queries (and associated interfaces) to my triple-store-based SIOC browser[1], in order to present what SIOC can be used for.

The first one is quite similar to the tagcloud feature (which creates a tagcloud of topics, as Technorati does but using sioc:topic property to get topics / categories): it displays a 3D pie of the ten most popular topics, using the PHP/SWF Charts API.

The second one uses the user aspect of SIOC. It has recently been decided to use both foaf:Person and sioc:User to represent creator of a sioc:Post when exporting data, while using only FOAF for unregistered users (i.e. comments on most weblog engines). This means that every Post (whether is it an original post or a reply) is linked to a foaf:User. Then, we can create mappings and relationships between posts and users, eventually smushing data using foaf:mbox_sha1sum if users use different nicknames but same e-mail in different blogs. So, this second query displays relationships beetween users within a set of decentralized SIOC-ed blogs that have been put in the same store. Two users are connected as soon as one replied to another, providing a way to discover people you’ve got in common (sometimes without knowing it !). The Prefuse API have been used to draw the network.

This FOAF/SIOC feature that links users to post have been recently introduced in exporters (WordPress, DotClear, b2evo) and in the PHP API. So, if you use an old version of one of this exporter, update it! These new versions also provide mappings between SIOC, FOAF and DC, and removed depracates some properties (see latest ontology specs). At the moment, I only store blogs that use the latest exporters in the store, so that all of them will be taken into accout in browsing interfaces, as the SPARQL queries refer to latest specs.

Finally, some of these exporting and browsing features will be presented in an upcoming talk at BlogTalk Reloaded, with the paper “SIOC Browser – Towards a Richer Blog Browsing Experience” co-written with John Breslin and Uldis Bojars. I’ll also be involved in a talk for the paper “Folksonomies, Ontologies and Corporate Blogging”, co-written with Philippe Laublet and Jean-David Sta, introducing an approach – using SIOC – that mix folksonomies and ontologies I dealt with in my PhD work.

So, once again, don’t hesitate to use SIOC exporters on your blog / forums if available (or write one with the API !) and get listed here !


[1] Implementation details here

SIOC Exporter pour Dotclear, v.1.4.1

Quelques correctifs sur l’installeur suite à la mise en place du plugin chez, et une nouvelle version disponible:

Le plugin:

C’est aussi l’occasion de signaler que SIOC dispose d’un nouveau site sur

Maintaining a changelog with DOAP

I’ve just pointed that I used DOAP to represent various information about SIOC Exporter for Dotclear. The DOAP vocabulary is designed to define different properties for a project, as its homepage, repository, different people involved into its development…

There is no direct property for the changelog of a project, yet you can use doap:release to represent information about each release and then add the changelog of a given release using dc:description[1]:

- API updated to use both foaf:maker / sioc:has_creator
- Using object type in URL parameters
- Generating a basic FOAF profile to be used in user export
- French tranlation of the backend
- Adding doap.rdf

Then, just use SPARQL to retrieve and order changes, plus a few lines of code to display the results (eg using Python and librdf):

import string  
import RDF  

query = """  
PREFIX dc: <>  
PREFIX doap: <>  
PREFIX rdf: <>  
SELECT ?revision ?created ?description  
WHERE {    
  ?_p rdf:type doap:Project .    
  ?_p doap:release ?_r .    
  ?_r doap:revision ?revision .    
  ?_r doap:created ?created .    
  ?_r dc:description ?description  
} ORDER BY DESC (?created)  """  

url = ""  
model = RDF.Model()  
RDF.Parser().parse_into_model(model, url)  
for r in RDF.Query(query, query_language="sparql").execute(model):    
  print "# v%s [%s] %s" %(r['revision'].__str__().strip(), r['created'].__str__().strip(), r['description'].__str__())

And here it is, you’ve got a formatted changelog for your project:

# v1.4 [2006-09-09]      
- API updated to use both foaf:maker / sioc:has_creator     
- Using object type in URL parameters      
- Generating a basic FOAF profile to be used in user export     
- French tranlation of the backend      
- Adding doap.rdf  

# v1.3 [2006-08-02]      
- Update to match API changes  

# v1.2 [2006-05-30]  

This example shows how data can be formalized and mashed-up using Semantic Web technologies, as you can do with your FOAF profile and then create an homepage from it. So, while I first thaught about a FOAF to Homepage script, I’m now into a simple RDF 2 Templated-HTML converter, which will use Jinja as a templating engine, and librdf + SPARQL to get information from any RDF file.


[1] Yet, adding a changelog property could be more appropriate from a semantic point of view, or maybe some more complex class, I’ve started the discussion here.

SIOC Exporter pour Dotclear, v1.4

Les évolutions précédentes sont passées un peu inaperçues – aucun billet à ce sujet – mais une nouvelle version du plugin SIOC pour DotClear est aujourd’hui disponible.

Ce plugin permet donc d’exporter le contenu de votre blog (billets, commentaires, utilisateurs) en RDF en utilisant l’ontologie SIOCSemantically-Interlinked Online Communities – que David de Biologeek mentionnait d’ailleurs récemment dans un de ces posts. Le weblog complet est ainsi représenté avec un formalisme défini et accessible, permettant toutes sortes de requêtes et d’interaction avec les autres blogs utilisant ce format, quelqu’en soit l’outil d’origine, comme on peut le voir ici. A la manière de RSS donc, mais avec un export total du système donc non seulement des billets mais aussi des groupes, des rôles …

Concernant l’exporter en lui-même, il est maintenant packagé comme un plugin DotClear, et vous pouvez donc l’installer (en théorie) depuis le back-office de votre blog. Il exporte les billets (logique ;) ), les commentaires et les utilisateurs. Pour chaque billets sa catégorie et ses tags (avec le plugin qui va bien) sont également exportés via la propriété sioc:topic, et les liens vers d’autres URL avec sioc:links_to.

Il est maintenant codé à partir de l’API PHP pour SIOC, qui lie dorénavant les billets aussi bien au compte utilisateur qu’à l’utilisateur lui-même, utilisant donc à la fois FOAF[1] que SIOC, permettant ainsi de faire le lien entre utilisateurs enregistrés ou non de différents blogs et d’entrevoir les premieres apparitions de réseaux sociaux avec SIOC.

Ah oui, dernier détail, le changelog et autres infos sur le plugin sont disponibles dans sa description DOAP[2]. J’y reviendrai partiellement en fin de soirée dans un autre billet.

Enfin si vous l’utilisez, n’hésitez pas à vous lister sur cette page, et si SIOC vous interesse à rejoindre la mailing-liste ou #sioc sur freenode si vous avez des questions précises sur le sujet.

Le plugin:

Edit 14/09 @ 15:40: Correctifs et nouvelle version ici.


[1] D’ailleurs, il se pourrait bien qu’un plugin FOAF plus poussé pour DC voit le jour avec Harisson

[2] Description Of A Project, ontologie pour décrire … des projets informatiques.

Adapting SPARQL queries to a given language

I’m currently refactoring my homepage and want it to be created from my FOAF profile, as at the moment where it consists in FOAF + XSLT to render XHTML. I don’t want to use RDFHomepage as I want something simple, not involving other RDF files than my FOAF profile (even if the publications + FOAF mapping from RDFHomepage is quite nice), and want to add other features as RDF in HTML and RSS feed parsing, as Got wrote in his example.

So, I’m now retrieving data using librdf and SPARQL. I first ran the following SPARQL query – using OPTIONAL for each parameter as I may remove some properties from my profile and don’t want to change the query but also want to test it on other profiles that may have less information.

 PREFIX foaf: <>  PREFIX bio: <>  SELECT ?foaf_name ?foaf_givenname ?foaf_family_name ?foaf_nick    ?foaf_surname ?foaf_mbox ?bio_olb ?bio_keywords  WHERE {    ?_x foaf:primaryTopic ?node .    OPTIONAL {?node foaf:name ?foaf_name } .    OPTIONAL {?node foaf:givenname ?foaf_givenname } .    OPTIONAL {?node foaf:family_name ?foaf_family_name } .    OPTIONAL {?node foaf:nick ?foaf_nick } .    OPTIONAL {?node foaf:surname ?foaf_surname } .    OPTIONAL {?node foaf:mbox ?foaf_mbox } .    OPTIONAL {?node bio:olb ?bio_olb } .    OPTIONAL {?node bio:keywords ?bio_keywords }  }

And … got 8 different results ! Indeed, I’m using both french and english to describe some properties in my profile, eg

  <bio:keywords xml:lang="en">    Social software, Semantic Web, weblogs, RDF, OWL, ontologies  </bio:keywords>  <bio:keywords xml:lang="fr">    Logiciels sociaux, Web Sémantique, weblogs, RDF, OWL, ontologies  </bio:keywords>

so it retrieves all combination of properties / langs.

Instead of parsing the results to get only values for a given language, I use language matching in the query. I’ve added a FILTER to each node so that they will be fetched only if they don’t have any xml:lang or if it matches the “favourite language” for this query (to make the query totally clean, I think I should add a isLiteral test before).

 PREFIX foaf: <>  PREFIX bio: <>  SELECT ?foaf_name ?foaf_givenname ?foaf_family_name ?foaf_nick    ?foaf_surname ?foaf_mbox ?bio_olb ?bio_keywords  WHERE {    ?_x foaf:primaryTopic ?node .    OPTIONAL {?node foaf:name ?foaf_name .      FILTER (lang(?foaf_name) = "" || langMatches(lang(?foaf_name), "FR"))    } .    OPTIONAL {?node foaf:givenname ?foaf_givenname .      FILTER (lang(?foaf_givenname) = "" || langMatches(lang(?foaf_givenname), "FR"))    } .    OPTIONAL {?node foaf:family_name ?foaf_family_name .      FILTER (lang(?foaf_family_name) = "" || langMatches(lang(?foaf_family_name), "FR"))    } .    OPTIONAL {?node foaf:nick ?foaf_nick .      FILTER (lang(?foaf_nick) = "" || langMatches(lang(?foaf_nick), "FR"))    } .    OPTIONAL {?node foaf:surname ?foaf_surname .      FILTER (lang(?foaf_surname) = "" || langMatches(lang(?foaf_surname), "FR"))    } .    OPTIONAL {?node foaf:mbox ?foaf_mbox .      FILTER (lang(?foaf_mbox) = "" || langMatches(lang(?foaf_mbox), "FR"))    } .    OPTIONAL {?node bio:olb ?bio_olb .      FILTER (lang(?bio_olb) = "" || langMatches(lang(?bio_olb), "FR"))    } .    OPTIONAL {?node bio:keywords ?bio_keywords .      FILTER (lang(?bio_keywords) = "" || langMatches(lang(?bio_keywords), "FR"))    } .


Here it is, I’ve got only one result now, which match only french items when language is specified.

Actually, this query is created using this python snippet:

 prefixes = {    'foaf'  : '',    'bio'   : '',  }  properties = [    'foaf:name',    'foaf:givenname',    'foaf:family_name',    'foaf:nick',    'foaf:surname',    'foaf:mbox',    'bio:olb',    'bio:keywords'  ]  def c2u(string) :    return string.replace(':','_')  lang = 'FR'  prefixes = string.join(["PREFIX %s: <%s>" %(key, value) for key, value in prefixes.items()])  select = string.join(["?%s " %c2u(value) for value in properties])  conds = string.join(["OPTIONAL {?node %s ?%s . FILTER (lang(?%s) = '' || langMatches(lang(?%s),'%s')) }"     %(value, c2u(value), c2u(value), c2u(value), lang) for value in properties])  query = "%s SELECT %s WHERE {?_x foaf:primaryTopic ?node . %s}" %(prefixes, select, conds)  print query

Lots of things to do at the moment, but I hope that the whole script and its template will be ready for the week end, at the same time as a new release of the SIOC plugin for DotClear.

Edit 2006-09-09 @ 12h: Removed foaf:dateOfBirth from example as it doesn’t exist, see comments.