Instructions to use kormilitzin/en_core_med7_lg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- spaCy
How to use kormilitzin/en_core_med7_lg with spaCy:
!pip install https://huggingface.co/kormilitzin/en_core_med7_lg/resolve/main/en_core_med7_lg-any-py3-none-any.whl # Using spacy.load(). import spacy nlp = spacy.load("en_core_med7_lg") # Importing as module. import en_core_med7_lg nlp = en_core_med7_lg.load() - Notebooks
- Google Colab
- Kaggle
Installation
pip install -U pip setuptools wheel
pip install "en-core-med7-lg @ https://huggingface.co/kormilitzin/en_core_med7_lg/resolve/main/en_core_med7_lg-1.1.0-py3-none-any.whl"
en_core_med7_lg
en_core_med7_lg is a non-transformer, large-vector spaCy pipeline for medication-related named entity recognition in English clinical text.
The model extracts the following entity types:
DRUGSTRENGTHDOSAGEDURATIONFREQUENCYFORMROUTE
Version
Current release: 1.1.0
This release was retrained and repackaged for the modern spaCy/transformers stack:
- Python
3.12.13 - spaCy
3.8.14
Unlike en_core_med7_trf, this model does not use a transformer backend and does not require spacy-transformers, transformers, tokenizers, or torch at runtime.
Citation
If you use this model, please cite the original Med7 paper:
Kormilitzin, A., Vaci, N., Liu, Q., & Nevado-Holgado, A. (2021). Med7: A transferable clinical natural language processing model for electronic health records. Artificial Intelligence in Medicine, 118, 102086. https://doi.org/10.1016/j.artmed.2021.102086
BibTeX:
@article{kormilitzin2021med7,
title = {Med7: A transferable clinical natural language processing model for electronic health records},
author = {Kormilitzin, Andrey and Vaci, Nemanja and Liu, Qiang and Nevado-Holgado, Alejo},
journal = {Artificial Intelligence in Medicine},
volume = {118},
pages = {102086},
year = {2021},
doi = {10.1016/j.artmed.2021.102086},
publisher = {Elsevier}
}
- Downloads last month
- 1,089
Space using kormilitzin/en_core_med7_lg 1
Evaluation results
- NER F1 on Med7 held-out evaluation splitself-reported0.889
- NER precision on Med7 held-out evaluation splitself-reported0.880
- NER recall on Med7 held-out evaluation splitself-reported0.898