Medical Assertion MPNet Embedding ( jsl )

Description

This model is trained on a list of clinical and biomedical datasets curated in-house

Copy S3 URI

How to use


document_assembler = DocumentAssembler()\
    .setInputCol("text")\
    .setOutputCol("document")

mpnet_embedding = MPNetEmbeddings.pretrained("mpnet_embeddings_medical_assertion_jsl", "en", "clinical/models")\
    .setInputCols(["document"])\
    .setOutputCol("mpnet_embeddings")

pipeline = Pipeline().setStages([document_assembler, mpnet_embedding])

text = [
    ["I feel a bit drowsy after taking an insulin."],
    ["Peter Parker is a nice lad and lives in New York"]
]

data = spark.createDataFrame(text).toDF("text")

result = pipeline.fit(data).transform(data)


val document_assembler = new DocumentAssembler()
    .setInputCol("text")
    .setOutputCol("document")

val mpnet_embedding = MPNetEmbeddings.pretrained("mpnet_embeddings_medical_assertion_jsl", "en", "clinical/models")
    .setInputCols(Array("document"))
    .setOutputCol("mpnet_embeddings")

val pipeline = new Pipeline().setStages(Array(document_assembler, mpnet_embedding))

val result = pipeline.fit(data).transform(data)

Results



|    |  assertion_embedding                                                      |
|---:|:--------------------------------------------------------------------------|
|  0 | [Row(annotatorType='sentence_embeddings', begin=0, end=43, result='I feel a bit drowsy after taking an insulin.', metadata={'sentence': '0'}, embeddings=[-0.014557844027876854, -0.04016261175274849, 0.013381453230977058, 0.07861644774675369, -0.030201803892850876, -0.016034666448831558, ...])]  |
|  1 | [Row(annotatorType='sentence_embeddings', begin=0, end=47, result='Peter Parker is a nice lad and lives in New York', metadata={'sentence': '0'}, embeddings=[-0.019502660259604454, -0.05983254685997963, 0.011300831101834774, 0.00489014433696866, 0.012493547983467579, -0.027176303789019585...])] |


Model Information

Model Name: mpnet_embeddings_medical_assertion_jsl
Compatibility: Healthcare NLP 5.3.2+
License: Licensed
Edition: Official
Input Labels: [document]
Output Labels: [assertion_embedding]
Language: en
Size: 406.9 MB
Case sensitive: false