Pipeline to Detect Units and Measurements in text

Description

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

Predicted Entities

Measurements, Units

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

text = '''Bilateral 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 anteromedial aspect of 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.'''

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

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

val text = "Bilateral 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 anteromedial aspect of 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."

val result = pipeline.fullAnnotate(text)
import nlu
nlu.load("en.med_ner.clinical_measurements.pipeline").predict("""Bilateral 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 anteromedial aspect of 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

|    | ner_chunks      |   begin |   end | ner_label    |   confidence |
|---:|:----------------|--------:|------:|:-------------|-------------:|
|  0 | 0.5 x 0.5 x 0.4 |     113 |   127 | Measurements |      0.98748 |
|  1 | cm              |     129 |   130 | Units        |      0.9996  |

Model Information

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