HajoRijgersberg / OM

Ontology of units of Measure
89 stars 23 forks source link

Examples of use #7

Open nicholascar opened 6 years ago

nicholascar commented 6 years ago

Can some expected examples of use or, better, actual examples of use, be indicated from the ontology's website at http://www.ontology-of-units-of-measure.org/page/om-2?

Yes I realise this code repo lists some of those resources but it was hard to get here from the ontology online.

HajoRijgersberg commented 6 years ago

It's a good idea. The example that we now give with scales is already quite a complex example. Most use of OM will be with units, which is more simple so to speak. I'll come back to this. Such a diagram, by the way, is already in my thesis (https://www.cs.vu.nl/en/Images/H_Rijgersberg_21mei2013_tcm210-342356.pdf): Figure 3.2. UML class diagram of a measurement of the diameter of apple 1 in OM.

agneta20 commented 5 years ago

Hi I am trying to use 'hasUnit' as a predicate to define a unit. As it doesn't have a domain, is this the correct way to use it ?


:uri1 a ag:product;
rdfs:label "apples";
     om2:hasNumericValue 100 ;
     om2:hasUnit om2:kilogram.
HajoRijgersberg commented 5 years ago

Hi Agneta, In fact, everyone may use OM in the way one wishes to use it. It is possible to dot it in the way that you suggest. Normally, however, one would create an instance of the class 'Mass', e.g. called 'applesMass', with om:phenomenon the value 'apples' (ag:product, if I understand your example correctly). Subsequently, one will create an instance of the class 'Measure' to store the 100 kg in. This instance may e.g. be called '_100kg' (note that an id may not start with a number, for which reason I have added an underscore at the beginning). This measure will have the properties om:hasnumericalvalue with value 100 and om:hasUnit with the value om:kilogram, as in your example. Finally, 'appleMass' gets as om:hasValue the measure object '_100kg' (e.g. ag:_100kg).

Hope this helps! Please, let me know! :)

bhaugen commented 4 years ago

Registering my interest in examples so I might be notified in more appear...and helpful people link them to this issue...

HajoRijgersberg commented 4 years ago

This example might be useful to you: https://www.cs.vu.nl/en/Images/H_Rijgersberg_21mei2013_tcm210-342356.pdf

bhaugen commented 4 years ago

@HajoRijgersberg wrote:

This example might be useful to you: https://www.cs.vu.nl/en/Images/H_Rijgersberg_21mei2013_tcm210-342356.pdf

Yes, thanks, that paper had several good food-related examples, which is one of the domains we've worked in.

I also found some clear examples of OM vocabulary usage in https://github.com/agneta20/BONSAI-ontology-RDF-framework/tree/master/examples by following @agneta20 (thanks!)

Looks like OM is used by: https://bonsai.uno/ https://github.com/BONSAMURAIS/bonsai

Bonsai seems somewhat related to our vocabulary-in-process for economic networks: https://valueflo.ws/

We are thinking of replacing QUDT, which we have been using, with OM. And we create a lot of examples.

Who else is using OM, or should that be another issue? Do all the projects listed here use OM? http://www.foodvoc.org/resource/Valerie-9/EUProject

bhaugen commented 4 years ago

@HajoRijgersberg @agneta20 do you have a chat environment that you use for OM? Or do you mind chatty interactions in your github issues? We probably want to post some trial examples of our own use of OM for comments and suggestions for improvement.

HajoRijgersberg commented 4 years ago

Hi Bob, Sorry for my late response; very busy times. Thanks for the examples of projects you mentioned where OM is used. It is difficult to obtain such a (complete) list of projects. Indeed, it would be a good idea to make that a separate issue (i.e., who is using OM). Hopefully we will get a (more or less complete?) list then. No, we don't have a separate chat environment for OM, but as far as I'm concerned, this github site would be ideal for that! :) Thanks in advance for posting your trial examples, that would be great! Best, Hajo

fosterlynn commented 4 years ago

@HajoRijgersberg here is a simplified example from ValueFlows. We really appreciate your offer of feedback!

It's possibly not that different than the one posted above which you already answered. For a bit more context though, we already have constructs for the type of resource (like 'apples' in that example), and for the resource itself (like this barrel of apples). And we have the construct that relates that with the quantity, which in this example is the EconomicEvent. And although we will have engineering and possibly scientific use cases, we are dealing primarily with production and exchange.

Here's our proposed definition.

vf:resourceQuantity a       owl:ObjectProperty ;
        rdfs:domain         vf:EconomicEvent ;
        rdfs:range          om2:Measure .

Here's a couple usage examples, hope this format is clear enough.


  - '@id': mfg:9bd19194-a36d-4a1f-896b-8082887962cb
    '@type': EconomicEvent
    action: consume
    resourceInventoriedAs: mfg:6b5bc786-b9ed-4189-b34f-5ef7d10f1f86 # polymer stock
    resourceQuantity:
      om2:hasUnit: om2:kilogram
      om2:hasNumericalValue: 450

  - '@id': store:a8356625-bf64-4c16-9099-28aa1b718c4b
    '@type': EconomicEvent
    action: transfer
    resourceClassifiedAs: https://www.wikidata.org/wiki/Q47107 # bucket
    resourceQuantity:
      om2:hasUnit: om2:one
      om2:hasNumericalValue: 3

Besides general feedback you may have, this last one also illustrates a specific set of questions. Is the unit one the correct thing to use for a basic count of items of the same type? And if we decide that is not easy enough to understand by "business" people, what is the best way to handle that? Can we use another unit (one in another ontology or we define) like this? om2:hasUnit vf:each Or is there a better solution within OM?

HajoRijgersberg commented 4 years ago

Hi Lynn, Thanks for your issue and examples! :) In the way that you suggest, one can certainly use OM. Note however that, this way, you don't use the om:hasValue property, and you define (resource)quantity as a property of objects rather than that quantities are independent concepts having the particular objects as their phenomena. A consequence of this approach is, for example, that one can now not see that 450 kg relates to a mass (om:Mass is a subclass of om:Quantity). But that is not necessarily a problem; if this way of working is suitable for you, then that's fine. But I thought, I just let you know about these considerations. As to the one issue: indeed, that's the correct unit. As far as I know there are no other units for this purpose. Of course, you could define your own, like vf:each, for example as an instance of om:UnitOfMeasure. The point however, then is that other applications may not understand your new unit. But for your own application, that's not necessarily a problem. Hope these answers help? Please, let me know! :)

steveraysteveray commented 4 years ago

bhaugen:

We are thinking of replacing QUDT, which we have been using, with OM. And we create a lot of examples.

I do hope that you have checked back with the qudt.org website. There have been many changes and updates since the release of version 2.1.

bhaugen commented 4 years ago

@steveraysteveray

I do hope that you have checked back with the qudt.org website. There have been many changes and updates since the release of version 2.1.

Here's some of the discussion that led to looking at OM. https://github.com/valueflows/valueflows/issues/268

Assuming that we want to restart that discussion and that we have some questions for the qudt team, do you know if they have anything like a public issue list where we could engage in discussions like we can with OM? That has been one of the attractions here. All I found at qudt so far was an email address, which is not nothing, but also not as collaborative.

Note: I don't know if we want to restart that discussion now or not. It's one small - but important - part of a larger effort, and we have running software that is ready to test. In the future, I expect some convergence and standardization of the unit vocabularies.

HajoRijgersberg commented 4 years ago

Thanks for the interesting discussion. Perhaps the review of unit ontologies that Jan Martin Keil and Sirko Schindler of the University of Jena did is interesting to you: http://www.semantic-web-journal.net/system/files/swj1825.pdf.

steveraysteveray commented 4 years ago

Thanks, Hajo, Indeed, I was one of the reviewers of that paper, and mentioned that it was comparing release 1 of QUDT.

Steve

On Wed, Nov 6, 2019 at 11:59 AM Hajo Rijgersberg notifications@github.com wrote:

Thanks for the interesting discussion. Perhaps the review of unit ontologies that Jan Martin Keil and Sirko Schindler of the University of Jena did is interesting to you: http://www.semantic-web-journal.net/system/files/swj1825.pdf.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HajoRijgersberg/OM/issues/7?email_source=notifications&email_token=AAIT5TLU6NKO53DC6HSESRTQSMOZRA5CNFSM4FJEOZ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDHZTLA#issuecomment-550476204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIT5TKGWXF3OLAGK42AQ4LQSMOZRANCNFSM4FJEOZ3A .

HajoRijgersberg commented 4 years ago

OK, thanx, that's good to realize. A comparison with release 2 would be interesting.

HajoRijgersberg commented 4 years ago

Jan Martin (https://github.com/jmkeil), do you perhaps know more about comparison OM with release 2 of QUDT, or comparison of the releases 1 and 2 of QUDT?

HajoRijgersberg commented 4 years ago

By the way, I am adding more and more references, including use of OM, at the bottom of the main text of this github.

fosterlynn commented 4 years ago

Thanks for the interesting discussion. Perhaps the review of unit ontologies that Jan Martin Keil and Sirko Schindler of the University of Jena did is interesting to you

Thanks, yes that was one of the resources we used in making the decision, very helpful paper.

Btw, I just popped into the QUDT website to see if things on v2 had moved along, and I still see many pieces of the spec in QA, where they have been for a very long time, and which also influenced us.

But in any case, I think we are good with OM2 for now, and we expect to learn a lot from the current handful of projects implementing our vocabulary. And as @bhaugen said, we are hopeful for some convergence in the units at some point.

P.S. Thanks much @HajoRijgersberg for your responsiveness to our questions! And (understanding we are implementing a simplified version) if you want more from us in terms of examples or whatever for your purposes, we'd be happy to help, just let us know.

HajoRijgersberg commented 4 years ago

Thank you all for your kind words! :) I appreciate that a lot! Indeed, that's very good work of Jan Martin and Sirko. And thank you all for the (interesting!) discussion! Very happy to help. Lynn, if you could provide me a reference to your work with OM, e.g. a paper or a website, then I can add you to the references of use of OM on the main page! :)

fosterlynn commented 4 years ago

Lynn, if you could provide me a reference to your work with OM, e.g. a paper or a website, then I can add you to the references of use of OM on the main page!

Here is the main website: https://valueflo.ws. If you want more, let us know.... :)

[edit: Not sure what would talk more specifically about our use of OM...]

HajoRijgersberg commented 4 years ago

Thanx, I've added your reference to the list! :)

steveraysteveray commented 4 years ago

Bob, That's a good idea. We have resurrected our original public QUDT github repo to host github Issue discussions about QUDT. Please see https://github.com/qudt/qudt-public-repo There are no source files stored on this repo at present, since those are available at qudt.org. However, as you will see on the readme, we will be providing a dedicated server that will support SPARQL and GraphQL queries against the models in the future.

Steve

On Wed, Nov 6, 2019 at 10:27 AM Bob Haugen notifications@github.com wrote:

@steveraysteveray https://github.com/steveraysteveray

I do hope that you have checked back with the qudt.org website. There have been many changes and updates since the release of version 2.1.

Here's some of the discussion that led to looking at OM. valueflows/valueflows#268 https://github.com/valueflows/valueflows/issues/268

Assuming that we want to restart that discussion and that we have some questions for the qudt team, do you know if they have anything like a public issue list where we could engage in discussions like we can with OM? That has been one of the attractions here. All I found at qudt so far was an email address, which is not nothing, but also not as collaborative.

Note: I don't know if we want to restart that discussion now or not. It's one small - but important - part of a larger effort, and we have running software that is ready to test. In the future, I expect some convergence and standardization of the unit vocabularies.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HajoRijgersberg/OM/issues/7?email_source=notifications&email_token=AAIT5TKIFUAQGCBMIN7VOV3QSMEALA5CNFSM4FJEOZ3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDHQW7Y#issuecomment-550439807, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIT5TLEXO44OTK376DJJYDQSMEALANCNFSM4FJEOZ3A .

SirkoS commented 4 years ago

Jan Martin (https://github.com/jmkeil), do you perhaps know more about comparison OM with release 2 of QUDT, or comparison of the releases 1 and 2 of QUDT?

I know that @jmkeil is working on a more generalized version of our past comparison. He planned to redo the old comparison as a validation, which will then most likely also include QUDT2. However, I have no clue about any schedule for this.

HajoRijgersberg commented 4 years ago

Hi Sirko, Sorry for my late reply! Thanx for the attention; very interesting to see the eventual result. If you know more, or about the schedule, please let us know! :) Best, Hajo

jmkeil commented 4 years ago

I know that @jmkeil is working on a more generalized version of our past comparison. He planned to redo the old comparison as a validation, which will then most likely also include QUDT2. However, I have no clue about any schedule for this.

I hope to do that before end of February. I will keep you updated.

HajoRijgersberg commented 4 years ago

Thanks in advance, Jan Martin! :)

aanastasiou commented 4 years ago

@HajoRijgersberg Whether I make use of this or not, this is an incredible piece of work.

I find it interesting since it could allow me to capture a set of experiments. However, I have a number of features that are the result of computational processes that have names, very well mathematical definitions but no units.

If you know a number of other things, you can create a function that takes the value of the feature and embeds it in a scale. But until these other things are known, the value of the feature is just a number (with a name and a definition).

For instance, you can measure pixel distance on an image and get a number. We know that this number has units of length. But without knowing the pixel size (not all pixels are square by the way), we cannot put this number in the same box as "unit of length" numbers. (First of all, it is impossible to convert between units because this "thing" does not have one).

The condition I am facing now is that, I really would like to bring the OM into the existing model because it captures tones of good modelling work that has already taken place but at the same time, it is not obvious to me how I could use the OM to define a "local" (i.e. not part of a standard) measure. And I would like to avoid splitting this model into two parts for things that are definable by the OM and the "other things". If I use the OM throughout, they can all be treated the same.

Is this use case covered by the OM? Is there an example (or specific section in a document / paper) that I could go through to see how this can be realised?

HajoRijgersberg commented 4 years ago

Thank you so much, Athanasios! :)

No problem, these mathematical variables can be quantities without a unit (or: quantities with unit one, sometimes called the "unitless unit").

I think (and agree with you) that pixel size could be such a quantity, and that it can not be converted with length. Shall I define that quantity for you?

It would be great if you could use OM in your model! :) Do you refer with a measure to something like '3 cm', '4 kg', 5 km', etc, or rather to a quantity like 'length', 'mass', 'time', 'pixel size', etc.? I could define e.g. pixel size in OM with possible unit 'unit one'. Subsequently the om:hasValue property can be used for (such) a quantity to refer to Measures (i.e., the constructs such as '3 cm', '4 kg' etc.) using this unit one. The unit one is the only unit in the SI standard that is not shown when used in combination with a number. (Without a number, i.e., standalone, the official symbol is '1'.) Not sure of course if you refer to usage such as this, so happy to hear more about it! :)

Perhaps the description on the main page of this GitHub (https://github.com/HajoRijgersberg/OM), especially Figure 2 ( https://github.com/HajoRijgersberg/OM/blob/master/images/OMAppleExample.png), does cover this use case appropriately?

aanastasiou commented 4 years ago

Hello @HajoRijgersberg and thank you for the helpful comments.

This was the exact point I wanted to clarify, whether there is a way to define a "local measure" or if the top level model has to be modified first so that this "measure" gets embeded to the existing model before it can be used.

By "measure" (or metric, or feature), I am referring to quantities that can have correspondence with real units but for whatever reasons, not all the information that is required to do the conversion are available. These are typically "features" in this sense.

I used the distance over a digital image as an example (image processing has a huge number of such examples). I am talking more generally about unitless quantities. For example, in image processing, you can extract a number of features (characteristics, numbers that quantify some aspect of the image) from an image. But the image was acquired within a context. For example, I may be measuring something through an image. I know it is distance (or area, or velocity, or some rate of change more generally), I know WHEN it happened and I also know the conditions that the image was taken in (temperature, lighting, pressure, other experimental factors).

So, ideally, I would like to define a temperature scale indication (via OM), a pressure scale indication (via OM) and an indication of that feature's value. The only thing this feature does not have is a unit. It has a name "e.g. Image Space Distance", it has a definition, but it does not have a unit. That is, "it does not have a unit yet". Later on, via a numerical process, it could be possible to relate that measurement to a unit.

I am working with Python, so, defining things like temperature and pressure (or any other existing measure) could be done via the factory om. But for the features, is it correct to derive a class Feature from Scale or could it be done via om too?

HajoRijgersberg commented 4 years ago

Hi @aanastasiou, all clear! :) Your measures, features indeed seem to be quantities without a unit, or unitless quantities (or officially quantities with unit one). Some may call them numeric properties or variables or something. Your temperature scale, is that something like the Celsius scale or the Kelvin scale in OM? Just checking for my understanding. If not, it may be a specific temperature scale, to be newly defined. What kind of classes or points should span that scale? And the same question for the pressure scale. The quantities (measures, features) that use these scales can refer to these points as their values through the om:hasValue property. No unit is involved in these scale references. For your quantities (features) if I understand correctly, you could define subclasses to Quantity such as TemperatureScaleIndication and PressureScaleIndication, which relate to the above-mentioned scales. This can all be done via OM. Not sure about the exact names you could use best for these scales and quantities.

aanastasiou commented 4 years ago

Hello @HajoRijgersberg

Thank you, this sounds like a good start I guess, I could derive Feature (or better FeatureValue) from Quantity and then attach all my features under that.

Your temperature scale, is that something like the Celsius scale or the Kelvin scale in OM?

Yes that is another positive point of OM. I can have both C or K and pressure is primarily in PSI.

No unit is involved in these scale references.

That bit I don't get. I noticed that there is a difference between a "raw" number stating 30C and 30K and a point within a temp scale with the second being the one that can be transposed between scales. That would be the definition I am after (point in scale).

Some of these measures have extremes.....but I am not sure if they can be transformed to each other. Perhaps a scale could be defined, but it does not seem to have a practical application at the moment.

HajoRijgersberg commented 4 years ago

I could derive Feature (or better FeatureValue) from Quantity and then attach all my features under that.

Sounds good! :)

and pressure is primarily in PSI.

Good point. So far I haven't defined pound-force per square inch in OM, but I can do that.

No unit is involved in these scale references.

That bit I don't get. I noticed that there is a difference between a "raw" number stating 30C and 30K and a point within a temp scale with the second being the one that can be transposed between scales. That would be the definition I am after (point in scale).

30C and 30K are values refering to units (degree Celsius and kelvin). The temperature scales primarily have points. The units degree Celsius and kelvin are related to the scales to indicate the unit difference between to integer points.

< Some of these measures have extremes.....

What do you mean with that? Perhaps you have an example for me.

but I am not sure if they can be transformed to each other. Perhaps a scale could be defined, but it does not seem to have a practical application at the moment.

So you don't need any new scales, do I understand correctly?

dr-shorthair commented 4 years ago

Kelvin is a true unit of measure, for 'thermodynamic potential' since the zero point is a real thing. Celsius is a coordinate scale.

aanastasiou commented 4 years ago

Good point. So far I haven't defined pound-force per square inch in OM, but I can do that.

Oh, I just assumed it was included.

30C and 30K are values refering to units (degree Celsius and kelvin). The temperature scales primarily have points. The units degree Celsius and kelvin are related to the scales to indicate the unit difference between to integer points.

OK, this ringed a bell before but I was not sure and @dr-shorthair 's comment reminded me of this.

Some of these measures have extremes.....

What do you mean with that? Perhaps you have an example for me.

An example from the "physical" world: pH. It has a value, a constrained scale and no unit. A pH of 23 would not be a pH measurement. Another example: The Hounsfield scale, it does not have a unit but it does have extremes (and this one also has a specific zero point).

So you don't need any new scales, do I understand correctly?

The reason I am asking is to make the definition as tight as possible. If it is possible to define something like a "uint8 scale", which can be assigned to measures with a value that should remain between 0 and 255 (for example), then I could proceed that way. Otherwise, just a quantity definition would suffice. I may be thinking about data validation which might not exactly be the concern of an OM.

I am a little bit concerned that this might not be a good place for this discussion, Shall I start a new ticket, shall we create a wiki page on the subject?

HajoRijgersberg commented 4 years ago

I shall include pound-force per square inch. I'll keep you up to date.

OK, this ringed a bell before but I was not sure and @dr-shorthair 's comment reminded me of this.

Scales are certainly related to or similar to these datatypes. A scale with red, green, and blue for example is a nominal scale.

An example from the "physical" world: pH. It has a value, a constrained scale and no unit. A pH of 23 would not be a pH measurement. Another example: The Hounsfield scale, it does not have a unit but it does have extremes (and this one also has a specific zero point).

So you don't need any new scales, do I understand correctly?

The reason I am asking is to make the definition as tight as possible. If it is possible to define something like a "uint8 scale", which can be assigned to measures with a value that should remain between 0 and 255 (for example), then I could proceed that way. Otherwise, just a quantity definition would suffice. I may be thinking about data validation which might not exactly be the concern of an OM.

Good point about these extremes. Indeed, so far it has not been a part of OM. This is something I need to discuss in the team. Maybe it would (indeed) not be the task of OM, because it deals with statements about phenomena in the real world, rather than merely definitions of "tools" to describe these in a quantitative way. I'm not quite sure - interested in your further thoughts about this subjects!

I am a little bit concerned that this might not be a good place for this discussion, Shall I start a new ticket, shall we create a wiki page on the subject?

I would say a new ticket in any case. It is a very interesting subject. Perhaps too much for OM, perhaps not. Certainly worthwhile to discuss further! Wiki page would of course also be alright with me, but I would certainly be happy to have the discussion here. It fits the field of OM: units, quantities, scales, etc.! :)

jmkeil commented 3 years ago

I know that @jmkeil is working on a more generalized version of our past comparison. He planned to redo the old comparison as a validation, which will then most likely also include QUDT2. However, I have no clue about any schedule for this.

I hope to do that before end of February. I will keep you updated.

Plans did not work out as thought this year. But with some delay I have now prepared a new unit ontology comparison based on ABECTO. It is not that detailed yet with regards to surrounding entity types as quantity kinds and it currently only compares OM, QUDT and SWEET (=the active ones, except of WD), but it already revealed a bunch of flaws. I will provide issues with details in the next minutes in the according issue trackers. I also need to mention, that the mapping is far from perfect. Please not, that ABECTO is going to be part of my thesis. Some attribution to ABECTO, e.g. in messages of resulting commits, would be very helpful to me. Comments are very welcome.

HajoRijgersberg commented 3 years ago

Hi Jan Martin,

Thanks for your comparison, and I would certainly like to refer to your work on the main page of this GitHub! If you could indicate which sources I could best refer to, please let me know. Good luck writing your thesis and preparing for the defense! :)

Best, Hajo

P.S.: What is WD?

jmkeil commented 3 years ago

If you could indicate which sources I could best refer to, please let me know.

Currently, the ABECTO Demo paper is the best option, I think:

Keil, Jan Martin (2020). ABECTO: An ABox Evaluation and Comparison Tool for Ontologies. In: ESWC 2020 Satellite Events: Posters and Demos. DOI:10.1007/978-3-030-62327-2_24.

But hopefully, there will be an evaluation paper in the future.

With WD I referred to WikiData.

HajoRijgersberg commented 3 years ago

Hi Jan Martin, Just added a ref to your paper on the main page of the OM GitHub! Thanks for all your effort. Looking forward to your future evaluation paper! Cheers, Hajo