Mathematica seems confused about Kilograms vs KilogramsForceImplementing CGS unit system in Mathematica 9Unit...

Why are energy weapons seen as more acceptable in children's shows than guns that fire bullets?

Why did Shae (falsely) implicate Sansa?

A dragon's soul trapped in a ring of mind shielding wants a new body; what magic could enable her to do so?

Can you make a Spell Glyph of a spell that has the potential to target more than one creature?

Found a major flaw in paper from home university – to which I would like to return

What happens to someone who dies before their clone has matured?

How to have a different style for edges of a triangle

Is layered encryption more secure than long passwords?

How do I add numbers from two txt files with Bash?

Father gets chickenpox, but doesn't infect his two children. How is this possible?

Ethernet cable only works in certain positions

How can I ensure that advanced technology remains in the hands of the superhero community?

For US ESTA, should I mention a visa denial from before I got UK citizenship?

How to play song that contains one guitar when we have two guitarists (or more)?

Should corporate security training be tailored based on a users' job role?

How to not forget my phone in the bathroom?

Is there a technology capable of disabling the whole of Earth's satellitle network?

What happens when the last remaining players refuse to kill each other?

Identical projects by students at two different colleges: still plagiarism?

Sing Baby Shark

If I can't win, but can stop my opponent from winning, is the game drawn?

Are there any rules or guidelines about the order of saving throws?

Taking an academic pseudonym?

Rigorous Geometric Proof That dA=rdrdθ?



Mathematica seems confused about Kilograms vs KilogramsForce


Implementing CGS unit system in Mathematica 9Unit issues in Mathematica 9Can't force UnitConvert to be evaluated in PlotHow to dequantify units in mathematica?Where to see all Mathematica unitsIntegrate complains about incompatible quantities in integration limitsPhysical constants seems broken in 10.3How to prevent Quantity calculations from converting unitsMathematica does not fully simplify unitsHow do I properly use Quantities (units) in plots?













7












$begingroup$


This does what I expect:



Quantity["Kilograms"*"Meters"] // InputForm



Quantity[1, "Kilograms"*"Meters"]




This, on the other hand, bungles the units:



Quantity[1, "Kilograms*Meters"] // InputForm



Quantity[1, "KilogramsForce"*"Meters"]




Note that KilogramsForce is a unit of force, not mass, and strictly different from Kilograms. This is not a case of a subtle and understandable misinterpretation as in the case of Kelvins vs KelvinsDifference, but a parsing error.




  • What do we need to be careful about when writing down units for parsing? How can we prevent parsing errors, other than splitting the units as in the first input line above?

  • Are there other cases like this one?

  • Is this a residue of Imperial Units parsing, where pounds and pounds-force are sometimes used interchangeably?

  • Is this the result of an overly greedy way of interpreting a torque? This parsing error seems specific to the $text{kg}cdottext{m}$ unit and does not occur, e.g., with $text{kg}cdottext{s}$.










share|improve this question











$endgroup$








  • 2




    $begingroup$
    And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
    $endgroup$
    – Gustavo Delfino
    6 hours ago
















7












$begingroup$


This does what I expect:



Quantity["Kilograms"*"Meters"] // InputForm



Quantity[1, "Kilograms"*"Meters"]




This, on the other hand, bungles the units:



Quantity[1, "Kilograms*Meters"] // InputForm



Quantity[1, "KilogramsForce"*"Meters"]




Note that KilogramsForce is a unit of force, not mass, and strictly different from Kilograms. This is not a case of a subtle and understandable misinterpretation as in the case of Kelvins vs KelvinsDifference, but a parsing error.




  • What do we need to be careful about when writing down units for parsing? How can we prevent parsing errors, other than splitting the units as in the first input line above?

  • Are there other cases like this one?

  • Is this a residue of Imperial Units parsing, where pounds and pounds-force are sometimes used interchangeably?

  • Is this the result of an overly greedy way of interpreting a torque? This parsing error seems specific to the $text{kg}cdottext{m}$ unit and does not occur, e.g., with $text{kg}cdottext{s}$.










share|improve this question











$endgroup$








  • 2




    $begingroup$
    And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
    $endgroup$
    – Gustavo Delfino
    6 hours ago














7












7








7





$begingroup$


This does what I expect:



Quantity["Kilograms"*"Meters"] // InputForm



Quantity[1, "Kilograms"*"Meters"]




This, on the other hand, bungles the units:



Quantity[1, "Kilograms*Meters"] // InputForm



Quantity[1, "KilogramsForce"*"Meters"]




Note that KilogramsForce is a unit of force, not mass, and strictly different from Kilograms. This is not a case of a subtle and understandable misinterpretation as in the case of Kelvins vs KelvinsDifference, but a parsing error.




  • What do we need to be careful about when writing down units for parsing? How can we prevent parsing errors, other than splitting the units as in the first input line above?

  • Are there other cases like this one?

  • Is this a residue of Imperial Units parsing, where pounds and pounds-force are sometimes used interchangeably?

  • Is this the result of an overly greedy way of interpreting a torque? This parsing error seems specific to the $text{kg}cdottext{m}$ unit and does not occur, e.g., with $text{kg}cdottext{s}$.










share|improve this question











$endgroup$




This does what I expect:



Quantity["Kilograms"*"Meters"] // InputForm



Quantity[1, "Kilograms"*"Meters"]




This, on the other hand, bungles the units:



Quantity[1, "Kilograms*Meters"] // InputForm



Quantity[1, "KilogramsForce"*"Meters"]




Note that KilogramsForce is a unit of force, not mass, and strictly different from Kilograms. This is not a case of a subtle and understandable misinterpretation as in the case of Kelvins vs KelvinsDifference, but a parsing error.




  • What do we need to be careful about when writing down units for parsing? How can we prevent parsing errors, other than splitting the units as in the first input line above?

  • Are there other cases like this one?

  • Is this a residue of Imperial Units parsing, where pounds and pounds-force are sometimes used interchangeably?

  • Is this the result of an overly greedy way of interpreting a torque? This parsing error seems specific to the $text{kg}cdottext{m}$ unit and does not occur, e.g., with $text{kg}cdottext{s}$.







units






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago







Roman

















asked 7 hours ago









RomanRoman

1,581614




1,581614








  • 2




    $begingroup$
    And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
    $endgroup$
    – Gustavo Delfino
    6 hours ago














  • 2




    $begingroup$
    And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
    $endgroup$
    – Gustavo Delfino
    6 hours ago








2




2




$begingroup$
And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
$endgroup$
– Gustavo Delfino
6 hours ago




$begingroup$
And Quantity[1, "Kilograms*Meters^2"] // InputForm is interpreted correctly
$endgroup$
– Gustavo Delfino
6 hours ago










1 Answer
1






active

oldest

votes


















7












$begingroup$

Under the hood, units not recognized by Quantity use Wolfram|Alpha's NLP to parse the unit.



In this case we see there are 2 possibilities:



enter image description here



It's probably worth leaving feedback at the bottom of the Alpha page making your case that 'kilogram meters' should be the default for this query.



I don't think there's a way to access all possibilities in Quantity and I think the best way to avoid this is to use the canonical form of the units from the beginning.



If that's not feasible, as a workaround you can stringify your entire input and use Interpreter:



Interpreter["Quantity", AmbiguityFunction -> All]["1 Kilograms*Meters"]



AmbiguityList[
{Quantity[1, "KilogramsForce" "Meters"], Quantity[1, "Kilograms" "Meters"]},
"Kilograms*Meters",
{<|"Description" -> "kilogram-force meters"|>, <|"Description" -> "kilogram meters"|>}]






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
    $endgroup$
    – Roman
    5 hours ago






  • 1




    $begingroup$
    Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
    $endgroup$
    – Roman
    5 hours ago











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191816%2fmathematica-seems-confused-about-kilograms-vs-kilogramsforce%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









7












$begingroup$

Under the hood, units not recognized by Quantity use Wolfram|Alpha's NLP to parse the unit.



In this case we see there are 2 possibilities:



enter image description here



It's probably worth leaving feedback at the bottom of the Alpha page making your case that 'kilogram meters' should be the default for this query.



I don't think there's a way to access all possibilities in Quantity and I think the best way to avoid this is to use the canonical form of the units from the beginning.



If that's not feasible, as a workaround you can stringify your entire input and use Interpreter:



Interpreter["Quantity", AmbiguityFunction -> All]["1 Kilograms*Meters"]



AmbiguityList[
{Quantity[1, "KilogramsForce" "Meters"], Quantity[1, "Kilograms" "Meters"]},
"Kilograms*Meters",
{<|"Description" -> "kilogram-force meters"|>, <|"Description" -> "kilogram meters"|>}]






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
    $endgroup$
    – Roman
    5 hours ago






  • 1




    $begingroup$
    Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
    $endgroup$
    – Roman
    5 hours ago
















7












$begingroup$

Under the hood, units not recognized by Quantity use Wolfram|Alpha's NLP to parse the unit.



In this case we see there are 2 possibilities:



enter image description here



It's probably worth leaving feedback at the bottom of the Alpha page making your case that 'kilogram meters' should be the default for this query.



I don't think there's a way to access all possibilities in Quantity and I think the best way to avoid this is to use the canonical form of the units from the beginning.



If that's not feasible, as a workaround you can stringify your entire input and use Interpreter:



Interpreter["Quantity", AmbiguityFunction -> All]["1 Kilograms*Meters"]



AmbiguityList[
{Quantity[1, "KilogramsForce" "Meters"], Quantity[1, "Kilograms" "Meters"]},
"Kilograms*Meters",
{<|"Description" -> "kilogram-force meters"|>, <|"Description" -> "kilogram meters"|>}]






share|improve this answer











$endgroup$









  • 1




    $begingroup$
    Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
    $endgroup$
    – Roman
    5 hours ago






  • 1




    $begingroup$
    Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
    $endgroup$
    – Roman
    5 hours ago














7












7








7





$begingroup$

Under the hood, units not recognized by Quantity use Wolfram|Alpha's NLP to parse the unit.



In this case we see there are 2 possibilities:



enter image description here



It's probably worth leaving feedback at the bottom of the Alpha page making your case that 'kilogram meters' should be the default for this query.



I don't think there's a way to access all possibilities in Quantity and I think the best way to avoid this is to use the canonical form of the units from the beginning.



If that's not feasible, as a workaround you can stringify your entire input and use Interpreter:



Interpreter["Quantity", AmbiguityFunction -> All]["1 Kilograms*Meters"]



AmbiguityList[
{Quantity[1, "KilogramsForce" "Meters"], Quantity[1, "Kilograms" "Meters"]},
"Kilograms*Meters",
{<|"Description" -> "kilogram-force meters"|>, <|"Description" -> "kilogram meters"|>}]






share|improve this answer











$endgroup$



Under the hood, units not recognized by Quantity use Wolfram|Alpha's NLP to parse the unit.



In this case we see there are 2 possibilities:



enter image description here



It's probably worth leaving feedback at the bottom of the Alpha page making your case that 'kilogram meters' should be the default for this query.



I don't think there's a way to access all possibilities in Quantity and I think the best way to avoid this is to use the canonical form of the units from the beginning.



If that's not feasible, as a workaround you can stringify your entire input and use Interpreter:



Interpreter["Quantity", AmbiguityFunction -> All]["1 Kilograms*Meters"]



AmbiguityList[
{Quantity[1, "KilogramsForce" "Meters"], Quantity[1, "Kilograms" "Meters"]},
"Kilograms*Meters",
{<|"Description" -> "kilogram-force meters"|>, <|"Description" -> "kilogram meters"|>}]







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 6 hours ago









Chip HurstChip Hurst

21.5k15790




21.5k15790








  • 1




    $begingroup$
    Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
    $endgroup$
    – Roman
    5 hours ago






  • 1




    $begingroup$
    Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
    $endgroup$
    – Roman
    5 hours ago














  • 1




    $begingroup$
    Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
    $endgroup$
    – Roman
    5 hours ago






  • 1




    $begingroup$
    Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
    $endgroup$
    – Roman
    5 hours ago








1




1




$begingroup$
Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
$endgroup$
– Roman
5 hours ago




$begingroup$
Ha that's full-on en.wikipedia.org/wiki/Robopsychology ! Thanks @ChipHurst, this is at least a partial answer.
$endgroup$
– Roman
5 hours ago




1




1




$begingroup$
Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
$endgroup$
– Roman
5 hours ago




$begingroup$
Considering how wide the Interpreter casts its net, its full reply is of limited use for an automated procedure and I cannot do better than pick its most likely answer (other than checking the ambiguity list manually). Surprisingly, Interpreter["Quantity", AmbiguityFunction -> All]["1 Second"] gives four possible interpretations, and even Interpreter["Quantity", AmbiguityFunction -> All]["1 Meter"] finds two ways of interpreting, even though these units are about as basic as it gets. NLP is not the right tool here, as it fails in unexpected ways (hence my reference to robopsychology).
$endgroup$
– Roman
5 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematica Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f191816%2fmathematica-seems-confused-about-kilograms-vs-kilogramsforce%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

ORA-01691 (unable to extend lob segment) even though my tablespace has AUTOEXTEND onORA-01692: unable to...

Always On Availability groups resolving state after failover - Remote harden of transaction...

Circunscripción electoral de Guipúzcoa Referencias Menú de navegaciónLas claves del sistema electoral en...