Open EmmanuelMess opened 2 years ago
There is an International System of Units defining how they have to be written.
The main issue IMO is what unit has to be returned. For pressure, this could be bar, Pa, lbf/in² and so on … The same occurs for length : what unit will be used ? Meter, inch, yard, miles (nautical/terrestrial) …
Implementation should ask user what converted unit is before returning an answer.
Implementation should ask user what converted unit is before returning an answer.
Why not return all?
There is an International System of Units defining how they have to be written.
Not everyone knows that, not everyone follows that, and not everyone will know that this feature was added so they might search for google where "1 kilogram to gram" works perfectly. Also "kg" and "kilogram" are defined as the same thing (one is the abbreviation the other is the full name) by the SI, same for all translations of that word.
The main issue IMO is what unit has to be returned. For pressure, this could be bar, Pa, lbf/in² and so on … The same occurs for length : what unit will be used ? Meter, inch, yard, miles (nautical/terrestrial) …
In my head this works with an equal, where all useful equivalences are returned:
1 kg = 2.20462 pd = 35.274 oz
Implementation should ask user what converted unit is before returning an answer.
That would require too much parsing IMO, as it needs to do natural language parsing (NLP) for obtaining the info "x to y".
Is your feature request related to a problem? Please describe. Convert measures.
Describe the solution you'd like If you type "1 kg", it can have an item with the amount of pounds it relates to. Also for radians "2 pi radians" is 360°, etc. There probably has to be deliberations on how the unit is detected: "kg", "kilogram", "kilogramo" , "quilogramo", "kgs" all mean the same thing, but are written very differently.
Would you be able to contribute code? If I have the time.