• Michael DeBellis

A Simple Measurement Vocabulary

In recent work I've been doing I've noticed a common problem is how to define measurements such as "3 kilometers" or "40 miles per hour". There are some sophisticated vocabularies out there that address this problem. However, for some projects what is required isn't a huge vocabulary that can address every possible use case but a small and simple vocabulary to address the majority of them. The ontology I've created here is an attempt to fill that niche.

There are two top level classes: Measurement and Unit. The Unit class has subclasses: DistanceUnit, TimeUnit, and WeightUnit. The instances of Unit are individuals such as Mile, Hour, and Kilogram. Of course this can easily be extended with for example currency units such as Dollars. The Measurement class has subclasses SingleUnitMeasurement, DoubleUnitMeasurement, and TripleUnitMeasurement for measurements in one, two and three dimensions respectively. E.g., instances of SingleUnitMeasurement are Miles10, Hours1, and Kilograms20. Example instances of DoubleUnitMeasurement and TripleUnitMeasurement are Mph20 (speed) and Kpsps10 (acceleration). I put the number after the name of each individual so that in a list of individuals all measurements with the same units will be viewed together.

The Measurement class has two data properties: hasMeasuredValue is an xsd:decimal with the actual value and measuredAtTime is an xsd:dateTime that optionally records the time the measurement was taken. The object properties are hasUnit1, hasUnit2, and hasUnit3 which define the Unit for each Measurement. The other properties are greaterThan, lessThan, greaterThanOrEqualTo, equalTo, etc. These define an order for Measurement individuals that have the same number of dimensions and kind of units. The equalTo property is of course symmetric (each Measurement is equalTo itself) and the greaterThan and lessThan properties are inverses and transitive. Because the properties are transitive it is only required to define an order in one direction and the inverse property will automatically be inferred.

I have also defined some transformation rules that convert between different units. The two that I have in the current version are transformations between Kilometers and Miles and between kph and mph. I think it would be very straight forward for users to follow the pattern of the existing rules (starting by cloning the relevant rule in the SWRLTab) to add new units and new transformations.

One of the drawbacks of this version is that many transformation rules are required. I have an idea for a revised design that will reduce the required number of transformations but I'm not sure if/when I will implement that and I think the current version might be useful to others as it is. I hope people find some value from it. As always please feel free to contact me with comments or questions: SimpleMeasurementVocabularyV1.owl

Recent Posts

See All

©2019 by Michael DeBellis. Proudly created with Wix.com