How to create an Entity Linker without Knowledgebase #12775
Unanswered
ecemture
asked this question in
Help: Coding & Implementations
Replies: 1 comment 2 replies
-
Hi @ecemture, to make sure I understand correctly: are you looking to write your own entity linking component or do you want to use spaCy's implementation? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a custom dataset, and I trained a NER transformer model with it. I want to implement an Entity Linker. However, spacy’s entity linker approach requires a knowledge base.
I couldn’t create a knowledge base because I didn’t have any aliases or prior probabilities in my dataset. To overcome this issue, I started to use a MongoDB API and implemented a get_candidates() function. This get_candidates function returns entity_id, entity_vector, and span. Here is the output format of it:
[
{
"_id": "string",
"wiki_id": "string",
"prior_prob": 0,
"frequency": 0,
"embeddings": "Unknown Type: list"
}
]
I am hoping to replace Spacy’s get_candidates function, so whenever the entity_linker sends a request to the knowledgebase, it will get a response from my database. I want to train the entity_linker model by using this structure. The problem is get_candidates() function of spacy returns a Candidate object which takes the knowledge base as input.
So I wonder, is there any way to use this function without creating a knowledge base? How many functions should I rewrite If I want to create a Candidate() object with Knowledgebase equal to None?
Beta Was this translation helpful? Give feedback.
All reactions