Skip to content

Commit

Permalink
Changed default aggregation_strategy to max (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
omri374 committed Mar 25, 2024
1 parent db8ff82 commit 49a996d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions presidio-analyzer/conf/transformers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ models:
ner_model_configuration:
labels_to_ignore:
- O
aggregation_strategy: simple # "simple", "first", "average", "max"
stride: 16 # If stride >= 0, process long texts in
# overlapping windows of the model max
# length. The value is the length of the
# window overlap in transformer tokenizer
# tokens, NOT the length of the stride.
aggregation_strategy: max # "simple", "first", "average", "max"
stride: 16 # If stride >= 0, process long texts in
# overlapping windows of the model max
# length. The value is the length of the
# window overlap in transformer tokenizer
# tokens, NOT the length of the stride.
alignment_mode: expand # "strict", "contract", "expand"
model_to_presidio_entity_mapping:
PER: PERSON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NerModelConfiguration:
""" # noqa E501

labels_to_ignore: Optional[Collection[str]] = None
aggregation_strategy: Optional[str] = "simple"
aggregation_strategy: Optional[str] = "max"
stride: Optional[int] = 14
alignment_mode: Optional[str] = "expand"
default_score: Optional[float] = 0.85
Expand Down

0 comments on commit 49a996d

Please sign in to comment.