I’m looking for ways to extract relations between entities in contexts like these:
[I want a pizza with cheese and a coffee.]
So far I’ve been extracting entities allright but, as you may see, If I want to store something like [pizza, cheese] in one side and [coffee] in other, entity recognition is not enough (assuming these relations can get even more complex)/
I tried with a custom dependency parser (the one from spaCy and a few others) but dependencies are not good for this task that’s at an entity level…
Anybody tried a good model for relation extraction, one to train yourself…
My response is too late for the question below, but I will try to give an answer for someone who struggles with relation extraction right now, taking into account the recent developments.
Currently, auto-regressive models are the most popular, and they actually demonstrate good generalisability and are easy to use with infrastructure between them. I can recommend taking a look at models like that. However, this model was trained on a distant supervision dataset that can contain false positives. I would like to recommend collecting your own high-quality dataset from high-quality raw relation extraction datasets like DocRed.
When you need something more complex than relation extraction, where we extract triples, you can check this solution. Actually, the generalisation of relation extraction is table extraction, which deals with solving more high-order relations between entities or pieces of text.