W3C home > Mailing lists > Public > semantic-web@w3.org > July 2010

Re: Subjects as Literals

From: Sandro Hawke <sandro@w3.org>
Date: Thu, 01 Jul 2010 01:25:00 -0700
To: Pat Hayes <phayes@ihmc.us>
Cc: Ross Singer <rossfsinger@gmail.com>, Hugh Glaser <hg@ecs.soton.ac.uk>, Robert Sanderson <azaroth42@gmail.com>, Linked Data community <public-lod@w3.org>, Semantic Web <semantic-web@w3.org>
Message-ID: <1277972700.2036.619.camel@waldron>
On Wed, 2010-06-30 at 22:14 -0500, Pat Hayes wrote:
> On Jun 30, 2010, at 8:14 PM, Ross Singer wrote:
> 
> > I suppose my questions here would be:
> >
> > 1) What's the use case of a literal as subject statement (besides
> > being an academic exercise)?
> 
> A few off the top of my head.
> 
> 1. Titles of books, music and other works might have properties such  
> as the date they were registered, who owns them, etc..
> 2. Dates may have significant properties such as being the day that  
> someone was shot or when war broke out.
> 3. Dates represented as character strings in some known date format  
> other than XSD can be asserted to be the same as a 'real' date by  
> writing things like
> 
> "01-02-1481" sameDateAs "01022010"^^xsd:date .
> "01-02-1481" isDateIn :MuslimCalendar .
> 
> I am sure that you can think of many more. In general, allowing  
> strings as subjects opens the door to a wide range of uses of RDF to  
> 'attach'  information to pieces of text. Another example which occurs  
> to me: this piece of text is the French translation of that piece of  
> text, expressed as a single RDF triple with two literals.
> 
> 4. It has been noted that one can map datatyping into RDF itself by  
> treating the datatypes as properties, and there are several use cases  
> for this. The natural way to do it involves having literals as  
> subject, since the dataype map goes from the string to the value:
> 
> "23" xsd:number "23"^^xsd:number .
> 
> 5. Also, allowing this "purely academically" has the notable advantage  
> of simplifying RDF(S) inferencing, including making the forward- 
> chaining rules simpler. Right now, there is a strange oddity involving  
> blank node instantiations. One can say things like 'the number of my  
> children is prime" by using an blank node:
> 
> :PatHayes hasNumberOfKids _:x .
> _:x :a :PrimeNumber .
> 
> But this legal RDF can't be instantiated in the obvious way:
> 
> :PatHayes hasNumberOfKids "3"^^xsd:number .
> "3"^^xsd:number :a "PrimeNumber .   XXXX
> 
> This trips up RDFS reasoners, which can often produce inferences by a  
> kind of sneaky use-a-bnode-instead maneuver even when the obvious  
> conclusion cannot be stated because of the restriction. (There are a  
> few examples in the RDF semantics document.) Removing the restriction  
> would enable reasoners to work more efficiently with a smaller set of  
> rules. (I gather that at least some of the RDFS rule engines out there  
> already do this, internally.)
> 
> > 2) Does literal as subject make sense in "linked data" (I ask mainly
> > from a "follow your nose" perspective) if blank nodes are considered
> > controversial?
> 
> Seems to me that from the linked data POV, anything that can be an  
> object should also be useable as a subject. Of course, that does allow  
> for the view that both of them should only ever be IRIs, I guess.

Thanks for the good use cases.

So, in my brief unofficial workshop report [1] I kind of oversimplified
(lied) about one thing.  In general, topics were included because they
had considerable support present at the workshop.  But not
Literals-as-Subject; it was included because TimBL said it was important
to him.  That means, however, it had no advocate in the room, so perhaps
it's no great surprise it ended at the bottom.   Fortunately, the
workshop is not the final arbiter here.

I think perhaps the biggest reason against Literals-as-Subject is this
RDF/XML concern.  To be clear, yes, RDF/XML is already unable to
serialize some graphs, but this would make the matter much worse.  It
would make RDF/XML be much more clearly a second-class serialization,
and several people expressed concerns that relegating RDF/XML to such a
position was not a good idea.

People also expressed (to my surprise) willingness to make small,
backward compatible changes to RDF/XML, if necessary to keep up with
changes in the model.  This was clear for "Add Graphs to RDF/XML" which
was 8th on the list, the first that didn't have tons of support, but was
still largely desired.

I think support for literals-as-subject could be added to RDF/XML in a
pretty okay way.   Something like a special property, rdf:aboutLiteral:

  <ns:PrimeNumber>
     <rdf:aboutLiteral rdf:datatype="&xs;int">3</rdf:aboutLiteral>
  </ns:PrimeNumber>

In v1 parsers, it might generate an RDF namespace warning and it would
generate reasonable but not-quite-right triples: { _:x a ns:PrimeNumber;
_:x rdf:aboutLiteral 3}.  V2 parsers would generate the intended { 3 a
ns:PrimeNumber } triple.

(Opinion, Jeremy?  *If* we end up doing a v2 for graph naming, the
economic cost of also doing this becomes quite small.)

There's also a school of opposition here which is about aligning RDF
subjects with Object-Oriented Programming's objects.  For that school,
literals as subjects could be a real problem.   But I'm not sure anyone
takes that school very seriously now, so I'll let someone stand up and
argue that position if they want, rather than trying to do it for them.

    -- Sandro

[1] http://www.w3.org/2010/06/rdf-work-items/table
Received on Thursday, 1 July 2010 08:25:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:42:20 UTC