HajoRijgersberg / OM

Ontology of units of Measure
88 stars 23 forks source link

More alternative labels for `one`? #77

Closed fosterlynn closed 7 months ago

fosterlynn commented 1 year ago

We're using om:Measure for all our quantities in Valueflows (VF), and using your unit definitions. Since applications that use VF are mostly "business" rather than "scientific" applications, we need a different label(s) for one. Suggestions: each, count.

Can these be added as alternative labels for one? Or perhaps they should rather be new units? I don't know what is best for you.

If you are open to this, let me know if I should do a PR, or if you can do so. (Might be better if you do so, but I am willing to try.)

HajoRijgersberg commented 1 year ago

Thanx for your issue! Sorry for my late reply. It's a very valuable and important issue. I think I need some further clarification: do you mean quantities like NumberOfApples or amounts of money? I think the former, since you refer to 'each' and 'count'? 'Count' seems more like a quantity than a unit. Do you perhaps mean that? Count-quantities usually have units like 'one'. Would you need units like 'apple', so that one could formulate: number of products = 3 apple, i.e., where 'apple' acts as unit? Looking forward to your response. P.S.: Maybe a stupid question, but what is doing a PR?

fosterlynn commented 1 year ago

Thanks for your response! Please ask more if this is not clear.

do you mean quantities like NumberOfApples or amounts of money?

Number of apples is a good example. "Apple" would not be the unit though, it is something like a "resource or product type", Valueflows calls it ResourceSpecification. (I believe you have something like that in OM but I would have to look for the name.) Or any product that is quantified with a count or number would be the same. So if I give you 40 apples, or if I consume 40 apples to make applesauce, those look like (syntax not exact):

action: consume
resource specification: apple
quantity:
   hasNumericalValue: 40
   hasUnit: one

On the other hand if I make 30 pounds of applesauce, that looks like:

action: produce
resource specification:  applesauce
quantity:
  hasNumericalValue: 30
  hasUnit: pound

"Produce 30 pounds applesauce" makes sense to people. "Consume 40 one apples" doesn't make sense. "Consume 40 count apples" makes more sense. I still search for better terms. :) You already have piece, which also makes sense to people in some cases, but it seems you have that related to your work with food, which makes it more limited. You already have number if I remember correctly, which can also work in some cases, but not all.

Side note: In terms of currencies, we decided that currencies shouldn't be units, even though they do often appear in unit taxonomies. So US Dollar or Euro would be also a ResourceSpecification for us. So again, I suppose the unit is one, or maybe that is not correct since the numerical value might be 54.78? One aspect of our thinking was that we support alternative currencies, and local currencies, and people make those up all the time. While units seem more permanent, more universal. We don't want to support user-defined units, we want to use your list. :) But this was an area of a lot of discussion, I don't know if we made the best recommendation.

I think the idea of "one dimensional unit" probably makes sense with the scientific origins of unit vocabularies. But not so much in business or economic applications.

Maybe a stupid question, but what is doing a PR?

So sorry! My fault, I meant a pull request (in github).

HajoRijgersberg commented 1 year ago

Thanx again for your response! It is certainly getting clearer now. :) Here some points, the one perhaps more valuable than the other, in more or less synchronous order:

Hope the above already helps. Looking forward to your response! :)

fosterlynn commented 7 months ago

I am closing this request, it seems to not fit well with how you think of OM2. There are also other labels that are I'm sure technically correct, but not so friendly to "normal" people (not doing scientific work), like pound (avoirdupois). So I think we will just add something like labelOverride to your Unit, and let individual installations define an override for themselves if they like, while keeping the OM2 identifier so that everyone knows what unit is being talked about. This way people also will not have to add logic to eliminate "one" on user interfaces.

Thanks for considering it.

HajoRijgersberg commented 7 months ago

Ah, I see what you mean; perhaps your other labels are more domain-specific. As to the currencies: in my comment above I argued they be defined as units, but now that I have read it back I think I should also have mentioned that "in the world" there is also an important type of units: constants and other (physical) quantities. Like the mass of the sun, it is a quantity, i.e., a specific mass, but it is often used as unit. Note that in OM we have not incorporated this idea yet. This is something that I have already been wanting to tackle for a long time, but it is difficult of course. It will lead to certain consequences, etc. It is something that I would like to include in OM 3. Maybe good to know this and of course feel free to reopen the issue anytime you want. And thanx for the contribution, discussion, so far! :)