# Question about NER and relation annotation

**URL:** <https://support.prodi.gy/t/question-about-ner-and-relation-annotation/4606>\
**Category:** Uncategorized\
**Tags:** usage, ner, spacy, relations\
**Created:** [August 23, 2021, 4:46pm UTC](https://support.prodi.gy/t/question-about-ner-and-relation-annotation/4606 "2021-08-23T16:46:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaidkamil](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/zaidkamil/32/2215_2.png) [@zaidkamil](https://support.prodi.gy/u/zaidkamil)\
**Post date:** [August 23, 2021, 4:46pm UTC](https://support.prodi.gy/t/question-about-ner-and-relation-annotation/4606/1 "2021-08-23T16:46:43Z")

</div>

Hi,  
I am new to spacy and prodigy tools. I am able to perform domain-specific custom NER model but unable to extract relations/dependencies between entities using spacy via Jupyter notebook. The command I have used to export annotated data from prodigy to spacy is  
% prodigy data-to-spacy ./outputfile name --lang en --ner name of annotated dataset name  
is the above command is correct for custom NER and rel.manual annoations perfromed combined using  
prodigy rel.manual ner\_rels blank:en ./data.jsonl --label SUBJECT,LOCATION --span-label PERSON,GPE

If yes then please help me how can I use spacy to test my model for entities relations?

Thank you, kindly.

Zaid Kamil

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 24, 2021, 2:21am UTC](https://support.prodi.gy/t/question-about-ner-and-relation-annotation/4606/2 "2021-08-24T02:21:11Z")

</div>

Hi! spaCy doesn't have a built-in component for relation extraction at the moment, so there's no component you can train with it out-of-the-box and you'd have to use your own custom implementation if that's what you want to predict.

The following tutorial and example project shows how a relation extraction component can be implemented and what to consider for it – however, it's definitely a more advanced use case so if you're still new to spaCy, you might want to start with the more general usage docs and tutorials first 🙂

> **[projects/tutorials/rel\_component at v3 · explosion/projects](https://github.com/explosion/projects/tree/v3/tutorials/rel_component)**
>
> v3/tutorials/rel\_component

[![](https://img.youtube.com/vi/8HL-Ap5_Axo/hqdefault.jpg "SPACY v3: Custom trainable relation extraction component") ](https://www.youtube.com/watch?v=8HL-Ap5_Axo)

---

<div class="post-metadata">

**Author:** ![zaidkamil](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/zaidkamil/32/2215_2.png) [@zaidkamil](https://support.prodi.gy/u/zaidkamil)\
**Post date:** [August 26, 2021, 1:20am UTC](https://support.prodi.gy/t/question-about-ner-and-relation-annotation/4606/3 "2021-08-26T01:20:32Z")

</div>

Hi,  
Thanks, I will go through the suggested video.

Best regards  
Zaid Kamil
