I want to compare extendedIngredient
amounts between ingredients in different recipes that may or may not be listed using the same unitLong
. So, on my end I will do some math to convert two things listed in teaspoons and tablespoons, for example, to both be teaspoons, so I can properly compare the amounts using the same unit of measure. However, first I need a list of all possible amount
s and unitLong
s to know what I am working with.
I think amount
will be easier so I’ll start there. Is the amount
format always numerical decimal format, no matter how it was listed in the originalString
? Meaning, is it always “1” instead of “one” or “.5” instead of “one half”?
Then for unitLong
, what are all the possible choices? There are obvious ones like teaspoon, tablespoon, cup, etc. but I need a complete list to be able to set up the conversions for each one.
Join in the discussion - add comment below:
Yes, amount will always be a decimal number like 1 instead of one or 1.5 instead of “1 1/2”.
About conversion: We use some rather advanced conversions for ingredients depending on densities etc. So one cup of butter is not the same grams as one cup of flour for example. If you want to do something on your end, this is a list of currently used long unit names - the list might change:`
ounces
grams
milliliters
pints
pounds
cups
liters
teaspoons
package
tablespoons