Pipeline to Detect Pathogen, Medical Condition and Medicine

Description

This pretrained pipeline is built on the top of ner_pathogen model.

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

pipeline = PretrainedPipeline("ner_pathogen_pipeline", "en", "clinical/models")

text = '''Racecadotril is an antisecretory medication and it has better tolerability than loperamide. Diarrhea is the condition of having loose, liquid or watery bowel movements each day. Signs of dehydration often begin with loss of the normal stretchiness of the skin.  This can progress to loss of skin color, a fast heart rate as it becomes more severe.  While it has been speculated that rabies virus, Lyssavirus and Ephemerovirus could be transmitted through aerosols, studies have concluded that this is only feasible in limited conditions.'''

result = pipeline.fullAnnotate(text)
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

val pipeline = new PretrainedPipeline("ner_pathogen_pipeline", "en", "clinical/models")

val text = "Racecadotril is an antisecretory medication and it has better tolerability than loperamide. Diarrhea is the condition of having loose, liquid or watery bowel movements each day. Signs of dehydration often begin with loss of the normal stretchiness of the skin.  This can progress to loss of skin color, a fast heart rate as it becomes more severe.  While it has been speculated that rabies virus, Lyssavirus and Ephemerovirus could be transmitted through aerosols, studies have concluded that this is only feasible in limited conditions."

val result = pipeline.fullAnnotate(text)
import nlu
nlu.load("en.med_ner.pathogen.pipeline").predict("""Racecadotril is an antisecretory medication and it has better tolerability than loperamide. Diarrhea is the condition of having loose, liquid or watery bowel movements each day. Signs of dehydration often begin with loss of the normal stretchiness of the skin.  This can progress to loss of skin color, a fast heart rate as it becomes more severe.  While it has been speculated that rabies virus, Lyssavirus and Ephemerovirus could be transmitted through aerosols, studies have concluded that this is only feasible in limited conditions.""")

Results

|    | ner_chunks      |   begin |   end | ner_label        |   confidence |
|---:|:----------------|--------:|------:|:-----------------|-------------:|
|  0 | Racecadotril    |       0 |    11 | Medicine         |     0.9468   |
|  1 | loperamide      |      80 |    89 | Medicine         |     0.9986   |
|  2 | Diarrhea        |      92 |    99 | MedicalCondition |     0.9848   |
|  3 | dehydration     |     187 |   197 | MedicalCondition |     0.6305   |
|  4 | skin color      |     291 |   300 | MedicalCondition |     0.6586   |
|  5 | fast heart rate |     305 |   319 | MedicalCondition |     0.757233 |
|  6 | rabies virus    |     383 |   394 | Pathogen         |     0.95685  |
|  7 | Lyssavirus      |     397 |   406 | Pathogen         |     0.9694   |
|  8 | Ephemerovirus   |     412 |   424 | Pathogen         |     0.6919   |

Model Information

Model Name: ner_pathogen_pipeline
Type: pipeline
Compatibility: Healthcare NLP 4.3.0+
License: Licensed
Edition: Official
Language: en
Size: 1.7 GB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverterInternalModel