Hello. It feels amazing to start this blog as we have been able to create an end-2-end system for relation extraction from text, the ultimate goal of this Neural Extraction Framework project.

Before we begin, check the sample below of how the extracted and mapped triples look like:

Expectations

The expectation from an end-2-end relations extraction is to take as input a wikipedia article text and return a set of relational triples. These relational triples are in the form of <subject_entity> , <predicate> , <object_entity>/<literal>. Also, initially we want these triples to have the wikipedia page itself as the subject entity. For example, if the page is about Berlin_Wall, we would like to pick the triples where the subject entity is Berlin_Wall. This way, we have same objective as extracting from infobox, just that we also make use of the text to extract relations and thus enhance the process to mine more information about that entity/page.

Our approach

In the series of previous blogs, we have discussed what tools we are using to accomplish the various tasks involved in relation extraction i.e extracting entities, linking them, extracting relation and linking it as well. For NER, we have options like spacy or some pretrained models from huggingface. For entity linking, we had a few approaches but after evaluating them, we finalized on GENRE. For relation extraction, we used REBEL(which also extracts entities, fyi) and to map those, we used vector similarity.