I have some doubts about how to publish RDF data in a “semantic” site case study…

The better way

I know that now there is a PERFECT way, that is having an RDF backend and using an RDF Server ( as Sesame, Joseki or RAP for PHP enviroments ) with SPARQL as query language…

But in a small contest, instead of using XML Microformats, how we can do?

Example

Consider this case: a wordpress blog with the StructuredBlogging plugin installed… ( like this one )…

We know that this plugin uses a tag script to add in the post meta-info about the post itself… using this XML code:

<script type="application/x-subnode; charset=utf-8"> <subnode alternate-for-id="sbentry_1"> ... </subnode> </script>

More info about this approach at Technical Resources

The problem is that: there are several ways of including RDF code in a XHTML document, and two are the most important:

  • using of tag link rel=”meta” type=”application/rdf+xml” href=”” : it’s valid also for other RDF formats ( N3, nt .. )* using the tag script with the correct type… as above
    A more detailed duscussion is on this page:

-> RDF in HTML: Approaches

But it’s a quite old document, so using one more recent as SKOS working drafts, for example:

-> Quick Guide to Publishing a Thesaurus on the Semantic Web
we can find an interesting paragraph:

Publishing RDF Data

The simplest way to publish RDF data is to create one or more RDF documents containing your data, and publish them on the web via a normal HTTP server.

Note that, although the examples above all use the RDF/XML serialisation syntax (i.e. file format), there are two other alternative syntaxes for RDF: N3/Turtle [N3][Turtle] and N-Triples [N-Triples]. For documents containg RDF data in the RDF/XML format, the ‘content-type’ field in the HTTP header for that document should be ‘application/rdf+xml’.

You can also publish your RDF data on the web via a dedicated RDF server such as Joseki [Joseki] or Sesame [Sesame]. Publishing via an RDF server allows anyone to query the thesaurus over the web via an RDF query language such as SPARQL [SPARQL].

Current practice dictates that if you use HTTP URIs as identifiers for your thesaurus and its concepts, then those URIs should dereference to an RDF description of the thing they identify.

So, if i have a site with all its RDF stuff accessible via HTTP RDF Server and SPARQL, but also with some pages with the tag script with RDF code is it correct ?

So..

The use of RDF Server is a overlap of the others RDF inclusion tecniques or are two way to offer semantic data with different approaches?

I mean, probably the data inserted in the script tag is data just ready, instead for the server we have to make a query… so different usages… are acceptable IMHO.

Having a way to collect data as soon as it’s available is the context of use of the direct inclusion in a web page ( of the RDF data, of course )…
Probably that’s the difference…

As it is said here,

[…]
Neither of the linking (“tag link to the Metadata”) or embedding (“Embed XML RDF Part I: Eschew Validation”, and possibly “Embedding using tag script”) methods can be ruled out, in the author’s opinion.

Linking has the substantial advantage that it is serialization independent, may reduce file sizes when a single set of triples is often referenced (such as contact information), and provides a cascade.

Embedding is useful because it is direct, there are existing implementations to deal with it, plus people will be embedding XML RDF and other languages like it into XHTML for a long time to come.

Commenta e condividi

Ecco finalmente un servizio molto utile, peccato non sia possibile scaricare il codice…

Ma giusto per capire le potenzialita’ di apertura delle tecnologie che costituiscono il Semantic Web, dategli un’occhiata:

-> http://www.confoto.org/

E’ una specie di Flickr, pero’ per ora non aperto a tutti, e in piu’ basato solidamente su RDF, mattone del Semantic Web.

C’e una parte molto interessante per gli spunti che offre nel suo blog di sviluppo,

So, let’s see what the machine-readable data is good for:
confoto.org is a semantic photo service for Web conference pictures. It can’t compete with flickr (by no means), but it allows you to add “rich” annotations to photos.
It’s also not required to upload your files, you can simply post a list of URLs to confoto or, if you are a SemWebber, you can tell confoto where to find your already RDFized photo descriptions.

As we know, metadata doesn’t come for free. Flat, tag-based approaches taken by del.icio.us or flickr are currently a huge success, and any tool adding complexity beyond simple tagging could possibly shy away potential users.
However, folksonomies are limited, they only define a basic relation between the tag and the annotated resource.

With confoto, I’m trying to combine simple tagging with more advanced annotations. For tags I’m following Libby Miller’s pigsty approach and use dc:subject literals. For the more sophisticated stuff (creator, event, rating, license) I tried to hide complexity in the UI, keeping the annotation process simple (and metadata cheap). And with an AJAX-like* extension it was possible to add several interactive form elements to the annotator. This brings us back to the XTech data. Using the imported information, we can accelerate annotation tasks as outlined below.

La cosa ovvia e’ che e’ ancora un progetto in fase iniziale, ma ci sono dei punti con i quali mi trovo TOTALMENTE d’accordo…

  • usando come backend RDF il materiale che si annota sara’ poi compatibile e integrabile in qualsiasi altro modo essendo RDF uno standard aperto
  • tramite il supporto a SPARQL ci assicura che i dati presenti nel portale poi possono in qualsiasi momento tornare a noi: una cosa importante da capire e da avere… i dati in fondo sono sempre nostri,no?

E’ interessante notare anche l’importanza che ha ormai assunto creare tools simili a del.icio.us o flickr con quella semplicita’, ma allo stesso tempo fornendo un backend piu’ complesso, ma piu’ conveniente nel lungo termine in modo TOTALMENTE TRASPARENTE per l’utente… non si deve accorgere…

Questa e’ la direzione giusta per rendere il SemanticWeb un vantaggio per tutti…. e usabile da tutti…

[ENG]: I think this site ( confoto.org ) and its backend is a good example of a good semantic application design: but the most important part is that the data gets back to the user…
It’s an evolution of applications like flickr or del.icio.us and the social communities where the data is IN these sites and NOT available for everyone…

With the SPARQL interaction every site can publish its semantic material AND at the same time the user and the site USE this data without any problems…

This is a very good point, IMHO :)
Is this a good example of the DataLibre mission? Of course!!

Riferimenti:

-> XTech remixed and remote access to confoto.org
-> confoto

Commenta e condividi

Molti ormai sono abituati ad usare i tags per catalogare in modo piu’ semplice e intuitivo i propri contenuti…

Premessa: questo post prevede la conoscenza di RDF e delle ontologie, almeno a livello teorico, ma puo’ essere uno spunto per quelli curiosi: e’ quindi un post tecnico

Il problema nasce quando i tags iniziano ad essere molti e gestiscono in realta’ un’area della conoscenza, per non parlare delle lingue e dei sinonimi che entrano in gioco…

In breve c’e’ un doppio problema:

  • uno di natura semantica e linguistica: il fatto che io possa usare il tag apple per indicare la ditta mentre un altro possa indicare il frutto e una cosa non del tutto scontata quale la lingua in cui e’ scritto il tag…
  • gestire i sinonimi impliciti per i tags… iniziare a gestirli con il loro significato ed evitare doppie presenze.. esempio tecnologia e tecnologie per indicare la medesima cosa

Partiamo da un caso pratico: questo blog e’ dotato di tags… ma il loro uso e’ limitato e voglio provare a potenziarlo:

  • gestire la lingua e la collisione sintattica
  • avere un backend di RDF che gestisca il tutto

Questo chiaramente in chiave di gestire tutto il sito anche semanticamente, oltre che per i lettori umani ( in forma testuale semplice, quale e’ adesso ).

Il primo passo in effetti e’ trasformare il feed RSS1 ( totalmente RDF ) potenziandolo con il modulo per le taxonomies inserendo appunto i tags locali e le categorie per indicare gia’ nel feed il contesto dei posts… ( questa parte verra’ discussa in un post futuro ).

Il passo successivo e’ usare un datastore RDF locale per salvare in un sol colpo questo RSS potenziato con tutti i posts del blog e creare un cron giornaliero che aggiorni tale datastore.

Continua a leggere
Foto dell'autore

Matteo Brunati

Attivista Open Data prima, studioso di Civic Hacking e dell’importanza del ruolo delle comunità in seguito, vengo dalle scienze dell’informazione, dove ho scoperto il Software libero e l’Open Source, il Semantic Web e la filosofia che guida lo sviluppo degli standard del World Wide Web e ne sono rimasto affascinato.
Il lavoro (dal 2018 in poi) mi ha portato ad occuparmi di Legal Tech, di Cyber Security e di Compliance, ambiti fortemente connessi l’uno all’altro e decisamente sfidanti.


Compliance Specialist SpazioDati
Appassionato #CivicHackingIT


Trento