From 7291d59b449374de21b8a72dcbf88cef878f9071 Mon Sep 17 00:00:00 2001 From: Akar <67700732+akrztrk@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:02:21 +0100 Subject: [PATCH] updated md cards (#860) --- ...6-17-explain_clinical_doc_medication_en.md | 21 +++++++++------- ...7-re_bodypart_proceduretest_pipeline_en.md | 11 ++++++--- ...3-04-03-summarizer_biomedical_pubmed_en.md | 2 +- ...-04-03-summarizer_clinical_questions_en.md | 2 +- ...8-16-summarizer_clinical_laymen_onnx_en.md | 2 +- ...023-05-31-summarizer_clinical_laymen_en.md | 3 ++- ...3-06-13-re_test_result_date_pipeline_en.md | 15 ++++++++---- ...2023-06-22-icd10cm_resolver_pipeline_en.md | 10 ++++---- ...2022-12-01-oncology_therapy_pipeline_en.md | 11 +++++---- .../murat-gunay/2020-09-01-posology_re.md | 24 +++++++++++++++---- 10 files changed, 66 insertions(+), 35 deletions(-) diff --git a/docs/_posts/C-K-Loan/2023-06-17-explain_clinical_doc_medication_en.md b/docs/_posts/C-K-Loan/2023-06-17-explain_clinical_doc_medication_en.md index 56f1516387..ed43d80c84 100644 --- a/docs/_posts/C-K-Loan/2023-06-17-explain_clinical_doc_medication_en.md +++ b/docs/_posts/C-K-Loan/2023-06-17-explain_clinical_doc_medication_en.md @@ -68,6 +68,7 @@ nlu.load("en.explain_dco.clinical_medication.pipeline").predict("""The patient i ## Results ```bash +# ner_chunk +----+----------------+------------+ | | chunks | entities | |---:|:---------------|:-----------| @@ -84,15 +85,17 @@ nlu.load("en.explain_dco.clinical_medication.pipeline").predict("""The patient i | 10 | at bedtime | FREQUENCY | +----+----------------+------------+ -+----+----------+------------+-------------+ -| | chunks | entities | assertion | -|---:|:---------|:-----------|:------------| -| 0 | insulin | DRUG | Present | -| 1 | Bactrim | DRUG | Past | -| 2 | Fragmin | DRUG | Planned | -| 3 | Lantus | DRUG | Planned | -+----+----------+------------+-------------+ - +# assertion ++---+---------+----------+-----------+ +| | chunks | entities | assertion | +|--:|--------:|---------:|----------:| +| 0 | insulin | DRUG | Family | +| 1 | Bactrim | DRUG | Past | +| 2 | Fragmin | DRUG | Planned | +| 3 | Lantus | DRUG | Past | ++---+---------+----------+-----------+ + +# relation +----------------+-----------+------------+-----------+----------------+ | relation | entity1 | chunk1 | entity2 | chunk2 | |:---------------|:----------|:-----------|:----------|:---------------| diff --git a/docs/_posts/C-K-Loan/2023-06-17-re_bodypart_proceduretest_pipeline_en.md b/docs/_posts/C-K-Loan/2023-06-17-re_bodypart_proceduretest_pipeline_en.md index 3a5af04e08..6508f10346 100644 --- a/docs/_posts/C-K-Loan/2023-06-17-re_bodypart_proceduretest_pipeline_en.md +++ b/docs/_posts/C-K-Loan/2023-06-17-re_bodypart_proceduretest_pipeline_en.md @@ -64,9 +64,14 @@ nlu.load("en.relation.bodypart_proceduretest.pipeline").predict("""TECHNIQUE IN ## Results ```bash -| index | relations | entity1 | entity1_begin | entity1_end | chunk1 | entity2 | entity2_end | entity2_end | chunk2 | confidence | -|-------|-----------|------------------------------|---------------|-------------|--------|---------|-------------|-------------|---------------------|------------| -| 0 | 1 | External_body_part_or_region | 94 | 98 | chest | Test | 117 | 135 | portable ultrasound | 1.0 | +| | sentence | entity1_begin | entity1_end | chunk1 | entity1 | entity2_begin | entity2_end | chunk2 | entity2 | relation | confidence | +|--:|---------:|--------------:|------------:|---------------------:|-----------------------------:|--------------:|------------:|--------------------:|-----------------------------:|---------:|-----------:| +| 0 | 0 | 0 | 19 | TECHNIQUE IN DETAIL: | Section_Header | 78 | 87 | his mother | Gender | 1 | 0.9999987 | +| 1 | 0 | 0 | 19 | TECHNIQUE IN DETAIL: | Section_Header | 94 | 98 | chest | External_body_part_or_region | 1 | 0.9999529 | +| 2 | 0 | 0 | 19 | TECHNIQUE IN DETAIL: | Section_Header | 117 | 135 | portable ultrasound | Test | 1 | 0.9999838 | +| 3 | 0 | 78 | 87 | his mother | Gender | 94 | 98 | chest | External_body_part_or_region | 1 | 1.0 | +| 4 | 0 | 78 | 87 | his mother | Gender | 117 | 135 | portable ultrasound | Test | 1 | 0.9999982 | +| 5 | 0 | 94 | 98 | chest | External_body_part_or_region | 117 | 135 | portable ultrasound | Test | 1 | 1.0 | ``` {:.model-param} diff --git a/docs/_posts/Cabir40/2023-04-03-summarizer_biomedical_pubmed_en.md b/docs/_posts/Cabir40/2023-04-03-summarizer_biomedical_pubmed_en.md index 26861c9fc0..30040e2cd2 100644 --- a/docs/_posts/Cabir40/2023-04-03-summarizer_biomedical_pubmed_en.md +++ b/docs/_posts/Cabir40/2023-04-03-summarizer_biomedical_pubmed_en.md @@ -19,7 +19,7 @@ use_language_switcher: "Python-Scala-Java" ## Description -This model is a modified version of Flan-T5 (LLM) based summarization model that is finetuned with biomedical datasets (Pubmed abstracts) by John Snow Labs.  It can generate summaries up to 512 tokens given an input text (max 1024 tokens). +This model is a modified version of LLM based summarization model that is finetuned with biomedical datasets (Pubmed abstracts) by John Snow Labs.  It can generate summaries up to 512 tokens given an input text (max 1024 tokens). {:.btn-box} [Live Demo](https://demo.johnsnowlabs.com/healthcare/BIOMEDICAL_TEXT_SUMMARIZATION/){:.button.button-orange} diff --git a/docs/_posts/Cabir40/2023-04-03-summarizer_clinical_questions_en.md b/docs/_posts/Cabir40/2023-04-03-summarizer_clinical_questions_en.md index 071f4d6e1c..cb508ce4af 100644 --- a/docs/_posts/Cabir40/2023-04-03-summarizer_clinical_questions_en.md +++ b/docs/_posts/Cabir40/2023-04-03-summarizer_clinical_questions_en.md @@ -19,7 +19,7 @@ use_language_switcher: "Python-Scala-Java" ## Description -This model is a modified version of Flan-T5 (LLM) based summarization model that is finetuned with medical questions exchanged in clinical mediums (clinic, email, call center etc.) by John Snow Labs.  It can generate summaries up to 512 tokens given an input text (max 1024 tokens). +This model is a modified version of LLM based summarization model that is finetuned with medical questions exchanged in clinical mediums (clinic, email, call center etc.) by John Snow Labs.  It can generate summaries up to 512 tokens given an input text (max 1024 tokens). {:.btn-box} [Live Demo](https://demo.johnsnowlabs.com/healthcare/MEDICAL_TEXT_SUMMARIZATION_QA/){:.button.button-orange} diff --git a/docs/_posts/Cabir40/2023-08-16-summarizer_clinical_laymen_onnx_en.md b/docs/_posts/Cabir40/2023-08-16-summarizer_clinical_laymen_onnx_en.md index bc568d8651..c6b5b1d593 100644 --- a/docs/_posts/Cabir40/2023-08-16-summarizer_clinical_laymen_onnx_en.md +++ b/docs/_posts/Cabir40/2023-08-16-summarizer_clinical_laymen_onnx_en.md @@ -19,7 +19,7 @@ use_language_switcher: "Python-Scala-Java" ## Description -This model is a modified version of Flan-T5 (LLM) based summarization model that is finetuned with custom dataset by John Snow Labs to avoid using clinical jargon on the summaries. It can generate summaries up to 512 tokens given an input text (max 1024 tokens). +This model is a modified version of LLM based summarization model that is finetuned with custom dataset by John Snow Labs to avoid using clinical jargon on the summaries. It can generate summaries up to 512 tokens given an input text (max 1024 tokens). ## Predicted Entities diff --git a/docs/_posts/Meryem1425/2023-05-31-summarizer_clinical_laymen_en.md b/docs/_posts/Meryem1425/2023-05-31-summarizer_clinical_laymen_en.md index 9408b139ef..e3e3ef8b7a 100644 --- a/docs/_posts/Meryem1425/2023-05-31-summarizer_clinical_laymen_en.md +++ b/docs/_posts/Meryem1425/2023-05-31-summarizer_clinical_laymen_en.md @@ -19,7 +19,7 @@ use_language_switcher: "Python-Scala-Java" ## Description -This model is a modified version of Flan-T5 (LLM) based summarization model that is finetuned with custom dataset by John Snow Labs to avoid using clinical jargon on the summaries. It can generate summaries up to 512 tokens given an input text (max 1024 tokens). +This model is a modified version of LLM based summarization model that is finetuned with custom dataset by John Snow Labs to avoid using clinical jargon on the summaries. It can generate summaries up to 512 tokens given an input text (max 1024 tokens). ## Predicted Entities @@ -37,6 +37,7 @@ This model is a modified version of Flan-T5 (LLM) based summarization model that
{% include programmingLanguageSelectScalaPythonNLU.html %} + ```python document_assembler = DocumentAssembler()\ .setInputCol("text")\ diff --git a/docs/_posts/ahmedlone127/2023-06-13-re_test_result_date_pipeline_en.md b/docs/_posts/ahmedlone127/2023-06-13-re_test_result_date_pipeline_en.md index faf1223fc0..43a3683cdf 100644 --- a/docs/_posts/ahmedlone127/2023-06-13-re_test_result_date_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-06-13-re_test_result_date_pipeline_en.md @@ -63,11 +63,16 @@ nlu.load("en.relation.date_test_result.pipeline").predict("""He was advised ches ## Results ```bash -| index | relations | entity1 | chunk1 | entity2 | chunk2 | -|-------|--------------|--------------|---------------------|--------------|---------| -| 0 | O | TEST | chest X-ray | MEASUREMENTS | 93% | -| 1 | O | TEST | CT scan | MEASUREMENTS | 93% | -| 2 | is_result_of | TEST | SpO2 | MEASUREMENTS | 93% | +| | sentence | entity1_begin | entity1_end | chunk1 | entity1 | entity2_begin | entity2_end | chunk2 | entity2 | relation | confidence | +|--:|---------:|--------------:|------------:|------------:|--------:|--------------:|------------:|------------:|------------:|--------------:|-----------:| +| 0 | 0 | 0 | 1 | He | Gender | 15 | 25 | chest X-ray | Test | is_finding_of | 0.9991597 | +| 1 | 0 | 0 | 1 | He | Gender | 30 | 36 | CT scan | Test | is_finding_of | 1.0 | +| 2 | 0 | 15 | 25 | chest X-ray | Test | 30 | 36 | CT scan | Test | is_finding_of | 1.0 | +| 3 | 0 | 30 | 36 | CT scan | Test | 53 | 55 | his | Gender | is_finding_of | 1.0 | +| 4 | 0 | 30 | 36 | CT scan | Test | 57 | 60 | SpO2 | Test | is_finding_of | 1.0 | +| 5 | 0 | 53 | 55 | his | Gender | 57 | 60 | SpO2 | Test | is_date_of | 0.98956 | +| 6 | 0 | 53 | 55 | his | Gender | 75 | 77 | 93% | Test_Result | is_date_of | 0.9999974 | +| 7 | 0 | 57 | 60 | SpO2 | Test | 75 | 77 | 93% | Test_Result | is_result_of | 0.92868817 | ``` {:.model-param} diff --git a/docs/_posts/ahmedlone127/2023-06-22-icd10cm_resolver_pipeline_en.md b/docs/_posts/ahmedlone127/2023-06-22-icd10cm_resolver_pipeline_en.md index e12169e260..3199fc38bf 100644 --- a/docs/_posts/ahmedlone127/2023-06-22-icd10cm_resolver_pipeline_en.md +++ b/docs/_posts/ahmedlone127/2023-06-22-icd10cm_resolver_pipeline_en.md @@ -66,11 +66,11 @@ nlu.load("en.icd10cm_resolver.pipeline").predict("""A 28-year-old female with a ## Results ```bash -|chunk |ner_chunk|icd10cm_code| -+-----------------------------+---------+------------+ -|gestational diabetes mellitus|PROBLEM |O24.919 | -|anisakiasis |PROBLEM |B81.0 | -|fetal and neonatal hemorrhage|PROBLEM |P545 | +| | chunks | entities | icd10cm_code | +|--:|------------------------------:|---------:|-------------:| +| 0 | gestational diabetes mellitus | PROBLEM | O24.919 | +| 1 | anisakiasis | PROBLEM | B81.0 | +| 2 | fetal and neonatal hemorrhage | PROBLEM | P549 | ``` {:.model-param} diff --git a/docs/_posts/mauro-nievoff/2022-12-01-oncology_therapy_pipeline_en.md b/docs/_posts/mauro-nievoff/2022-12-01-oncology_therapy_pipeline_en.md index f4f86d18ce..c5d716e42d 100644 --- a/docs/_posts/mauro-nievoff/2022-12-01-oncology_therapy_pipeline_en.md +++ b/docs/_posts/mauro-nievoff/2022-12-01-oncology_therapy_pipeline_en.md @@ -33,6 +33,7 @@ This pipeline includes Named-Entity Recognition and Assertion Status models to e
{% include programmingLanguageSelectScalaPythonNLU.html %} + ```python from sparknlp.pretrained import PretrainedPipeline @@ -112,11 +113,11 @@ nlu.load("en.oncology_therpay.pipeline").predict("""The patient underwent a mast ******************** assertion_oncology_treatment_binary_wip results ******************** -| chunk | ner_label | assertion | -|:-----------------|:---------------|:----------------| -| mastectomy | Cancer_Surgery | Present_Or_Past | -| adriamycin | Chemotherapy | Present_Or_Past | -| cyclophosphamide | Chemotherapy | Present_Or_Past | +| | chunks | entities | assertion | +|--:|-----------------:|---------------:|----------:| +| 0 | mastectomy | Cancer_Surgery | Past | +| 1 | adriamycin | Chemotherapy | Present | +| 2 | cyclophosphamide | Chemotherapy | Present | ``` {:.model-param} diff --git a/docs/_posts/murat-gunay/2020-09-01-posology_re.md b/docs/_posts/murat-gunay/2020-09-01-posology_re.md index fb9aa8571c..aec29b3159 100644 --- a/docs/_posts/murat-gunay/2020-09-01-posology_re.md +++ b/docs/_posts/murat-gunay/2020-09-01-posology_re.md @@ -75,7 +75,16 @@ reModel = RelationExtractionModel()\ .setOutputCol("relations")\ .setMaxSyntacticDistance(4) -pipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, words_embedder, pos_tagger, ner_tagger, ner_chunker, dependency_parser, reModel]) +pipeline = Pipeline(stages=[ + document_assembler, + sentence_detector, + tokenizer, + words_embedder, + pos_tagger, + ner_tagger, + ner_chunker, + dependency_parser, + reModel]) empty_data = spark.createDataFrame([[""]]).toDF("text") @@ -84,7 +93,6 @@ model = pipeline.fit(empty_data) light_pipeline = LightPipeline(model) result = light_pipeline.fullAnnotate("The patient was prescribed 1 unit of Advil for 5 days after meals. The patient was also given 1 unit of Metformin daily. He was seen by the endocrinology service and she was discharged on 40 units of insulin glargine at night, 12 units of insulin lispro with meals, and metformin 1000 mg two times a day.") - ``` ```scala @@ -130,7 +138,16 @@ val re_Model = RelationExtractionModel() .setOutputCol("relations") .setMaxSyntacticDistance(4) -val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, words_embedder, pos_tagger, ner_tagger, ner_chunker, dependecy_parser, re_Model)) +val pipeline = new Pipeline().setStages(Array( + document_assembler, + sentence_detector, + tokenizer, + words_embedder, + pos_tagger, + ner_tagger, + ner_chunker, + dependecy_parser, + re_Model)) val data = Seq("The patient was prescribed 1 unit of Advil for 5 days after meals. The patient was also given 1 unit of Metformin daily. He was seen by the endocrinology service and she was discharged on 40 units of insulin glargine at night, 12 units of insulin lispro with meals, and metformin 1000 mg two times a day.").toDS.toDF("text") @@ -138,7 +155,6 @@ val result = pipeline.fit(data).transform(data) ```
-{:.h2_title} ## Results ```bash