Relation Extraction (between entities)

Hello everyone!

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…

Hope somebody did. Cheers! Julia

I did not used it so far, but MITIE has binary relation extraction. I guess you will also find a couple of examples online.

Maybe also take a look at this StackOverflow question: nlp - Need a good relation extractor - Stack Overflow

Other than that you could also train your own CRF.

Hope you find something that works for you!

1 Like

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.