OM icon indicating copy to clipboard operation
OM copied to clipboard

Examples of use

Open nicholascar opened this issue 6 years ago • 39 comments

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.

nicholascar avatar Jul 10 '18 10:07 nicholascar

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.

HajoRijgersberg avatar Jul 10 '18 22:07 HajoRijgersberg

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.

agneta20 avatar Mar 28 '19 15:03 agneta20

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! :)

HajoRijgersberg avatar Mar 29 '19 11:03 HajoRijgersberg

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

bhaugen avatar Oct 27 '19 16:10 bhaugen

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

HajoRijgersberg avatar Oct 28 '19 08:10 HajoRijgersberg

@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 avatar Oct 28 '19 12:10 bhaugen

@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.

bhaugen avatar Oct 28 '19 13:10 bhaugen

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

HajoRijgersberg avatar Oct 30 '19 09:10 HajoRijgersberg

@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?

fosterlynn avatar Nov 01 '19 21:11 fosterlynn

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! :)

HajoRijgersberg avatar Nov 02 '19 14:11 HajoRijgersberg

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.

steveraysteveray avatar Nov 06 '19 18:11 steveraysteveray

@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.

bhaugen avatar Nov 06 '19 18:11 bhaugen

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.

HajoRijgersberg avatar Nov 06 '19 19:11 HajoRijgersberg

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 [email protected] 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 .

steveraysteveray avatar Nov 06 '19 20:11 steveraysteveray

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

HajoRijgersberg avatar Nov 06 '19 20:11 HajoRijgersberg

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 avatar Nov 06 '19 20:11 HajoRijgersberg

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

HajoRijgersberg avatar Nov 06 '19 20:11 HajoRijgersberg

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.

fosterlynn avatar Nov 06 '19 20:11 fosterlynn

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! :)

HajoRijgersberg avatar Nov 06 '19 20:11 HajoRijgersberg

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...]

fosterlynn avatar Nov 06 '19 21:11 fosterlynn

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

HajoRijgersberg avatar Nov 07 '19 06:11 HajoRijgersberg

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 [email protected] 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 .

steveraysteveray avatar Nov 08 '19 18:11 steveraysteveray

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.

SirkoS avatar Nov 09 '19 23:11 SirkoS

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

HajoRijgersberg avatar Nov 14 '19 12:11 HajoRijgersberg

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.

jmkeil avatar Feb 11 '20 11:02 jmkeil

Thanks in advance, Jan Martin! :)

HajoRijgersberg avatar Feb 11 '20 11:02 HajoRijgersberg

@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?

aanastasiou avatar Jun 09 '20 16:06 aanastasiou

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?

HajoRijgersberg avatar Jun 10 '20 08:06 HajoRijgersberg

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?

aanastasiou avatar Jun 11 '20 11:06 aanastasiou

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.

HajoRijgersberg avatar Jun 12 '20 12:06 HajoRijgersberg