Replies: 16 comments 3 replies
-
For the utilization part of your question, I'm curious if you have explored the community resources (the column of links on the right at https://qudt.org/). Do they do the kind of things you are hoping for? PINT for the first part of your question does sound interesting, though. (I'm not a Python programmer, so it wouldn't be me to do anything with it!) |
Beta Was this translation helpful? Give feedback.
-
Our naming convention is based, I believe, on the ordering in the dimension vector, but even if it isn’t, we would have to rearchitect the entire ontology to suit Python users, who are presumably not even using the ontology in the way it was intended (as a structured model, or they wouldn’t be using Python which is a procedural language). If the Python community is already using the QUDT vocabulary in pint then they have succeeded w/o the ontology being modified. Am I missing something here?Jack Hodges, Ph.D.Arbor StudiosOn Jun 29, 2023, at 3:00 PM, steveraysteveray ***@***.***> wrote:
For the utilization part of your question, I'm curious if you have explored the community resources (the column of links on the right at https://qudt.org/). Do they do the kind of things you are hoping for?
PINT for the first part of your question does sound interesting, though. (I'm not a Python programmer, so it wouldn't be me to do anything with it!)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@steveraysteveray: I am familiar with some of those community resources, and I've written a similar one for Python before for internal use. @jhodgesatmb: I mentioned the capabilities Pint has for Python users just because it is an example of one of these tools that I happen to be familiar with. I'm not suggesting catering to Python users, or rearchitecting the ontology to conform to the model Pint has, or modifying Pint to conform to the QUDT model. I'm just suggesting that there could be an integration layer to enable to use QUDT and Pint together (or whatever framework and language one may choose to use, not necessarily Pint or Python). Regardless, I think that isn't the main benefit and more of a potential side effect anyway. As @steveraysteveray mentioned, I think the more interesting part (and the reason I started this discussion) is the first part- the automatic generation of the "mathematical" portions of the definitions of Units, Prefixes, Dimension Vectors, and so on. Currently, creating instances of these classes is a very manual process that is prone to human error, in terms of not following a convention, mathematical errors, or otherwise. For example, I recently added Stress Intensity Factor to QUDT. The process looked something like this (but generalized a bit in some places and simplified in others):
While the Quantity Kinds and adding metadata like descriptions and informative references would still be manual and adding identifiers like IEC 61360, UNECE, and UCUM codes would probably still be manual, adding the skeletons of new units and dimension vectors could be as simple as writing out the symbol of a unit and running a script. Furthermore, it would help ensure that the knowledge base is more complete and reliable. For example, up until I generated Unicode symbols for all the units using a common pattern, we maintained that set of symbols separately so we could guarantee a consistent UX for users. Also, there are currently about 75 units without a |
Beta Was this translation helpful? Give feedback.
-
@mgberg, I like the direction you are suggesting, partially because I have recently been working with some colleagues (not in the context of QUDT) who did a similar thing to generate a whole set of electricity instances with a large number of permutations of number of phases, line-to-line and line-to-neutral voltages, and more. It was done using a Python program that spat out 156 results with a nice, consistent structure. So my question is, what is the next step in your opinion? I would be happy to work with you on this as the QUDT domain person, if you would be the programmer... |
Beta Was this translation helpful? Give feedback.
-
I wrote a web service app to do conversions a couple years ago and I began developing a similar app to do dimension checking for equations, so I agree completely about this kind of tool.I see no harm in having a layer but we are resource constrained so someone would have to step up to the plate to create and test one.Jack Hodges, Ph.D.Arbor StudiosOn Jun 30, 2023, at 7:38 AM, steveraysteveray ***@***.***> wrote:
@mgberg, I like the direction you are suggesting, partially because I have recently been working with some colleagues (not in the context of QUDT) who did a similar thing to generate a whole set of electricity instances with a large number of permutations of number of phases, line-to-line and line-to-neutral voltages, and more. It was done using a Python program that spat out 156 results with a nice, consistent structure.
So my question is, what is the next step in your opinion? I would be happy to work with you on this as the QUDT domain person, if you would be the programmer...
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@jhodgesatmb, this is not about unit conversion, it is about creating new instances of Unit, or QuantityKind, etc. |
Beta Was this translation helpful? Give feedback.
-
@steveraysteveray Let me reach out to my organization to see if I can get permission to contribute to this. If I can, I think next steps would include:
|
Beta Was this translation helpful? Give feedback.
-
Inspired by your suggestion, and with the help of ChatGPT since I'm not really a programmer, I created the following POC in Python for prefixed units of the meter. (A good Friday afternoon distraction). Is this the kind of thing you are thinking of?
|
Beta Was this translation helpful? Give feedback.
-
That's fun, I've tried to get ChatGPT to use QUDT too. That's a simplified version of what we might be able to accomplish using a library like Pint. That example simply creates a graph using explicit information (e.g. the dimension vector and quantity kind is explicitly provided) and is probably fragile in places (like the construction of DBPedia/Wikipedia links wouldn't work like that for everything). Using Pint as an example:
If I get approval to do so, I could just play around with it and see what I can come up with as well. |
Beta Was this translation helpful? Give feedback.
-
Cool. |
Beta Was this translation helpful? Give feedback.
-
Ah, makes sense- I didn't think about multiple systems. I'll let you know if I can investigate this. |
Beta Was this translation helpful? Give feedback.
-
Hi, related to this thread, I am also interested in understanding complex units such as
there is alist of ucum-based codes like the ones above that are used in lab-related results that are relevant and missing from QUDT. There are different directions one could take, listing some possible ones in case they have already been discussed in the past. Manually add these units to QUDT. This would be time-consuming, but get more peer-review of the added units. If a unit is not defined explicitly in QUDT, can we define it as a composite unit using a unit formula? I understand that unit composition information is also stored in the dimensions vector, but is this sufficient to identify the core units one unit is composed of? e.g.
Any thoughts or pointers to older discussions on the topics would be very appreciated (cc/ @glow-mdsol) |
Beta Was this translation helpful? Give feedback.
-
Hi @jimkont, I have a few thoughts on this:
An interesting question is whether any of those QuantityKinds are appropriate to use the qkdvNumerator and qkdvDenominator relations. Clearly VolumeFlowRate does not carry that meaning, but I'd have to investigate whether MoistureDiffusivity has that underlying dimensionality. If not, would it make sense to define a new QuantityKind that does? You tell me - I'm not expert in your use case. All this speaks to the question of how much could be automatically generated. I would suggest that it's the QuantityKind that distinguishes concepts that might share the same DimensionVector, so perhaps the focus should be less on the Unit and more on the QuantityKind. Put another way, just because two Units have the same dimensionality does not mean they are commensurate, which is why we added the qkdvNumerator and qkdvDenominator relations as a partial fix. You can't really compare a relative humidity (dimensionless) with an interest rate (also dimensionless), which seems obvious when stated this way (as QuantityKinds), but not obvious when comparing two percentages (unit:PERCENT). So circling back to your original question, can you provide what the QuantityKinds are for the Units you are proposing? How are these Units used? And finally, because this gets back to context (for which the QuantityKind is a hint), it's hard for me to see how one could generate such Units and QuantityKinds at scale. I'm afraid it's still a manual, peer-reviewed process. What we need is an army of Wikipedia-like editors! Want to volunteer? |
Beta Was this translation helpful? Give feedback.
-
Yes, FWIW BIPM have a prototype service called the 'SI Reference Point' which is doing something similar to QUDT, but only for the SI units (just 29 so far).
|
Beta Was this translation helpful? Give feedback.
-
thanks @steveraysteveray and @dr-shorthair, for the replies and your valuable insights! I see that, indeed, quantitykinds is the key here. We can automate up to one point, but a manual process will be required in the end. I would be happy to contribute my findings to the community, but I will be working on the engineering side of this problem. I am not a domain expert for such units, but we will probably be able to find some. |
Beta Was this translation helpful? Give feedback.
-
@mgberg You might want to look at our qudtlib project. It produces artifacts for java (qudtlib-java) and javascript (qudtlib-js) that contain a domain model based on QUDT and unit/quantitykind/prefix/systemOfUnits instances - without any RDF processing at runtime. Rather, java/js code is generated at compile time and packaged in the artifacts. Maybe a python variant (based on Pint) would address your needs? I could help setting that up. |
Beta Was this translation helpful? Give feedback.
-
I'm curious if anyone has given any thought about integrating with some software library to enable features like:
For example, Pint for Python is highly configurable and has a fairly robust representation of QUDT-related content, including but not limited to:
A library like pint is useful to Python users because it has a lot of convenience functionality too, such as wrapping numpy and decorating functions to do conversions or enforce particular units.
However, for something like that to work reliably, it might require a new major release. For example, an extra rule may need to be added to Unit URI construction rules to enforce that the component units are always ordered alphabetically for reliable generation (i.e.
unit:W-PER-K-M
instead ofunit:W-PER-M-K
)Beta Was this translation helpful? Give feedback.
All reactions