Skip to content

Commit

Permalink
Update utility_helper_modules.md (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mellahysf committed May 2, 2023
1 parent 0654a10 commit ed45149
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions docs/en/utility_helper_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,8 @@ from sparknlp_jsl import Deid

deid_implementor= Deid(
# required: Spark session with spark-nlp-jsl jar
spark
)
spark,

res= deid_implementor.deidentify(
# required: The path of the input file. Default is None. File type must be 'csv' or 'json'.
input_file_path="data.csv",

Expand Down Expand Up @@ -422,6 +420,9 @@ token="token",
#optional: Date shift column name. Default is "date_shift".
#date_shift_column_name= "date_shift"

#optional: Json file path for multi-mode Deid. Default is NONE.
#multi_mode_file_path= "multi_mode_file_path.json"

#optional: The date tag. Default is "DATE".
#date_tag="DATE"

Expand Down Expand Up @@ -450,6 +451,8 @@ token="token",
#unnormalized_mode="obfuscate"
)

res= deid_implementor.deidentify()

```

```
Expand All @@ -470,10 +473,8 @@ from sparknlp_jsl import Deid

deid_implementor= Deid(
# required: Spark session with spark-nlp-jsl jar
spark
)
spark,

res= deid_implementor.deidentify(
# required: The path of the input file. Default is None. File type must be 'csv' or 'json'.
input_file_path="data.csv",

Expand All @@ -489,6 +490,9 @@ fields={"text": "mask"},
#optional: The masking policy. Default is "entity_labels".
masking_policy="entity_labels",

#optional: Json file path for multi-mode Deid. Default is NONE.
#multi_mode_file_path= "multi_mode_file_path.json",

#optional: Age group obfuscation. Default is False.
#age_group_obfuscation=True

Expand All @@ -508,6 +512,8 @@ masking_policy="entity_labels",
#unnormalized_mode="obfuscate"
)

res= deid_implementor.deidentify()

```

```
Expand All @@ -525,14 +531,11 @@ masking_policy="entity_labels",

```python

from sparknlp_jsl import Deid
from sparknlp_jsl.utils.deidentification_utils import structured_deidentifier

deid_implementor= Deid(
res= structured_deidentifier(
# required: Spark session with spark-nlp-jsl jar
spark
)

res= deid_implementor.structured_deidentifier(

#required: The path of the input file. Default is None. File type must be 'csv' or 'json'.
input_file_path="data.csv",
Expand Down

0 comments on commit ed45149

Please sign in to comment.