Pipeline to Detect Diseases in Medical Text

Description

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

Predicted Entities

Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

text = '''Kniest dysplasia is a moderately severe type II collagenopathy, characterized by short trunk and limbs, kyphoscoliosis, midface hypoplasia, severe myopia, and hearing loss.'''

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

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

val text = "Kniest dysplasia is a moderately severe type II collagenopathy, characterized by short trunk and limbs, kyphoscoliosis, midface hypoplasia, severe myopia, and hearing loss."

val result = pipeline.fullAnnotate(text)
from sparknlp.pretrained import PretrainedPipeline

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

text = '''Kniest dysplasia is a moderately severe type II collagenopathy, characterized by short trunk and limbs, kyphoscoliosis, midface hypoplasia, severe myopia, and hearing loss.'''

result = pipeline.fullAnnotate(text)

Results

|    | ner_chunk              |   begin |   end | ner_label   |   confidence |
|---:|:-----------------------|--------:|------:|:------------|-------------:|
|  0 | Kniest dysplasia       |       0 |    15 | Disease     |     0.999886 |
|  1 | type II collagenopathy |      40 |    61 | Disease     |     0.999934 |
|  2 | kyphoscoliosis         |     104 |   117 | Disease     |     0.99994  |
|  3 | midface hypoplasia     |     120 |   137 | Disease     |     0.999911 |
|  4 | myopia                 |     147 |   152 | Disease     |     0.999894 |
|  5 | hearing loss           |     159 |   170 | Disease     |     0.999351 |

Model Information

Model Name: bert_token_classifier_ner_ncbi_disease_pipeline
Type: pipeline
Compatibility: Healthcare NLP 4.4.4+
License: Licensed
Edition: Official
Language: en
Size: 404.8 MB

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • MedicalBertForTokenClassifier
  • NerConverterInternalModel