MOAT, Sindice and the Tag Ontology
I just commited two updates for the MOAT module for Drupal 5:
First, in order to add new URIs for a tag, the plugin now uses the sindice Widget that will query Sindice.com and suggests URIs for the used keyword. Then, simply chose the URI, and it will be added as a new meaning for your tag. A big thanks to the Sindice team and especially Adam for modifying the JS regarding the needs of the plugin (and for cool discussions we had about SW
) !

The next step I want to add in this plug-in is the social networking aspect (since all Meaning instances are related to people that define it, the plug-in could list in priority meanings defined by your friends, using foaf:knows). I’ll certainly need some people to be part of the experiment, so if you’re interesting in it, drop me a mail here or on moat-dev - comment here.
Second change, the plug-in now exports RestrictedTagging objects, while the previous version only exports sioc:topic links. Here’s an example of such an export. It also implied some changes on the sioc module, so you’ll need to update both from cvs if you want to try it. I hope this example (since the website documentation is not that clear at the moment) can help to solve some misunderstood about MOAT, eg (from this this interesting post from Kanzaki Masahide):
You might think this looks more natural if a Tagging has a Meaning, and a person is associated with Tagging, not Meaning. However, since a Tagging can have multiple associatedTag, it is not possible to establish such one-to-one mapping.
Indeed, tagging do not have direct link(s) to Meaning instances, since the Meaning class is context independant (i.e. representing all the meanings a tag can have). Yet, each tagging can have a tagMeaning property, that links to the needed URI. Moreover, to represent this tagging, MOAT implies to use a RestrictedTagging instance, and not a Tagging one, so that there’s only one associated Tag. Person are associated with Tagging (thanks to SIOC in the example, but could be extended with FOAF), and the reason to keep Person associated with the Meaning, is to contextualize it (see the social networking part I mention just before):
<tag:RestrictedTagging> <tag:taggedResource rdf:resource=“http://apassant.net/drupal/drupal-5.5/?q=node/6″/> <sioc:has_creator rdf:resource=“http://apassant.net/drupal/drupal-5.5/?q=sioc/user/1%23_user”/> <tag:associatedTag rdf:resource=“http://tags.moat-project.org/tag/sparql”/> <moat:tagMeaning rdf:resource=“http://dbpedia.org/resource/SPARQL”/> </tag:RestrictedTagging>
Hope that’s more clear, and - this time, for sure - I’ll update the website with more relevant schemas / documents !
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):
- Added queries to retrieve user accounts from FOAF profile and display them in comments with SparqlPress. Once again, it’s done by SPARQLing the FOAF URI of the user logged-in on this blog using an OpenID URL. To be displayed, the account must either have a URI (i.e. not to be a blank node) or a foaf:accountProfilePage (BTW, this one is not in the specs while it seems most people agreed on it - and already use it. Dan, what about it ?). Also added icons for some well-knows services. Live example here, and screenshot:

- Updated the simple network browser script to be compliant with the new release of a GraphGear (1.2). The component has new interesting features that can be set in the xml file, as setting the size of the nodes, and adding images. I updated the script to benefit from those features, and so it now display pictures and smaller nodes, which make the script run faster. The image detection only handles foaf:img at the moment, so this is something that whould need more work (e.g. retrieve sioc:avatar from the related online account …). Yet, here’s a sreenshot of the new rendering that you can browse there:

Time to sleep now …
Tags: foaf, graphgear, sparql, sparqlpress, wordpress
owl:sameAs reciprocity with OpenID
Still working on SparqlPress, I just adapted foaf-output for it, as a part of the future export capabilities of the plugin. It exports users in a group, or individually. Once again, thanks to OpenID and SPARQL capabilities of the backend, I can retrieve the related FOAF document, and also the URI of the user.
Thus, the export can provide owl:sameAs + rdfs:seeAlso links to the original people / file, like on that profile (BTW, well done for wikini and its FOAF export). The great thing, imho, is that it shows how OpenID can add a trust layer to the Semantic Web, by providing an automatic way to have bi-directional owl:sameAs links between URIs, which means both parts agree on the fact that they’re the same. Since you can link from your foaf profile to any URI on the Semantic Web, you need a way from this URI to link to your original FOAF file. This SW+OpenID association provides it, and could be really useful in a Linked Data perspective.
NB: OK Morten, now we’ll have to check how to avoid recursion ![]()
Tags: dataportability, linkeddata, openid, sparqlpress, trust
BarCamp Web Sémantique à Paris
La FING et websemantique.org organisent ce samedi à Paris à la Cantine un BarCamp dedié au Web Sémantique. Comme l’a dit Gautier, l’objectif est principalement de faire connaissance, et préparer l’organisation de nouvelles rencontres de ce type.
L’évènement est ouvert à tous, SPARQL-ers fous ou simples curieux, et l’inscription se fait de préférence en ligne avant celui-ci pour une meilleure logistique.
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.

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.
