Pipeline to Extract Entities in Clinical Trial Abstracts

Description

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

Predicted Entities

TimePoint, PublicationYear, Drug, BioAndMedicalUnit, DisorderOrSyndrome, Author, Journal, AllocationRatio, Duration, PValue, PMID, Country, DrugTime, DoseValue, CTDesign, Age, NumberPatients, CTAnalysisApproach, Value, Confidence, PercentagePatients

Open in Colab Copy S3 URI

How to use

from sparknlp.pretrained import PretrainedPipeline

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

result = pipeline.fullAnnotate("""A one-year, randomised, multicentre trial comparing insulin glargine with NPH insulin in combination with oral agents in patients with type 2 diabetes. In a multicentre, open, randomised study, 570 patients with Type 2 diabetes, aged 34 - 80 years, were treated for 52 weeks with insulin glargine or NPH insulin given once daily at bedtime.""")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline

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

val result = pipeline.fullAnnotate("""A one-year, randomised, multicentre trial comparing insulin glargine with NPH insulin in combination with oral agents in patients with type 2 diabetes. In a multicentre, open, randomised study, 570 patients with Type 2 diabetes, aged 34 - 80 years, were treated for 52 weeks with insulin glargine or NPH insulin given once daily at bedtime.""")
import nlu
nlu.load("en.med_ner.clinical_trials_abstracts.pipe").predict("""A one-year, randomised, multicentre trial comparing insulin glargine with NPH insulin in combination with oral agents in patients with type 2 diabetes. In a multicentre, open, randomised study, 570 patients with Type 2 diabetes, aged 34 - 80 years, were treated for 52 weeks with insulin glargine or NPH insulin given once daily at bedtime.""")

Results

+----------------+------------------+
|           chunk|             label|
+----------------+------------------+
|      randomised|          CTDesign|
|     multicentre|          CTDesign|
|insulin glargine|              Drug|
|     NPH insulin|              Drug|
| type 2 diabetes|DisorderOrSyndrome|
|     multicentre|          CTDesign|
|            open|          CTDesign|
|      randomised|          CTDesign|
|             570|    NumberPatients|
| Type 2 diabetes|DisorderOrSyndrome|
|              34|               Age|
|              80|               Age|
|        52 weeks|          Duration|
|insulin glargine|              Drug|
|     NPH insulin|              Drug|
|      once daily|          DrugTime|
|         bedtime|          DrugTime|
+----------------+------------------+

Model Information

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

Included Models

  • DocumentAssembler
  • SentenceDetectorDLModel
  • TokenizerModel
  • WordEmbeddingsModel
  • MedicalNerModel
  • NerConverter