EntityLinker returns different CUIs with every run
See original GitHub issueHi,
I’m running into a weird issue with NER extraction.
Different runs on the same document gives me identical entities, but different CUIs. I noticed the EntityLinker guide says it uses an approximate nearest neighbor search while linking entities to the KB.
This is the config I’m using:
linker = EntityLinker(resolve_abbreviations=True, name="umls", max_entities_per_mention=1, k=1)
Configuration:
>>> spacy.__version__
'2.3.4'
>>> scispacy.__version__
'0.3.0'
Question: How do I make the results deterministic?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
EntityLinker knowledge base returns CUIs not MeSH IDs ...
I'm using scispaCy entity linker using this snippet: from scispacy.linking import EntityLinker import spacy, scispacy config ...
Read more >EntityLinker · spaCy API Documentation
An EntityLinker component disambiguates textual mentions (tagged as named entities) ... it should return a single array, with one row per item in...
Read more >Incorrect entity being returned by EntityLinker Spacy
The way the Entity Linker works is that, given all potential candidates for an entity, it picks the most likely one.
Read more >ML4LHS/clinspacy source - Rdrr.io
This function is optional to run but gives you more #' control over the ... clinspacy_env$nlp$remove_pipe('EntityLinker') return(invisible()) } else ...
Read more >spacy-entity-linker - PyPI
Spacy Entity Linker is a pipeline for spaCy that performs Linked Entity Extraction ... returns all entities in the whole document all_linked_entities =...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yup, that works - thanks again!
ahh, i see. As a work around, i think you can do something like this, after loading the entity linker on just the core model
I’m not sure if there is a way to add a pipe without creating a copy of it in spacy3, will have to look into it.