Description
A pipeline for Adverse Drug Events (ADE) with ner_ade_biobert
, assertion_dl_biobert
, ,classifierdl_ade_conversational_biobert
, and re_ade_biobert
. It will classify the document, extract ADE and DRUG clinical entities, assign assertion status to ADE entities, and relate Drugs with their ADEs.
Live Demo Open in Colab Copy S3 URI
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("explain_clinical_doc_ade", "en", "clinical/models")
res = pipeline.fullAnnotate("""Been taking Lipitor for 15 years , have experienced severe fatigue a lot!!! . Doctor moved me to voltaren 2 months ago , so far , have only experienced cramps""")
from sparknlp.pretrained import PretrainedPipeline
val era_pipeline = new PretrainedPipeline("explain_clinical_doc_ade", "en", "clinical/models")
val result = era_pipeline.fullAnnotate("""Been taking Lipitor for 15 years , have experienced severe fatigue a lot!!! . Doctor moved me to voltaren 2 months ago , so far , have only experienced cramps""")(0)
import nlu
nlu.load("en.explain_doc.clinical_ade").predict("""Been taking Lipitor for 15 years , have experienced severe fatigue a lot!!! . Doctor moved me to voltaren 2 months ago , so far , have only experienced cramps""")
Results
Class: True
NER_Assertion:
| | chunk | entitiy | assertion |
|----|-------------------------|------------|-------------|
| 0 | Lipitor | DRUG | - |
| 1 | severe fatigue | ADE | Conditional |
| 2 | voltaren | DRUG | - |
| 3 | cramps | ADE | Conditional |
Relations:
| | chunk1 | entitiy1 | chunk2 | entity2 | relation |
|----|-------------------------------|------------|-------------|---------|----------|
| 0 | severe fatigue | ADE | Lipitor | DRUG | 1 |
| 1 | cramps | ADE | Lipitor | DRUG | 0 |
| 2 | severe fatigue | ADE | voltaren | DRUG | 0 |
| 3 | cramps | ADE | voltaren | DRUG | 1 |
Model Information
Model Name: | explain_clinical_doc_ade |
Type: | pipeline |
Compatibility: | Healthcare NLP 4.0.0+ |
License: | Licensed |
Edition: | Official |
Language: | en |
Size: | 484.6 MB |
Included Models
- DocumentAssembler
- TokenizerModel
- BertEmbeddings
- SentenceEmbeddings
- ClassifierDLModel
- MedicalNerModel
- NerConverterInternalModel
- PerceptronModel
- DependencyParserModel
- RelationExtractionModel
- NerConverterInternalModel
- AssertionDLModel