Description
This pipeline is designed to extract all entities mappable to SNOMED Conditions codes.
2 NER models are used to achieve those tasks.
How to use
from sparknlp.pretrained import PretrainedPipeline
ner_pipeline = PretrainedPipeline("ner_snomed_conditions_pipeline", "en", "clinical/models")
result = ner_pipeline.annotate("""
Medical professionals rushed in the bustling emergency room to attend to the patient with distressed breathing.
The attending physician immediately noted signs of respiratory distress, including stridor, a high-pitched sound indicative of upper respiratory tract obstruction.
The patient, struggling to breathe, exhibited dyspnea.
Concern raised when they began experiencing syncope, sudden loss of consciousness likely stemming from inadequate oxygenation.
Further examination revealed a respiratory tract hemorrhage.
""")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val ner_pipeline = PretrainedPipeline("ner_snomed_conditions_pipeline", "en", "clinical/models")
val result = ner_pipeline.annotate("""
Medical professionals rushed in the bustling emergency room to attend to the patient with distressed breathing.
The attending physician immediately noted signs of respiratory distress, including stridor, a high-pitched sound indicative of upper respiratory tract obstruction.
The patient, struggling to breathe, exhibited dyspnea.
Concern raised when they began experiencing syncope, sudden loss of consciousness likely stemming from inadequate oxygenation.
Further examination revealed a respiratory tract hemorrhage.
""")
Results
| | chunks | begin | end | entities |
|---:|:------------------------------------|--------:|------:|:--------------------------|
| 0 | distressed breathing | 91 | 110 | Symptom |
| 1 | respiratory distress | 164 | 183 | VS_Finding |
| 2 | stridor | 196 | 202 | Symptom |
| 3 | a high-pitched sound | 205 | 224 | PROBLEM |
| 4 | upper respiratory tract obstruction | 240 | 274 | Disease_Syndrome_Disorder |
| 5 | struggling to breathe | 290 | 310 | Symptom |
| 6 | dyspnea | 323 | 329 | Symptom |
| 7 | syncope | 377 | 383 | Symptom |
| 8 | sudden loss of consciousness | 386 | 413 | PROBLEM |
| 9 | inadequate oxygenation | 436 | 457 | Symptom |
| 10 | a respiratory tract hemorrhage | 490 | 519 | PROBLEM |
Model Information
Model Name: | ner_snomed_conditions_pipeline |
Type: | pipeline |
Compatibility: | Healthcare NLP 6.0.2+ |
License: | Licensed |
Edition: | Official |
Language: | en |
Size: | 1.7 GB |
Included Models
- DocumentAssembler
- SentenceDetectorDLModel
- TokenizerModel
- WordEmbeddingsModel
- MedicalNerModel
- NerConverterInternalModel
- MedicalNerModel
- NerConverterInternalModel
- ChunkMergeModel