Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

comparable units should be reduced on division

オープン
#19 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
backend

調査の方向性

まず、issue にある UCUM の除算例を再現し、コアの java-ucum エンジンが単位の除算と無次元の結果をどのように処理するかを調べます。返された s.[lb_av]/h/kg を期待される数値変換係数と比較し、関連する LINDT playground と unit-api の議論をコンテキストとして参照します。除算によって比較可能な単位がほぼ等しい数値係数に縮約されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

(This poor issue is looking for a home, was posted as https://github.com/unitsofmeasurement/uom-systems/issues/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 https://github.com/qudt/qudt-public-repo/issues/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 https://github.com/w3c/sparql-12/issues/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.

https://github.com/unitsofmeasurement/unit-api/discussions/225 is a bit related (exposing the multiplication factor of a UnitConverter)

主要言語
Java
スター
26
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

FHIR/Ucum-java のほかの issue

FHIR/Ucum-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。