Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I try just a few items such as

WolframAlpha["1 whole wheat tortilla + 2 slices american cheese + 150 g steak + 2 tbsp beans + 150 g white rice"]

I get the following nutrition facts table:

enter image description here

However, when I enter a longer query such as

WolframAlpha["1 whole wheat tortilla + 2 slices american cheese + 150 g steak + 2 tbsp beans + 150 g white rice + 100g bell peppers + 200 g chicken breast + 2 slices of whole wheat bread"]

I don't actually get a nutrition facts chart as before. Is there a way to force a nutrition facts output every time? Also, is there a way to limit the output pods to only a nutrition facts table, as I don't need any of the other pods?

share|improve this question
add comment

2 Answers

To get just the nutrition facts for simpler data use:

WolframAlpha["1 whole wheat tortilla + 2 slices american cheese + 150 g steak",
{{"NutritionLabelMultiplePlus", 1}, "Content"}]

To understand how to get this code use this answer as guide.

That other 2nd entry is so complex and long it throws something off in formatting. You can send feedback to Wolfram about it.

share|improve this answer
    
Feedback for Wolfram|Alpha should be sent to info@wolframalpha.com –  chuy Sep 5 '13 at 18:31
    
If you can figure out a way to use this, and include TimeConstraint, that'd be the ideal solution. I tried WolframAlpha[query, {{"NutritionLabelMultiplePlus", 1}, "Content"}, TimeConstraint -> 600], but that doesn't work. –  cartonn Sep 6 '13 at 0:36
add comment

The longer query is timing out. Set TimeConstraint option to larger value to enable completion. Use IncludePods->"NutritionLabelMultiplePlus" option setting to limit output content.

query1 = "1 whole wheat tortilla + 2 slices american cheese + 150 g steak + 2 tbsp beans + 150 g white rice";

query2 = query1 <> 
   " + 100 g bell peppers + 200 g chicken breast + 2 slices of whole wheat bread";

WolframAlpha[query1, IncludePods -> "NutritionLabelMultiplePlus"]

WolframAlpha[query2, IncludePods -> "NutritionLabelMultiplePlus", 
 TimeConstraint -> 60]
share|improve this answer
1  
Increasing TimeConstraint did not work for me for longer query, - pod was simply not returned. Did it work for you? –  Vitaliy Kaurov Sep 5 '13 at 6:11
    
Yes it worked for me. Perhaps you need even more time with your internet connection. –  Bob Hanlon Sep 5 '13 at 13:49
    
This also didn't work for me. Using your code results in the following message: "Wolfram|Alpha doesn't know how to interpret your input." –  cartonn Sep 6 '13 at 0:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.