Description
This pretrained pipeline is built on the top of umls_major_concepts_mapper model and maps entities (Major Clinical Concepts) with corresponding UMLS CUI codes.
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("umls_major_concepts_mapping", "en", "clinical/models")
sample_text = """ The patient complains of pustules after falling from stairs. Also, she has a history of quadriceps tendon rupture."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
from johnsnowlabs import nlp, medical
pipeline = nlp.PretrainedPipeline("umls_major_concepts_mapping", "en", "clinical/models")
sample_text = """ The patient complains of pustules after falling from stairs. Also, she has a history of quadriceps tendon rupture."""
result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = PretrainedPipeline("umls_major_concepts_mapping", "en", "clinical/models")
val sample_text = """ The patient complains of pustules after falling from stairs. Also, she has a history of quadriceps tendon rupture."""
val result = pipeline.transform(spark.createDataFrame([[sample_text]]).toDF("text"))
Results
| chunk | umls_code |
| :------------------------ | :-------- |
| pustules | C0241157 |
| stairs | C4300351 |
| quadriceps tendon rupture | C0263968 |
Model Information
| Model Name: | umls_major_concepts_mapping |
| Type: | pipeline |
| Compatibility: | Healthcare NLP 6.3.0+ |
| License: | Licensed |
| Edition: | Official |
| Language: | en |
| Size: | 1.8 GB |
Included Models
- DocumentAssembler
- SentenceDetector
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMapperModel