Skip to content

Commit

Permalink
doc fix in old hc md files (#13025)
Browse files Browse the repository at this point in the history
* doc fix in old hc md files

* Update 2021-03-29-recognize_entities_posology_en.md

* Update 2021-01-18-ner_radiology_en.md

* Update 2022-10-01-assertion_oncology_demographic_binary_wip_en.md

* Update 2021-01-29-deidentify_enriched_clinical_en.md

* updates

* Update 2021-01-29-ner_drugs_large_en.md and 2021-07-23-cantemist_scielowiki_es.md

* Update 2021-01-29-deidentify_enriched_clinical_en.md

* Update 2021-01-18-ner_radiology_en.md

* Update 2021-01-18-re_bodypart_directions_en.md

* Update 2021-01-18-re_bodypart_directions_en.md

* Update 2021-01-18-re_bodypart_problem_en.md

* Update 2021-01-18-re_bodypart_proceduretest_en.md

* Update 2021-01-18-re_date_clinical_en.md

* Update 2021-01-20-ner_deid_augmented_en.md

* Update 2021-01-18-re_bodypart_directions_en.md

* Update 2021-01-18-re_bodypart_problem_en.md

* Update 2021-01-18-re_bodypart_directions_en.md

* Update 2021-01-18-re_bodypart_problem_en.md

* Update 2022-07-28-bert_token_classifier_ner_pathogen_en_3_0.md

* Update 2022-08-13-ner_negation_uncertainty_es_3_0.md

* Update 2022-08-13-ner_pharmacology_es_3_0.md

* Update 2022-08-14-disease_mentions_tweet_es_3_0.md

* Update 2022-09-29-redl_oncology_location_biobert_wip_en.md

* Update 2022-09-30-ner_oncology_diagnosis_wip_en.md

* Update 2022-10-01-assertion_oncology_demographic_binary_wip_en.md

* Update 2022-10-01-assertion_oncology_family_history_wip_en.md

* Update 2022-10-01-assertion_oncology_problem_wip_en.md

* Update 2022-10-01-assertion_oncology_response_to_treatment_wip_en.md

* Update 2022-10-01-assertion_oncology_smoking_status_wip_en.md

* Update 2022-10-01-assertion_oncology_test_binary_wip_en.md

* Update 2022-10-01-assertion_oncology_treatment_binary_wip_en.md

* Update 2022-10-01-assertion_oncology_wip_en.md

* Update 2022-10-11-assertion_oncology_demographic_binary_wip_en.md

* Update 2022-10-11-assertion_oncology_family_history_wip_en.md

* Update 2022-10-11-assertion_oncology_problem_wip_en.md

* Update 2022-10-11-assertion_oncology_response_to_treatment_wip_en.md

* Update 2022-10-11-assertion_oncology_smoking_status_wip_en.md

* Update 2022-10-11-assertion_oncology_treatment_binary_wip_en.md

* Update 2022-10-11-assertion_oncology_wip_en.md

* Update 2022-09-29-redl_oncology_location_biobert_wip_en.md

* Update 2022-10-01-assertion_oncology_family_history_wip_en.md

* Update 2022-10-01-assertion_oncology_problem_wip_en.md

* Update 2022-03-22-bert_token_classifier_drug_development_trials_en_3_0.md

* 2022-06-26-drug_brandname_ndc_mapper_en_3_0.md

* Update 2022-06-26-icd10cm_snomed_mapper_en_3_0.md

* update 2022-06-26-icd10cm_umls_mapper_en_3_0.md

* Update 2022-06-26-icdo_snomed_mapper_en_3_0.md

* Update 2022-06-22-ner_living_species_bert_pt_3_0.md

* Update 2022-06-22-ner_living_species_bert_es_3_0.md

* Update 2022-06-22-ner_living_species_bert_pt_3_0.md

* Update 2022-06-22-ner_living_species_biobert_en_3_0.md

* Update 2022-06-22-ner_living_species_en_3_0.md

* Update 2022-06-22-ner_living_species_es_3_0.md

* Update 2022-06-22-ner_living_species_pt_3_0.md

* Update 2022-06-22-ner_living_species_roberta_es_3_0.md

* Update 2022-06-22-ner_living_species_roberta_pt_3_0.md

* Updated md

* Updates

* Update 2021-01-18-re_bodypart_directions_en.md

Co-authored-by: Cabir C <64752006+Cabir40@users.noreply.github.com>
Co-authored-by: Vildan <64216738+Meryem1425@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 10, 2022
1 parent 73aa5cc commit ef593c8
Show file tree
Hide file tree
Showing 103 changed files with 2,238 additions and 1,954 deletions.
195 changes: 98 additions & 97 deletions docs/_posts/C-K-Loan/2021-03-29-recognize_entities_posology_en.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,98 @@
---
layout: model
title: Recognize Posology Pipeline
author: John Snow Labs
name: recognize_entities_posology
date: 2021-03-29
tags: [ner, named_entity_recognition, pos, parts_of_speech, posology, ner_posology, pipeline, en, licensed]
task: [Named Entity Recognition, Part of Speech Tagging]
language: en
edition: Healthcare NLP 3.0.0
spark_version: 3.0
supported: true
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

This pipeline detects drugs, dosage, form, frequency, duration, route, and drug strength in text.

## Predicted Entities
`DRUG`, `STRENGTH`, `DURATION`, `FREQUENCY`, `FORM`, `DOSAGE`, `ROUTE`.

{:.btn-box}
[Live Demo](https://demo.johnsnowlabs.com/healthcare/NER_POSOLOGY/){:.button.button-orange}
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/1.Clinical_Named_Entity_Recognition_Model.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/recognize_entities_posology_en_3.0.0_3.0_1617042229126.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
from sparknlp.pretrained import PretrainedPipelinein
pipeline = PretrainedPipeline('recognize_entities_posology', lang = 'en')
annotations = pipeline.fullAnnotate(""The patient was perscriped 50MG penicilin for is headache"")[0]
annotations.keys()

```
```scala

val pipeline = new PretrainedPipeline("recognize_entities_posology", lang = "en")
val result = pipeline.fullAnnotate("The patient was perscriped 50MG penicilin for is headache")(0)

```

{:.nlu-block}
```python
import nlu

result_df = nlu.load('ner.posology').predict("The patient was perscriped 50MG penicilin for is headache")
result_df

```
</div>

## Results

```bash
+-----------------------------------------+
|result |
+-----------------------------------------+
|[O, O, O, O, B-Strength, B-Drug, O, O, O]|
+-----------------------------------------+

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|ner |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|[[named_entity, 0, 2, O, [word -> The, confidence -> 1.0], []], [named_entity, 4, 10, O, [word -> patient, confidence -> 0.9993], []], [named_entity, 12, 14, O, [word -> was, confidence -> 1.0], []], [named_entity, 16, 25, O, [word -> perscriped, confidence -> 0.9985], []], [named_entity, 27, 30, B-Strength, [word -> 50MG, confidence -> 0.9966], []], [named_entity, 32, 40, B-Drug, [word -> penicilin, confidence -> 0.9934], []], [named_entity, 42, 44, O, [word -> for, confidence -> 0.9999], []], [named_entity, 46, 47, O, [word -> is, confidence -> 0.9468], []], [named_entity, 49, 56, O, [word -> headache, confidence -> 0.9805], []]]|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+


```
{:.model-param}
## Model Information
{:.table-model}
|---|---|
|Model Name:|recognize_entities_posology|
|Type:|pipeline|
|Compatibility:|Healthcare NLP 3.0.0+|
|License:|Licensed|
|Edition:|Official|
|Language:|en|
## Included Models
- DocumentAssembler
- SentenceDetector
- TokenizerModel
- WordEmbeddingsModel
- NerDLModel
- NerConverter
---
layout: model
title: Recognize Posology Pipeline
author: John Snow Labs
name: recognize_entities_posology
date: 2021-03-29
tags: [ner, named_entity_recognition, pos, parts_of_speech, posology, ner_posology, pipeline, en, licensed]
task: [Named Entity Recognition, Part of Speech Tagging]
language: en
edition: Healthcare NLP 3.0.0
spark_version: 3.0
supported: true
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

This pipeline detects drugs, dosage, form, frequency, duration, route, and drug strength in text.

## Predicted Entities
`DRUG`, `STRENGTH`, `DURATION`, `FREQUENCY`, `FORM`, `DOSAGE`, `ROUTE`.

{:.btn-box}
[Live Demo](https://demo.johnsnowlabs.com/healthcare/NER_POSOLOGY/){:.button.button-orange}
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/1.Clinical_Named_Entity_Recognition_Model.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/recognize_entities_posology_en_3.0.0_3.0_1617042229126.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

## How to use



<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
from sparknlp.pretrained import PretrainedPipelinein
pipeline = PretrainedPipeline('recognize_entities_posology', lang = 'en')
annotations = pipeline.fullAnnotate(""The patient was perscriped 50MG penicilin for is headache"")[0]
annotations.keys()

```
```scala

val pipeline = new PretrainedPipeline("recognize_entities_posology", lang = "en")
val result = pipeline.fullAnnotate("The patient was perscriped 50MG penicilin for is headache")(0)

```

{:.nlu-block}
```python
import nlu

result_df = nlu.load('ner.posology').predict("The patient was perscriped 50MG penicilin for is headache")
result_df

```
</div>

## Results

```bash
+-----------------------------------------+
|result |
+-----------------------------------------+
|[O, O, O, O, B-Strength, B-Drug, O, O, O]|
+-----------------------------------------+

+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|ner |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|[[named_entity, 0, 2, O, [word -> The, confidence -> 1.0], []], [named_entity, 4, 10, O, [word -> patient, confidence -> 0.9993], []], [named_entity, 12, 14, O, [word -> was, confidence -> 1.0], []], [named_entity, 16, 25, O, [word -> perscriped, confidence -> 0.9985], []], [named_entity, 27, 30, B-Strength, [word -> 50MG, confidence -> 0.9966], []], [named_entity, 32, 40, B-Drug, [word -> penicilin, confidence -> 0.9934], []], [named_entity, 42, 44, O, [word -> for, confidence -> 0.9999], []], [named_entity, 46, 47, O, [word -> is, confidence -> 0.9468], []], [named_entity, 49, 56, O, [word -> headache, confidence -> 0.9805], []]]|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+


```
{:.model-param}
## Model Information
{:.table-model}
|---|---|
|Model Name:|recognize_entities_posology|
|Type:|pipeline|
|Compatibility:|Healthcare NLP 3.0.0+|
|License:|Licensed|
|Edition:|Official|
|Language:|en|
## Included Models
- DocumentAssembler
- SentenceDetector
- TokenizerModel
- WordEmbeddingsModel
- NerDLModel
- NerConverter
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ val documentAssembler = DocumentAssembler()


val sentenceDetector = SentenceDetectorDLModel.pretrained()
.setInputCols("document")
.setInputCols(Array("document"))
.setOutputCol("sentence")


val tokenizer = new Tokenizer()
.setInputCols("sentence")
.setInputCols(Array("sentence"))
.setOutputCol("token")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ val document_assembler = new DocumentAssembler()
.setOutputCol("chunk")

val chunkerMapper = ChunkMapperModel.pretrained("drug_brandname_ndc_mapper", "en", "clinical/models")
.setInputCols("chunk")
.setInputCols(Array("chunk"))
.setOutputCol("ndc")
.setRels(Array("Strength_NDC"))
.setLowerCase(True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ val documentAssembler = new DocumentAssembler()
.setOutputCol("ner_chunk")

val sbert_embedder = BertSentenceEmbeddings.pretrained("sbiobert_base_cased_mli", "en", "clinical/models")
.setInputCols("ner_chunk")
.setInputCols(Array("ner_chunk"))
.setOutputCol("sbert_embeddings")

val icd_resolver = SentenceEntityResolverModel.pretrained("sbiobertresolve_icd10cm_augmented_billable_hcc", "en", "clinical/models")
Expand All @@ -82,7 +82,7 @@ val icd_resolver = SentenceEntityResolverModel.pretrained("sbiobertresolve_icd10
.setDistanceFunction("EUCLIDEAN")

val chunkerMapper = ChunkMapperModel.pretrained("icd10cm_snomed_mapper", "en","clinical/models")
.setInputCols("icd10cm_code")
.setInputCols(Array("icd10cm_code"))
.setOutputCol("mappings")
.setRels(Array("snomed_code"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ val documentAssembler = new DocumentAssembler()

val sbert_embedder = BertSentenceEmbeddings
.pretrained("sbiobert_base_cased_mli", "en", "clinical/models")
.setInputCols("ner_chunk")
.setInputCols(Array("ner_chunk"))
.setOutputCol("sbert_embeddings")

val icd10cm_resolver = SentenceEntityResolverModel
Expand All @@ -88,7 +88,7 @@ val icd10cm_resolver = SentenceEntityResolverModel

val chunkerMapper = ChunkMapperModel
.pretrained("icd10cm_umls_mapper", "en", "clinical/models")
.setInputCols("rxnorm_code")
.setInputCols(Array("rxnorm_code"))
.setOutputCol("umls_mappings")
.setRels(Array("umls_code"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ val documentAssembler = new DocumentAssembler()

val sbert_embedder = BertSentenceEmbeddings
.pretrained("sbiobert_base_cased_mli", "en", "clinical/models")
.setInputCols("ner_chunk")
.setInputCols(Array("ner_chunk"))
.setOutputCol("sbert_embeddings")

val icdo_resolver = SentenceEntityResolverModel
Expand All @@ -89,7 +89,7 @@ val icdo_resolver = SentenceEntityResolverModel

val chunkerMapper = ChunkMapperModel
.pretrained("icdo_snomed_mapper", "en", "clinical/models")
.setInputCols("icdo_code")
.setInputCols(Array("icdo_code"))
.setOutputCol("snomed_mappings")
.setRels(Array("snomed_code"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ chunkerMapper_action = ChunkMapperModel.pretrained("drug_action_treatment_mapper
.setRels(["action"])\
.setLowerCase(True)

chunkerMapper_treatment = ChunkMapperModel.pretrained("drug_action_treatment_mapper", , "en", "clinical/models")\
chunkerMapper_treatment = ChunkMapperModel.pretrained("drug_action_treatment_mapper", "en", "clinical/models")\
.setInputCols(["ner_chunk"])\
.setOutputCol("treatment_mappings")\
.setRels(["treatment"])\
Expand Down Expand Up @@ -126,7 +126,7 @@ val chunkerMapper_action = ChunkMapperModel.pretrained("drug_action_treatment_ma
.setRels(Array("action"))
.setLowerCase(True)

val chunkerMapper_treatment = ChunkMapperModel.pretrained("drug_action_treatment_mapper", , "en", "clinical/models")
val chunkerMapper_treatment = ChunkMapperModel.pretrained("drug_action_treatment_mapper", "en", "clinical/models")
.setInputCols(Array("ner_chunk"))
.setOutputCol("treatment_mappings")
.setRels(Array("treatment"))
Expand Down
Loading

0 comments on commit ef593c8

Please sign in to comment.