Simplifying things

6 views
Skip to first unread message

Toby Inkster

unread,
Jan 8, 2010, 7:12:19 PM1/8/10
to baetle
Most of the proposals I've seen around this work seem to be horrifically
overcomplicated.

In particular, BOM suffers from what I think is a terrible antipattern:
it includes inverse properties for every relationship in the ontology.
This instantly complicates any processing you want to do with the data.
SPARQL queries become monstrous as you need to check for relationships
in each direction -- and then maybe filter out duplicates if the
relationship was described in both directions in the data!

Another thing I've come to loathe is properties named "isFooOf" and
"hasBar". They just look awful in N3. What does this mean for example?

{ <foo> is ex:isWifeOf of <bar> ; is ex:hasChild of <baz> . }

So I've put together a simple vocab for describing software bugs in RDF:

http://ontologi.es/doap-bugs#

Where possible, I've included rdfs:subPropertyOf/subClassOf links in to
BOM, but the aim when using doap-bugs is not to mix and match it with
BOM.

My motivation in doing this was to expand on a vocab I put together
earlier in the day for software change logs:

http://ontologi.es/doap-changeset#

The dcs:fixes property acts as a link between them, with a domain of
dcs:Bugfix and a range of dbug:Issue. The DOAP Change Sets vocab is used
by this Perl module:

http://search.cpan.org/dist/Module-Install-DOAPChangeSets/

Which can be plugged into the Perl packaging system to create pretty
human-readable change logs from RDF. Here's an example of the way it
might be used:

http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/Changes.ttl

And the human-readable changelog produced:

http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/Changes

--
Toby A Inkster
<mailto:ma...@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Jonas Tappolet

unread,
Jan 12, 2010, 8:03:37 AM1/12/10
to bae...@googlegroups.com
Hi Toby

Some thoughts to your inputs:

In particular, BOM suffers from what I think is a terrible antipattern:
it includes inverse properties for every relationship in the ontology.
This instantly complicates any processing you want to do with the data.
SPARQL queries become monstrous as you need to check for relationships
in each direction -- and then maybe filter out duplicates if the
relationship was described in both directions in the data!


I agree with you that this can be cumbersome if you don't use any kind of inference or reasoning support.
But the advantage of creating inverse relations in the ontology is that you can state in the data:

subj hasFoo obj

_OR_

obj isFooOf subj

Based on the definitions from the ontology, a reasoner can complete the inverse definition which allows you to either use hasFoo or isFooOf in your triple pattern in the query. These patterns get matched to both the "normal" and inverse expression in the data. What you mentioned with the monstrous SPARQL queries describes "manual" inference using SPARQL. This is definitely not recommended.

 

Another thing I've come to loathe is properties named "isFooOf" and
"hasBar". They just look awful in N3. What does this mean for example?

       { <foo> is ex:isWifeOf of <bar> ; is ex:hasChild of <baz> . }



I was not aware of this notation. I thought you would rather write

{<foo> ex:isWifeOf <bar>; exHasChild <baz> .}

Then the is...Of and has... makes sense im my opinion.


Where possible, I've included rdfs:subPropertyOf/subClassOf links in to
BOM, but the aim when using doap-bugs is not to mix and match it with
BOM.

I think its a great idea that you referenced bom in your ontology. That way, similar / same data is logically connected.


Best
Jonas





Toby Inkster

unread,
Jan 12, 2010, 8:39:32 AM1/12/10
to bae...@googlegroups.com
On Tue, 2010-01-12 at 14:03 +0100, Jonas Tappolet wrote:
> But the advantage of creating inverse relations in the ontology is
> that you can state in the data:
>
> subj hasFoo obj
> _OR_
> obj isFooOf subj

I would say that the fact you can state the same thing in two different
ways here is a disadvantage rather than an advantage. For authors, it
doubles the number of properties in the vocab, making it harder to
learn. For consumers, it complicates things even more. If there are n
facts that to be been stated, there are n^2 ways of stating them.

> Based on the definitions from the ontology, a reasoner can complete
> the inverse definition which allows you to either use hasFoo or
> isFooOf in your triple pattern in the query.

Indeed, but most RDF tools do not have built-in support OWL reasoning.

See also <http://dig.csail.mit.edu/breadcrumbs/node/72>.

Henry Story

unread,
Jan 12, 2010, 8:53:28 AM1/12/10
to bae...@googlegroups.com

On 12 Jan 2010, at 14:39, Toby Inkster wrote:

> On Tue, 2010-01-12 at 14:03 +0100, Jonas Tappolet wrote:
>> But the advantage of creating inverse relations in the ontology is
>> that you can state in the data:
>>
>> subj hasFoo obj
>> _OR_
>> obj isFooOf subj
>
> I would say that the fact you can state the same thing in two different
> ways here is a disadvantage rather than an advantage. For authors, it
> doubles the number of properties in the vocab, making it harder to
> learn. For consumers, it complicates things even more. If there are n
> facts that to be been stated, there are n^2 ways of stating them.

I agree. On should have one relation be named only. With N3 and RDFa it is now possible to take the inverse of any relation. It is just a matter of time before we get a better rdf/xml to allow us to do the same thing there. (though it is not really important there, as very few people read or write rdf/xml by hand)


>
>> Based on the definitions from the ontology, a reasoner can complete
>> the inverse definition which allows you to either use hasFoo or
>> isFooOf in your triple pattern in the query.
>
> Indeed, but most RDF tools do not have built-in support OWL reasoning.
>
> See also <http://dig.csail.mit.edu/breadcrumbs/node/72>.

I like the idea of having a bnode property for the inverse, with a label!

Henry

Henry Story

unread,
Jan 12, 2010, 8:59:26 AM1/12/10
to bae...@googlegroups.com

On 9 Jan 2010, at 01:12, Toby Inkster wrote:

> So I've put together a simple vocab for describing software bugs in RDF:
>
> http://ontologi.es/doap-bugs#


$ cwm http://ontologi.es/doap-bugs
#Processed by Id: cwm.py,v 1.197 2007/12/13 15:38:39 syosi Exp
# using base http://ontologi.es/doap-bugs
http://ontologi.es/doap-bugs
Traceback (most recent call last):
File "/Users/hjs/Programming/w3.org/2000/10/swap/cwm.py", line 750, in <module>
doCommand()
File "/Users/hjs/Programming/w3.org/2000/10/swap/cwm.py", line 455, in doCommand
why=myReason)
File "/Users/hjs/Programming/w3.org/2000/10/swap/webAccess.py", line 178, in load
raise DocumentAccessError(addr, sys.exc_info() )
swap.webAccess.DocumentAccessError: Unable to access document <http://ontologi.es/doap-bugs>, because:
HTTP Error 406: Not Acceptable

Not sure if this is a bug in cwm...

Toby Inkster

unread,
Jan 12, 2010, 5:51:33 PM1/12/10
to bae...@googlegroups.com
On Tue, 2010-01-12 at 14:59 +0100, Henry Story wrote:
> Not sure if this is a bug in cwm...

cwm sends:

Accept: application/rdf+xml, text/rdf+n3,
application/sparql-results+xml

The server only offers "text/n3". Given the many different media types
Turtle and N3 are sent under, not sure of the best way to approach this.
Does anyone know if Apache can be easily configured to treat different
media types as equivalent?

I tend to use "text/n3" and "text/turtle" as per:

http://www.w3.org/2008/01/rdf-media-types

Olivier Berger

unread,
Jan 13, 2010, 4:49:35 AM1/13/10
to Toby Inkster, bae...@googlegroups.com
Hi.

Le samedi 09 janvier 2010 à 00:12 +0000, Toby Inkster a écrit :

> My motivation in doing this was to expand on a vocab I put together
> earlier in the day for software change logs:
>
> http://ontologi.es/doap-changeset#
>
> The dcs:fixes property acts as a link between them, with a domain of
> dcs:Bugfix and a range of dbug:Issue. The DOAP Change Sets vocab is used
> by this Perl module:
>
> http://search.cpan.org/dist/Module-Install-DOAPChangeSets/
>
> Which can be plugged into the Perl packaging system to create pretty
> human-readable change logs from RDF. Here's an example of the way it
> might be used:
>
> http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/Changes.ttl
>
> And the human-readable changelog produced:
>
> http://goddamn.co.uk/viewvc/perlmods/Module-Install-DOAPChangeSets/Changes
>

This looks great.

I think a similar approach could be applied for instance to Debian
package changelogs which have pretty stable rules to express bugs fixed
by source package uploads.

Keep us eventually posted of further adoption of your ontology and
tools.

Best regards,
--
Olivier BERGER <olivier...@it-sudparis.eu>
http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 1024D/6B829EEC
Ingénieur Recherche - Dept INF
Institut TELECOM, SudParis (http://www.it-sudparis.eu/), Evry (France)

Henry Story

unread,
Jan 19, 2010, 5:22:03 AM1/19/10
to public-...@w3.org, bae...@googlegroups.com

On 12 Jan 2010, at 22:51, Toby Inkster wrote:

> On Tue, 2010-01-12 at 14:59 +0100, Henry Story wrote:
>> Not sure if this is a bug in cwm...
>
> cwm sends:
>
> Accept: application/rdf+xml, text/rdf+n3,
> application/sparql-results+xml
>
> The server only offers "text/n3". Given the many different media types
> Turtle and N3 are sent under, not sure of the best way to approach this.
> Does anyone know if Apache can be easily configured to treat different
> media types as equivalent?
>
> I tend to use "text/n3" and "text/turtle" as per:
>
> http://www.w3.org/2008/01/rdf-media-types


You are right. The default on the W3 CVS seems to be to serve this up in text/n3

$ curl -I http://www.w3.org/ns/auth/cert.n3
HTTP/1.1 200 OK
Date: Tue, 19 Jan 2010 09:24:04 GMT
Server: Apache/2
Last-Modified: Tue, 19 Jan 2010 09:03:42 GMT
ETag: "1c66-47d80bf15b780"
Accept-Ranges: bytes
Content-Length: 7270
Cache-Control: max-age=21600
Expires: Tue, 19 Jan 2010 15:24:04 GMT
P3P: policyref="http://www.w3.org/2001/05/P3P/p3p.xml"
Connection: close
Content-Type: text/n3; qs=0.89


and running

cwm http://bblfish.net/people/henry/card.n3

does indeed produce the following request

GET /people/henry/card.n3 HTTP/1.1
Accept-Encoding: identity
Host: bblfish.net
Connection: close
Accept: text/rdf+n3,application/rdf+xml
User-Agent: Python-urllib/2.6


>
> --
> Toby A Inkster
> <mailto:ma...@tobyinkster.co.uk>
> <http://tobyinkster.co.uk>

> --
> You received this message because you are subscribed to the Google Groups "baetle" group.
> To post to this group, send email to bae...@googlegroups.com.
> To unsubscribe from this group, send email to baetle+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/baetle?hl=en.
>
>

Tim Berners-Lee

unread,
Jan 25, 2010, 11:34:50 AM1/25/10
to Henry Story, public-...@w3.org, bae...@googlegroups.com
I have changed the cwm source but can't check it in just now.
If I remember I will update the CVS repo.
I'm not sure about doing a release, haven't done one for a while.

Tim

Reply all
Reply to author
Forward
0 new messages