Skip to content

How to train NER and Relation Extraction model together #9139

Discussion options

You must be logged in to vote

Don't use all capitals when creating an issue.

As mentioned in the training data section of the docs, training data in spaCy just consists of making the Doc objects you want to see as output from your model. One thing that's a little tricky is that you can't specify different training data for different components - if you want to train multiple components at the same time, you need give the same data to all of them. In this case this means that your training data needs both relation annotations and NER annotations on each individual doc. Because training data for relation extraction already includes entity labels you should just be able to use your relation extraction training data as is…

Replies: 4 comments 26 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by svlandeg
Comment options

You must be logged in to vote
20 replies
@Rithik-Alias
Comment options

@polm
Comment options

@Rithik-Alias
Comment options

@panchalsp
Comment options

@Faizan-Siddique
Comment options

Comment options

You must be logged in to vote
6 replies
@karndeepsingh
Comment options

@Lolologist
Comment options

@karndeepsingh
Comment options

@polm
Comment options

@Lolologist
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
training Training and updating models feat / ner Feature: Named Entity Recognizer feat / rel Feature: Relation Extractor
8 participants