Pipeline to Detect Entities Related to Cancer Diagnosis

Description

This pretrained pipeline is built on the top of ner_oncology_diagnosis model.

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

pipeline = PretrainedPipeline("ner_oncology_diagnosis_pipeline", "en", "clinical/models")

text = '''Two years ago, the patient presented with a tumor in her left breast and adenopathies. She was diagnosed with invasive ductal carcinoma. Last week she was also found to have a lung metastasis.'''

result = pipeline.fullAnnotate(text)
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = new PretrainedPipeline("ner_oncology_diagnosis_pipeline", "en", "clinical/models")

val text = "Two years ago, the patient presented with a tumor in her left breast and adenopathies. She was diagnosed with invasive ductal carcinoma. Last week she was also found to have a lung metastasis."

val result = pipeline.fullAnnotate(text)

Results

|    | ner_chunks   |   begin |   end | ner_label         |   confidence |
|---:|:-------------|--------:|------:|:------------------|-------------:|
|  0 | tumor        |      44 |    48 | Tumor_Finding     |       0.9958 |
|  1 | adenopathies |      73 |    84 | Adenopathy        |       0.6287 |
|  2 | invasive     |     110 |   117 | Histological_Type |       0.9965 |
|  3 | ductal       |     119 |   124 | Histological_Type |       0.9996 |
|  4 | carcinoma    |     126 |   134 | Cancer_Dx         |       0.9988 |
|  5 | metastasis   |     181 |   190 | Metastasis        |       0.9996 |

Model Information

Model Name: ner_oncology_diagnosis_pipeline
Type: pipeline
Compatibility: Healthcare NLP 4.3.0+
License: Licensed
Edition: Official
Language: en
Size: 1.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel