Mohammad
(Mismail)
January 31, 2023, 9:06am
1
What is prodigy relations" command can be used to train a relation extraction model which is a NLP task that aims to identify relationships between entities in a text.
hi @Mohammad !
There isn't a Prodigy command to train relation extractions because spaCy doesn't natively support them.
Hi! The problem here is that you're trying to train a syntactic dependency parser on data collected on entity relationships. These are fundamentally two very different tasks so it's not surprising you're seeing a 0 accuracy score here. The dependency parser just isn't the right fit for this task.
spaCy doesn't currently have a generic built-in relation prediction component because the type of model you want for this can often differ significantly between use cases. But this tutorial of implemen…
You may find Sofie's video/tutorial:
Also, there are multiple other posts (e.g., searching by the relations tag) like this on ideas on how to develop your own custom recipe:
Hi Pantelis,
In general your workflow is exactly how we'd recommend it. The REL component was developed as a tutorial and is not really robust and generic enough to cover any use-case, but I hope the provided example code can help you hit the ground running.
First, the extracted annotations from my rel.manual also have the Named Entities, but i think i have seen mentioned elsewhere that it still better to separately train the two tasks. So i should keep my already trained NER model and train …