W3C home > Mailing lists > Public > semantic-web@w3.org > March 2005

RE: true/false in RDF?

From: Joshua Allen <joshuaa@microsoft.com>
Date: Wed, 16 Mar 2005 09:16:34 -0800
Message-ID: <0E36FD96D96FCA4AA8E8F2D199320E5204883721@RED-MSG-43.redmond.corp.microsoft.com>
To: "Jeremy Wong" <wong@miko.com.hk>, <semantic-web@w3.org>
You are just giving me the textbook argument for why XSD typed literals are good for XML.  Considering that I owned Microsoft’s design of the strongly-typed XML parsing APIs which expose XSD typed literals for millions of developers, I think I understand the value of XSD typed literals for XML.

 

However, I am increasingly feeling that it’s shallow and naïve to extrapolate this “good idea” to RDF object values, especially in something such as Boolean which has actual semantic value.  Don’t change the subject and give me a speech about other literal types; let’s just talk about Boolean.  What the heck do I gain by using a typed literal?  As far as I can tell, I just make the architecture more complex, force myself to add another layer of indirection to get at semantics which should be embedded in the word itself, and condemn myself to a nightmare of ontological hell where my system will never work without n layers of inference.  That seems dumb.

 

________________________________

From: Jeremy Wong [mailto:jeremy@miko.hk] 
Sent: Monday, March 14, 2005 6:16 PM
To: Joshua Allen; semantic-web@w3.org
Subject: Re: true/false in RDF?

 

Yes, we can define the range of a property (the value space for the predicate) for both object value and data value. What's more is that you need to explicitly define the class and its extension as for the object value.

 

Datatype other than those from XML Schema and XMLLiteral are implementation dependent [http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#dfn-typed-literal]. Certainly contents provider can use their own datatypes, but it loses the audience of some other implementations.

 

I agree with you that the simple implementation I described is poor. Any better implementation of owl:sameAs do you suggest?

 

Datatypes provide a hint the way to process the lexical values. In addition to data validation, it determines whether the processing software is able to understand and to handle it. For example, we need transformation to xsd:hexBinary data and to xsd:base64Binary data. Declaring a literal, e.g. "123", with the datatype xsd:string means that we cannot perform mathematical operation on it. Using the datatype xsd:double means that it may be an approximate value,  because the precision of IEEE754 floating point number is limited. From one view datatype is to confine the computational space.

 

 

Jeremy

	----- Original Message ----- 

	寄件者: Joshua Allen <mailto:joshuaa@microsoft.com>  

	收件者: Jeremy Wong <mailto:wong@miko.com.hk>  ; semantic-web@w3.org <mailto:semantic-web@w3.org>  

	傳送日期: Tuesday, 15 March, 2005 1:05

	主旨: RE: true/false in RDF?

	 

	No, this is not the case.  You can define a value space for the predicate regardless of whether the value is literal or URI.

	 

	Furthermore, the problem of owl:sameAs applies equally to your example.  There is nothing stopping someone from declaring a new RDFS literal type that does literal “true” and “false”, and you would be forced to infer.  Besides, it’s not too smart to design your data based on a hypothetically poor implementation.

	 

	IMO, the idea of a “predefined value space” is antithetical to semantic web.  It is useful for prepopulating forms, doing data entry validations, and so on – but these are all *local* and should not be propagated to the web as a whole.  It destroys breadth-scale interop, and means that the only people who interop are people who share the exact same RDFS schema.  Suddenly RDF becomes no better than CORBA or XSD.

	 

	
________________________________


	From: Jeremy Wong [mailto:jeremy@miko.hk] 
	Sent: Sunday, March 13, 2005 10:11 PM
	To: Joshua Allen; semantic-web@w3.org
	Subject: Re: true/false in RDF?

	 

	In my opinion, the advantage of using typed literal is its predefined value-space which is better known. If you use an object value, you'll need to define its class extension, i.e. the value space. Other people need to learn your object value.

	 

	Since many content provider may use a boolean value, using an object value rather than a data value may induce performance problem. Consider if there are some resources having the same meaning as your true object, "http://xmlns.com/wordnet/1.6/true", then we shall have some owl:sameAs statements...

	 

	R1 owl:sameAs http://xmlns.com/wordnet/1.6/true


	R2 owl:sameAs http://xmlns.com/wordnet/1.6/true


	...

	Rn owl:sameAs http://xmlns.com/wordnet/1.6/true


	 

	A simple implementation of owl:sameAs inference is to duplicate statements, i.e. if we have one statement..

	 

	http://foobar/page.html P1 http://xmlns.com/wordnet/1.6/true


	 

	Then n more statements will be generated...

	 

	http://foobar/page.html P1 R1

	http://foobar/page.html P1 R2

	...

	http://foobar/page.html P1 Rn

	 

	It would consume very huge memory space and even computation power. The rate of expansion is about n^2.

	 

	 

	Jeremy

	 

	----- Original Message ----- 

		寄件者: Joshua Allen <mailto:joshuaa@microsoft.com>  

		收件者: Jeremy Wong <mailto:jeremy@miko.hk>  ; semantic-web@w3.org 

		傳送日期: Monday, 14 March, 2005 13:48

		主旨: RE: true/false in RDF?

		 

		Yeah, that’s what I intended to express with my first example – if you use a literal, the literal is absolutely meaningless without type information.

		 

		Why not just use URIs which mean “true” and “false” and do away with typing?  The only advantages I can see for typing are imaginary (compile time/run-time checks?!?!) and the disadvantage is real.

		 

		
________________________________


		From: Jeremy Wong [mailto:jeremy@miko.hk] 
		Sent: Sunday, March 13, 2005 9:35 PM
		To: Joshua Allen; semantic-web@w3.org
		Subject: Re: true/false in RDF?

		 

		I am not too familar with N3 notation about datatype, therefore I provide my example in RDF/XML

		 

		<rdf:Description rdf:about="http://foobar/page.html <http://foobar/page.html> " xmlns:myterms="urn:myterms">

		  <myterms:isCached rdf:datatype="http://www.w3.org/TR/XMLSchema#boolean <http://www.w3.org/TR/XMLSchema#boolean> ">true</myterms:isCached>

		</rdf:Description>

		 

		We have typed literal already. Why do you still consider object value?

		 

		 

		Jeremy

			----- Original Message ----- 

			From: Joshua Allen <mailto:joshuaa@microsoft.com>  

			To: semantic-web@w3.org 

			Sent: Monday, March 14, 2005 12:16 PM

			Subject: true/false in RDF?

			 

			I’ve decided that I want to use URI object values for my Boolean triples, rather than the literals “true/false”.  In other words, instead of:

			 

			http://foobar/page.html <http://foobar/page.html>   urn:myterms:isCached   “true”

			 

			I want to use:

			 

			http://foobar/page.html <http://foobar/page.html>   urn:myterms:isCached   http://xmlns.com/wordnet/1.6/true <http://xmlns.com/wordnet/1.6/true> 

			 

			I can find zero examples of the latter; only the former.  But I think the latter is right.  Why am I wrong?

Received on Wednesday, 16 March 2005 17:17:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:45 UTC