Pipeline to Detect chemicals in text

Description

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

Predicted Entities

CHEM

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

text = '''The results have shown that the product p - choloroaniline is not a significant factor in chlorhexidine - digluconate associated erosive cystitis. A high percentage of kanamycin - colistin and povidone - iodine irrigations were associated with erosive cystitis.'''

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

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

val text = "The results have shown that the product p - choloroaniline is not a significant factor in chlorhexidine - digluconate associated erosive cystitis. A high percentage of kanamycin - colistin and povidone - iodine irrigations were associated with erosive cystitis."

val result = pipeline.fullAnnotate(text)
import nlu
nlu.load("en.med_ner.chemicals.pipeline").predict("""The results have shown that the product p - choloroaniline is not a significant factor in chlorhexidine - digluconate associated erosive cystitis. A high percentage of kanamycin - colistin and povidone - iodine irrigations were associated with erosive cystitis.""")

Results

|    | ner_chunks                  |   begin |   end | ner_label   |   confidence |
|---:|:----------------------------|--------:|------:|:------------|-------------:|
|  0 | p - choloroaniline          |      40 |    57 | CHEM        |     0.935767 |
|  1 | chlorhexidine - digluconate |      90 |   116 | CHEM        |     0.855367 |
|  2 | kanamycin                   |     168 |   176 | CHEM        |     0.9824   |
|  3 | colistin                    |     180 |   187 | CHEM        |     0.9911   |
|  4 | povidone - iodine           |     193 |   209 | CHEM        |     0.8111   |

Model Information

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

Included Models

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