Procedure Text Matcher Pipeline

Description

This pipeline, extracts medical procedure entities in clinical text. It recognizes procedures including colonoscopy, biopsy, MRI, CT scan, echocardiogram, endoscopy, blood transfusion, and more.

Copy S3 URI

How to use


from sparknlp.pretrained import PretrainedPipeline

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

sample_text = """ The patient presented with gastrointestinal symptoms. A colonoscopy was performed which revealed a suspicious lesion, and a biopsy was obtained for pathological examination."""

result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))


from johnsnowlabs import nlp, medical

pipeline = nlp.PretrainedPipeline("procedure_matcher_pipeline", "en", "clinical/models")

sample_text = """ The patient presented with gastrointestinal symptoms. A colonoscopy was performed which revealed a suspicious lesion, and a biopsy was obtained for pathological examination."""

result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))


import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

val sample_text = """ The patient presented with gastrointestinal symptoms. A colonoscopy was performed which revealed a suspicious lesion, and a biopsy was obtained for pathological examination."""

val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))

Results


| chunk       | begin | end | label     |
| :---------- | ----: | --: | :-------- |
| colonoscopy |    56 |  66 | PROCEDURE |
| biopsy      |   124 | 129 | PROCEDURE |

Model Information

Model Name: procedure_matcher_pipeline
Type: pipeline
Compatibility: Healthcare NLP 6.3.0+
License: Licensed
Edition: Official
Language: en
Size: 965.8 KB

Included Models

  • DocumentAssembler
  • SentenceDetector
  • TokenizerModel
  • TextMatcherInternalModel
  • ChunkConverter