Re: ontology for units of measurement and/or physical quantities

While
       box1  exterms:mass  [ex:value  2.4; exterms:units  
exunits:kilograms] .

  might seem like a straightforward way, it turns out it is a trap!

Presumably this one could write too

       box1 exterms:mass  [ex:value  2.4; exterms:units  
exunits:kilograms] ;
	   exterms:mass  [ex:value  2400.0; exterms:units exunits:grams] .

You would expect mass to be a functional property, to the two Bnodes  
must
be owl:sameAs each other, so we can conclude that the masses are the  
same:

       box1 exterms:mass  [
			ex:value  2.4;
			exterms:units exunits:kilograms;
	   		ex:value  2400.0;
			exterms:units exunits:grams]

bzzzt! tilt! that means we have a mass with two values and two units.
What's wrong with this picture?:

       box1 exterms:mass  [
			ex:value  2.4, 2400.0;
			exterms:units exunits:kilograms, exunits:grams]

A much *better way* is to use the unit as a connecting predicate.

       box1  exterms:mass   [ exunits:kilograms 2.4 ].

You can then write quite validly

       box1  exterms:mass   [ exunits:grams 2400.0;   
exunits:kilograms 2.4   ].

This takes less space and can be easily manipulated, and doesn't  
throw up
horrible errors.

A unit kg is the relationship between 3kg and 3.
Presumably also the relationship between 3 and 3[kg^-1] but that is  
another story.

It works out nicely with path syntax in N3,  ! for forward and ^ for  
backward,

    box1!exterms:mass!exunits:kilograms        is the mass in kg  [ie  
a number]

and     2.4^exunits:kg                   is a mass.

Tim

See http://www.w3.org/DesignIssues/InterpretationProperties.html for  
some 6 year old ramblings on similar properties for datatypes and  
languages.

  Also http://ksl.stanford.edu/knowledge-sharing/papers/engmath.html  
which notes "To reuse a simple example: 3 feet and 1 yard are equal,  
yet the tuples <3,ft> and <1,yd> are not.".

[Notice a similarity between 2.4^exunits:kg and   
"2.4"^^integer?  .... hmmm funny that :-) ]


PPS: can't you even say, using units predicates as multiplication or  
division of scalar quantities

@prefix : <....exunits#>.
@keywords.

   box1  height	3 ^ m ;
     	speed   3 ^ m!s ;
     	acceleration 9.81 ^m!s!s .

On Sep 23, 2006, at 4:19, Danny Ayers wrote:

>
> Hi Robert,
>
> N-ary relations [1] seems like a straightforward way of representing
> values with units, there's an example in the Primer [2] (here as
> Turtle syntax, a bit clearer):
>
> exproduct:item10245   exterms:mass  [
>                 rdf:value        "2.4"^^xsd:decimal ;
>                 exterms:units    exunits:kilograms .
> ]
>
> Cheers,
> Danny.
>
> [1] http://www.w3.org/TR/swbp-n-aryRelations/
> [2] http://www.w3.org/TR/rdf-primer/#rdfvalue
>
> -- 
>
> http://dannyayers.com

Received on Thursday, 28 September 2006 21:06:26 UTC