Pipeline to Extract Demographic Entities from Oncology Texts

Description

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

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

text = '''The patient is a 40-year-old man with history of heavy smoking.'''

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

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

val text = "The patient is a 40-year-old man with history of heavy smoking."

val result = pipeline.fullAnnotate(text)

Results

|    | ner_chunks    |   begin |   end | ner_label      |   confidence |
|---:|:--------------|--------:|------:|:---------------|-------------:|
|  0 | 40-year-old   |      17 |    27 | Age            |       0.6743 |
|  1 | man           |      29 |    31 | Gender         |       0.9365 |
|  2 | heavy smoking |      49 |    61 | Smoking_Status |       0.7294 |

Model Information

Model Name: ner_oncology_demographics_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