Description
This pretrained pipeline is built on the top of umls_clinical_findings_mapper model and maps clinical entities with corresponding UMLS CUI codes.
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("umls_clinical_findings_mapping", "en", "clinical/models")
sample_text = """ A 28-year-old female with a history of obesity with BMI of 33.5 kg/m2, presented with a one-week history of reduced fatigue."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
from johnsnowlabs import nlp, medical
pipeline = nlp.PretrainedPipeline("umls_clinical_findings_mapping", "en", "clinical/models")
sample_text = """ A 28-year-old female with a history of obesity with BMI of 33.5 kg/m2, presented with a one-week history of reduced fatigue."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = PretrainedPipeline("umls_clinical_findings_mapping", "en", "clinical/models")
val sample_text = """ A 28-year-old female with a history of obesity with BMI of 33.5 kg/m2, presented with a one-week history of reduced fatigue."""
val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
Results
| chunk | umls_code |
| :-------------- | :-------- |
| obesity | C4759928 |
| BMI | C0578022 |
| reduced fatigue | C5547024 |
Model Information
| Model Name: | umls_clinical_findings_mapping |
| Type: | pipeline |
| Compatibility: | Healthcare NLP 6.3.0+ |
| License: | Licensed |
| Edition: | Official |
| Language: | en |
| Size: | 1.7 GB |
Included Models
- DocumentAssembler
- SentenceDetector
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMapperModel