How to train and correct a Named Entity Recognition with relation extraction

Hi! The prodigy train command lets you train a single component, specified via the first argument. Training parser will train a dependency parser, and spaCy will expect dependency parsing annotations. spaCy doesn't currently have a built-in component for entity relation extraction, so you'd have to bring your own implementation for that. See this thread for details:

You can always load pre-annotated data into Prodigy by providing input data in the same format. See here for what the relations interface expects: https://prodi.gy/docs/api-interfaces#relations

So if you have a model or some other process that outputs relations, you can run it over the incoming texts, add a "relations" key with the predictions and then correct them manually in the UI. Here's an example for how this works for NER: Named Entity Recognition · Prodigy · An annotation tool for AI, Machine Learning & NLP The same works for relations – you'd just be adding a key "relations" instead :slightly_smiling_face:

1 Like