[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Advocating the use of RDF and Turtle (standards) - Was: Re: [DEP 12] Mapping debian/upstream fields to established formats or ontologies.



Hi.

Charles Plessy <plessy@debian.org> writes:

> Le Fri, Jan 25, 2013 at 07:58:51PM +0100, Guillem Jover a écrit :
>> 
>> If the intention is for this to possibly be adopted by upstreams
>> themselves so that they can maintain and ship them in their releases,
>> then the current format does not seem appropriate when there are
>> existing proposals around, for example DOAP. Working with the
>> existing solutions/standards instead of creating yet another one
>> and trying to extend them if they have current deficiencies would
>> seem more helpful overall than creating more divergence.
>
> Hi again; thank you for your comments !
>
> this touches to the core of DEP 12.  I really do not want to invent yet another
> ontology.  On the other hand, it looks like the only way to formally declare
> relations to other ontologies is to use formats that I would not expect most
> package maintainers to adopt and write by hand without template, like RDF in
> XML, Turtle, N-triples, etc.
>
> So my goal with DEP 12 is to work around this problem by moving these relations
> in the DEP 12 spec.  For instance, the Name and Homepage fields follow DOAP
> (http://usefulinc.com/doap/).  The Reference field's subfields follow BibTeX
> (http://www.bibtex.org/Format) , etc.  If somebody writes a converter from YAML
> to a popular semantic web format, and this gets used, we win.  If this is
> forked to bootstrap a successful cross-distro project, we win.   But I do not
> think that we can start with a complex format.
>
> So what I would be exited to see happen, would be that for other fields than
> Reference and the trivial overlaps with DOAP, people would propose other
> bridges to other ontologies, or, recognising a need existing in Debian (like
> the Donation field), would propose the addition of this kind of field to an
> existing ontology and report the result.
>
> In summary, I would consider DEP 12 completed when a reasonnable number
> of fields listed in http://wiki.debian.org/UpstreamMetadata#Fields can
> be mapped to well-established ontologies.
>

I'd personally advocate the use of *standards*, and in particular the
Turtle representation of RDF [5].

I think Turtle is quite easy to write (and read) by humans, more or less
as much as YAML or JSON.

In addition, it allows to integrate natively in the Semantic Web
landscape, if the Linked Data approach [0] is chosen, i.e. using URIs for
naming things.

This would allow *interlinking* these meta-data about packages in
Debian, or about the upstream programs, with plenty of other Semantic
Web resources natively.

For instance, the PTS is already producing RDF meta-data [1] (not yet as
Turtle, but I'm working on it, unfortunately a bit too slowly [2],
still, rapper converts it quite well... see example below). 
So the URIs used to describe packages could be the same, in the DEP-12
related "upstream" meta-data description and in the PTS' RDF files,
allowing navigation from one to the other, in order to get a
comprehensive description of one package.

DOAP has been mentioned, and the PTS produces meta-data reusing DOAP,
since the ADMS.SW ontology is used, so interlinking with upstream
project descriptions available as DOAP on upstream sites is "native"
(see a discussion in [3], [4]).

On the other hand, these meta-data would be available to upstreams and
other distributions to reuse/consume/extend/interlink provided that
these DEP-12 meta-data documents would live on the Web, at the very URLs
of the URIs contained in them (and served by content-negociation, again,
a Linked Data pattern that is quite common).

So, I'd plea so that we don't reinvent another ontology, and choose a
standard format like Turtle, which brings natively interoperable and
semantic description for such meta-data.


Example of Turtle description of the umegaya source package found in the
PTS (slightly reformated for readability, mainly reordering of lines):

$ rapper -o turtle http://packages.qa.debian.org/u/umegaya.rdf

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix admssw: <http://purl.org/adms/sw/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix schema: <http://schema.org/> .
@prefix spdx: <http://www.spdx.org/rdf/terms#> .
@prefix str: <http://exslt.org/strings> .

<http://packages.qa.debian.org/u/umegaya.rdf>
    a foaf:Document ;
    foaf:primaryTopic <http://packages.qa.debian.org/umegaya> .

<http://packages.qa.debian.org/umegaya>
    a admssw:SoftwareProject ;
    doap:name "umegaya" ;
    doap:description "Debian umegaya source packaging" ;
    doap:homepage <http://packages.debian.org/src:umegaya> ;
    doap:release <http://packages.qa.debian.org/umegaya#umegaya_0.12> ;
    schema:contributor [
        a foaf:OnlineAccount ;
        foaf:accountName "Charles Plessy" ;
        foaf:accountServiceHomepage <http://qa.debian.org/developer.php?login=plessy@debian.org>
    ] .

<http://packages.qa.debian.org/umegaya#umegaya_0.12>
    a admssw:SoftwareRelease ;
    rdfs:label "umegaya 0.12" ;
    doap:revision "0.12" ;
    dcterms:description "Debian umegaya source package version 0.12" ;
    admssw:project <http://packages.qa.debian.org/umegaya> ;
    admssw:package <http://packages.qa.debian.org/umegaya#umegaya_0.12.dsc>, <http://packages.qa.debian.org/umegaya#umegaya_0.12.tar.gz> ;
    dcterms:relation <https://launchpad.net/ubuntu/+source/umegaya/0.12> .

[...]

So, a DEP-12 file like upstream.ttl could contain :

<http://packages.qa.debian.org/umegaya#usptream-meta-data>
    a dep12:UpstreamMetadata ;
    dep12:sourcePackage <http://packages.qa.debian.org/umegaya> ;
    dep12:publication <http://example.com/bibloentry/123> .

for instance, if the goal is to relate the paper
<http://example.com/bibloentry/123> to the umegaya source package (where
http://example.com/bibloentry/123 would ideally contain bibliographic
meta-data as RDF of some sort) ...


Hope this makes sense, and welcome to the Semantic Web ;)

Best regards,

[0] http://linkeddata.org/
[1] http://packages.qa.debian.org/common/RDF.html, http://wiki.debian.org/qa.debian.org/pts/RdfInterface
[2] http://anonscm.debian.org/gitweb/?p=users/obergix/qa.git;a=shortlog;h=refs/heads/turtle
[3] http://www-public.telecom-sudparis.eu/~berger_o/presentation-MiniDebconf-Paris-2012.pdf
[4] http://www-public.it-sudparis.eu/~berger_o/papier-swse2012.old/
[5] http://www.w3.org/TR/turtle/
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)


Reply to: