Annotation scheme / workflow for entity relations

How do you recommend to use prodigy for these two examples?

  1. Training a custom parser for chat intent semantics
  2. Extracting entity relations

I haven't worked out a good flow for a task like that yet. My tasks is really entity relations but I see option one as another way to solve it as well - correct me if I'm wrong.

I just noticed this comment from @ines

I also recall @honnibal mentioning that he was looking into making a tutorial on the subject. I see that quite a few people asking about it so my question is: do you have something planned or should we not count on it anytime soon?

I'm a bit confused as to what you're asking exactly.

You can use Prodigy to label entity relations with the rel-manual recipe. More information in the docs: and

It's true that spaCy doesn't have a built-in implementation for predicting relations, as this is quite a challenging task to solve in a generic way. You can implement or bring your own model though, which should be much more easy to do with the new spaCy v3: Note that the example at the end of that page outlines how to implement such a REL component, but you'll still have to implement your own ML model...

Impressive answer if you didn't know what I was asking for.

This example was exactly what I was looking for. I.e. an example of how you'd approach a REL task. Thank you.

It would however be amazing with a full example - e.g. as a spacy project in a repo.

Impressive answer if you didn't know what I was asking for.

Haha, happy to hear it :wink:

It would however be amazing with a full example

For sure - this is work in progress :slight_smile:

1 Like

You guys :smiling_face_with_three_hearts:

Can I subscribe to it in a Github Issue or do you mind post an update when its ready? And is it expected within the next few months (understandable if not!)?

I'll ping you here, it should be ready within the next month :slight_smile:


Just barely made the "within the next month" promise - but here's the fully implemented example!

You can see the full code for the ML model and the corresponding pipeline component implementation in the project "scripts" folder.

Who knows, we might even plan a video tutorial around this example .... (stay tuned) !

1 Like