h-REA / hREA

A ValueFlows / REA economic network coordination system implemented on Holochain and with supplied Javascript GraphQL libraries
https://docs.hrea.io
Other
142 stars 15 forks source link

Resolve semantic integrity issues related to `Unit` records #389

Open pospi opened 1 year ago

pospi commented 1 year ago

Well-known units should be retrievable by well-known IDs. See also vf-graphql#104.

See #387 as a WIP which would be reimplemented via semantic indexing lib after resolving the upstream protocol decision.

fosterlynn commented 1 year ago

In terms of IDs, we can use the OM2 semantic web reference, which looks like (for example):
http://www.ontology-of-units-of-measure.org/resource/om-2/metre http://www.ontology-of-units-of-measure.org/resource/om-2/mile-USSurvey

If we don't want to include the whole URL, metre and mile-USSurvey are also unique within OM2.

We currently have label and symbol as attributes/properties of Unit. Neither of those are unique. I'd suggest we add the global unique ID, which is the OM2 URL.

Expanding this issue a little bit:

Without getting into the longer range solution where networks can pick their own set of units from a useful facility (which is a big deal, see #223), there is one other thing we could add to make units more functional right now. That is to add a label override, like an alternative label, but without using OM2 alternative labels and without asking them to add alternatives. This would default to the label, but be changeable by the network, without changing anything from OM2. This would (temporarily?) solve problems with language and custom, and also solve the "one" problem, where mostly the terms used in "business" are not included in unit ontologies because they come from scientific communities. ("one" means one dimensional unit, which people might call "each", "piece", "count", etc., or just leave blank on the UI.)

Side note: There are a lot of possible things to include in the data for each unit from OM2, some of which are multiples, like language support for label and symbol, or support for alternate labels. It's a bit difficult to pick a sweet spot for enough functionality vs too much complexity. Other attributes/properties that would be useful are: definition, and a filter that OM2 has some values for, and we would want to add others.

Lots of data derived from OM2 here.

fosterlynn commented 1 year ago

Moving discussion over to https://github.com/h-REA/hREA/pull/387. I somehow missed this before my comment yesterday (above). Apologies.

Other attributes/properties that would be useful are: definition

Also noting that I was wrong that OM2 calls it definition, they appear to use comment.