Pipeline to Detect Radiology Related Entities

Description

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

Live Demo Open in Colab Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

pipeline.fullAnnotate("Breast ultrasound was subsequently performed, which demonstrated an ovoid mass measuring approximately 0.5 x 0.5 x 0.4 cm in diameter located within the left shoulder. This mass demonstrates isoechoic echotexture to the adjacent muscle, with no evidence of internal color flow. This may represent benign fibrous tissue or a lipoma.")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

pipeline.fullAnnotate("Breast ultrasound was subsequently performed, which demonstrated an ovoid mass measuring approximately 0.5 x 0.5 x 0.4 cm in diameter located within the left shoulder. This mass demonstrates isoechoic echotexture to the adjacent muscle, with no evidence of internal color flow. This may represent benign fibrous tissue or a lipoma.")
import nlu
nlu.load("en.med_ner.radiology.pipeline").predict("""Breast ultrasound was subsequently performed, which demonstrated an ovoid mass measuring approximately 0.5 x 0.5 x 0.4 cm in diameter located within the left shoulder. This mass demonstrates isoechoic echotexture to the adjacent muscle, with no evidence of internal color flow. This may represent benign fibrous tissue or a lipoma.""")

Results

+---------------------+-------------------------+
|chunk                |ner_label                |
+---------------------+-------------------------+
|Breast               |BodyPart                 |
|ultrasound           |ImagingTest              |
|ovoid mass           |ImagingFindings          |
|0.5 x 0.5 x 0.4      |Measurements             |
|cm                   |Units                    |
|left shoulder        |BodyPart                 |
|mass                 |ImagingFindings          |
|isoechoic echotexture|ImagingFindings          |
|muscle               |BodyPart                 |
|internal color flow  |ImagingFindings          |
|benign fibrous tissue|ImagingFindings          |
|lipoma               |Disease_Syndrome_Disorder|
+---------------------+-------------------------+

Model Information

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

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverter