Description
This pretrained pipeline is built on the top of umls_disease_syndrome_mapper model and maps entities (Disease or Syndrome) with corresponding UMLS CUI codes.
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("umls_disease_syndrome_mapping", "en", "clinical/models")
sample_text = """ A 35-year-old male with a history of obesity and gestational diabetes mellitus and acyclovir allergy."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
from johnsnowlabs import nlp, medical
pipeline = nlp.PretrainedPipeline("umls_disease_syndrome_mapping", "en", "clinical/models")
sample_text = """ A 35-year-old male with a history of obesity and gestational diabetes mellitus and acyclovir allergy."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = PretrainedPipeline("umls_disease_syndrome_mapping", "en", "clinical/models")
val sample_text = """ A 35-year-old male with a history of obesity and gestational diabetes mellitus and acyclovir allergy."""
val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
Results
| chunk | umls_code |
| :---------------------------- | :-------- |
| obesity | C0028754 |
| gestational diabetes mellitus | C0085207 |
| acyclovir allergy | C0571297 |
Model Information
| Model Name: | umls_disease_syndrome_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