Pipeline to Extract Entities Related to TNM Staging

Description

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

Predicted Entities

Cancer_Dx, Lymph_Node, Metastasis, Tumor_Description, Staging, Tumor, Lymph_Node_Modifier

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

text = '''The final diagnosis was metastatic breast carcinoma, and it was classified as T2N1M1 stage IV. The histological grade of this 4 cm tumor was grade 2.'''

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

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

val text = "The final diagnosis was metastatic breast carcinoma, and it was classified as T2N1M1 stage IV. The histological grade of this 4 cm tumor was grade 2."

val result = pipeline.fullAnnotate(text)

Results

|    | ner_chunks       |   begin |   end | ner_label         |   confidence |
|---:|:-----------------|--------:|------:|:------------------|-------------:|
|  0 | metastatic       |      24 |    33 | Metastasis        |     0.9999   |
|  1 | breast carcinoma |      35 |    50 | Cancer_Dx         |     0.9972   |
|  2 | T2N1M1 stage IV  |      78 |    92 | Staging           |     0.905267 |
|  3 | 4 cm             |     126 |   129 | Tumor_Description |     0.85105  |
|  4 | tumor            |     131 |   135 | Tumor             |     0.9926   |
|  5 | grade 2          |     141 |   147 | Tumor_Description |     0.89705  |

Model Information

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

Included Models

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