I have a set of text documents with tagged named entities like "person", "organization", "location", "product", "amount", "price" etc. I have already done fine-tuning of the BERT model to recognize these named entities. But I also need to solve the problem of finding related named entities in the text. For example, let's say we have a part of text like this:
Hey, Jack! There is work for you. Thomas Smith of the Big Corporation called this morning and ordered four pizzas for fifteen dollars, and Andy on 28th Street ordered sushi.
BERT will find the following named entities and their positions in this text:
- Jack - person
- Thomas Smith - person
- Big Corporation - organization
- four - amount
- pizzas - product
- fifteen dollars - price
- Andy - person
- 28th Street - location
- sushi - product
I need a model that can split these entities into groups, which contain semantically related entities as follows:
- {Jack}
- {Thomas Smith, Big Corporation, four, pizzas, fifteen dollars}
- {Andy, 28th Street, sushi}
Is it possible to solve such a problem if I have a training dataset with links between entities? Is there any neural network architecture that can be used on top of the BERT model embeddings for solving this problem? Maybe a graph model?