Social, mobile, semantic

Monday’s DBpedia mobile presentation at LDOW2008 impressed me a lot. Actually, while I never worked on it, I’m really interested in ways to combine mobile applications, Semantic Web / Linked Data technologies and social networking. Here’s a use case I have in mind for a long time and I’d like to share.

Imagine in can embed a FOAF profile on my mobile phone, or just an URI with owl:sameAs / rdfs:seeAlso links to my main URI / RDF file. When joining a conference, a restaurant or any place where there are some people (and when I’m in a good mood), I allow my phone to deliver my presence and this URI (+ related data) to anyone, while at the same time searching for available URIs and data.

Then, I got a list of URIs, and my phone will suggest me that there’s some people nearby that I must meet regarding some criterias and how our URIs are interlinked. A simple way would be to configure the application with kind of (statement, depth) tuples. For example (foaf:interest, 2) would suggest me all people where one of my foaf:interest is link to one of their foaf:interest with a maximum path of 2. And of course, those paths should be computed using Linked Data and considering the whole SW graph, or GGG, e.g. going through DBpedia, GeoNames of any dataset from the LOD cloud if needed.

But, in some case, paths are not enough, as they can result to unrelevant results (depending on the start URI the path may quickly go towards too generic URIs), or sometimes too much people. For example, at a SW event, I guess it would have suggest me to meet anything since I have dbpedia:Semantic_Web in my profile. A solution could be to have an intelligent context manager in the mobile phone that will check my iCal, find that I’m attending a workshop (or even better, use GPS location, browse upcoming.org or other services to find which event I’m attending), retrieve the workshop homepage in which organizers embedded some RDF data about topics of the workshops (as they eat their own dogfood :), and exclude those URIs (and paths that goes through). To be more accurate, instead of those path tuples, I could also define complex queries, as for example: “People that will present some paper at a conference I’ll attend next month”.
Actually, it’s just a matter of providing all the data, open it, and of course, interlink. But well, “Linked Data is the Semantic Web done as it should be. It is the Web done as it should be“, no ?

RDFa profile and new URI

I just added a short profile about myself embedding RDFa that aims to replace my old FOAF file, in which I already moved some things (i.e. relationships) to external services.

I also gave me a nicer URI, http://apassant.net/alex that uses content-negociation to redirect either to the HTML version of this profile or to the extracted RDF one, depending on the Accept header, combining some rewrite rules that Ivan Herman defined for the SW Faq and the .htaccess used for the Flickr wrapper. My old foaf.rdf file is also now redirected to this extracted profile, and I’m using an owl:sameAs in RDFa link to be compliant with services that uses my old URI.

# Old foaf.rdf compliance
RedirectPermanent /foaf.rdf http://www.w3.org/2007/08/pyRdfa/extract?uri=http://apassant.net/about/
# RDF redirect for my URI
RewriteCond %{HTTP_ACCEPT} application/rdf\+xml
RewriteRule ^alex$ http://www.w3.org/2007/08/pyRdfa/extract?uri=http://apassant.net/about/ [R=303,L]
# HTML redirect for my URI
RewriteRule ^alex$ about [R=303,L]

I’m also wondering, since this profile is used as http://apassant.net homepage which is also my OpenID URL, how it will work when loggin on websites using SparqlPress + OpenID as ARC2 embeds an RDFa extractor so that it should discover my FOAF data without using any autodiscovery link.

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 :)

MOAT module for Drupal 5

A first release of the MOAT module for Drupal 5 is available on drupal.org (get from cvs for latest features).

It features a simple interface that will query a server for the tags you used and show the available URIs that have been defined by yourself or by other users of the same server. At the moment, it makes no distinction between both, neither between your friends’URIs and other people ones.

You can also add a new URI, which will be automatically sent to the server so that anyone can re-use it later.

It outputs the node with the SIOC module and a sioc:topic link (output example), a next release will feature “moat-augmented” RetrictedTagging objects from the Tag ontology.

And so, if your application pings PTSW or someone browe the page with Semantic Radar, its content will be available almost instantaneously for semweb applications.

Introducing MOAT

I’m happy to announce the MOAT project:

MOAT (Meaning Of A Tag) provides a Semantic Web framework to publish semantically-annotated content from free-tagging.

While tags are widely used in Web 2.0 services, their lack of machine-understandable meaning can be a problem for information retrieval, especially when people use tags that can have different meanings depending on the context.

MOAT aims to solve this by providing a way for users to define meaning(s) of their tag(s) using URIs of Semantic Web resources (such as URIs from dbpedia, geonames … or any knowledge base), and then annotate content with those URIs rather than free-text tags, leveraging content into Semantic Web, by linking data together. Moreover, tag meanings can be shared between people, providing an architecture of participation to define and exchange potential meanings of tags within a community of users.

To achieve this goal, MOAT relies on an architecture that can be deployed for any organisation or community and that involves a lightweight ontology, a MOAT server, and some third-party clients .

More details about the framework and its implementation are described on the project website. A demo server is available here, and updates should be done soon (code and documentation).

RDF export of Flickr profiles with FOAF and SIOC

I really think that the Semantic Web, and especially FOAF and SIOC can be an answer to the social graph and distributed social networks, as explained (and drawn) there: do not rely on proprietary APIs, but provide data in a way that can be universally linked and understood by software agents.

There are already RDF exporters for Twitter or Facebook, and here’s my contribution to the Giant Global Graph: a Flickr exporter, exporting accounts and groups - if you want some data about your pictures, check flickurl.

It uses the phpFlickr API and exports only publicly available data, to be compliant with Flickr privacy settings (i.e. if you setup your account so that not connected users cannot see it in any contact list, it won’t appear in those contact lists RDF exports).

Basically, it exports one RDF file per user, including one foaf:Person and a related sioc:User - with basic properties (sioc:name, sioc:avatar) as well as a link to his image gallery using the SIOC types ImageGalery class -, and exports the relationships (foaf:knows) with other users, and groups he’s member of (sioc:member_of). Groups are exported is another file, with related informations (dc:description, foaf:depiction …). Files are related with seeAlso links.

In order to be compliant with the Linked Data principles, the script also defines a URI for each foaf:Person, so that anyone can link to it from his FOAF profile, using this pattern within his own foaf:Person description:

<owl:sameAs rdf:resource="http://apassant.net/home/2007/12/flickrdf/people/flickr_id"/>

It also defines an URI for each sioc:User and sioc:UserGroup. I could have used the Flickr account URL, but I think that’s better to make the difference between the account itself, and the homepage of this account, same for the groups.

URIs are defined as follows:

While data is available at:

Eg with my profile:

It uses content-negociation and 303 redirections to the RDF file or to Flickr.com, depending if you access the page with an RDF-compliant browser or not.

Finally, profiles are also linked to existing URIs thanks to:

Please note that each created page is kept on the server. If you want to rebuild one, go to the service homepage and create a profile (you’ll see it also work with user names if you don’t know user id but be careful the user name is not the screen name). A dataset of created profiles should be available soon.

Edit 22/12/2006: Check this post for more details on issues with how to deal with user name / user ID.

DOAP and the Linked Data Web

From the LOD mailing-list, I discovered and browsed doapspace.org, that aims to build a DOAP repository. Contrary to doap:store that fetches RDF files from the Web thanks to PTSW, one of the nice feature of doapspace is that it creates DOAP files from services that do not offer such meta-data for their projects, such as SourceForge or FreshMeat.

Rob already scrapped about 45000 DOAP files ! And should be able in a few days to ping PTSW to inform it about new files, that can the be crawled into doap:store, browsed… and SPARQLed - let’s hope my box can support such amount of data and queries…

As discussed on the mailing-list, this service could be a great way to make DOAP enter one step further into the Linked Data Web. What’s currently missing is URIs, for projects and people. I noticed when creating doap:store that many projects don’t have an URI (and are just blank nodes), which makes impossible to link to them from external files, as FOAF profiles.

Now, imagine that doapspace scrapper creates URI for all people and projects, based on the service name and user / project id on the original service. Using owl:sameAs and rdfs:seeAlso, anyone could add something like this in its FOAF profile:

<foaf:Person rdf:about="#me">
  <owl:sameAs
    rdf:resource="http://doapspace.org/user/sf/terraces"
    rdf:seeAlso="http://doapspace.org/user/sf/terraces/rdfview"/>
  <owl:sameAs
    rdf:resource="http://doapspace.org/user/fm/terraces"
    rdf:seeAlso="http://doapspace.org/user/fm/terraces/rdfview"/>
</foaf:Person>

Then, by reading my FOAF profile with Tabulator or any Linked Data Browser I can easilly browse my profiles on doapspace, that would ideally list all projects (with their URIs) I’m into and that I can browse again, thanks again to seeAlso links.

Another advantage is that I don’t have to mention the projects I maintain in my FOAF file, but let doapspace do the job for me, since using owl:sameAs will tell that these different URIs identify the same person (= me). Then using a single SPARQL query on these files with an engine that supports owl:sameAs, I can easilly find all projects I’m into, whereas it comes from:

select ?project
where {
  ?project doap:maintainer <my_foaf_URI>
}

The final step would be to query only my FOAF profile, and let the engine discover / identify doapspace URIs and retrieve profiles to add them in its files to query, as the Semantic Web Client library does, but I don’t know if it currently supports owl:sameAs or not.