# Relationship Extraction

Relationship Extraction (RE) is a task that is related to [Coreference Resolution](https://wiki.jamesravey.me/books/ai-and-ml/page/coreference-resolution "Coreference Resolution") but with a focus on identifying relationships between entities.

In the following example:

> James, the CTO at Filament AI, lives in the South of England.

We want to identify the following relationships:

```
(James, isCTOof, Filament AI)
(James, livesIn, England)
```

### Approaches

- [FewRel](https://github.com/thunlp/FewRel) by the NLP group at Tsinghua University propose a few-shot model which takes 2 entity mentions, in context, and N possible relationship types - it predicts which of the relationships is most likely to apply. It can also predict when none of the relationships are applicable.