# Implementation of NER model with relationship extraction?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902%3E%5C
**Category:** Intermediate\
**Created:** [May 13, 2022, 4:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902 "2022-05-13T04:08:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaximusDecimusMeridi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maximusdecimusmeridi/32/3390_2.png) [@MaximusDecimusMeridi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMaximusDecimusMeridi)%5C
**Post date:** [May 13, 2022, 4:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902%2F1 "2022-05-13T04:08:00Z")

</div>

I am working with transactional data, and am thinking of training my own NER model on self labelled data (originator, receiver, financial institution etc)… It makes a lot of sense to also capture relationships at the same time, to further model the transaction from the description. I have found two great resources on this so far:

- [GitHub - sujitpal/ner-re-with-transformers-odsc2022: Building NER and RE components using HuggingFace Transformers](https://github.com/sujitpal/ner-re-with-transformers-odsc2022)
- [SPACY v3: Custom trainable relation extraction component - YouTube](https://www.youtube.com/watch?v=8HL-Ap5_Axo)

Are there any other examples/tutorials/resources on this? Also I’m thinking that my entities naturally imply relationship (payer, payee, originating financial institution etc), so maybe it wouldn’t add that much to encode it?

Anyway, any input/thoughts are appreciated!

Thanks

---

<div class="post-metadata">

**Author:** ![evangeliazve](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@evangeliazve](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fevangeliazve)%5C
**Post date:** [November 15, 2022, 7:59pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902%2F2 "2022-11-15T19:59:51Z")

</div>

Hello Maximus,

Did you find a solution to your problem?

I have found the same ressources as you and I decided to move forward with the first one as for Spacy is needed to buy Prodigy. Otherwise it’s seems impossible for me to get the data to the right format.  
I currently use doccano for annotating net and re.  
However, I have difficulty to make inference with the first solution for RE  
Also to link NER and RE  
Any advice is welcome.

Best

---

<div class="post-metadata">

**Author:** ![Jonathanai](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Jonathanai](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJonathanai)%5C
**Post date:** [July 27, 2023, 10:58am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902%2F3 "2023-07-27T10:58:17Z")

</div>

@evangeliazve I am facing the very same issue with the first solution from sujitpal with transformers and huggingface.

Did you find a solution to make inference with RE with his approach?

---

<div class="post-metadata">

**Author:** ![harvey-specter24](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@harvey-specter24](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fharvey-specter24)%5C
**Post date:** [September 25, 2024, 7:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimplementation-of-ner-model-with-relationship-extraction%2F17902%2F4 "2024-09-25T19:17:48Z")

</div>

Hi @MaximusDecimusMeridi  
im working on the same problem too, what im finding it difficult to handle is just the amount of variance that is contained in one transaction narration (for ex: a narration might indicate an upi payment to an merchant/ business enterprise but through amazon as upi gateway , so in this case its difficult for the model to determine wether the receiver is actually the merchant to whom money was sent to or is it amazon)  
Would love to know how your solution fared and what approach worked  
Thanks in advance!!
