Closed fkleedorfer closed 7 months ago
I now realize that we have a cascading set of errors. You have fixed the unit's dimension vector, but now of course, the associated quantity kind either
Would you be willing to chase these down? They show up in the validation check.
I will be reverting this merge so that we get back to the previous commit.
Yep I was expecting things to break this way - sorry I should have mentioned it.
The algorithm is simple once you have the factor unit hierarchy: take the dim vector to the power of the unit, combine vectors in the parent node, and continue that recursively.
I am doing this in java, it is probably doable with shacl sparql functions and the preprocessing I am doing with a couple of construct queries and a few extra triples. However, I don't have the time to do that now. Feel free to use qudtlib to do it though ( release with that code in the next few days)
For the more pressing problem at hand - fixing the quantity kinds - what is the algorithm?
...keeping an eye open for something being obviously wrong that might affect the algorithm
Makes sense?
There seems to be a problem with your factor logic. For example, you had:
# factor unit tree for unit µg/cm²
# +-- unit:MicroG-PER-CentiM2 http://qudt.org/vocab/dimensionvector/A0E0L-2I0M1H0T0D0
# | +-- unit:MicroG http://qudt.org/vocab/dimensionvector/A0E0L1I0M0H0T-2D0
# | +-- unit:CentiM^-2 http://qudt.org/vocab/dimensionvector/A0E0L-2I0M0H0T0D0
#
qudt:hasDimensionVector qkdv:A0E0L-1I0M0H0T-2D0 ;
Aha, I now see that we had an error in the URI: MicroG-PER-CM2 should have been MicroGM-PER-CM2. Your algorithm took it at face value and assumed we were talking about MicroGravity per cm**2, and thus computed the appropriate DV.
So we should fix that first, and then tackle the cascading issues. It may be that the qk algorithm may need to involve a human to make the judgements... I can't go any further right now - maybe tomorrow.
I caught two more of such cases earlier, but this one slipped through. See #834
I'll remove this dv replacement from this PR.
How about making the changes (including the qk updates where needed) and create a new PR for all this?
I've added some information about the quantitykinds - does not seem to be an easy decision in each case
PR: #836
No, actually: #837
For each fix, a comment is provided that contains the 'factor unit tree' along with the dimension vectors of each the factor, so that reviewers can check the combination of those vectors and verify the error in the existing DV. These comments should be removed after verification of the replaced DVs.
All other dimension vectors are correct or cannot be verified because their factor units' dimension vectors are missing.