Description
This pretrained pipeline is built on the top of umls_mesh_mapper model and maps UMLS codes to corresponding MESH codes
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("umls_mesh_mapping", "en", "clinical/models")
sample_text = """ [['C0000530'], ['C0000726'], ['C0000343'], ['C5416820']]"""
result = pipeline.transform(spark.createDataFrame(sample_text).toDF("text"))
from johnsnowlabs import nlp, medical
pipeline = nlp.PretrainedPipeline("umls_mesh_mapping", "en", "clinical/models")
sample_text = """ [['C0000530'], ['C0000726'], ['C0000343'], ['C5416820']]"""
result = pipeline.transform(spark.createDataFrame(sample_text).toDF("text"))
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = PretrainedPipeline("umls_mesh_mapping", "en", "clinical/models")
val sample_text = """ [['C0000530'], ['C0000726'], ['C0000343'], ['C5416820']]"""
val result = pipeline.transform(spark.createDataFrame(sample_text).toDF("text"))
Results
| umls_code | mesh_code |
| :-------- | :--------- |
| C0000530 | D015720 |
| C0000726 | D000005 |
| C0000343 | D015652 |
| C5416820 | C000722768 |
Model Information
| Model Name: | umls_mesh_mapping |
| Type: | pipeline |
| Compatibility: | Healthcare NLP 6.3.0+ |
| License: | Licensed |
| Edition: | Official |
| Language: | en |
| Size: | 6.2 MB |
Included Models
- DocumentAssembler
- Doc2Chunk
- ChunkMapperModel