NER Model Finder with Sentence Entity Resolvers (sbert_jsl_medium_uncased)

Description

This model maps clinical entities (NER labels) to the most appropriate NER model using sbert_jsl_medium_uncased Sentence Bert Embeddings. Given the entity name, it will return a list of pretrained NER models having that entity or similar ones.

Predicted Entities

ner_model_list

Open in Colab Copy S3 URI

How to use

documentAssembler = DocumentAssembler()\
    .setInputCol("text")\
    .setOutputCol("ner_chunk")

sbert_embedder = BertSentenceEmbeddings.pretrained("sbert_jsl_medium_uncased","en","clinical/models")\
    .setInputCols(["ner_chunk"])\
    .setOutputCol("sbert_embeddings")

ner_model_finder = SentenceEntityResolverModel.pretrained("sbertresolve_ner_model_finder", "en", "clinical/models")\
    .setInputCols(["sbert_embeddings"])\
    .setOutputCol("model_names")\
    .setDistanceFunction("EUCLIDEAN")

    
ner_model_finder_pipelineModel = PipelineModel(stages = [documentAssembler, sbert_embedder, ner_model_finder])

light_pipeline = LightPipeline(ner_model_finder_pipelineModel)

annotations = light_pipeline.fullAnnotate("medication")
val documentAssembler = new DocumentAssembler()
    .setInputCol("text")
    .setOutputCol("ner_chunk")

val sbert_embedder = BertSentenceEmbeddings.pretrained("sbert_jsl_medium_uncased","en","clinical/models")
    .setInputCols(Array("ner_chunk"))
    .setOutputCol("sbert_embeddings")
    
val ner_model_finder = SentenceEntityResolverModel.pretrained("sbertresolve_ner_model_finder", "en", "clinical/models")
    .setInputCols(Array("sbert_embeddings"))
    .setOutputCol("model_names")
    .setDistanceFunction("EUCLIDEAN")

    
val ner_model_finder_pipelineModel = new PipelineModel().setStages(Array(documentAssembler, sbert_embedder, ner_model_finder))

val light_pipeline = LightPipeline(ner_model_finder_pipelineModel)

val annotations = light_pipeline.fullAnnotate("medication")

import nlu
nlu.load("en.resolve.ner.model_finder").predict("""Put your text here.""")

Results

+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|entity    |models                                                                                                                                                                                                                                                                                                                             |all_models                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |resolutions                                                                                                                                                                                                                                                                       |
+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|medication|['ner_posology_greedy', 'jsl_ner_wip_modifier_clinical', 'ner_posology_small', 'ner_jsl_greedy', 'ner_ade_clinical', 'ner_posology', 'ner_risk_factors', 'ner_ade_healthcare', 'ner_drugs_large', 'ner_jsl_slim', 'ner_posology_experimental', 'ner_posology_large', 'ner_posology_healthcare', 'ner_drugs_greedy', 'ner_pathogen']|['ner_posology_greedy', 'jsl_ner_wip_modifier_clinical', 'ner_posology_small', 'ner_jsl_greedy', 'ner_ade_clinical', 'ner_posology', 'ner_risk_factors', 'ner_ade_healthcare', 'ner_drugs_large', 'ner_jsl_slim', 'ner_posology_experimental', 'ner_posology_large', 'ner_posology_healthcare', 'ner_drugs_greedy', 'ner_pathogen']:::['ner_posology_greedy', 'jsl_ner_wip_modifier_clinical', 'ner_posology_small', 'ner_jsl_greedy', 'ner_ade_clinical', 'ner_nature_nero_clinical', 'ner_posology', 'ner_biomarker', 'ner_clinical_trials_abstracts', 'ner_risk_factors', 'ner_ade_healthcare', 'ner_drugs_large', 'ner_jsl_slim', 'ner_posology_experimental', 'ner_posology_large', 'ner_posology_healthcare', 'ner_drugs_greedy']:::['ner_covid_trials', 'ner_jsl', 'jsl_rd_ner_wip_greedy_clinical', 'jsl_ner_wip_modifier_clinical', 'ner_healthcare', 'ner_jsl_enriched', 'ner_events_clinical', 'ner_jsl_greedy', 'ner_clinical', 'ner_clinical_large', 'ner_jsl_slim', 'ner_events_healthcare', 'ner_events_admission_clinical']:::['ner_biomarker']:::['ner_medmentions_coarse']:::['ner_covid_trials', 'ner_jsl_enriched', 'ner_jsl', 'ner_medmentions_coarse']:::['ner_drugs']:::['ner_nature_nero_clinical']:::['ner_jsl', 'jsl_rd_ner_wip_greedy_clinical', 'jsl_ner_wip_modifier_clinical', 'ner_medmentions_coarse', 'ner_jsl_enriched', 'ner_jsl_greedy']:::['ner_jsl', 'jsl_rd_ner_wip_greedy_clinical', 'ner_nature_nero_clinical', 'ner_medmentions_coarse', 'jsl_ner_wip_modifier_clinical', 'ner_jsl_enriched', 'ner_radiology_wip_clinical', 'ner_jsl_greedy', 'ner_radiology', 'ner_jsl_slim']:::['ner_posology_experimental']:::['ner_pathogen']:::['ner_measurements_clinical', 'jsl_rd_ner_wip_greedy_clinical', 'ner_nature_nero_clinical', 'ner_radiology_wip_clinical', 'ner_radiology', 'ner_nihss']:::['ner_jsl', 'ner_posology_greedy', 'jsl_rd_ner_wip_greedy_clinical', 'jsl_ner_wip_modifier_clinical', 'ner_posology_small', 'ner_jsl_enriched', 'ner_jsl_greedy', 'ner_posology', 'ner_posology_experimental', 'ner_posology_large', 'ner_posology_healthcare']:::['ner_covid_trials', 'ner_jsl', 'jsl_rd_ner_wip_greedy_clinical', 'ner_medmentions_coarse', 'jsl_ner_wip_modifier_clinical', 'ner_jsl_enriched', 'ner_jsl_greedy']:::['ner_clinical_trials_abstracts']:::['ner_medmentions_coarse', 'ner_nature_nero_clinical']|medication:::drug:::treatment:::targeted therapy:::therapeutic procedure:::drug ingredient:::drug chemical:::medical procedure:::substance:::medical device:::administration:::medical condition:::measurement:::drug strength:::physiological reaction:::dose:::research activity|
+----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Model Information

Model Name: sbertresolve_ner_model_finder
Compatibility: Healthcare NLP 4.1.0+
License: Licensed
Edition: Official
Input Labels: [sbert_embeddings]
Output Labels: [models]
Language: en
Size: 737.3 KB
Case sensitive: false

References

This model is trained with the data that has the labels of 70 different clinical NER models.