3 ms·
I did that years ago for some project. For recipes you can probably get away with regular expressions. But with Spacy you could tokenize the sentence, then tag
by teruakohatu 6y ago
I did that years ago for some project. For recipes you can probably get away with regular expressions.
But with Spacy you could tokenize the sentence, then tag each work with the Part of Speech it is, and then find patterns eg. Verb Number Noun Preposition Noun
Then match the first noum against a list of measurements (tablespoon, teaspoon, tbsp...) and extract the rest of the components.