Description
This pipeline includes Named-Entity Recognition and Assertion Status models to extract information from oncology texts. This pipeline focuses on entities related to therapies.
Live Demo Open in Colab Copy S3 URI
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("oncology_therapy_pipeline", "en", "clinical/models")
pipeline.fullAnnotate("The patient underwent a mastectomy two years ago. She is currently receiving her second cycle of adriamycin and cyclophosphamide, and is in good overall condition.")[0]
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = new PretrainedPipeline("oncology_therapy_pipeline", "en", "clinical/models")
val result = pipeline.fullAnnotate("""The patient underwent a mastectomy two years ago. She is currently receiving her second cycle of adriamycin and cyclophosphamide, and is in good overall condition.""")(0)
import nlu
nlu.load("en.oncology_therpay.pipeline").predict("""The patient underwent a mastectomy two years ago. She is currently receiving her second cycle of adriamycin and cyclophosphamide, and is in good overall condition.""")
Results
******************** ner_oncology_wip results ********************
| chunk | ner_label |
|:-----------------|:---------------|
| mastectomy | Cancer_Surgery |
| second cycle | Cycle_Number |
| adriamycin | Chemotherapy |
| cyclophosphamide | Chemotherapy |
******************** ner_oncology_wip results ********************
| chunk | ner_label |
|:-----------------|:---------------|
| mastectomy | Cancer_Surgery |
| second cycle | Cycle_Number |
| adriamycin | Chemotherapy |
| cyclophosphamide | Chemotherapy |
******************** ner_oncology_wip results ********************
| chunk | ner_label |
|:-----------------|:---------------|
| mastectomy | Cancer_Surgery |
| second cycle | Cycle_Number |
| adriamycin | Cancer_Therapy |
| cyclophosphamide | Cancer_Therapy |
******************** ner_oncology_unspecific_posology_wip results ********************
| chunk | ner_label |
|:-----------------|:---------------------|
| mastectomy | Cancer_Therapy |
| second cycle | Posology_Information |
| adriamycin | Cancer_Therapy |
| cyclophosphamide | Cancer_Therapy |
******************** assertion_oncology_wip results ********************
| chunk | ner_label | assertion |
|:-----------------|:---------------|:------------|
| mastectomy | Cancer_Surgery | Past |
| adriamycin | Chemotherapy | Present |
| cyclophosphamide | Chemotherapy | Present |
******************** assertion_oncology_treatment_binary_wip results ********************
| chunk | ner_label | assertion |
|:-----------------|:---------------|:----------------|
| mastectomy | Cancer_Surgery | Present_Or_Past |
| adriamycin | Chemotherapy | Present_Or_Past |
| cyclophosphamide | Chemotherapy | Present_Or_Past |
Model Information
Model Name: | oncology_therapy_pipeline |
Type: | pipeline |
Compatibility: | Spark NLP for Healthcare 4.2.2+ |
License: | Licensed |
Edition: | Official |
Language: | en |
Size: | 1.7 GB |
Included Models
- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverter
- MedicalNerModel
- NerConverter
- MedicalNerModel
- NerConverter
- MedicalNerModel
- NerConverter
- ChunkMergeModel
- ChunkMergeModel
- AssertionDLModel
- AssertionDLModel