Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comparable units should be reduced on division #19

Open
VladimirAlexiev opened this issue Feb 2, 2021 · 4 comments
Open

comparable units should be reduced on division #19

VladimirAlexiev opened this issue Feb 2, 2021 · 4 comments

Comments

@VladimirAlexiev
Copy link
Contributor

(This poor issue is looking for a home, was posted as unitsofmeasurement/uom-systems#182 but evicted from that project)

I use UCUM on the semantic web through LINDT (https://github.com/OpenSensingCity/jena-ucum by @maximelefrancois86, @Antoine-Zimmermann).

I'm trying to find the conversion factor of LB-PER-H for qudt/qudt-public-repo#285 (@steveraysteveray).
I tried this query at https://ci.mines-stetienne.fr/lindt/playground.html:

PREFIX cdt: <http://w3id.org/lindt/custom_datatypes#> 
select ("1 [lb_av]/h"^^cdt:ucum / "1 kg/s"^^cdt:ucum as ?conv) {}

The result is "1.0 s.[lb_av]/h/kg"^^cdt:dimensionless.
This might be formally correct but is highly useless because s.[lb_av]/h/kg is a dimensionless unit (the factor I'm looking for), but is left unreduced. I expect to get:

  • 0.00012599803
  • or 0.00012599803^^xsd:double
  • or as last resort "0.00012599803"^^cdt:dimensionless
  • (or a number approximately equal to this).

I'm posting this here (@grahamegrieve) instead of jena-ucum because I guess it comes from the core java-ucum engine.

Why is this important: java-ucum includes a bunch of conversion factors and this is the most natural way to get them out.

We have a big discussion at w3c/sparql-dev#129 whether UoM factors should be used as encoded in Java (LINDT), or should be explicitly put into triples (QUDT), and being able to get them out of java-ucum will provide a bridge.

unitsofmeasurement/unit-api#225 is a bit related (exposing the multiplication factor of a UnitConverter)

@grahamegrieve
Copy link
Contributor

What would this look like as a test case in UcumFunctionalTests.xml (\src\test\resources)?

@VladimirAlexiev
Copy link
Contributor Author

@grahamegrieve #20

VladimirAlexiev added a commit to VladimirAlexiev/Ucum-java that referenced this issue Feb 3, 2021
fix comment link to "github FHIR#19"
@VladimirAlexiev
Copy link
Contributor Author

Hi @grahamegrieve , any ETA on implementing this feature? I've provided a unit test

grahamegrieve added a commit that referenced this issue Jul 17, 2023
grahamegrieve pushed a commit that referenced this issue Jul 17, 2023
@grahamegrieve
Copy link
Contributor

my apologies for ignoring this. Embarrassing I did it for so long. But what's the issue. The test passes as is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants