For example, I used Prodigy NER to tag units of measurement used in American cooking like cups, teaspoons, tablespoons, etc...As shown in the patterns file line below, I included the weight in grams for each unit. I need to convert each unit to grams to ultimately produce a nutritional profile of the entire recipe.
How can I - for one example - use Prodigy to replace one cup for 128 grams? I mean, can the patterns file be used to replace words with their corresponding amounts? If not, is there another way Prodigy can assist with developing the Python dictionaries needed to perform these conversions?
Examples of patterns file I refer to in the question:
`{"label": "UMS", "pattern": [{"lower": "cup"}], "grams": "128"}`
{"label": "UMS", "pattern": [{"lower": "tablespoon"}], "grams": "14.3"}
{"label": "UMS", "pattern": [{"lower": "quart"}], "grams": "946"}