Skip to content
Discussion options

You must be logged in to vote

Do I need a NER model to identify the drugs (my entities) in the first place?

Yes, the relex component uses existing entity annotations to find potential relations, so you need something that sets entities. Usually that would be an NER model, though it could be rule-based (an EntityRuler).

In what format should I have the corpus? I saw this example,

You need to make a .spacy file that has Docs that look like you want your output to look - they should have the right entities and the right relation data in the doc._.rel attribute. The preprocessing script in the demo project builds a file like that (it's the DocBin). In this data token_start and token_end are the token indices of the te…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@CarlaMPR
Comment options

@polm
Comment options

Answer selected by CarlaMPR
Comment options

You must be logged in to vote
1 reply
@polm
Comment options

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 / rel Feature: Relation Extractor
3 participants