Units of measure and property chaining
We're long overdue for standard URIs for units of measure in the Semantic Web.
The SUMO stuff has a nice browser (e.g. see meter), a nice mapping from wordnet, and nice licensing terms. Of course, it's not RDF-native. In particular, it uses n-ary relations in the form of functions of more than one argument; 1 hour is written (&%MeasureFn 1 &%HourDuration). I might be willing to work out a mapping for that, but other details in the KIF source bother me a bit: a month is modelled conservatively as something between 28 and 31 days, but a year is exactly 365 days, despite leap-years. Go figure.
There's a nice Units in MathML note from November 2003, but all the URIs are incomplete, e.g. http://.../units/yard .
The Sep 2006 OWL Time Working Draft has full URIs such as http://www.w3.org/2006/time#seconds, but its approach to n-ary relations is unsound, as I pointed out in a Jun 2006 comment.
Tim sketched the Interpretation Properties idiom back in 1998; I don't suppose it fits in OWL-DL, but it appeals to me quite a bit as an approach to units of measure. He just recently fleshed out some details in http://www.w3.org/2007/ont/unit. Units of measure are modelled as properties that relate quantities to magnitudes; for example:
track length [ un:mile 0.25].
This Interpretation Properties approach allows us to model composition of units in the natural way:
W is o2:chain of (A V).
where o2:chain is like property chaining in OWL 1.1 (we hope).
Likewise, inverse units are modelled as inverse properties:
s a Unit; rdfs:label "s". hz rdfs:label "Hz"; owl:inverseOf s.
Finally, scalar conversions are modelled using product; for example, mile is defined in terms of meter like so:
(m 0.0254) product inch. (inch 12) product foot. (foot 3) product yard. (yard 22) product chain. (chain 10) product furlong. (furlong 8)product mile.
I supplemented his ontology with some test/example cases, unit_ex.n3 and then added a few rules to flesh out the modelling. These rules converts between meters and miles:
# numeric multiplication associates with unit multiplication { (?U1 ?S1) un:product ?U2. (?U2 ?S2) un:product ?U3. (?S1 ?S2) math:product ?S3 } => { (?U1 ?S3) un:product ?U3 } # scalar conversions between units { ?X ?UNIT ?V. (?BASE ?CONVERSION) un:product ?UNIT. (?V ?CONVERSION) math:product ?V2. } => { ?X ?BASE ?V2 }.
Put them together and out comes:
ex:track ex:length [ :chain 20.0; :foot 1320.0; :furlong 2.0; :inch 15840.0; :m 402.336; :mile 0.25; :yard 440.0 ] .
The rules I wrote for pushing conversion factors into chains isn't fully general, but it works in cases like converting from this:
(un:foot un:hz) o2:chain fps. bullet speed [ fps 4000 ].
to this:
ex:bullet ex:speed [ ex:fps 4000; :mps 1219.2 ] .
As I say, I find this approach quite appealing. I hope to discuss it with people working on units of measure in development of a Delivery Context Ontology.