duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

Nutrition: Update with appropriate triggers #3195

Closed pjhampton closed 6 years ago

pjhampton commented 7 years ago

Problem

This Instant Answer is great, but it's not triggering as much as it should be. This is because the triggering hasn't been optimized. In https://github.com/duckduckgo/zeroclickinfo-spice/commit/ff29bd391b2a836ee3214338d2b67bbd7aaa560a, @jdorweiler removed a series of trigger words because this IA was over-triggering. However, it's now under-triggering. This Pull Request should build on top of his work!

Solution

The developer should analyze the Nutritionix API and update the trigger words as appropriate in Nutrition.pm. Because you will be changing the behaviour of the Instant Answer, please don't forget to update the tests.

Get Started

Resources


Instant Answer Page: https://duck.co/ia/view/nutrition

apoorvnandan commented 7 years ago

Hey, I would like to work on this! In ff29bd3 the following trigger words were removed. 'kcals', 'cals','dietary fiber','trans-fat','trans fat','trans fatty acid','calories from fat','saturated fat','monosaturated fat','polyunsaturated fat','cholesterol','sodium','sugar','protein','carbs','carbohydrates','vitamin c','vitamin a','calcium' I am unable to understand how these were responsible for the over triggering?

pjhampton commented 7 years ago

Yes, please @apoorvnandan

I'll put this on hold for now, but I will reserve it for you. I'm pushing a PR tonight which overhauls this IA and upgrades the API from 1.1 => 2. I will let you know when that's done 😄

apoorvnandan commented 7 years ago

Okay, sure.