Registry /
ai-ml / drug-named-entity-recognition
Install & Compatibility
Where this runs
tested against v2.0.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 22.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 23MB
21MB installed
● package 21MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
drugs_finder
✓ from drug_named_entity_recognition import drugs_finder
✗ from drug_named_entity_recognition import DrugNER
find_drugs
✓ from drug_named_entity_recognition import find_drugs
✗ from drug_named_entity_recognition import DrugNER
molecular_properties
✓ from drug_named_entity_recognition import molecular_properties
✗ from drug_named_entity_recognition import DrugNER
Initialize DrugNER and extract drug entities from a text string.
from drug_named_entity_recognition import DrugNER
drug_ner = DrugNER()
text = "Patient was given 500mg of Paracetamol and 10mg of Diazepam."
entities = drug_ner.find_entities(text)
print(entities)
# Example output: [{'name': 'paracetamol', 'rxnorm': '161', 'start': 24, 'end': 35, ...}, ...]
Upgrade
Version history
2.0.9latest on PyPI · released Jul 15, 2025
Audit
Dependencies
scispacyrequiredRequired for loading the biomedical NLP pipeline (en_core_sci_sm) used for drug entity recognition.
spacyrequiredCore NLP library dependency. Version must be compatible with scispacy.