relation extraction

Dear Ines,

I have done a refined NER using prodigy, It works good. I want to provide training data for relation extraction, dows prodigy offer something for that? do you have any idea how can priovide tuple including (N1, relation,N2) many thanks!

Relation extraction support is currently fairly limited. You can use the dep view, as shown here: https://prodi.gy/demo?view_id=dep , so long as you have a way of proposing the arcs.

Another alternative is, if your relation structures are very limited (e.g. you know you can only have up to three relations in a sentence), and you know you can identify the anchors (e.g. they're always entities), you could use the text categoriser. You would have one category per relation structure, e.g. one category would be "1 buys 2", and another category would be "2 buys 1". You'd label a sentence like Google bought YouTube as 1 buys 2, and a sentence like YouTube was sold to Google as 2 buys 1.

1 Like

thank you very much for your exact and relevant responses. basically for this kind of dep, I need training data? I could not find the documentation. the next question is that where is the text categorizer?

Hi,
I have trained separate NER models for address, phone number, email id, etc and now I want to link these entities to one / more person. Is there any way to use real.manual on these models and then train the 'rel' model for identifying further relations? Or is there any alternative way to go about it.

Thanks

You can definitely use rel.manual to create the data for this, and even feed in pre-labelled entity annotations. But there's currently no out-of-the-box component you can train in spaCy, so you'd have to use your own model implementation.

Also see the related threads here:

Thank you for the quick response. Appreciate it!