by magicalhippo · 5y ago · 0 comments
Should I give it another shot or are there libraries more suited for this than just plain regexp galore?
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.