From the anonymized query logs, it seems that the triggering of this IA could be opened up. Below is a dump of these queries to help the contributor improve this instant answer.
Solved by: https://github.com/duckduckgo/zeroclickinfo-goodies/pull/4118
1 cm equals how many inches
19 cm equals in
30 cm equals how many inches
180 cm inches conversion
kg to lb conversion
160 lb is how many kg
190 lb = ? kg
35 lb = how many kilo
4 tbsp equals how many cups
1 tbsp = ? tsp
1 gallon equals how many ounces
convert from feet to mile
convert 330 centigrade to Farenheit
Unanswered Queries
167 cm to feet inch
188 cm in feet and inches
177.5 cm to ft in
28551 lb IN KG
1 lb 3 oz
oz to tablespoon conversion
convert tbsp to grams
how many tbsp in 2/3 cup
how many tbsp in an ounce
cubic foot to gallon conversion
convert pounds to newtons
101 degrees in celsius
80 degrees to celsius
65 degrees celsius equals
450 degrees to celsius
minus 40 degrees c to f
350 degrees in centigrade
Add a selection of these queries to Conversions.t
Update the triggering in Conversions.pm to make the tests pass
Send your PR
@mintsoft @moollaza
Instant Answer Page: https://duck.co/ia/view/conversions
@duckduckgo/duckduckhack-contributors if anyone wants to pick a few of these query patterns and implement them they're welcome to :+1:
@pjhampton @mintsoft Should I mention queries here on which I'd like to work or can I go on and send a PR directly or is there any kind of ordered pattern which I should follow ?
Feeling lost on how to go. Can you elaborate? :confused:
I recommend you take them all forward as one PR @adityatandon007
@adityatandon007 I agree with @pjhampton . That said; don't feel you have to solve all of them in one go if you're not able to. If you do a PR for just one of the patterns (for example 1 $unit equals how many $unit style) then that's fine, I'll cross them off on here or something when I see it.
@mintsoft @moollaza please review and travis has failed I think it needs to be restarted. Could you restart it so that my build can pass
@mintsoft I restarted the travis and it has build and passed tests successfully. Please review
@mintsoft @moollaza some of the above mentioned queries are irrelevant like convert tbsp to grams, convert pounds to newtons, because these have different types. When I searched through the yaml file. I saw tbsp has volume type whereas grams has mass type and which makes sense like we can only convert if we have quantities of same type. Similarly is the case with some other queries mass to force conversion and mass to volume conversion.
@pjhampton The two queries which I cannot understand are
1 lb 3 oz
35 lb %3D how many kilo
@mintsoft @moollaza @pjhampton
The query convert 330 centigrade to Farenheit should trigger but it doesn't because the of the typo in Farenheit it should be Fahrenheit
The query how many tbsp in 2/3 cup doesn't trigger because this IA doesn't support fractions for now but if you convert that fraction ie.2/3 = 0.666 and type the query as how many tbsp in 0.666 cup it triggers and gives the desired result. This thing could be taken as a new feature which can be added to this IA so I have left that for now.
The queries for oz to tbsp or queries for ounce are not triggering because its again the same thing type mismatch issue oz is mass in yaml file and tbsp is volume. Those queries will work if you ask fluid ounce instead of ounce. and fluid ounce have type as volume so conversion works for that.
P.S. The feet inch thing is not a triggering issue. Its more mathematical and we needed a hack for some queries like that and one think that I couldn't resolve was that minus thing with temperature queries though query does work for - (not for minus).
@adityatandon007 Thanks for looking into those, I'll add my thoughts to each thing here:
convert pounds to newtons is basically showing a limitation of the Imperial number system. The unit pounds is used for both force and mass (unambiguously called pounds-force, pounds-mass). We could add a workaround for pounds force like: https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Conversions.pm#L77
I have no idea how to convert tablespoons to grams. I'm guessing it's a cooking measurement, I'll have to investigate if there's an assumed density to convert the volume to mass.
For convert 330 centigrade to Farenheit you can add an alias for Fahrenheit into the yaml, we have a few variable spellings in already
the 1 lb 3 oz query is someone basically wanting to to know what 1.1875 lb in kg is. In imperial units it's common to mix them. The only solution that really works is a similar hack for lbs and oz as we have already for inches and feet (https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Conversions.pm#L68) I think it's acceptable to do the same thing for lbs and oz.
The 2/3 as a number thing means extending the numbers role to handle that. It's probably best to open a separate issue for that (@pjhampton)
I've updated the list of queries at the top with the ones that have been solved by @adityatandon007 in #4118
Closing this for now
Most helpful comment
@adityatandon007 Thanks for looking into those, I'll add my thoughts to each thing here:
convert pounds to newtonsis basically showing a limitation of the Imperial number system. The unit pounds is used for both force and mass (unambiguously called pounds-force, pounds-mass). We could add a workaround for pounds force like: https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Conversions.pm#L77I have no idea how to convert tablespoons to grams. I'm guessing it's a cooking measurement, I'll have to investigate if there's an assumed density to convert the volume to mass.
For
convert 330 centigrade to Farenheityou can add an alias for Fahrenheit into the yaml, we have a few variable spellings in alreadythe
1 lb 3 ozquery is someone basically wanting to to know what1.1875lb in kg is. In imperial units it's common to mix them. The only solution that really works is a similar hack for lbs and oz as we have already for inches and feet (https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Conversions.pm#L68) I think it's acceptable to do the same thing for lbs and oz.The 2/3 as a number thing means extending the numbers role to handle that. It's probably best to open a separate issue for that (@pjhampton)