This could be a cooking recipe, but in my case it is a chemical recipe.
Here is a typical generic chemical recipe:
23 g chemicalA is dissolved in 250 ml methanol. The solution is cooled
to 0 - 5 degC and 18 ml compoundB is added dropwise over 60 minutes.
The mixture is heated to reflux overnight, then cooled to 0 - 5 degC
for 3 hours. The precipated product is collected, washed with 50 ml
cold methanol. Yield: 28 g compoundC as a light yellow solid after
drying in vacuum at 70 degC for 6 hours.
I have a list of chemicals I am searching for:
chemicals =
I want to extract amount and unit of measurement for each chemical
from the recipe to give a list of sublists [chemical, amount, unit].
Something like:
recipe1 = [, , ...]
Using Python, how do I go about this best?